aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2014-06-22 20:56:22 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-06-23 22:43:13 -0400
commit0eb5736828722bd274519fab87b915da287ffd59 (patch)
tree64104632ccda701e0c6d22753c03672d8b236d2a /arch/powerpc
parent68986c9f0f4552c34c248501eb0c690553866d6e (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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/iomap.c20
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}
24unsigned int ioread16be(void __iomem *addr) 24unsigned int ioread16be(void __iomem *addr)
25{ 25{
26 return in_be16(addr); 26 return readw_be(addr);
27} 27}
28unsigned int ioread32(void __iomem *addr) 28unsigned int ioread32(void __iomem *addr)
29{ 29{
@@ -31,7 +31,7 @@ unsigned int ioread32(void __iomem *addr)
31} 31}
32unsigned int ioread32be(void __iomem *addr) 32unsigned int ioread32be(void __iomem *addr)
33{ 33{
34 return in_be32(addr); 34 return readl_be(addr);
35} 35}
36EXPORT_SYMBOL(ioread8); 36EXPORT_SYMBOL(ioread8);
37EXPORT_SYMBOL(ioread16); 37EXPORT_SYMBOL(ioread16);
@@ -49,7 +49,7 @@ void iowrite16(u16 val, void __iomem *addr)
49} 49}
50void iowrite16be(u16 val, void __iomem *addr) 50void iowrite16be(u16 val, void __iomem *addr)
51{ 51{
52 out_be16(addr, val); 52 writew_be(val, addr);
53} 53}
54void iowrite32(u32 val, void __iomem *addr) 54void iowrite32(u32 val, void __iomem *addr)
55{ 55{
@@ -57,7 +57,7 @@ void iowrite32(u32 val, void __iomem *addr)
57} 57}
58void iowrite32be(u32 val, void __iomem *addr) 58void iowrite32be(u32 val, void __iomem *addr)
59{ 59{
60 out_be32(addr, val); 60 writel_be(val, addr);
61} 61}
62EXPORT_SYMBOL(iowrite8); 62EXPORT_SYMBOL(iowrite8);
63EXPORT_SYMBOL(iowrite16); 63EXPORT_SYMBOL(iowrite16);
@@ -75,15 +75,15 @@ EXPORT_SYMBOL(iowrite32be);
75 */ 75 */
76void ioread8_rep(void __iomem *addr, void *dst, unsigned long count) 76void 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}
80void ioread16_rep(void __iomem *addr, void *dst, unsigned long count) 80void 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}
84void ioread32_rep(void __iomem *addr, void *dst, unsigned long count) 84void 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}
88EXPORT_SYMBOL(ioread8_rep); 88EXPORT_SYMBOL(ioread8_rep);
89EXPORT_SYMBOL(ioread16_rep); 89EXPORT_SYMBOL(ioread16_rep);
@@ -91,15 +91,15 @@ EXPORT_SYMBOL(ioread32_rep);
91 91
92void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count) 92void 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}
96void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count) 96void 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}
100void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count) 100void 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}
104EXPORT_SYMBOL(iowrite8_rep); 104EXPORT_SYMBOL(iowrite8_rep);
105EXPORT_SYMBOL(iowrite16_rep); 105EXPORT_SYMBOL(iowrite16_rep);