Re: [patch 3/3] x86_64: Make the x86_32 percpu operations usable onx86_64
From: Christoph Lameter
Date: Fri Nov 30 2007 - 15:08:03 EST
The following fix is needed for UP (did not have time to do proper
testing, some people will get mad at me if I do not get into a vacation
mode now, be back on the 13th of December):
Fix UP setup
The __per_cpu_start offset is still needed in a UP configuration. There we
do not relocate the percpu area. So we must subtract __per_cpu_start in
setup64.c. It will be zero if the percpu area is relocated.
Signed-off-by: Christoph Lameter <clameter@xxxxxxx>
---
arch/x86/kernel/setup64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: linux-2.6.24-rc3-mm2/arch/x86/kernel/setup64.c
===================================================================
--- linux-2.6.24-rc3-mm2.orig/arch/x86/kernel/setup64.c 2007-11-30 11:41:23.989455039 -0800
+++ linux-2.6.24-rc3-mm2/arch/x86/kernel/setup64.c 2007-11-30 11:41:47.497905579 -0800
@@ -115,7 +115,7 @@ void __init setup_per_cpu_areas(void)
/* Relocate the pda */
memcpy(ptr, cpu_pda(i), sizeof(struct x8664_pda));
cpu_pda(i) = (struct x8664_pda *)ptr;
- cpu_pda(i)->data_offset = (unsigned long)ptr;
+ cpu_pda(i)->data_offset = ptr - __per_cpu_start;
}
/* Fix up pda for this processor .... */
pda_init(0);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/