From: Christoph Lameter Subject: cpu_alloc: Sparc64 support Enable a simple virtual configuration with 32MB available per cpu so that we do not use a static area on sparc64. [Not tested. I have no sparc64] Signed-off-by: Christoph Lameter --- arch/sparc64/Kconfig | 15 +++++++++++++++ arch/sparc64/kernel/vmlinux.lds.S | 3 +++ include/asm-sparc64/percpu.h | 2 ++ include/asm-sparc64/pgtable.h | 1 + 4 files changed, 21 insertions(+) Index: linux-2.6/arch/sparc64/Kconfig =================================================================== --- linux-2.6.orig/arch/sparc64/Kconfig 2007-11-20 18:24:35.995625043 -0800 +++ linux-2.6/arch/sparc64/Kconfig 2007-11-20 18:44:43.783625094 -0800 @@ -103,6 +103,21 @@ config SPARC64_PAGE_SIZE_4MB endchoice +config CPU_AREA_VIRTUAL + bool + default y + +config CPU_AREA_ORDER + int + default "11" if SPARC64_PAGE_SIZE_8KB + default "9" if SPARC64_PAGE_SIZE_64KB + default "6" if SPARC64_PAGE_SIZE_512KB + default "3" if SPARC64_PAGE_SIZE_4MB + +config CPU_AREA_ALLOC_ORDER + int + default "0" + config SECCOMP bool "Enable seccomp to safely compute untrusted bytecode" depends on PROC_FS Index: linux-2.6/include/asm-sparc64/pgtable.h =================================================================== --- linux-2.6.orig/include/asm-sparc64/pgtable.h 2007-11-20 18:24:36.015625329 -0800 +++ linux-2.6/include/asm-sparc64/pgtable.h 2007-11-20 18:44:43.791625097 -0800 @@ -43,6 +43,7 @@ #define VMALLOC_START _AC(0x0000000100000000,UL) #define VMALLOC_END _AC(0x0000000200000000,UL) #define VMEMMAP_BASE _AC(0x0000000200000000,UL) +#define CPU_AREA_BASE _AC(0x0000000300000000,UL) #define vmemmap ((struct page *)VMEMMAP_BASE) Index: linux-2.6/arch/sparc64/kernel/vmlinux.lds.S =================================================================== --- linux-2.6.orig/arch/sparc64/kernel/vmlinux.lds.S 2007-11-20 18:24:36.007625369 -0800 +++ linux-2.6/arch/sparc64/kernel/vmlinux.lds.S 2007-11-20 18:44:43.791625097 -0800 @@ -2,12 +2,15 @@ #include #include +#include OUTPUT_FORMAT("elf64-sparc", "elf64-sparc", "elf64-sparc") OUTPUT_ARCH(sparc:v9a) ENTRY(_start) jiffies = jiffies_64; +cpu_area = CPU_AREA_BASE + SECTIONS { swapper_low_pmd_dir = 0x0000000000402000; Index: linux-2.6/include/asm-sparc64/percpu.h =================================================================== --- linux-2.6.orig/include/asm-sparc64/percpu.h 2007-11-20 18:45:12.551625756 -0800 +++ linux-2.6/include/asm-sparc64/percpu.h 2007-11-20 18:45:30.644875051 -0800 @@ -5,6 +5,8 @@ register unsigned long __local_per_cpu_offset asm("g5"); +char cpu_area[]; + #ifdef CONFIG_SMP #define setup_per_cpu_areas() do { } while (0)