From 55c8c0cb8344c462d0b7b06b170893035d3d72c6 Mon Sep 17 00:00:00 2001 From: David Mosberger Date: Tue, 25 Jan 2005 18:03:40 -0800 Subject: [IA64] fix per-CPU MCA mess and make UP kernels work again This patch cleans up the per-CPU MCA mess with the following changes (and yields a UP kernel that actually boots again): - In percpu.h, make per_cpu_init() a function-call even for the UP case. - In contig.c, enable per_cpu_init() even for UP since we need to allocate the per-CPU MCA data in that case as well. - Move the MCA-related stuff out of the cpuinfo structure into per-CPU variables defined by mca.c. - Rename IA64_KR_PA_CPU_INFO to IA64_KR_PER_CPU_DATA, since it really is a per-CPU pointer now. - In mca.h, move IA64_MCA_STACK_SIZE early enough so it gets defined for assembly-code, too. Tidy up struct ia64_mca_struct. Add declaration of ia64_mca_cpu_init(). - In mca_asm.[hS], replace various GET_*() macros with a single GET_PERCPU_ADDR() which loads the physical address of an arbitrary per-CPU variable. Remove all dependencies on the layout of the cpuinfo structure. Replace hardcoded stack-size with IA64_MCA_STACK_SIZE constant. Replace hardcoded references to ar.k3 with IA64_KR(PER_CPU_DATA). - In setup.c:cpu_init(), initialize ar.k3 to be the physical equivalent of the per-CPU data pointer. - Nuke silly ia64_mca_cpu_t typedef and just use struct ia64_mca_cpu instead. - Move __per_cpu_mca[] from setup.c to mca.c. - Rename set_mca_pointer() to ia64_mca_cpu_init() and sanitize it. - Rename efi.c:pal_code_memdesc() to efi_get_pal_addr() and make it return the PAL address, rather than a memory-descriptor. - Make efi_map_pal_code() use efi_get_pal_addr(). Signed-off-by: David Mosberger-Tang Signed-off-by: Tony Luck --- include/linux/efi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/linux') diff --git a/include/linux/efi.h b/include/linux/efi.h index ec0faa230f65..0f461df7686c 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -289,6 +289,7 @@ efi_guid_unparse(efi_guid_t *guid, char *out) } extern void efi_init (void); +extern void *efi_get_pal_addr (void); extern void efi_map_pal_code (void); extern void efi_map_memmap(void); extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg); -- cgit v1.2.3