diff options
author | Ingo Molnar <mingo@kernel.org> | 2014-01-12 14:12:44 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2014-01-12 14:12:44 +0100 |
commit | dba861461f88c12249ac78fb877866c04f99deb3 (patch) | |
tree | 5812b143581bcc66c7c542f01ba0cb22e489b8e5 /arch/parisc/mm/init.c | |
parent | 0e6601eee039893a3f6420596ae4588d90d13cbe (diff) | |
parent | 228fdc083b017eaf90e578fa86fb1ecfd5ffae87 (diff) |
Merge branch 'linus' into timers/core
Pick up the latest fixes and refresh the branch.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/parisc/mm/init.c')
-rw-r--r-- | arch/parisc/mm/init.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c index b0f96c0e631..96f8168cf4e 100644 --- a/arch/parisc/mm/init.c +++ b/arch/parisc/mm/init.c @@ -32,6 +32,7 @@ #include <asm/sections.h> extern int data_start; +extern void parisc_kernel_start(void); /* Kernel entry point in head.S */ #if PT_NLEVELS == 3 /* NOTE: This layout exactly conforms to the hybrid L2/L3 page table layout @@ -324,8 +325,9 @@ static void __init setup_bootmem(void) reserve_bootmem_node(NODE_DATA(0), 0UL, (unsigned long)(PAGE0->mem_free + PDC_CONSOLE_IO_IODC_SIZE), BOOTMEM_DEFAULT); - reserve_bootmem_node(NODE_DATA(0), __pa((unsigned long)_text), - (unsigned long)(_end - _text), BOOTMEM_DEFAULT); + reserve_bootmem_node(NODE_DATA(0), __pa(KERNEL_BINARY_TEXT_START), + (unsigned long)(_end - KERNEL_BINARY_TEXT_START), + BOOTMEM_DEFAULT); reserve_bootmem_node(NODE_DATA(0), (bootmap_start_pfn << PAGE_SHIFT), ((bootmap_pfn - bootmap_start_pfn) << PAGE_SHIFT), BOOTMEM_DEFAULT); @@ -378,6 +380,17 @@ static void __init setup_bootmem(void) request_resource(&sysram_resources[0], &pdcdata_resource); } +static int __init parisc_text_address(unsigned long vaddr) +{ + static unsigned long head_ptr __initdata; + + if (!head_ptr) + head_ptr = PAGE_MASK & (unsigned long) + dereference_function_descriptor(&parisc_kernel_start); + + return core_kernel_text(vaddr) || vaddr == head_ptr; +} + static void __init map_pages(unsigned long start_vaddr, unsigned long start_paddr, unsigned long size, pgprot_t pgprot, int force) @@ -466,7 +479,7 @@ static void __init map_pages(unsigned long start_vaddr, */ if (force) pte = __mk_pte(address, pgprot); - else if (core_kernel_text(vaddr) && + else if (parisc_text_address(vaddr) && address != fv_addr) pte = __mk_pte(address, PAGE_KERNEL_EXEC); else |