lkml.org 
[lkml]   [2017]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 1/2] x86/mm: add a function to check if a pfn is UC/UC-
From
Date
On 08/11/2017 08:56, Haozhong Zhang wrote:
> +bool pat_pfn_is_uc_or_uc_minus(unsigned long pfn)
> +{
> + enum page_cache_mode cm = lookup_memtype(PFN_PHYS(pfn));
> +
> + return cm == _PAGE_CACHE_MODE_UC || cm == _PAGE_CACHE_MODE_UC_MINUS;
> +}
> +EXPORT_SYMBOL_GPL(pat_pfn_is_uc_or_uc_minus);
> +

As discussed in the reply to v2, this should include WC too. The
function name could become something like pat_pfn_downgraded_by_uc_mtrr.

Thanks,

Paolo

\
 
 \ /
  Last update: 2017-12-18 13:56    [W:0.596 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site