Vineet Gupta
9d5f2c151e
ARC: udelay: fix inline assembler by adding LP_COUNT to clobber list
...
commit 36425cd67052e3becf325fd4d3ba5691791ef7e4 upstream.
commit 3c7c7a2fc8 ("ARC: Don't use "+l" inline asm constraint")
modified the inline assembly to setup LP_COUNT register manually and NOT
rely on gcc to do it (with the +l inline assembler contraint hint, now
being retired in the compiler)
However the fix was flawed as we didn't add LP_COUNT to asm clobber list,
meaning gcc doesn't know that LP_COUNT or zero-delay-loops are in action
in the inline asm.
This resulted in some fun - as nested ZOL loops were being generared
| mov lp_count,250000 ;16 # tmp235,
| lp .L__GCC__LP14 # <======= OUTER LOOP (gcc generated)
| .L14:
| ld r2, [r5] # MEM[(volatile u32 *)prephitmp_43], w
| dmb 1
| breq r2, -1, @.L21 #, w,,
| bbit0 r2,1,@.L13 # w,,
| ld r4,[r7] ;25 # loops_per_jiffy, loops_per_jiffy
| mpymu r3,r4,r6 #, loops_per_jiffy, tmp234
|
| mov lp_count, r3 # <====== INNER LOOP (from inline asm)
| lp 1f
| nop
| 1:
| nop_s
| .L__GCC__LP14: ; loop end, start is @.L14 #,
This caused issues with drivers relying on sane behaviour of udelay
friends.
With LP_COUNT added to clobber list, gcc doesn't generate the outer
loop in say above case.
Addresses STAR 9001146134
Reported-by: Joao Pinto <jpinto@synopsys.com>
Fixes: 3c7c7a2fc8 ("ARC: Don't use "+l" inline asm constraint")
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-01 08:33:08 +01:00
..
arcregs.h
ARC: change return value of userspace cmpxchg assist syscall
2016-11-07 11:01:12 -08:00
asm-offsets.h
atomic.h
ARC: [plat-eznps] add missing atomic_fetch_xxx operations
2016-09-30 14:48:18 -07:00
barrier.h
ARC: [plat-eznps] Use dedicated SMP barriers
2016-05-09 09:32:33 +05:30
bitops.h
ARC: [plat-eznps] Use dedicated atomic/bitops/cmpxchg
2016-05-09 09:32:33 +05:30
bug.h
ARC: BUG() dumps stack after @msg (@msg now same as in generic BUG))
2014-10-13 14:46:18 +05:30
cache.h
ARCv2: IOC: use @ioc_enable not @ioc_exist where intended
2016-10-24 09:24:47 -07:00
cacheflush.h
ARC: mm: arc700: Don't assume 2 colours for aliasing VIPT dcache
2017-01-09 08:32:21 +01:00
checksum.h
ipv4: Update parameters for csum_tcpudp_magic to their original types
2016-03-13 23:55:13 -04:00
cmpxchg.h
ARC: [plat-eznps] Use dedicated atomic/bitops/cmpxchg
2016-05-09 09:32:33 +05:30
current.h
ARC: remove extraneous __KERNEL__ guards
2014-10-13 14:46:20 +05:30
delay.h
ARC: udelay: fix inline assembler by adding LP_COUNT to clobber list
2017-02-01 08:33:08 +01:00
disasm.h
ARC: disassembly (needed by kprobes/kgdb/unaligned-access-emul)
2013-02-15 23:16:04 +05:30
dma-mapping.h
ARC: dma: reintroduce platform specific dma<->phys
2016-03-19 14:34:09 +05:30
dma.h
ARC: Add PCI support
2016-03-10 14:44:13 -06:00
dwarf.h
ARC: dw2 unwind: add infrastructure for adding cfi pseudo ops to asm
2016-09-30 14:48:22 -07:00
elf.h
ARC: fix build warning in elf.h
2016-10-19 14:38:53 -07:00
entry-arcv2.h
ARCv2: Support for ARCv2 ISA and HS38x cores
2015-06-22 14:06:55 +05:30
entry-compact.h
Fix typos
2016-05-30 10:07:32 +05:30
entry.h
ARC: use correct offset in pt_regs for saving/restoring user mode r25
2016-08-19 10:44:13 -07:00
exec.h
ARC: Fundamental ARCH data-types/defines
2013-02-11 20:00:34 +05:30
fb.h
arc: Add our own implementation of fb_pgprotect()
2016-04-07 14:59:09 +05:30
futex.h
ARC: change some branchs to jumps to resolve linkage errors
2015-08-20 18:53:15 +05:30
highmem.h
ARC: mm: HIGHMEM: kmap API implementation
2015-10-28 19:49:04 +05:30
hugepage.h
arch: fix has_transparent_hugepage()
2016-05-19 19:12:14 -07:00
io.h
ARC: Add missing io barriers to io{read,write}{16,32}be()
2016-05-05 16:35:28 +05:30
irq.h
ARC: irq: export some IRQs again
2016-05-09 09:32:30 +05:30
irqflags-arcv2.h
ARCv2: fix local_save_flags
2016-09-30 14:48:25 -07:00
irqflags-compact.h
ARC: Call trace_hardirqs_on() before enabling irqs
2016-08-10 10:14:07 -07:00
irqflags.h
ARCv2: Support for ARCv2 ISA and HS38x cores
2015-06-22 14:06:55 +05:30
Kbuild
PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for ARC
2016-09-06 10:53:32 -05:00
kdebug.h
ARC: Fundamental ARCH data-types/defines
2013-02-11 20:00:34 +05:30
kgdb.h
ARC: Update order of registers in KGDB to match GDB 7.5
2014-10-13 14:46:20 +05:30
kmap_types.h
ARC: mm: HIGHMEM: kmap API implementation
2015-10-28 19:49:04 +05:30
kprobes.h
ARC: Remove explicit passing around of ECR
2013-06-26 15:30:50 +05:30
linkage.h
ARC: dw2 unwind: add infrastructure for adding cfi pseudo ops to asm
2016-09-30 14:48:22 -07:00
mach_desc.h
ARC: smp: Rename platform hook @init_cpu_smp -> @init_per_cpu
2015-12-17 12:56:56 +05:30
mcip.h
ARCv2: intc: untangle SMP, MCIP and IDU
2016-10-16 15:49:07 -07:00
mmu.h
ARC: mm: PAE40 support
2015-10-29 18:41:30 +05:30
mmu_context.h
Fix typos
2016-05-30 10:07:32 +05:30
mmzone.h
ARC: support HIGHMEM even without PAE40
2016-05-05 16:35:46 +05:30
module.h
ARC: module: Fix !CONFIG_ARC_DW2_UNWIND builds
2017-01-26 08:24:37 +01:00
mutex.h
ARC: SMP support
2013-02-15 23:16:02 +05:30
page.h
ARC: pae: STRICT_MM_TYPECHECKS was broken
2016-05-13 09:16:09 +05:30
pci.h
ARC: Add PCI support
2016-03-10 14:44:13 -06:00
perf_event.h
arc: perf: Enable generic "cache-references" and "cache-misses" events
2016-09-30 14:48:18 -07:00
pgalloc.h
arc: get rid of superfluous __GFP_REPEAT
2016-06-24 17:23:52 -07:00
pgtable.h
ARC: mm: PAE40: Fix crash at munmap
2016-11-29 09:12:08 -08:00
processor.h
Fix typos
2016-05-30 10:07:32 +05:30
ptrace.h
ARC: Make pt_regs regs unsigned
2015-08-05 11:48:21 +05:30
sections.h
of/fdt: consolidate built-in dtb section variables
2014-04-30 00:59:13 -05:00
segment.h
ARC: uaccess friends
2013-02-11 20:00:31 +05:30
serial.h
ARC: Dynamically determine BASE_BAUD from DeviceTree
2015-02-02 17:08:37 +05:30
setup.h
ARC: boot log: refactor cpu name/release printing
2016-10-28 10:09:07 -07:00
shmparam.h
ARC: [mm] Aliasing VIPT dcache support 4/4
2013-05-09 22:00:57 +05:30
smp.h
ARC: IRQ: Do not use hwirq as virq and vice versa
2016-11-08 12:05:10 -08:00
spinlock.h
locking/spinlock, arch: Update and fix spin_unlock_wait() implementations
2016-06-14 11:55:15 +02:00
spinlock_types.h
ARC: LLOCK/SCOND based rwlock
2015-08-04 09:26:33 +05:30
stacktrace.h
ARC: Make arc_unwind_core accessible externally
2015-02-27 10:15:00 +05:30
string.h
ARC: remove extraneous __KERNEL__ guards
2014-10-13 14:46:20 +05:30
switch_to.h
ARC: Process-creation/scheduling/idle-loop
2013-02-11 20:00:38 +05:30
syscall.h
ARC: stop using pt_regs->orig_r8
2013-06-22 19:23:26 +05:30
syscalls.h
ARC: syscall for userspace cmpxchg assist
2016-10-24 09:24:26 -07:00
thread_info.h
Fix typos
2016-05-30 10:07:32 +05:30
timex.h
ARC: Timers/counters/delay management
2013-02-11 20:00:39 +05:30
tlb-mmu1.h
ARC: Disintegrate arcregs.h
2013-06-22 13:46:42 +05:30
tlb.h
ARC: Disintegrate arcregs.h
2013-06-22 13:46:42 +05:30
tlbflush.h
ARC: thp: unbork !CONFIG_TRANSPARENT_HUGEPAGE build
2016-03-17 15:31:45 +05:30
uaccess.h
ARC: uaccess: get_user to zero out dest in cause of fault
2016-09-13 17:49:41 -04:00
unaligned.h
ARC: rename kconfig option for unaligned emulation
2014-10-13 14:46:15 +05:30
unwind.h
ARC: dw2 unwind: Reinstante unwinding out of modules
2015-12-17 11:10:23 +05:30