Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / highmem-split-2.6-rhel4.patch
1 diff -Naur linux-2.6.10/arch/i386/Kconfig linux-2.6.10/arch/i386/Kconfig
2 --- linux-2.6.10/arch/i386/Kconfig      2004-08-25 21:38:29.435578760 -0600
3 +++ linux-2.6.10/arch/i386/Kconfig      2004-08-25 20:50:36.000000000 -0600
4 @@ -789,6 +789,26 @@
5         depends on HIGHMEM64G
6         default y
7  
8 +choice
9 +       depends on !X86_4G
10 +       depends on NOHIGHMEM
11 +       prompt "User address space size"
12 +
13 +config USER_3GB
14 +       depends on X86
15 +       bool "3GB User Address Space"
16 +
17 +config USER_2GB
18 +       depends on X86
19 +       bool "2GB User Address Space"
20 +
21 +config USER_1GB
22 +       depends on X86
23 +       bool "1GB User Address Space"
24 +
25 +endchoice
26 +
27 +
28  # Common NUMA Features
29  config NUMA
30         bool "Numa Memory Allocation and Scheduler Support"
31 diff -Naur linux-2.6.10/include/asm-generic/page_offset.h linux-2.6.10/include/asm-generic/page_offset.h
32 --- linux-2.6.10/include/asm-generic/page_offset.h      1969-12-31 17:00:00.000000000 -0700
33 +++ linux-2.6.10/include/asm-generic/page_offset.h      2004-08-25 20:51:03.000000000 -0600
34 @@ -0,0 +1,24 @@
35 +
36 +#include <linux/config.h>
37 +
38 +#ifdef __ASSEMBLY__
39 +
40 +#if defined(CONFIG_USER_1GB)
41 +#define PAGE_OFFSET_RAW 0x40000000
42 +#elif defined(CONFIG_USER_2GB)
43 +#define PAGE_OFFSET_RAW 0x80000000
44 +#else
45 +#define PAGE_OFFSET_RAW 0xc0000000
46 +#endif
47 +
48 +#else
49 +
50 +#if defined(CONFIG_USER_1GB)
51 +#define PAGE_OFFSET_RAW 0x40000000UL
52 +#elif defined(CONFIG_USER_2GB)
53 +#define PAGE_OFFSET_RAW 0x80000000UL
54 +#else
55 +#define PAGE_OFFSET_RAW 0xc0000000UL
56 +#endif
57 +
58 +#endif
59 diff -Naur linux-2.6.10/include/asm-generic/vmlinux.lds.h linux-2.6.10/include/asm-generic/vmlinux.lds.h
60 --- linux-2.6.10/include/asm-generic/vmlinux.lds.h      2004-08-14 04:54:48.000000000 -0600
61 +++ linux-2.6.10/include/asm-generic/vmlinux.lds.h      2004-08-25 20:49:32.000000000 -0600
62 @@ -1,3 +1,6 @@
63 +
64 +#include <asm-generic/page_offset.h>
65 +
66  #ifndef LOAD_OFFSET
67  #define LOAD_OFFSET 0
68  #endif
69 diff -Naur linux-2.6.10/include/asm-i386/page.h linux-2.6.10/include/asm-i386/page.h
70 --- linux-2.6.10/include/asm-i386/page.h        2004-08-14 04:54:50.000000000 -0600
71 +++ linux-2.6.10/include/asm-i386/page.h        2004-08-25 20:49:32.000000000 -0600
72 @@ -103,7 +103,8 @@
73  #define __PAGE_OFFSET          (0x02000000)
74  #define TASK_SIZE              ((current->personality & 0x8000000) ? 0xc0000000 : 0xff000000)
75  #else
76 -#define __PAGE_OFFSET          (0xc0000000)
77 -#define TASK_SIZE              (0xc0000000)
78 +#include <asm-generic/page_offset.h>
79 +#define __PAGE_OFFSET          (PAGE_OFFSET_RAW)
80 +#define TASK_SIZE              (PAGE_OFFSET_RAW)
81  #endif
82  
83  #ifndef __ASSEMBLY__
84 diff -Naur linux-2.6.10/arch/i386/mm/pageattr.c linux-2.6.10/arch/i386/mm/pageattr.c
85 --- linux-2.6.10/arch/i386/mm/pageattr.c      2006-08-25 12:39:09.000000000 +0400       
86 +++ linux-2.6.10/arch/i386/mm/pageattr.c      2006-10-19 00:43:49.000000000 +0400
87 @@ -15,7 +15,7 @@
88  
89  static spinlock_t cpa_lock = SPIN_LOCK_UNLOCKED;
90  static struct list_head df_list = LIST_HEAD_INIT(df_list);
91 -
92 +extern char _stext[], _etext[], _sinittext[], _einittext[];
93  
94  pte_t *lookup_address(unsigned long address)
95  {
96