Merge branch 'x86-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-pat-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86, pat: Fix cacheflush address in change_page_attr_set_clr() mm: remove !NUMA condition from PAGEFLAGS_EXTENDED condition set x86: Fix earlyprintk=dbgp for machines without NX x86, pat: Sanity check remap_pfn_range for RAM region x86, pat: Lookup the protection from memtype list on vm_insert_pfn() x86, pat: Add lookup_memtype to get the current memtype of a paddr x86, pat: Use page flags to track memtypes of RAM pages x86, pat: Generalize the use of page flag PG_uncached x86, pat: Add rbtree to do quick lookup in memtype tracking x86, pat: Add PAT reserve free to io_mapping* APIs x86, pat: New i/f for driver to request memtype for IO regions x86, pat: ioremap to follow same PAT restrictions as other PAT users x86, pat: Keep identity maps consistent with mmaps even when pat_disabled x86, mtrr: make mtrr_aps_delayed_init static bool x86, pat/mtrr: Rendezvous all the cpus for MTRR/PAT init generic-ipi: Allow cpus not yet online to call smp_call_function with irqs disabled x86: Fix an incorrect argument of reserve_bootmem() x86: Fix system crash when loading with "reservetop" parameter
This commit is contained in:
@ -158,24 +158,14 @@ static void __iomem *__ioremap_caller(resource_size_t phys_addr,
|
||||
retval = reserve_memtype(phys_addr, (u64)phys_addr + size,
|
||||
prot_val, &new_prot_val);
|
||||
if (retval) {
|
||||
pr_debug("Warning: reserve_memtype returned %d\n", retval);
|
||||
printk(KERN_ERR "ioremap reserve_memtype failed %d\n", retval);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (prot_val != new_prot_val) {
|
||||
/*
|
||||
* Do not fallback to certain memory types with certain
|
||||
* requested type:
|
||||
* - request is uc-, return cannot be write-back
|
||||
* - request is uc-, return cannot be write-combine
|
||||
* - request is write-combine, return cannot be write-back
|
||||
*/
|
||||
if ((prot_val == _PAGE_CACHE_UC_MINUS &&
|
||||
(new_prot_val == _PAGE_CACHE_WB ||
|
||||
new_prot_val == _PAGE_CACHE_WC)) ||
|
||||
(prot_val == _PAGE_CACHE_WC &&
|
||||
new_prot_val == _PAGE_CACHE_WB)) {
|
||||
pr_debug(
|
||||
if (!is_new_memtype_allowed(phys_addr, size,
|
||||
prot_val, new_prot_val)) {
|
||||
printk(KERN_ERR
|
||||
"ioremap error for 0x%llx-0x%llx, requested 0x%lx, got 0x%lx\n",
|
||||
(unsigned long long)phys_addr,
|
||||
(unsigned long long)(phys_addr + size),
|
||||
|
Reference in New Issue
Block a user