summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-02-26 06:31:23 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-26 06:31:23 +0100
commit801c0be81454901e02c49abe12929c67e7d1cb55 (patch)
tree749cb64a2829b174e6d5df76da756285e7554002 /include
parent13b2eda64d14d0a0c15c092664c7351ea58ea851 (diff)
parent13093cb0e59053bf97910de3a24f07cdff71c62c (diff)
downloadlinux-801c0be81454901e02c49abe12929c67e7d1cb55.tar.gz
linux-801c0be81454901e02c49abe12929c67e7d1cb55.tar.bz2
linux-801c0be81454901e02c49abe12929c67e7d1cb55.zip
Merge branches 'x86/urgent' and 'x86/pat' into x86/core
Conflicts: arch/x86/include/asm/pat.h
Diffstat (limited to 'include')
-rw-r--r--include/linux/io-mapping.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
index cbc2f0cd631b..f1ed66c43787 100644
--- a/include/linux/io-mapping.h
+++ b/include/linux/io-mapping.h
@@ -49,8 +49,9 @@ static inline struct io_mapping *
io_mapping_create_wc(resource_size_t base, unsigned long size)
{
struct io_mapping *iomap;
+ pgprot_t prot;
- if (!is_io_mapping_possible(base, size))
+ if (!reserve_io_memtype_wc(base, size, &prot))
return NULL;
iomap = kmalloc(sizeof(*iomap), GFP_KERNEL);
@@ -59,13 +60,14 @@ io_mapping_create_wc(resource_size_t base, unsigned long size)
iomap->base = base;
iomap->size = size;
- iomap->prot = pgprot_writecombine(__pgprot(__PAGE_KERNEL));
+ iomap->prot = prot;
return iomap;
}
static inline void
io_mapping_free(struct io_mapping *mapping)
{
+ free_io_memtype(mapping->base, mapping->size);
kfree(mapping);
}