diff options
Diffstat (limited to 'arch/xtensa/mm')
-rw-r--r-- | arch/xtensa/mm/init.c | 13 | ||||
-rw-r--r-- | arch/xtensa/mm/mmu.c | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/arch/xtensa/mm/init.c b/arch/xtensa/mm/init.c index 479d7537a32a..aff108df92d3 100644 --- a/arch/xtensa/mm/init.c +++ b/arch/xtensa/mm/init.c | |||
@@ -90,7 +90,7 @@ int __init mem_reserve(unsigned long start, unsigned long end, int must_exist) | |||
90 | 90 | ||
91 | 91 | ||
92 | /* | 92 | /* |
93 | * Initialize the bootmem system and give it all the memory we have available. | 93 | * Initialize the bootmem system and give it all low memory we have available. |
94 | */ | 94 | */ |
95 | 95 | ||
96 | void __init bootmem_init(void) | 96 | void __init bootmem_init(void) |
@@ -142,9 +142,14 @@ void __init bootmem_init(void) | |||
142 | 142 | ||
143 | /* Add all remaining memory pieces into the bootmem map */ | 143 | /* Add all remaining memory pieces into the bootmem map */ |
144 | 144 | ||
145 | for (i=0; i<sysmem.nr_banks; i++) | 145 | for (i = 0; i < sysmem.nr_banks; i++) { |
146 | free_bootmem(sysmem.bank[i].start, | 146 | if (sysmem.bank[i].start >> PAGE_SHIFT < max_low_pfn) { |
147 | sysmem.bank[i].end - sysmem.bank[i].start); | 147 | unsigned long end = min(max_low_pfn << PAGE_SHIFT, |
148 | sysmem.bank[i].end); | ||
149 | free_bootmem(sysmem.bank[i].start, | ||
150 | end - sysmem.bank[i].start); | ||
151 | } | ||
152 | } | ||
148 | 153 | ||
149 | } | 154 | } |
150 | 155 | ||
diff --git a/arch/xtensa/mm/mmu.c b/arch/xtensa/mm/mmu.c index 36ec171698b8..861203e958da 100644 --- a/arch/xtensa/mm/mmu.c +++ b/arch/xtensa/mm/mmu.c | |||
@@ -39,7 +39,7 @@ void init_mmu(void) | |||
39 | set_itlbcfg_register(0); | 39 | set_itlbcfg_register(0); |
40 | set_dtlbcfg_register(0); | 40 | set_dtlbcfg_register(0); |
41 | #endif | 41 | #endif |
42 | #if XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY && CONFIG_OF | 42 | #if XCHAL_HAVE_PTP_MMU && XCHAL_HAVE_SPANNING_WAY && defined(CONFIG_OF) |
43 | /* | 43 | /* |
44 | * Update the IO area mapping in case xtensa_kio_paddr has changed | 44 | * Update the IO area mapping in case xtensa_kio_paddr has changed |
45 | */ | 45 | */ |