diff -Naur linux-2.6.10/arch/i386/Kconfig linux-2.6.10/arch/i386/Kconfig --- linux-2.6.10/arch/i386/Kconfig 2004-08-25 21:38:29.435578760 -0600 +++ linux-2.6.10/arch/i386/Kconfig 2004-08-25 20:50:36.000000000 -0600 @@ -789,6 +789,26 @@ depends on HIGHMEM64G default y +choice + depends on !X86_4G + depends on NOHIGHMEM + prompt "User address space size" + +config USER_3GB + depends on X86 + bool "3GB User Address Space" + +config USER_2GB + depends on X86 + bool "2GB User Address Space" + +config USER_1GB + depends on X86 + bool "1GB User Address Space" + +endchoice + + # Common NUMA Features config NUMA bool "Numa Memory Allocation and Scheduler Support" diff -Naur linux-2.6.10/include/asm-generic/page_offset.h linux-2.6.10/include/asm-generic/page_offset.h --- linux-2.6.10/include/asm-generic/page_offset.h 1969-12-31 17:00:00.000000000 -0700 +++ linux-2.6.10/include/asm-generic/page_offset.h 2004-08-25 20:51:03.000000000 -0600 @@ -0,0 +1,24 @@ + +#include + +#ifdef __ASSEMBLY__ + +#if defined(CONFIG_USER_1GB) +#define PAGE_OFFSET_RAW 0x40000000 +#elif defined(CONFIG_USER_2GB) +#define PAGE_OFFSET_RAW 0x80000000 +#else +#define PAGE_OFFSET_RAW 0xc0000000 +#endif + +#else + +#if defined(CONFIG_USER_1GB) +#define PAGE_OFFSET_RAW 0x40000000UL +#elif defined(CONFIG_USER_2GB) +#define PAGE_OFFSET_RAW 0x80000000UL +#else +#define PAGE_OFFSET_RAW 0xc0000000UL +#endif + +#endif diff -Naur linux-2.6.10/include/asm-generic/vmlinux.lds.h linux-2.6.10/include/asm-generic/vmlinux.lds.h --- linux-2.6.10/include/asm-generic/vmlinux.lds.h 2004-08-14 04:54:48.000000000 -0600 +++ linux-2.6.10/include/asm-generic/vmlinux.lds.h 2004-08-25 20:49:32.000000000 -0600 @@ -1,3 +1,6 @@ + +#include + #ifndef LOAD_OFFSET #define LOAD_OFFSET 0 #endif diff -Naur linux-2.6.10/include/asm-i386/page.h linux-2.6.10/include/asm-i386/page.h --- linux-2.6.10/include/asm-i386/page.h 2004-08-14 04:54:50.000000000 -0600 +++ linux-2.6.10/include/asm-i386/page.h 2004-08-25 20:49:32.000000000 -0600 @@ -103,7 +103,8 @@ #define __PAGE_OFFSET (0x02000000) #define TASK_SIZE ((current->personality & 0x8000000) ? 0xc0000000 : 0xff000000) #else -#define __PAGE_OFFSET (0xc0000000) -#define TASK_SIZE (0xc0000000) +#include +#define __PAGE_OFFSET (PAGE_OFFSET_RAW) +#define TASK_SIZE (PAGE_OFFSET_RAW) #endif #ifndef __ASSEMBLY__ diff -Naur linux-2.6.10/arch/i386/mm/pageattr.c linux-2.6.10/arch/i386/mm/pageattr.c --- linux-2.6.10/arch/i386/mm/pageattr.c 2006-08-25 12:39:09.000000000 +0400 +++ linux-2.6.10/arch/i386/mm/pageattr.c 2006-10-19 00:43:49.000000000 +0400 @@ -15,7 +15,7 @@ static spinlock_t cpa_lock = SPIN_LOCK_UNLOCKED; static struct list_head df_list = LIST_HEAD_INIT(df_list); - +extern char _stext[], _etext[], _sinittext[], _einittext[]; pte_t *lookup_address(unsigned long address) {