diff options
Diffstat (limited to 'arch/ia64/mm/init.c')
-rw-r--r-- | arch/ia64/mm/init.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/ia64/mm/init.c b/arch/ia64/mm/init.c index 56e12903973c..c0f3bee69042 100644 --- a/arch/ia64/mm/init.c +++ b/arch/ia64/mm/init.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/uaccess.h> | 35 | #include <asm/uaccess.h> |
36 | #include <asm/unistd.h> | 36 | #include <asm/unistd.h> |
37 | #include <asm/mca.h> | 37 | #include <asm/mca.h> |
38 | #include <asm/paravirt.h> | ||
38 | 39 | ||
39 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); | 40 | DEFINE_PER_CPU(struct mmu_gather, mmu_gathers); |
40 | 41 | ||
@@ -259,6 +260,7 @@ put_kernel_page (struct page *page, unsigned long address, pgprot_t pgprot) | |||
259 | static void __init | 260 | static void __init |
260 | setup_gate (void) | 261 | setup_gate (void) |
261 | { | 262 | { |
263 | void *gate_section; | ||
262 | struct page *page; | 264 | struct page *page; |
263 | 265 | ||
264 | /* | 266 | /* |
@@ -266,10 +268,11 @@ setup_gate (void) | |||
266 | * headers etc. and once execute-only page to enable | 268 | * headers etc. and once execute-only page to enable |
267 | * privilege-promotion via "epc": | 269 | * privilege-promotion via "epc": |
268 | */ | 270 | */ |
269 | page = virt_to_page(ia64_imva(__start_gate_section)); | 271 | gate_section = paravirt_get_gate_section(); |
272 | page = virt_to_page(ia64_imva(gate_section)); | ||
270 | put_kernel_page(page, GATE_ADDR, PAGE_READONLY); | 273 | put_kernel_page(page, GATE_ADDR, PAGE_READONLY); |
271 | #ifdef HAVE_BUGGY_SEGREL | 274 | #ifdef HAVE_BUGGY_SEGREL |
272 | page = virt_to_page(ia64_imva(__start_gate_section + PAGE_SIZE)); | 275 | page = virt_to_page(ia64_imva(gate_section + PAGE_SIZE)); |
273 | put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE); | 276 | put_kernel_page(page, GATE_ADDR + PAGE_SIZE, PAGE_GATE); |
274 | #else | 277 | #else |
275 | put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE); | 278 | put_kernel_page(page, GATE_ADDR + PERCPU_PAGE_SIZE, PAGE_GATE); |
@@ -633,8 +636,7 @@ mem_init (void) | |||
633 | #endif | 636 | #endif |
634 | 637 | ||
635 | #ifdef CONFIG_FLATMEM | 638 | #ifdef CONFIG_FLATMEM |
636 | if (!mem_map) | 639 | BUG_ON(!mem_map); |
637 | BUG(); | ||
638 | max_mapnr = max_low_pfn; | 640 | max_mapnr = max_low_pfn; |
639 | #endif | 641 | #endif |
640 | 642 | ||
@@ -667,8 +669,8 @@ mem_init (void) | |||
667 | * code can tell them apart. | 669 | * code can tell them apart. |
668 | */ | 670 | */ |
669 | for (i = 0; i < NR_syscalls; ++i) { | 671 | for (i = 0; i < NR_syscalls; ++i) { |
670 | extern unsigned long fsyscall_table[NR_syscalls]; | ||
671 | extern unsigned long sys_call_table[NR_syscalls]; | 672 | extern unsigned long sys_call_table[NR_syscalls]; |
673 | unsigned long *fsyscall_table = paravirt_get_fsyscall_table(); | ||
672 | 674 | ||
673 | if (!fsyscall_table[i] || nolwsys) | 675 | if (!fsyscall_table[i] || nolwsys) |
674 | fsyscall_table[i] = sys_call_table[i] | 1; | 676 | fsyscall_table[i] = sys_call_table[i] | 1; |