diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2014-06-22 20:56:22 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2014-06-23 22:43:13 -0400 |
commit | 0eb5736828722bd274519fab87b915da287ffd59 (patch) | |
tree | 64104632ccda701e0c6d22753c03672d8b236d2a | |
parent | 68986c9f0f4552c34c248501eb0c690553866d6e (diff) |
powerpc/kerenl: Enable EEH for IO accessors
In arch/powerpc/kernel/iomap.c, lots of IO reading accessors missed
to check EEH error as Ben pointed. The patch fixes it.
For the writing accessors, we change the called functions only for
making them look similar to the reading counterparts.
Suggested-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
-rw-r--r-- | arch/powerpc/kernel/iomap.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c index b82227e7e21b..12e48d56f771 100644 --- a/arch/powerpc/kernel/iomap.c +++ b/arch/powerpc/kernel/iomap.c | |||
@@ -23,7 +23,7 @@ unsigned int ioread16(void __iomem *addr) | |||
23 | } | 23 | } |
24 | unsigned int ioread16be(void __iomem *addr) | 24 | unsigned int ioread16be(void __iomem *addr) |
25 | { | 25 | { |
26 | return in_be16(addr); | 26 | return readw_be(addr); |
27 | } | 27 | } |
28 | unsigned int ioread32(void __iomem *addr) | 28 | unsigned int ioread32(void __iomem *addr) |
29 | { | 29 | { |
@@ -31,7 +31,7 @@ unsigned int ioread32(void __iomem *addr) | |||
31 | } | 31 | } |
32 | unsigned int ioread32be(void __iomem *addr) | 32 | unsigned int ioread32be(void __iomem *addr) |
33 | { | 33 | { |
34 | return in_be32(addr); | 34 | return readl_be(addr); |
35 | } | 35 | } |
36 | EXPORT_SYMBOL(ioread8); | 36 | EXPORT_SYMBOL(ioread8); |
37 | EXPORT_SYMBOL(ioread16); | 37 | EXPORT_SYMBOL(ioread16); |
@@ -49,7 +49,7 @@ void iowrite16(u16 val, void __iomem *addr) | |||
49 | } | 49 | } |
50 | void iowrite16be(u16 val, void __iomem *addr) | 50 | void iowrite16be(u16 val, void __iomem *addr) |
51 | { | 51 | { |
52 | out_be16(addr, val); | 52 | writew_be(val, addr); |
53 | } | 53 | } |
54 | void iowrite32(u32 val, void __iomem *addr) | 54 | void iowrite32(u32 val, void __iomem *addr) |
55 | { | 55 | { |
@@ -57,7 +57,7 @@ void iowrite32(u32 val, void __iomem *addr) | |||
57 | } | 57 | } |
58 | void iowrite32be(u32 val, void __iomem *addr) | 58 | void iowrite32be(u32 val, void __iomem *addr) |
59 | { | 59 | { |
60 | out_be32(addr, val); | 60 | writel_be(val, addr); |
61 | } | 61 | } |
62 | EXPORT_SYMBOL(iowrite8); | 62 | EXPORT_SYMBOL(iowrite8); |
63 | EXPORT_SYMBOL(iowrite16); | 63 | EXPORT_SYMBOL(iowrite16); |
@@ -75,15 +75,15 @@ EXPORT_SYMBOL(iowrite32be); | |||
75 | */ | 75 | */ |
76 | void ioread8_rep(void __iomem *addr, void *dst, unsigned long count) | 76 | void ioread8_rep(void __iomem *addr, void *dst, unsigned long count) |
77 | { | 77 | { |
78 | _insb((u8 __iomem *) addr, dst, count); | 78 | readsb(addr, dst, count); |
79 | } | 79 | } |
80 | void ioread16_rep(void __iomem *addr, void *dst, unsigned long count) | 80 | void ioread16_rep(void __iomem *addr, void *dst, unsigned long count) |
81 | { | 81 | { |
82 | _insw_ns((u16 __iomem *) addr, dst, count); | 82 | readsw(addr, dst, count); |
83 | } | 83 | } |
84 | void ioread32_rep(void __iomem *addr, void *dst, unsigned long count) | 84 | void ioread32_rep(void __iomem *addr, void *dst, unsigned long count) |
85 | { | 85 | { |
86 | _insl_ns((u32 __iomem *) addr, dst, count); | 86 | readsl(addr, dst, count); |
87 | } | 87 | } |
88 | EXPORT_SYMBOL(ioread8_rep); | 88 | EXPORT_SYMBOL(ioread8_rep); |
89 | EXPORT_SYMBOL(ioread16_rep); | 89 | EXPORT_SYMBOL(ioread16_rep); |
@@ -91,15 +91,15 @@ EXPORT_SYMBOL(ioread32_rep); | |||
91 | 91 | ||
92 | void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count) | 92 | void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count) |
93 | { | 93 | { |
94 | _outsb((u8 __iomem *) addr, src, count); | 94 | writesb(addr, src, count); |
95 | } | 95 | } |
96 | void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count) | 96 | void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count) |
97 | { | 97 | { |
98 | _outsw_ns((u16 __iomem *) addr, src, count); | 98 | writesw(addr, src, count); |
99 | } | 99 | } |
100 | void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count) | 100 | void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count) |
101 | { | 101 | { |
102 | _outsl_ns((u32 __iomem *) addr, src, count); | 102 | writesl(addr, src, count); |
103 | } | 103 | } |
104 | EXPORT_SYMBOL(iowrite8_rep); | 104 | EXPORT_SYMBOL(iowrite8_rep); |
105 | EXPORT_SYMBOL(iowrite16_rep); | 105 | EXPORT_SYMBOL(iowrite16_rep); |