x86, PAT: Consolidate code in pat_x_mtrr_type() and reserve_memtype()
Fix pat_x_mtrr_type() to use UC_MINUS when the mtrr type return UC. This is to be consistent with ioremap() and ioremap_nocache() which uses UC_MINUS. Consolidate the code such that reserve_memtype() also uses pat_x_mtrr_type() when the caller doesn't specify any special attribute (non WB attribute). Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> LKML-Reference: <20090409212708.939936000@intel.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
committed by
Ingo Molnar
parent
3869c4aa18
commit
b6ff32d9aa
@ -375,7 +375,8 @@ static void __iomem *ioremap_default(resource_size_t phys_addr,
|
||||
* - UC_MINUS for non-WB-able memory with no other conflicting mappings
|
||||
* - Inherit from confliting mappings otherwise
|
||||
*/
|
||||
err = reserve_memtype(phys_addr, phys_addr + size, -1, &flags);
|
||||
err = reserve_memtype(phys_addr, phys_addr + size,
|
||||
_PAGE_CACHE_WB, &flags);
|
||||
if (err < 0)
|
||||
return NULL;
|
||||
|
||||
|
Reference in New Issue
Block a user