alistair23-linux/arch
Konrad Rzeszutek Wilk a945928ea2 xen: Do not enable spinlocks before jump_label_init() has executed
xen_init_spinlocks() currently calls static_key_slow_inc() before
jump_label_init() is invoked. When CONFIG_JUMP_LABEL is set (which usually is
the case) the effect of this static_key_slow_inc() is deferred until after
jump_label_init(). This is different from when CONFIG_JUMP_LABEL is not set, in
which case the key is set immediately. Thus, depending on the value of config
option, we may observe different behavior.

In addition, when we come to __jump_label_transform() from jump_label_init(),
the key (paravirt_ticketlocks_enabled) is already enabled. On processors where
ideal_nop is not the same as default_nop this will cause a BUG() since it is
expected that before a key is enabled the latter is replaced by the former
during initialization.

To address this problem we need to move
static_key_slow_inc(&paravirt_ticketlocks_enabled) so that it is called
after jump_label_init(). We also need to make sure that this is done before
other cpus start to boot. early_initcall appears to be  a good place to do so.
(Note that we cannot move whole xen_init_spinlocks() there since pv_lock_ops
need to be set before alternative_instructions() runs.)

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
[v2: Added extra comments in the code]
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Reviewed-by: Steven Rostedt <rostedt@goodmis.org>
2013-09-24 16:22:26 -04:00
..
alpha alpha: Use handle_percpu_irq for the timer interrupt 2013-07-19 13:54:26 -07:00
arc ARC: [lib] strchr breakage in Big-endian configuration 2013-08-24 11:24:53 -07:00
arm Linux 3.11-rc7 2013-09-09 12:05:37 -04:00
arm64 Perf backend fixes for arm64 where the user can cause kernel panic 2013-08-21 16:36:32 -07:00
avr32 avr32: boards/atngw100/mrmt.c: fix building error 2013-08-08 14:16:22 +02:00
blackfin Merge branch 'cpuinit_phase2' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2013-07-18 10:50:26 -07:00
c6x Merge branch 'akpm' (updates from Andrew Morton) 2013-07-03 17:12:13 -07:00
cris cris: delete __cpuinit usage from all cris files 2013-07-14 19:36:54 -04:00
frv frv: delete __cpuinit usage from all frv files 2013-07-14 19:36:55 -04:00
h8300 net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
hexagon arch: *: Kconfig: add "kernel/Kconfig.freezer" to "arch/*/Kconfig" 2013-08-13 17:57:49 -07:00
ia64 Fix TLB gather virtual address range invalidation corner cases 2013-08-16 08:52:46 -07:00
m32r m32r: delete __cpuinit usage from all m32r files 2013-07-14 19:36:55 -04:00
m68k m68k: Truncate base in do_div() 2013-08-14 11:46:30 +02:00
metag metag: delete __cpuinit usage from all metag files 2013-07-14 19:36:54 -04:00
microblaze microblaze: fix clone syscall 2013-08-13 17:57:48 -07:00
mips MIPS: Handle OCTEON BBIT instructions in FPU emulator. 2013-08-20 19:17:40 +02:00
mn10300 net: rename busy poll socket op and globals 2013-07-10 17:08:27 -07:00
openrisc arch: *: Kconfig: add "kernel/Kconfig.freezer" to "arch/*/Kconfig" 2013-08-13 17:57:49 -07:00
parisc parisc: Fix interrupt routing for C8000 serial ports 2013-07-31 23:42:32 +02:00
powerpc powerpc/tm: Fix context switching TAR, PPR and DSCR SPRs 2013-08-09 18:07:12 +10:00
s390 s390: Fix broken build 2013-08-16 21:16:37 -07:00
score arch: *: Kconfig: add "kernel/Kconfig.freezer" to "arch/*/Kconfig" 2013-08-13 17:57:49 -07:00
sh Fix TLB gather virtual address range invalidation corner cases 2013-08-16 08:52:46 -07:00
sparc sparc: delete __cpuinit/__CPUINIT usage from all users 2013-07-14 19:36:52 -04:00
tile tile: delete __cpuinit usage from all tile files 2013-07-14 19:36:54 -04:00
um Fix TLB gather virtual address range invalidation corner cases 2013-08-16 08:52:46 -07:00
unicore32 reboot: move arch/x86 reboot= handling to generic kernel 2013-07-09 10:33:29 -07:00
x86 xen: Do not enable spinlocks before jump_label_init() has executed 2013-09-24 16:22:26 -04:00
xtensa xtensa: delete __cpuinit usage from all xtensa files 2013-07-14 19:36:56 -04:00
.gitignore
Kconfig microblaze: fix clone syscall 2013-08-13 17:57:48 -07:00