diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:02:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:02:58 -0400 |
commit | 064e297c324fff9b62226aae5dc468ebb272433c (patch) | |
tree | 49d031d180a30d6e94e4cfdcc46ec966399d8856 /arch/blackfin/mm/init.c | |
parent | f13771187b9423b824f32518319f6da85d819003 (diff) | |
parent | db52ecc2953d932b2fc1c62e585231659edd1d98 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/vapier/blackfin: (30 commits)
Blackfin: SMP: fix continuation lines
Blackfin: acvilon: fix timeout usage for I2C
Blackfin: fix typo in BF537 IRQ comment
Blackfin: unify duplicate MEM_MT48LC32M8A2_75 kconfig options
Blackfin: set ARCH_KMALLOC_MINALIGN
Blackfin: use atomic kmalloc in L1 alloc so it too can be atomic
Blackfin: another year of changes (update copyright in boot log)
Blackfin: optimize strncpy a bit
Blackfin: isram: clean up ITEST_COMMAND macro and improve the selftests
Blackfin: move string functions to normal lib/ assembly
Blackfin: SIC: cut down on IAR MMR reads a bit
Blackfin: bf537-minotaur: fix build errors due to header changes
Blackfin: kgdb: pass up the CC register instead of a 0 stub
Blackfin: handle HW errors in the new "FAULT" printing code
Blackfin: show the whole accumulator in the pseudo DBG insn
Blackfin: support all possible registers in the pseudo instructions
Blackfin: add support for the DBG (debug output) pseudo insn
Blackfin: change the BUG opcode to an unused 16-bit opcode
Blackfin: allow NMI watchdog to be used w/RETN as a scratch reg
Blackfin: add support for the DBGA (debug assert) pseudo insn
...
Diffstat (limited to 'arch/blackfin/mm/init.c')
-rw-r--r-- | arch/blackfin/mm/init.c | 60 |
1 files changed, 17 insertions, 43 deletions
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c index 355b87aa6b93..bb4e8fff4b55 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 |
@@ -52,40 +40,26 @@ EXPORT_SYMBOL(cpu_pda); | |||
52 | void __init paging_init(void) | 40 | void __init paging_init(void) |
53 | { | 41 | { |
54 | /* | 42 | /* |
55 | * make sure start_mem is page aligned, otherwise bootmem and | 43 | * make sure start_mem is page aligned, otherwise bootmem and |
56 | * page_alloc get different views og the world | 44 | * page_alloc get different views of the world |
57 | */ | 45 | */ |
58 | unsigned long end_mem = memory_end & PAGE_MASK; | 46 | unsigned long end_mem = memory_end & PAGE_MASK; |
59 | 47 | ||
60 | pr_debug("start_mem is %#lx virtual_end is %#lx\n", PAGE_ALIGN(memory_start), end_mem); | 48 | unsigned long zones_size[MAX_NR_ZONES] = { |
61 | 49 | [0] = 0, | |
62 | /* | 50 | [ZONE_DMA] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT, |
63 | * initialize the bad page table and bad page to point | 51 | [ZONE_NORMAL] = 0, |
64 | * to a couple of allocated pages | 52 | #ifdef CONFIG_HIGHMEM |
65 | */ | 53 | [ZONE_HIGHMEM] = 0, |
66 | empty_bad_page_table = (unsigned long)alloc_bootmem_pages(PAGE_SIZE); | 54 | #endif |
67 | empty_bad_page = (unsigned long)alloc_bootmem_pages(PAGE_SIZE); | 55 | }; |
68 | empty_zero_page = (unsigned long)alloc_bootmem_pages(PAGE_SIZE); | ||
69 | memset((void *)empty_zero_page, 0, PAGE_SIZE); | ||
70 | 56 | ||
71 | /* | 57 | /* Set up SFC/DFC registers (user data space) */ |
72 | * Set up SFC/DFC registers (user data space) | ||
73 | */ | ||
74 | set_fs(KERNEL_DS); | 58 | set_fs(KERNEL_DS); |
75 | 59 | ||
76 | pr_debug("free_area_init -> start_mem is %#lx virtual_end is %#lx\n", | 60 | pr_debug("free_area_init -> start_mem is %#lx virtual_end is %#lx\n", |
77 | PAGE_ALIGN(memory_start), end_mem); | 61 | PAGE_ALIGN(memory_start), end_mem); |
78 | 62 | free_area_init(zones_size); | |
79 | { | ||
80 | unsigned long zones_size[MAX_NR_ZONES] = { 0, }; | ||
81 | |||
82 | zones_size[ZONE_DMA] = (end_mem - PAGE_OFFSET) >> PAGE_SHIFT; | ||
83 | zones_size[ZONE_NORMAL] = 0; | ||
84 | #ifdef CONFIG_HIGHMEM | ||
85 | zones_size[ZONE_HIGHMEM] = 0; | ||
86 | #endif | ||
87 | free_area_init(zones_size); | ||
88 | } | ||
89 | } | 63 | } |
90 | 64 | ||
91 | asmlinkage void __init init_pda(void) | 65 | asmlinkage void __init init_pda(void) |