diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-26 00:31:23 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-26 00:31:23 -0500 |
commit | 801c0be81454901e02c49abe12929c67e7d1cb55 (patch) | |
tree | 749cb64a2829b174e6d5df76da756285e7554002 /include/linux | |
parent | 13b2eda64d14d0a0c15c092664c7351ea58ea851 (diff) | |
parent | 13093cb0e59053bf97910de3a24f07cdff71c62c (diff) |
Merge branches 'x86/urgent' and 'x86/pat' into x86/core
Conflicts:
arch/x86/include/asm/pat.h
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/io-mapping.h | 6 |
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 * | |||
49 | io_mapping_create_wc(resource_size_t base, unsigned long size) | 49 | io_mapping_create_wc(resource_size_t base, unsigned long size) |
50 | { | 50 | { |
51 | struct io_mapping *iomap; | 51 | struct io_mapping *iomap; |
52 | pgprot_t prot; | ||
52 | 53 | ||
53 | if (!is_io_mapping_possible(base, size)) | 54 | if (!reserve_io_memtype_wc(base, size, &prot)) |
54 | return NULL; | 55 | return NULL; |
55 | 56 | ||
56 | iomap = kmalloc(sizeof(*iomap), GFP_KERNEL); | 57 | iomap = kmalloc(sizeof(*iomap), GFP_KERNEL); |
@@ -59,13 +60,14 @@ io_mapping_create_wc(resource_size_t base, unsigned long size) | |||
59 | 60 | ||
60 | iomap->base = base; | 61 | iomap->base = base; |
61 | iomap->size = size; | 62 | iomap->size = size; |
62 | iomap->prot = pgprot_writecombine(__pgprot(__PAGE_KERNEL)); | 63 | iomap->prot = prot; |
63 | return iomap; | 64 | return iomap; |
64 | } | 65 | } |
65 | 66 | ||
66 | static inline void | 67 | static inline void |
67 | io_mapping_free(struct io_mapping *mapping) | 68 | io_mapping_free(struct io_mapping *mapping) |
68 | { | 69 | { |
70 | free_io_memtype(mapping->base, mapping->size); | ||
69 | kfree(mapping); | 71 | kfree(mapping); |
70 | } | 72 | } |
71 | 73 | ||