linux_dsm_epyc7002/arch/arc/include/asm
Vineet Gupta 36425cd670 ARC: udelay: fix inline assembler by adding LP_COUNT to clobber list
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")
Cc: stable@vger.kernel.org
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2017-01-24 10:54:24 -08:00
..
arcregs.h ARC: mm: No need to save cache version in @cpuinfo 2016-12-19 11:54:41 -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
bitops.h
bug.h
cache.h ARCv2: IOC: Adhere to progamming model guidelines to avoid DMA corruption 2017-01-18 14:48:33 -08:00
cacheflush.h ARC: mm: arc700: Don't assume 2 colours for aliasing VIPT dcache 2016-12-19 11:55:17 -08:00
checksum.h
cmpxchg.h
current.h
delay.h ARC: udelay: fix inline assembler by adding LP_COUNT to clobber list 2017-01-24 10:54:24 -08:00
disasm.h
dma-mapping.h
dma.h
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: save r30 on kernel entry as gcc uses it for code-gen 2017-01-10 11:51:33 -08:00
entry-compact.h
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
fb.h
futex.h
highmem.h
hugepage.h
io.h
irq.h
irqflags-arcv2.h ARCv2: intc: default all interrupts to priority 1 2016-12-14 09:23:46 -08:00
irqflags-compact.h ARC: Call trace_hardirqs_on() before enabling irqs 2016-08-10 10:14:07 -07:00
irqflags.h
Kbuild PCI/MSI: Enable PCI_MSI_IRQ_DOMAIN support for ARC 2016-09-06 10:53:32 -05:00
kdebug.h
kgdb.h
kmap_types.h
kprobes.h
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
mmu_context.h
mmu.h
mmzone.h
module.h ARC: module: Fix !CONFIG_ARC_DW2_UNWIND builds 2017-01-18 11:17:44 -08:00
page.h
pci.h
perf_event.h arc: perf: Enable generic "cache-references" and "cache-misses" events 2016-09-30 14:48:18 -07:00
pgalloc.h
pgtable.h ARC: mm: PAE40: Fix crash at munmap 2016-11-29 09:12:08 -08:00
processor.h locking/core: Provide common cpu_relax_yield() definition 2016-11-17 08:17:36 +01:00
ptrace.h ARCv2: save r30 on kernel entry as gcc uses it for code-gen 2017-01-10 11:51:33 -08:00
sections.h
segment.h
serial.h
setup.h ARCv2: IOC: Use actual memory size to setup aperture size 2017-01-18 14:52:43 -08:00
shmparam.h
smp.h ARC: IRQ: Do not use hwirq as virq and vice versa 2016-11-08 12:05:10 -08:00
spinlock_types.h
spinlock.h
stacktrace.h
string.h
switch_to.h
syscall.h
syscalls.h ARC: syscall for userspace cmpxchg assist 2016-10-24 09:24:26 -07:00
thread_info.h
timex.h
tlb-mmu1.h
tlb.h
tlbflush.h
uaccess.h ARC: uaccess: get_user to zero out dest in cause of fault 2016-09-13 17:49:41 -04:00
unaligned.h
unwind.h