aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/mm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/mm')
-rw-r--r--arch/x86/mm/pat.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c
index e78cd0ec2bc..38a66ef9426 100644
--- a/arch/x86/mm/pat.c
+++ b/arch/x86/mm/pat.c
@@ -20,6 +20,7 @@
20#include <asm/cacheflush.h> 20#include <asm/cacheflush.h>
21#include <asm/processor.h> 21#include <asm/processor.h>
22#include <asm/tlbflush.h> 22#include <asm/tlbflush.h>
23#include <asm/x86_init.h>
23#include <asm/pgtable.h> 24#include <asm/pgtable.h>
24#include <asm/fcntl.h> 25#include <asm/fcntl.h>
25#include <asm/e820.h> 26#include <asm/e820.h>
@@ -348,6 +349,11 @@ static int free_ram_pages_type(u64 start, u64 end)
348 return 0; 349 return 0;
349} 350}
350 351
352int default_is_untracked_pat_range(u64 start, u64 end)
353{
354 return is_ISA_range(start, end);
355}
356
351/* 357/*
352 * req_type typically has one of the: 358 * req_type typically has one of the:
353 * - _PAGE_CACHE_WB 359 * - _PAGE_CACHE_WB
@@ -388,7 +394,7 @@ int reserve_memtype(u64 start, u64 end, unsigned long req_type,
388 } 394 }
389 395
390 /* Low ISA region is always mapped WB in page table. No need to track */ 396 /* Low ISA region is always mapped WB in page table. No need to track */
391 if (is_ISA_range(start, end - 1)) { 397 if (x86_platform.is_untracked_pat_range(start, end - 1)) {
392 if (new_type) 398 if (new_type)
393 *new_type = _PAGE_CACHE_WB; 399 *new_type = _PAGE_CACHE_WB;
394 return 0; 400 return 0;
@@ -499,7 +505,7 @@ int free_memtype(u64 start, u64 end)
499 return 0; 505 return 0;
500 506
501 /* Low ISA region is always mapped WB. No need to track */ 507 /* Low ISA region is always mapped WB. No need to track */
502 if (is_ISA_range(start, end - 1)) 508 if (x86_platform.is_untracked_pat_range(start, end - 1))
503 return 0; 509 return 0;
504 510
505 is_range_ram = pat_pagerange_is_ram(start, end); 511 is_range_ram = pat_pagerange_is_ram(start, end);
@@ -582,7 +588,7 @@ static unsigned long lookup_memtype(u64 paddr)
582 int rettype = _PAGE_CACHE_WB; 588 int rettype = _PAGE_CACHE_WB;
583 struct memtype *entry; 589 struct memtype *entry;
584 590
585 if (is_ISA_range(paddr, paddr + PAGE_SIZE - 1)) 591 if (x86_platform.is_untracked_pat_range(paddr, paddr + PAGE_SIZE - 1))
586 return rettype; 592 return rettype;
587 593
588 if (pat_pagerange_is_ram(paddr, paddr + PAGE_SIZE)) { 594 if (pat_pagerange_is_ram(paddr, paddr + PAGE_SIZE)) {