]> git.baikalelectronics.ru Git - kernel.git/commit
[IA64] Ensure cpu0 can access per-cpu variables in early boot code
authorTony Luck <tony.luck@intel.com>
Tue, 12 Aug 2008 17:34:20 +0000 (10:34 -0700)
committerTony Luck <tony.luck@intel.com>
Tue, 12 Aug 2008 17:34:20 +0000 (10:34 -0700)
commit07cab436eadc6f33f2bcd73b7c1b7e39f83799ac
tree2d1dada5b7d8dd8cd060f54a597aaa34ccc8edb6
parentcc9555b008a73208eeef3a2a048dada127e558d6
[IA64] Ensure cpu0 can access per-cpu variables in early boot code

ia64 handles per-cpu variables a litle differently from other architectures
in that it maps the physical memory allocated for each cpu at a constant
virtual address (0xffffffffffff0000). This mapping is not enabled until
the architecture specific cpu_init() function is run, which causes problems
since some generic code is run before this point. In particular when
CONFIG_PRINTK_TIME is enabled, the boot cpu will trap on the access to
per-cpu memory at the first printk() call so the boot will fail without
the kernel printing anything to the console.

Fix this by allocating percpu memory for cpu0 in the kernel data section
and doing all initialization to enable percpu access in head.S before
calling any generic code.

Other cpus must take care not to access per-cpu variables too early, but
their code path from start_secondary() to cpu_init() is all in arch/ia64

Signed-off-by: Tony Luck <tony.luck@intel.com>
arch/ia64/kernel/head.S
arch/ia64/kernel/setup.c
arch/ia64/kernel/smpboot.c
arch/ia64/kernel/vmlinux.lds.S
arch/ia64/mm/contig.c
arch/ia64/mm/discontig.c