aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/mm/ioremap.c2
-rw-r--r--arch/x86/mm/pat.c5
-rw-r--r--include/asm-x86/e820.h1
3 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/mm/ioremap.c b/arch/x86/mm/ioremap.c
index 7452eb31ed12..6d9960dd6f35 100644
--- a/arch/x86/mm/ioremap.c
+++ b/arch/x86/mm/ioremap.c
@@ -142,7 +142,7 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
142 /* 142 /*
143 * Don't remap the low PCI/ISA area, it's always mapped.. 143 * Don't remap the low PCI/ISA area, it's always mapped..
144 */ 144 */
145 if (phys_addr >= ISA_START_ADDRESS && last_addr < ISA_END_ADDRESS) 145 if (is_ISA_range(phys_addr, last_addr))
146 return (__force void __iomem *)phys_to_virt(phys_addr); 146 return (__force void __iomem *)phys_to_virt(phys_addr);
147 147
148 /* 148 /*
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index 227df3ca9bfd..5bbc22efe4e5 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -215,7 +215,7 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
215 } 215 }
216 216
217 /* Low ISA region is always mapped WB in page table. No need to track */ 217 /* Low ISA region is always mapped WB in page table. No need to track */
218 if (start >= ISA_START_ADDRESS && (end - 1) <= ISA_END_ADDRESS) { 218 if (is_ISA_range(start, end - 1)) {
219 if (ret_type) 219 if (ret_type)
220 *ret_type = _PAGE_CACHE_WB; 220 *ret_type = _PAGE_CACHE_WB;
221 221
@@ -415,9 +415,8 @@ int free_memtype(u64 start, u64 end)
415 } 415 }
416 416
417 /* Low ISA region is always mapped WB. No need to track */ 417 /* Low ISA region is always mapped WB. No need to track */
418 if (start >= ISA_START_ADDRESS && end <= ISA_END_ADDRESS) { 418 if (is_ISA_range(start, end - 1))
419 return 0; 419 return 0;
420 }
421 420
422 spin_lock(&memtype_lock); 421 spin_lock(&memtype_lock);
423 list_for_each_entry(ml, &memtype_list, nd) { 422 list_for_each_entry(ml, &memtype_list, nd) {
diff --git a/include/asm-x86/e820.h b/include/asm-x86/e820.h
index 7004251fc66b..5103d0b2c46c 100644
--- a/include/asm-x86/e820.h
+++ b/include/asm-x86/e820.h
@@ -24,6 +24,7 @@ struct e820map {
24 24
25#define ISA_START_ADDRESS 0xa0000 25#define ISA_START_ADDRESS 0xa0000
26#define ISA_END_ADDRESS 0x100000 26#define ISA_END_ADDRESS 0x100000
27#define is_ISA_range(s, e) ((s) >= ISA_START_ADDRESS && (e) < ISA_END_ADDRESS)
27 28
28#define BIOS_BEGIN 0x000a0000 29#define BIOS_BEGIN 0x000a0000
29#define BIOS_END 0x00100000 30#define BIOS_END 0x00100000