linux-kernel-test/include
Satyam Sharma 62be90012c i386: Fix a couple busy loops in mach_wakecpu.h:wait_for_init_deassert()
Use cpu_relax() in the busy loops, as atomic_read() doesn't automatically
imply volatility for i386 and x86_64. x86_64 doesn't have this issue because
it open-codes the while loop in smpboot.c:smp_callin() itself that already
uses cpu_relax().

For i386, however, smpboot.c:smp_callin() calls wait_for_init_deassert()
which is buggy for mach-default and mach-es7000 cases.

[ I test-built a kernel -- smp_callin() itself got inlined in its only
  callsite, smpboot.c:start_secondary() -- and the relevant piece of
  code disassembles to the following:

0xc1019704 <start_secondary+12>:        mov    0xc144c4c8,%eax
0xc1019709 <start_secondary+17>:        test   %eax,%eax
0xc101970b <start_secondary+19>:        je     0xc1019709 <start_secondary+17>

  init_deasserted (at 0xc144c4c8) gets fetched into %eax only once and
  then we loop over the test of the stale value in the register only,
  so these look like real bugs to me. With the fix below, this becomes:

0xc1019706 <start_secondary+14>:        pause
0xc1019708 <start_secondary+16>:        cmpl   $0x0,0xc144c4c8
0xc101970f <start_secondary+23>:        je     0xc1019706 <start_secondary+14>

  which looks nice and healthy. ]

Thanks to Heiko Carstens for noticing this.

Signed-off-by: Satyam Sharma <satyam@infradead.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-08-18 09:54:44 -07:00
..
acpi acpi-cpufreq: Fix some x86/x86-64 acpi-cpufreq driver issues 2007-08-07 18:40:30 -04:00
asm-alpha Fix Alpha O_CLOEXEC definition 2007-08-09 08:39:22 -07:00
asm-arm [ARM] 4531/1: remove is_in_rom() protptype 2007-08-04 22:13:43 +01:00
asm-avr32 [AVR32] Define mmiowb() 2007-08-15 16:36:56 +02:00
asm-blackfin remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-cris remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-frv FRV: connect up fallocate 2007-08-11 15:47:40 -07:00
asm-generic changing include/asm-generic/pgtable.h for non-mmu 2007-08-11 15:47:42 -07:00
asm-h8300 remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-i386 i386: Fix a couple busy loops in mach_wakecpu.h:wait_for_init_deassert() 2007-08-18 09:54:44 -07:00
asm-ia64 [IA64] SN2 needs platform specific irq_to_vector() function. 2007-08-13 10:31:26 -07:00
asm-m32r remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-m68k more include order horrors 2007-07-28 19:42:21 -07:00
asm-m68knommu remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-mips Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus 2007-07-31 20:41:53 -07:00
asm-parisc Fix WARN_ON() on bitfield ops for all other archs 2007-08-01 20:45:38 -07:00
asm-powerpc [POWERPC] Fix initialization and usage of dma_mask 2007-08-10 21:04:42 +10:00
asm-ppc [WATCHDOG] mv64x60_wdt: Add arch/powerpc platform support 2007-07-24 21:16:02 +00:00
asm-s390 Fix WARN_ON() on bitfield ops for all other archs 2007-08-01 20:45:38 -07:00
asm-sh sh: Add missing dma_sync_single_range_for_*(). 2007-08-10 02:37:01 +09:00
asm-sh64 sh64: Add missing dma_sync_single_for_*(). 2007-08-10 02:47:31 +09:00
asm-sparc [MATH-EMU]: Fix underflow exception reporting. 2007-08-16 22:59:49 -07:00
asm-sparc64 [MATH-EMU]: Fix underflow exception reporting. 2007-08-16 22:59:49 -07:00
asm-um arch: personality independent stack top 2007-07-19 10:04:45 -07:00
asm-v850 remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
asm-x86_64 finish i386 and x86-64 sysdata conversion 2007-08-11 15:47:42 -07:00
asm-xtensa remove unused TIF_NOTIFY_RESUME flag 2007-07-31 15:39:38 -07:00
crypto
keys
linux Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2007-08-18 09:38:56 -07:00
math-emu [MATH-EMU]: Fix underflow exception reporting. 2007-08-16 22:59:49 -07:00
media V4L/DVB (5835): saa7146/dvb-ttpci: Fix signedness warnings (gcc 4.1.1, kernel 2.6.22) 2007-07-18 14:24:44 -03:00
mtd
net [NETFILTER]: nf_nat: add symbolic dependency on IPv4 conntrack 2007-08-07 18:12:01 -07:00
pcmcia
rdma IB: Move the macro IB_UMEM_MAX_PAGE_CHUNK() to umem.c 2007-08-03 10:45:18 -07:00
rxrpc
scsi [SCSI] sd: disentangle barriers in SCSI 2007-08-04 08:37:04 -05:00
sound [ALSA] version 1.0.14 2007-07-20 11:13:35 +02:00
video remove tx3912fb 2007-07-31 15:39:41 -07:00
xen xen: xen/page.h compile fix 2007-07-26 11:35:16 -07:00
Kbuild