1 Rules.make | 17 +++++++
2 arch/i386/Makefile | 4 +
3 arch/i386/config.in | 10 ++++
4 arch/i386/vmlinux.lds | 99 -----------------------------------------
5 arch/i386/vmlinux.lds.S | 99 +++++++++++++++++++++++++++++++++++++++++
6 include/asm-i386/page.h | 4 +
7 include/asm-i386/page_offset.h | 10 ++++
8 include/asm-i386/processor.h | 4 +
9 mm/memory.c | 23 +++++++--
10 9 files changed, 165 insertions(+), 105 deletions(-)
12 Index: linux-2.4.22-vanilla/arch/i386/config.in
13 ===================================================================
14 --- linux-2.4.22-vanilla.orig/arch/i386/config.in 2003-12-02 23:55:28.000000000 +0300
15 +++ linux-2.4.22-vanilla/arch/i386/config.in 2003-12-15 23:09:28.000000000 +0300
18 if [ "$CONFIG_HIGHMEM64G" = "y" ]; then
19 define_bool CONFIG_X86_PAE y
20 + choice 'User address space size' \
25 + choice 'User address space size' \
29 + 3.5GB CONFIG_05GB" 3GB
32 if [ "$CONFIG_HIGHMEM" = "y" ]; then
33 Index: linux-2.4.22-vanilla/arch/i386/Makefile
34 ===================================================================
35 --- linux-2.4.22-vanilla.orig/arch/i386/Makefile 2003-11-03 22:50:58.000000000 +0300
36 +++ linux-2.4.22-vanilla/arch/i386/Makefile 2003-12-15 23:09:28.000000000 +0300
39 MAKEBOOT = $(MAKE) -C arch/$(ARCH)/boot
41 +arch/i386/vmlinux.lds: arch/i386/vmlinux.lds.S FORCE
42 + $(CPP) -C -P -I$(HPATH) -imacros $(HPATH)/asm-i386/page_offset.h -Ui386 arch/i386/vmlinux.lds.S >arch/i386/vmlinux.lds
44 vmlinux: arch/i386/vmlinux.lds
51 + rm -f arch/i386/vmlinux.lds
55 Index: linux-2.4.22-vanilla/arch/i386/vmlinux.lds.S
56 ===================================================================
57 --- linux-2.4.22-vanilla.orig/arch/i386/vmlinux.lds.S 2003-01-30 13:24:37.000000000 +0300
58 +++ linux-2.4.22-vanilla/arch/i386/vmlinux.lds.S 2003-12-15 23:10:46.000000000 +0300
60 +/* ld script to make i386 Linux kernel
61 + * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
63 +OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
68 + . = PAGE_OFFSET_RAW + 0x100000;
69 + _text = .; /* Text and read-only data */
76 + _etext = .; /* End of text section */
78 + .rodata : { *(.rodata) *(.rodata.*) }
79 + .kstrtab : { *(.kstrtab) }
81 + . = ALIGN(16); /* Exception table */
82 + __start___ex_table = .;
83 + __ex_table : { *(__ex_table) }
84 + __stop___ex_table = .;
86 + __start___ksymtab = .; /* Kernel symbol table */
87 + __ksymtab : { *(__ksymtab) }
88 + __stop___ksymtab = .;
90 + .data : { /* Data */
95 + _edata = .; /* End of data section */
97 +/* chose the biggest of the possible stack sizes here? */
98 + . = ALIGN(65536); /* init_task */
99 + .data.init_task : { *(.data.init_task) }
101 + . = ALIGN(4096); /* Init code and data */
103 + .text.init : { *(.text.init) }
104 + .data.init : { *(.data.init) }
107 + .setup.init : { *(.setup.init) }
109 + __initcall_start = .;
110 + .initcall.init : { *(.initcall.init) }
111 + __initcall_end = .;
116 + .data.page_aligned : { *(.data.idt) }
119 + .data.cacheline_aligned : { *(.data.cacheline_aligned) }
121 + __bss_start = .; /* BSS */
127 + /* Sections to be discarded */
134 + /* Stabs debugging sections. */
135 + .stab 0 : { *(.stab) }
136 + .stabstr 0 : { *(.stabstr) }
137 + .stab.excl 0 : { *(.stab.excl) }
138 + .stab.exclstr 0 : { *(.stab.exclstr) }
139 + .stab.index 0 : { *(.stab.index) }
140 + .stab.indexstr 0 : { *(.stab.indexstr) }
141 + .comment 0 : { *(.comment) }
143 Index: linux-2.4.22-vanilla/arch/i386/vmlinux.lds
144 ===================================================================
145 --- linux-2.4.22-vanilla.orig/arch/i386/vmlinux.lds 2003-12-15 23:17:09.000000000 +0300
146 +++ linux-2.4.22-vanilla/arch/i386/vmlinux.lds 2003-01-30 13:24:37.000000000 +0300
148 -/* ld script to make i386 Linux kernel
149 - * Written by Martin Mares <mj@atrey.karlin.mff.cuni.cz>;
151 -OUTPUT_FORMAT("elf32-i386", "elf32-i386", "elf32-i386")
156 - . = 0xC0000000 + 0x100000;
157 - _text = .; /* Text and read-only data */
164 - _etext = .; /* End of text section */
166 - .rodata : { *(.rodata) *(.rodata.*) }
167 - .kstrtab : { *(.kstrtab) }
169 - . = ALIGN(16); /* Exception table */
170 - __start___ex_table = .;
171 - __ex_table : { *(__ex_table) }
172 - __stop___ex_table = .;
174 - __start___ksymtab = .; /* Kernel symbol table */
175 - __ksymtab : { *(__ksymtab) }
176 - __stop___ksymtab = .;
178 - .data : { /* Data */
183 - _edata = .; /* End of data section */
185 -/* chose the biggest of the possible stack sizes here? */
186 - . = ALIGN(65536); /* init_task */
187 - .data.init_task : { *(.data.init_task) }
189 - . = ALIGN(4096); /* Init code and data */
191 - .text.init : { *(.text.init) }
192 - .data.init : { *(.data.init) }
195 - .setup.init : { *(.setup.init) }
197 - __initcall_start = .;
198 - .initcall.init : { *(.initcall.init) }
199 - __initcall_end = .;
204 - .data.page_aligned : { *(.data.idt) }
207 - .data.cacheline_aligned : { *(.data.cacheline_aligned) }
209 - __bss_start = .; /* BSS */
215 - /* Sections to be discarded */
222 - /* Stabs debugging sections. */
223 - .stab 0 : { *(.stab) }
224 - .stabstr 0 : { *(.stabstr) }
225 - .stab.excl 0 : { *(.stab.excl) }
226 - .stab.exclstr 0 : { *(.stab.exclstr) }
227 - .stab.index 0 : { *(.stab.index) }
228 - .stab.indexstr 0 : { *(.stab.indexstr) }
229 - .comment 0 : { *(.comment) }
231 Index: linux-2.4.22-vanilla/include/asm-i386/page.h
232 ===================================================================
233 --- linux-2.4.22-vanilla.orig/include/asm-i386/page.h 2003-11-03 23:51:46.000000000 +0300
234 +++ linux-2.4.22-vanilla/include/asm-i386/page.h 2003-12-15 23:09:28.000000000 +0300
236 * and CONFIG_HIGHMEM64G options in the kernel configuration.
239 -#define __PAGE_OFFSET (0xC0000000)
240 +#include <asm/page_offset.h>
242 +#define __PAGE_OFFSET (PAGE_OFFSET_RAW)
245 * This much address space is reserved for vmalloc() and iomap()
246 Index: linux-2.4.22-vanilla/include/asm-i386/page_offset.h
247 ===================================================================
248 --- linux-2.4.22-vanilla.orig/include/asm-i386/page_offset.h 2003-01-30 13:24:37.000000000 +0300
249 +++ linux-2.4.22-vanilla/include/asm-i386/page_offset.h 2003-12-15 23:09:28.000000000 +0300
251 +#include <linux/config.h>
253 +#define PAGE_OFFSET_RAW 0xE0000000
254 +#elif defined(CONFIG_1GB)
255 +#define PAGE_OFFSET_RAW 0xC0000000
256 +#elif defined(CONFIG_2GB)
257 +#define PAGE_OFFSET_RAW 0x80000000
258 +#elif defined(CONFIG_3GB)
259 +#define PAGE_OFFSET_RAW 0x40000000
261 Index: linux-2.4.22-vanilla/include/asm-i386/processor.h
262 ===================================================================
263 --- linux-2.4.22-vanilla.orig/include/asm-i386/processor.h 2003-12-02 23:55:28.000000000 +0300
264 +++ linux-2.4.22-vanilla/include/asm-i386/processor.h 2003-12-15 23:09:28.000000000 +0300
266 /* This decides where the kernel will search for a free chunk of vm
267 * space during mmap's.
270 #define TASK_UNMAPPED_BASE (TASK_SIZE / 3)
272 +#define TASK_UNMAPPED_BASE (TASK_SIZE / 16)
276 * Size of io_bitmap in longwords: 32 is ports 0-0x3ff.
277 Index: linux-2.4.22-vanilla/mm/memory.c
278 ===================================================================
279 --- linux-2.4.22-vanilla.orig/mm/memory.c 2003-05-16 05:29:15.000000000 +0400
280 +++ linux-2.4.22-vanilla/mm/memory.c 2003-12-15 23:09:28.000000000 +0300
283 static inline void free_one_pgd(pgd_t * dir)
287 + pmd_t * pmd, * md, * emd;
293 pmd = pmd_offset(dir, 0);
295 - for (j = 0; j < PTRS_PER_PMD ; j++) {
296 - prefetchw(pmd+j+(PREFETCH_STRIDE/16));
297 - free_one_pmd(pmd+j);
300 + * Beware if changing the loop below. It once used int j,
301 + * for (j = 0; j < PTRS_PER_PMD; j++)
302 + * free_one_pmd(pmd+j);
303 + * but some older i386 compilers (e.g. egcs-2.91.66, gcc-2.95.3)
304 + * terminated the loop with a _signed_ address comparison
305 + * using "jle", when configured for HIGHMEM64GB (X86_PAE).
306 + * If also configured for 3GB of kernel virtual address space,
307 + * if page at physical 0x3ffff000 virtual 0x7ffff000 is used as
308 + * a pmd, when that mm exits the loop goes on to free "entries"
309 + * found at 0x80000000 onwards. The loop below compiles instead
310 + * to be terminated by unsigned address comparison using "jb".
312 + for (md = pmd, emd = pmd + PTRS_PER_PMD; md < emd; md++) {
313 + prefetchw(md+(PREFETCH_STRIDE/16));
318 Index: linux-2.4.22-vanilla/Rules.make
319 ===================================================================
320 --- linux-2.4.22-vanilla.orig/Rules.make 2003-05-16 05:28:27.000000000 +0400
321 +++ linux-2.4.22-vanilla/Rules.make 2003-12-15 23:09:28.000000000 +0300
324 # Added the SMP separator to stop module accidents between uniprocessor
325 # and SMP Intel boxes - AC - from bits by Michael Chastain
326 +# Added separator for different PAGE_OFFSET memory models - Ingo.
331 genksyms_smp_prefix :=
336 + genksyms_smp_prefix := -p smp_2gig_
338 + genksyms_smp_prefix := -p 2gig_
344 + genksyms_smp_prefix := -p smp_3gig_
346 + genksyms_smp_prefix := -p 3gig_
350 $(MODINCL)/%.ver: %.c
351 @if [ ! -r $(MODINCL)/$*.stamp -o $(MODINCL)/$*.stamp -ot $< ]; then \
352 echo '$(CC) $(CFLAGS) $(EXTRA_CFLAGS_nostdinc) -E -D__GENKSYMS__ $<'; \