aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ia64/mm/init.c19
-rw-r--r--include/asm-ia64/pgtable.h8
2 files changed, 23 insertions, 4 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c
index 547785e3cba2..4eb2f52b87a1 100644
--- a/arch/ia64/mm/init.c
+++ b/arch/ia64/mm/init.c
@@ -305,8 +305,9 @@ setup_gate (void)
305 struct page *page; 305 struct page *page;
306 306
307 /* 307 /*
308 * Map the gate page twice: once read-only to export the ELF headers etc. and once 308 * Map the gate page twice: once read-only to export the ELF
309 * execute-only page to enable privilege-promotion via "epc": 309 * headers etc. and once execute-only page to enable
310 * privilege-promotion via "epc":
310 */ 311 */
311 page = virt_to_page(ia64_imva(__start_gate_section)); 312 page = virt_to_page(ia64_imva(__start_gate_section));
312 put_kernel_page(page, GATE_ADDR, PAGE_READONLY); 313 put_kernel_page(page, GATE_ADDR, PAGE_READONLY);
@@ -315,6 +316,20 @@ setup_gate (void)
315 put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE); 316 put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE);
316#else 317#else
317 put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE); 318 put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE);
319 /* Fill in the holes (if any) with read-only zero pages: */
320 {
321 unsigned long addr;
322
323 for (addr = GATE_ADDR + PAGE_SIZE;
324 addr < GATE_ADDR + PERCPU_PAGE_SIZE;
325 addr += PAGE_SIZE)
326 {
327 put_kernel_page(ZERO_PAGE(0), addr,
328 PAGE_READONLY);
329 put_kernel_page(ZERO_PAGE(0), addr + PERCPU_PAGE_SIZE,
330 PAGE_READONLY);
331 }
332 }
318#endif 333#endif
319 ia64_patch_gate(); 334 ia64_patch_gate();
320} 335}
diff --git a/include/asm-ia64/pgtable.h b/include/asm-ia64/pgtable.h
index ea121a002309..fcc9c3344ab4 100644
--- a/include/asm-ia64/pgtable.h
+++ b/include/asm-ia64/pgtable.h
@@ -8,7 +8,7 @@
8 * This hopefully works with any (fixed) IA-64 page-size, as defined 8 * This hopefully works with any (fixed) IA-64 page-size, as defined
9 * in <asm/page.h>. 9 * in <asm/page.h>.
10 * 10 *
11 * Copyright (C) 1998-2004 Hewlett-Packard Co 11 * Copyright (C) 1998-2005 Hewlett-Packard Co
12 * David Mosberger-Tang <davidm@hpl.hp.com> 12 * David Mosberger-Tang <davidm@hpl.hp.com>
13 */ 13 */
14 14
@@ -551,7 +551,11 @@ do { \
551 551
552/* These tell get_user_pages() that the first gate page is accessible from user-level. */ 552/* These tell get_user_pages() that the first gate page is accessible from user-level. */
553#define FIXADDR_USER_START GATE_ADDR 553#define FIXADDR_USER_START GATE_ADDR
554#define FIXADDR_USER_END (GATE_ADDR + 2*PERCPU_PAGE_SIZE) 554#ifdef HAVE_BUGGY_SEGREL
555# define FIXADDR_USER_END (GATE_ADDR + 2*PAGE_SIZE)
556#else
557# define FIXADDR_USER_END (GATE_ADDR + 2*PERCPU_PAGE_SIZE)
558#endif
555 559
556#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG 560#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_YOUNG
557#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY 561#define __HAVE_ARCH_PTEP_TEST_AND_CLEAR_DIRTY