diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-10-23 01:01:49 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-10-23 01:01:49 -0400 |
commit | 3dd41424090a0ca3a660218d06afe6ff4441bad3 (patch) | |
tree | 511ef1bb1799027fc5aad574adce49120ecadd87 /include/linux/io-mapping.h | |
parent | 5c5456402d467969b217d7fdd6670f8c8600f5a8 (diff) | |
parent | f6f94e2ab1b33f0082ac22d71f66385a60d8157f (diff) |
Merge commit 'v2.6.36' into wip-merge-2.6.36
Conflicts:
Makefile
arch/x86/include/asm/unistd_32.h
arch/x86/kernel/syscall_table_32.S
kernel/sched.c
kernel/time/tick-sched.c
Relevant API and functions changes (solved in this commit):
- (API) .enqueue_task() (enqueue_task_litmus),
dequeue_task() (dequeue_task_litmus),
[litmus/sched_litmus.c]
- (API) .select_task_rq() (select_task_rq_litmus)
[litmus/sched_litmus.c]
- (API) sysrq_dump_trace_buffer() and sysrq_handle_kill_rt_tasks()
[litmus/sched_trace.c]
- struct kfifo internal buffer name changed (buffer -> buf)
[litmus/sched_trace.c]
- add_wait_queue_exclusive_locked -> __add_wait_queue_tail_exclusive
[litmus/fmlp.c]
- syscall numbers for both x86_32 and x86_64
Diffstat (limited to 'include/linux/io-mapping.h')
-rw-r--r-- | include/linux/io-mapping.h | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h index 25085ddd955f..7fb592793738 100644 --- a/include/linux/io-mapping.h +++ b/include/linux/io-mapping.h | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | #include <asm/page.h> | 24 | #include <asm/page.h> |
25 | #include <asm/iomap.h> | ||
26 | 25 | ||
27 | /* | 26 | /* |
28 | * The io_mapping mechanism provides an abstraction for mapping | 27 | * The io_mapping mechanism provides an abstraction for mapping |
@@ -33,6 +32,8 @@ | |||
33 | 32 | ||
34 | #ifdef CONFIG_HAVE_ATOMIC_IOMAP | 33 | #ifdef CONFIG_HAVE_ATOMIC_IOMAP |
35 | 34 | ||
35 | #include <asm/iomap.h> | ||
36 | |||
36 | struct io_mapping { | 37 | struct io_mapping { |
37 | resource_size_t base; | 38 | resource_size_t base; |
38 | unsigned long size; | 39 | unsigned long size; |
@@ -78,8 +79,10 @@ io_mapping_free(struct io_mapping *mapping) | |||
78 | } | 79 | } |
79 | 80 | ||
80 | /* Atomic map/unmap */ | 81 | /* Atomic map/unmap */ |
81 | static inline void * | 82 | static inline void __iomem * |
82 | io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) | 83 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
84 | unsigned long offset, | ||
85 | int slot) | ||
83 | { | 86 | { |
84 | resource_size_t phys_addr; | 87 | resource_size_t phys_addr; |
85 | unsigned long pfn; | 88 | unsigned long pfn; |
@@ -87,16 +90,16 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) | |||
87 | BUG_ON(offset >= mapping->size); | 90 | BUG_ON(offset >= mapping->size); |
88 | phys_addr = mapping->base + offset; | 91 | phys_addr = mapping->base + offset; |
89 | pfn = (unsigned long) (phys_addr >> PAGE_SHIFT); | 92 | pfn = (unsigned long) (phys_addr >> PAGE_SHIFT); |
90 | return iomap_atomic_prot_pfn(pfn, KM_USER0, mapping->prot); | 93 | return iomap_atomic_prot_pfn(pfn, slot, mapping->prot); |
91 | } | 94 | } |
92 | 95 | ||
93 | static inline void | 96 | static inline void |
94 | io_mapping_unmap_atomic(void *vaddr) | 97 | io_mapping_unmap_atomic(void __iomem *vaddr, int slot) |
95 | { | 98 | { |
96 | iounmap_atomic(vaddr, KM_USER0); | 99 | iounmap_atomic(vaddr, slot); |
97 | } | 100 | } |
98 | 101 | ||
99 | static inline void * | 102 | static inline void __iomem * |
100 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | 103 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) |
101 | { | 104 | { |
102 | resource_size_t phys_addr; | 105 | resource_size_t phys_addr; |
@@ -108,7 +111,7 @@ io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | |||
108 | } | 111 | } |
109 | 112 | ||
110 | static inline void | 113 | static inline void |
111 | io_mapping_unmap(void *vaddr) | 114 | io_mapping_unmap(void __iomem *vaddr) |
112 | { | 115 | { |
113 | iounmap(vaddr); | 116 | iounmap(vaddr); |
114 | } | 117 | } |
@@ -122,36 +125,38 @@ struct io_mapping; | |||
122 | static inline struct io_mapping * | 125 | static inline struct io_mapping * |
123 | io_mapping_create_wc(resource_size_t base, unsigned long size) | 126 | io_mapping_create_wc(resource_size_t base, unsigned long size) |
124 | { | 127 | { |
125 | return (struct io_mapping *) ioremap_wc(base, size); | 128 | return (struct io_mapping __force *) ioremap_wc(base, size); |
126 | } | 129 | } |
127 | 130 | ||
128 | static inline void | 131 | static inline void |
129 | io_mapping_free(struct io_mapping *mapping) | 132 | io_mapping_free(struct io_mapping *mapping) |
130 | { | 133 | { |
131 | iounmap(mapping); | 134 | iounmap((void __force __iomem *) mapping); |
132 | } | 135 | } |
133 | 136 | ||
134 | /* Atomic map/unmap */ | 137 | /* Atomic map/unmap */ |
135 | static inline void * | 138 | static inline void __iomem * |
136 | io_mapping_map_atomic_wc(struct io_mapping *mapping, unsigned long offset) | 139 | io_mapping_map_atomic_wc(struct io_mapping *mapping, |
140 | unsigned long offset, | ||
141 | int slot) | ||
137 | { | 142 | { |
138 | return ((char *) mapping) + offset; | 143 | return ((char __force __iomem *) mapping) + offset; |
139 | } | 144 | } |
140 | 145 | ||
141 | static inline void | 146 | static inline void |
142 | io_mapping_unmap_atomic(void *vaddr) | 147 | io_mapping_unmap_atomic(void __iomem *vaddr, int slot) |
143 | { | 148 | { |
144 | } | 149 | } |
145 | 150 | ||
146 | /* Non-atomic map/unmap */ | 151 | /* Non-atomic map/unmap */ |
147 | static inline void * | 152 | static inline void __iomem * |
148 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) | 153 | io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) |
149 | { | 154 | { |
150 | return ((char *) mapping) + offset; | 155 | return ((char __force __iomem *) mapping) + offset; |
151 | } | 156 | } |
152 | 157 | ||
153 | static inline void | 158 | static inline void |
154 | io_mapping_unmap(void *vaddr) | 159 | io_mapping_unmap(void __iomem *vaddr) |
155 | { | 160 | { |
156 | } | 161 | } |
157 | 162 | ||