diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /arch/x86/include/asm/io.h | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'arch/x86/include/asm/io.h')
-rw-r--r-- | arch/x86/include/asm/io.h | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 30a3e9776123..d02804d650c4 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h | |||
@@ -38,9 +38,10 @@ | |||
38 | 38 | ||
39 | #include <linux/string.h> | 39 | #include <linux/string.h> |
40 | #include <linux/compiler.h> | 40 | #include <linux/compiler.h> |
41 | #include <asm-generic/int-ll64.h> | ||
42 | #include <asm/page.h> | 41 | #include <asm/page.h> |
43 | 42 | ||
43 | #include <xen/xen.h> | ||
44 | |||
44 | #define build_mmio_read(name, size, type, reg, barrier) \ | 45 | #define build_mmio_read(name, size, type, reg, barrier) \ |
45 | static inline type name(const volatile void __iomem *addr) \ | 46 | static inline type name(const volatile void __iomem *addr) \ |
46 | { type ret; asm volatile("mov" size " %1,%0":reg (ret) \ | 47 | { type ret; asm volatile("mov" size " %1,%0":reg (ret) \ |
@@ -85,27 +86,6 @@ build_mmio_write(__writel, "l", unsigned int, "r", ) | |||
85 | build_mmio_read(readq, "q", unsigned long, "=r", :"memory") | 86 | build_mmio_read(readq, "q", unsigned long, "=r", :"memory") |
86 | build_mmio_write(writeq, "q", unsigned long, "r", :"memory") | 87 | build_mmio_write(writeq, "q", unsigned long, "r", :"memory") |
87 | 88 | ||
88 | #else | ||
89 | |||
90 | static inline __u64 readq(const volatile void __iomem *addr) | ||
91 | { | ||
92 | const volatile u32 __iomem *p = addr; | ||
93 | u32 low, high; | ||
94 | |||
95 | low = readl(p); | ||
96 | high = readl(p + 1); | ||
97 | |||
98 | return low + ((u64)high << 32); | ||
99 | } | ||
100 | |||
101 | static inline void writeq(__u64 val, volatile void __iomem *addr) | ||
102 | { | ||
103 | writel(val, addr); | ||
104 | writel(val >> 32, addr+4); | ||
105 | } | ||
106 | |||
107 | #endif | ||
108 | |||
109 | #define readq_relaxed(a) readq(a) | 89 | #define readq_relaxed(a) readq(a) |
110 | 90 | ||
111 | #define __raw_readq(a) readq(a) | 91 | #define __raw_readq(a) readq(a) |
@@ -115,6 +95,8 @@ static inline void writeq(__u64 val, volatile void __iomem *addr) | |||
115 | #define readq readq | 95 | #define readq readq |
116 | #define writeq writeq | 96 | #define writeq writeq |
117 | 97 | ||
98 | #endif | ||
99 | |||
118 | /** | 100 | /** |
119 | * virt_to_phys - map virtual addresses to physical | 101 | * virt_to_phys - map virtual addresses to physical |
120 | * @address: address to remap | 102 | * @address: address to remap |
@@ -206,6 +188,7 @@ static inline void __iomem *ioremap(resource_size_t offset, unsigned long size) | |||
206 | 188 | ||
207 | extern void iounmap(volatile void __iomem *addr); | 189 | extern void iounmap(volatile void __iomem *addr); |
208 | 190 | ||
191 | extern void set_iounmap_nonlazy(void); | ||
209 | 192 | ||
210 | #ifdef __KERNEL__ | 193 | #ifdef __KERNEL__ |
211 | 194 | ||
@@ -348,6 +331,18 @@ extern void __iomem *early_memremap(resource_size_t phys_addr, | |||
348 | unsigned long size); | 331 | unsigned long size); |
349 | extern void early_iounmap(void __iomem *addr, unsigned long size); | 332 | extern void early_iounmap(void __iomem *addr, unsigned long size); |
350 | extern void fixup_early_ioremap(void); | 333 | extern void fixup_early_ioremap(void); |
334 | extern bool is_early_ioremap_ptep(pte_t *ptep); | ||
335 | |||
336 | #ifdef CONFIG_XEN | ||
337 | struct bio_vec; | ||
338 | |||
339 | extern bool xen_biovec_phys_mergeable(const struct bio_vec *vec1, | ||
340 | const struct bio_vec *vec2); | ||
341 | |||
342 | #define BIOVEC_PHYS_MERGEABLE(vec1, vec2) \ | ||
343 | (__BIOVEC_PHYS_MERGEABLE(vec1, vec2) && \ | ||
344 | (!xen_domain() || xen_biovec_phys_mergeable(vec1, vec2))) | ||
345 | #endif /* CONFIG_XEN */ | ||
351 | 346 | ||
352 | #define IO_SPACE_LIMIT 0xffff | 347 | #define IO_SPACE_LIMIT 0xffff |
353 | 348 | ||