diff options
-rw-r--r-- | arch/blackfin/include/asm/pgtable.h | 3 | ||||
-rw-r--r-- | arch/blackfin/mm/init.c | 29 |
2 files changed, 6 insertions, 26 deletions
diff --git a/arch/blackfin/include/asm/pgtable.h b/arch/blackfin/include/asm/pgtable.h index 821c699c2238..dcca3e6d6e80 100644 --- a/arch/blackfin/include/asm/pgtable.h +++ b/arch/blackfin/include/asm/pgtable.h | |||
@@ -80,7 +80,8 @@ PTE_BIT_FUNC(mkyoung, |= _PAGE_ACCESSED); | |||
80 | * ZERO_PAGE is a global shared page that is always zero: used | 80 | * ZERO_PAGE is a global shared page that is always zero: used |
81 | * for zero-mapped memory areas etc.. | 81 | * for zero-mapped memory areas etc.. |
82 | */ | 82 | */ |
83 | #define ZERO_PAGE(vaddr) (virt_to_page(0)) | 83 | #define ZERO_PAGE(vaddr) virt_to_page(empty_zero_page) |
84 | extern char empty_zero_page[]; | ||
84 | 85 | ||
85 | extern unsigned int kobjsize(const void *objp); | 86 | extern unsigned int kobjsize(const void *objp); |
86 | 87 | ||
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c index 355b87aa6b93..10c8a59a96c5 100644 --- a/arch/blackfin/mm/init.c +++ b/arch/blackfin/mm/init.c | |||
@@ -15,23 +15,11 @@ | |||
15 | #include "blackfin_sram.h" | 15 | #include "blackfin_sram.h" |
16 | 16 | ||
17 | /* | 17 | /* |
18 | * BAD_PAGE is the page that is used for page faults when linux | 18 | * ZERO_PAGE is a special page that is used for zero-initialized data and COW. |
19 | * is out-of-memory. Older versions of linux just did a | 19 | * Let the bss do its zero-init magic so we don't have to do it ourselves. |
20 | * do_exit(), but using this instead means there is less risk | ||
21 | * for a process dying in kernel mode, possibly leaving a inode | ||
22 | * unused etc.. | ||
23 | * | ||
24 | * BAD_PAGETABLE is the accompanying page-table: it is initialized | ||
25 | * to point to BAD_PAGE entries. | ||
26 | * | ||
27 | * ZERO_PAGE is a special page that is used for zero-initialized | ||
28 | * data and COW. | ||
29 | */ | 20 | */ |
30 | static unsigned long empty_bad_page_table; | 21 | char empty_zero_page[PAGE_SIZE] __attribute__((aligned(PAGE_SIZE))); |
31 | 22 | EXPORT_SYMBOL(empty_zero_page); | |
32 | static unsigned long empty_bad_page; | ||
33 | |||
34 | static unsigned long empty_zero_page; | ||
35 | 23 | ||
36 | #ifndef CONFIG_EXCEPTION_L1_SCRATCH | 24 | #ifndef CONFIG_EXCEPTION_L1_SCRATCH |
37 | #if defined CONFIG_SYSCALL_TAB_L1 | 25 | #if defined CONFIG_SYSCALL_TAB_L1 |
@@ -60,15 +48,6 @@ void __init paging_init(void) | |||
60 | pr_debug("start_mem is %#lx virtual_end is %#lx\n", PAGE_ALIGN(memory_start), end_mem); | 48 | pr_debug("start_mem is %#lx virtual_end is %#lx\n", PAGE_ALIGN(memory_start), end_mem); |
61 | 49 | ||
62 | /* | 50 | /* |
63 | * initialize the bad page table and bad page to point | ||
64 | * to a couple of allocated pages | ||
65 | */ | ||
66 | empty_bad_page_table = (unsigned long)alloc_bootmem_pages(PAGE_SIZE); | ||
67 | empty_bad_page = (unsigned long)alloc_bootmem_pages(PAGE_SIZE); | ||
68 | empty_zero_page = (unsigned long)alloc_bootmem_pages(PAGE_SIZE); | ||
69 | memset((void *)empty_zero_page, 0, PAGE_SIZE); | ||
70 | |||
71 | /* | ||
72 | * Set up SFC/DFC registers (user data space) | 51 | * Set up SFC/DFC registers (user data space) |
73 | */ | 52 | */ |
74 | set_fs(KERNEL_DS); | 53 | set_fs(KERNEL_DS); |