diff options
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/init.c | 5 | ||||
-rw-r--r-- | arch/x86/mm/pat.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/mm/init.c b/arch/x86/mm/init.c index 4903a03ae876..59b7fc453277 100644 --- a/arch/x86/mm/init.c +++ b/arch/x86/mm/init.c | |||
@@ -410,9 +410,8 @@ void __init init_mem_mapping(void) | |||
410 | /* the ISA range is always mapped regardless of memory holes */ | 410 | /* the ISA range is always mapped regardless of memory holes */ |
411 | init_memory_mapping(0, ISA_END_ADDRESS); | 411 | init_memory_mapping(0, ISA_END_ADDRESS); |
412 | 412 | ||
413 | /* xen has big range in reserved near end of ram, skip it at first */ | 413 | /* xen has big range in reserved near end of ram, skip it at first.*/ |
414 | addr = memblock_find_in_range(ISA_END_ADDRESS, end, PMD_SIZE, | 414 | addr = memblock_find_in_range(ISA_END_ADDRESS, end, PMD_SIZE, PMD_SIZE); |
415 | PAGE_SIZE); | ||
416 | real_end = addr + PMD_SIZE; | 415 | real_end = addr + PMD_SIZE; |
417 | 416 | ||
418 | /* step_size need to be small so pgt_buf from BRK could cover it */ | 417 | /* step_size need to be small so pgt_buf from BRK could cover it */ |
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index 2610bd93c896..657438858e83 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c | |||
@@ -563,6 +563,13 @@ int kernel_map_sync_memtype(u64 base, unsigned long size, unsigned long flags) | |||
563 | if (base > __pa(high_memory-1)) | 563 | if (base > __pa(high_memory-1)) |
564 | return 0; | 564 | return 0; |
565 | 565 | ||
566 | /* | ||
567 | * some areas in the middle of the kernel identity range | ||
568 | * are not mapped, like the PCI space. | ||
569 | */ | ||
570 | if (!page_is_ram(base >> PAGE_SHIFT)) | ||
571 | return 0; | ||
572 | |||
566 | id_sz = (__pa(high_memory-1) <= base + size) ? | 573 | id_sz = (__pa(high_memory-1) <= base + size) ? |
567 | __pa(high_memory) - base : | 574 | __pa(high_memory) - base : |
568 | size; | 575 | size; |