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:
@@ -49,23 +49,30 @@ static inline struct io_mapping *
|
||||
io_mapping_create_wc(resource_size_t base, unsigned long size)
|
||||
{
|
||||
struct io_mapping *iomap;
|
||||
|
||||
if (!is_io_mapping_possible(base, size))
|
||||
return NULL;
|
||||
pgprot_t prot;
|
||||
|
||||
iomap = kmalloc(sizeof(*iomap), GFP_KERNEL);
|
||||
if (!iomap)
|
||||
return NULL;
|
||||
goto out_err;
|
||||
|
||||
if (iomap_create_wc(base, size, &prot))
|
||||
goto out_free;
|
||||
|
||||
iomap->base = base;
|
||||
iomap->size = size;
|
||||
iomap->prot = pgprot_writecombine(__pgprot(__PAGE_KERNEL));
|
||||
iomap->prot = prot;
|
||||
return iomap;
|
||||
|
||||
out_free:
|
||||
kfree(iomap);
|
||||
out_err:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static inline void
|
||||
io_mapping_free(struct io_mapping *mapping)
|
||||
{
|
||||
iomap_free(mapping->base, mapping->size);
|
||||
kfree(mapping);
|
||||
}
|
||||
|
||||
|
@@ -99,7 +99,7 @@ enum pageflags {
|
||||
#ifdef CONFIG_HAVE_MLOCKED_PAGE_BIT
|
||||
PG_mlocked, /* Page is vma mlocked */
|
||||
#endif
|
||||
#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
|
||||
#ifdef CONFIG_ARCH_USES_PG_UNCACHED
|
||||
PG_uncached, /* Page has been mapped as uncached */
|
||||
#endif
|
||||
__NR_PAGEFLAGS,
|
||||
@@ -257,7 +257,7 @@ PAGEFLAG_FALSE(Mlocked)
|
||||
SETPAGEFLAG_NOOP(Mlocked) TESTCLEARFLAG_FALSE(Mlocked)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IA64_UNCACHED_ALLOCATOR
|
||||
#ifdef CONFIG_ARCH_USES_PG_UNCACHED
|
||||
PAGEFLAG(Uncached, uncached)
|
||||
#else
|
||||
PAGEFLAG_FALSE(Uncached)
|
||||
|
Reference in New Issue
Block a user