Lines 51-57
Link Here
|
51 |
#include <asm/numa.h> |
51 |
#include <asm/numa.h> |
52 |
#include <asm/cacheflush.h> |
52 |
#include <asm/cacheflush.h> |
53 |
#include <asm/init.h> |
53 |
#include <asm/init.h> |
54 |
#include <asm/setup.h> |
|
|
55 |
|
54 |
|
56 |
static int __init parse_direct_gbpages_off(char *arg) |
55 |
static int __init parse_direct_gbpages_off(char *arg) |
57 |
{ |
56 |
{ |
Lines 294-311
void __init init_extra_mapping_uc(unsigned long phys, unsigned long size)
Link Here
|
294 |
* to the compile time generated pmds. This results in invalid pmds up |
293 |
* to the compile time generated pmds. This results in invalid pmds up |
295 |
* to the point where we hit the physaddr 0 mapping. |
294 |
* to the point where we hit the physaddr 0 mapping. |
296 |
* |
295 |
* |
297 |
* We limit the mappings to the region from _text to _brk_end. _brk_end |
296 |
* We limit the mappings to the region from _text to _end. _end is |
298 |
* is rounded up to the 2MB boundary. This catches the invalid pmds as |
297 |
* rounded up to the 2MB boundary. This catches the invalid pmds as |
299 |
* well, as they are located before _text: |
298 |
* well, as they are located before _text: |
300 |
*/ |
299 |
*/ |
301 |
void __init cleanup_highmap(void) |
300 |
void __init cleanup_highmap(void) |
302 |
{ |
301 |
{ |
303 |
unsigned long vaddr = __START_KERNEL_map; |
302 |
unsigned long vaddr = __START_KERNEL_map; |
304 |
unsigned long vaddr_end = __START_KERNEL_map + (max_pfn_mapped << PAGE_SHIFT); |
303 |
unsigned long end = roundup((unsigned long)_end, PMD_SIZE) - 1; |
305 |
unsigned long end = roundup((unsigned long)_brk_end, PMD_SIZE) - 1; |
|
|
306 |
pmd_t *pmd = level2_kernel_pgt; |
304 |
pmd_t *pmd = level2_kernel_pgt; |
|
|
305 |
pmd_t *last_pmd = pmd + PTRS_PER_PMD; |
307 |
|
306 |
|
308 |
for (; vaddr + PMD_SIZE - 1 < vaddr_end; pmd++, vaddr += PMD_SIZE) { |
307 |
for (; pmd < last_pmd; pmd++, vaddr += PMD_SIZE) { |
309 |
if (pmd_none(*pmd)) |
308 |
if (pmd_none(*pmd)) |
310 |
continue; |
309 |
continue; |
311 |
if (vaddr < (unsigned long) _text || vaddr > end) |
310 |
if (vaddr < (unsigned long) _text || vaddr > end) |