[PATCH v2 4/8] powerpc: add io{read,write}64 accessors

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3768d

Revision v2 of 2 in this series.

4 messages, 3 authors, 2016-05-11 · open the first message on its own page

[PATCH v2 4/8] powerpc: add io{read,write}64 accessors

From: Horia Geantă <horia.geanta@nxp.com>
Date: 2016-05-05 15:36:29

This will allow device drivers to consistently use io{read,write}XX
also for 64-bit accesses.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
---
 arch/powerpc/kernel/iomap.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c
index 12e48d56f771..3963f0b68d52 100644
--- a/arch/powerpc/kernel/iomap.c
+++ b/arch/powerpc/kernel/iomap.c
@@ -38,6 +38,18 @@ EXPORT_SYMBOL(ioread16);
 EXPORT_SYMBOL(ioread16be);
 EXPORT_SYMBOL(ioread32);
 EXPORT_SYMBOL(ioread32be);
+#ifdef __powerpc64__
+u64 ioread64(void __iomem *addr)
+{
+	return readq(addr);
+}
+u64 ioread64be(void __iomem *addr)
+{
+	return readq_be(addr);
+}
+EXPORT_SYMBOL(ioread64);
+EXPORT_SYMBOL(ioread64be);
+#endif /* __powerpc64__ */
 
 void iowrite8(u8 val, void __iomem *addr)
 {
@@ -64,6 +76,18 @@ EXPORT_SYMBOL(iowrite16);
 EXPORT_SYMBOL(iowrite16be);
 EXPORT_SYMBOL(iowrite32);
 EXPORT_SYMBOL(iowrite32be);
+#ifdef __powerpc64__
+void iowrite64(u64 val, void __iomem *addr)
+{
+	writeq(val, addr);
+}
+void iowrite64be(u64 val, void __iomem *addr)
+{
+	writeq_be(val, addr);
+}
+EXPORT_SYMBOL(iowrite64);
+EXPORT_SYMBOL(iowrite64be);
+#endif /* __powerpc64__ */
 
 /*
  * These are the "repeat read/write" functions. Note the
-- 
2.4.4

Re: [PATCH v2 4/8] powerpc: add io{read,write}64 accessors

From: Horia Ioan Geanta Neag <horia.geanta@nxp.com>
Date: 2016-05-09 08:53:18

On 5/5/2016 6:37 PM, Horia Geant=E3 wrote:=0A=
This will allow device drivers to consistently use io{read,write}XX=0A=
also for 64-bit accesses.=0A=
=0A=
Signed-off-by: Horia Geant=E3 <horia.geanta@nxp.com>=0A=
=0A=
It would be great if PPC maintainers could Ack this patch.=0A=
=0A=
As stated in the cover letter: https://lkml.org/lkml/2016/5/5/340=0A=
I'd like to go with the whole patch set via cryptodev-2.6 tree.=0A=
=0A=
Thanks,=0A=
Horia=0A=
=0A=
quoted hunk
---=0A=
 arch/powerpc/kernel/iomap.c | 24 ++++++++++++++++++++++++=0A=
 1 file changed, 24 insertions(+)=0A=
=0A=
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c=0A=
index 12e48d56f771..3963f0b68d52 100644=0A=
--- a/arch/powerpc/kernel/iomap.c=0A=
+++ b/arch/powerpc/kernel/iomap.c=0A=
@@ -38,6 +38,18 @@ EXPORT_SYMBOL(ioread16);=0A=
 EXPORT_SYMBOL(ioread16be);=0A=
 EXPORT_SYMBOL(ioread32);=0A=
 EXPORT_SYMBOL(ioread32be);=0A=
+#ifdef __powerpc64__=0A=
+u64 ioread64(void __iomem *addr)=0A=
+{=0A=
+	return readq(addr);=0A=
+}=0A=
+u64 ioread64be(void __iomem *addr)=0A=
+{=0A=
+	return readq_be(addr);=0A=
+}=0A=
+EXPORT_SYMBOL(ioread64);=0A=
+EXPORT_SYMBOL(ioread64be);=0A=
+#endif /* __powerpc64__ */=0A=
 =0A=
 void iowrite8(u8 val, void __iomem *addr)=0A=
 {=0A=
@@ -64,6 +76,18 @@ EXPORT_SYMBOL(iowrite16);=0A=
 EXPORT_SYMBOL(iowrite16be);=0A=
 EXPORT_SYMBOL(iowrite32);=0A=
 EXPORT_SYMBOL(iowrite32be);=0A=
+#ifdef __powerpc64__=0A=
+void iowrite64(u64 val, void __iomem *addr)=0A=
+{=0A=
+	writeq(val, addr);=0A=
+}=0A=
+void iowrite64be(u64 val, void __iomem *addr)=0A=
+{=0A=
+	writeq_be(val, addr);=0A=
+}=0A=
+EXPORT_SYMBOL(iowrite64);=0A=
+EXPORT_SYMBOL(iowrite64be);=0A=
+#endif /* __powerpc64__ */=0A=
 =0A=
 /*=0A=
  * These are the "repeat read/write" functions. Note the=0A=
=0A=
=0A=

Re: [PATCH v2 4/8] powerpc: add io{read,write}64 accessors

From: Scott Wood <hidden>
Date: 2016-05-10 18:50:46

On 05/09/2016 03:20 AM, Horia Ioan Geanta Neag wrote:=0A=
On 5/5/2016 6:37 PM, Horia Geant=E3 wrote:=0A=
quoted
This will allow device drivers to consistently use io{read,write}XX=0A=
also for 64-bit accesses.=0A=
=0A=
Signed-off-by: Horia Geant=E3 <horia.geanta@nxp.com>=0A=
=0A=
It would be great if PPC maintainers could Ack this patch.=0A=
=0A=
As stated in the cover letter: https://lkml.org/lkml/2016/5/5/340=0A=
I'd like to go with the whole patch set via cryptodev-2.6 tree.=0A=
=0A=
It looks good to me.  Michael?=0A=
=0A=
-Scott=0A=
=0A=
=0A=
=0A=
Thanks,=0A=
Horia=0A=
=0A=
quoted
---=0A=
 arch/powerpc/kernel/iomap.c | 24 ++++++++++++++++++++++++=0A=
 1 file changed, 24 insertions(+)=0A=
=0A=
diff --git a/arch/powerpc/kernel/iomap.c b/arch/powerpc/kernel/iomap.c=
=0A=
quoted
index 12e48d56f771..3963f0b68d52 100644=0A=
--- a/arch/powerpc/kernel/iomap.c=0A=
+++ b/arch/powerpc/kernel/iomap.c=0A=
@@ -38,6 +38,18 @@ EXPORT_SYMBOL(ioread16);=0A=
 EXPORT_SYMBOL(ioread16be);=0A=
 EXPORT_SYMBOL(ioread32);=0A=
 EXPORT_SYMBOL(ioread32be);=0A=
+#ifdef __powerpc64__=0A=
+u64 ioread64(void __iomem *addr)=0A=
+{=0A=
+	return readq(addr);=0A=
+}=0A=
+u64 ioread64be(void __iomem *addr)=0A=
+{=0A=
+	return readq_be(addr);=0A=
+}=0A=
+EXPORT_SYMBOL(ioread64);=0A=
+EXPORT_SYMBOL(ioread64be);=0A=
+#endif /* __powerpc64__ */=0A=
 =0A=
 void iowrite8(u8 val, void __iomem *addr)=0A=
 {=0A=
@@ -64,6 +76,18 @@ EXPORT_SYMBOL(iowrite16);=0A=
 EXPORT_SYMBOL(iowrite16be);=0A=
 EXPORT_SYMBOL(iowrite32);=0A=
 EXPORT_SYMBOL(iowrite32be);=0A=
+#ifdef __powerpc64__=0A=
+void iowrite64(u64 val, void __iomem *addr)=0A=
+{=0A=
+	writeq(val, addr);=0A=
+}=0A=
+void iowrite64be(u64 val, void __iomem *addr)=0A=
+{=0A=
+	writeq_be(val, addr);=0A=
+}=0A=
+EXPORT_SYMBOL(iowrite64);=0A=
+EXPORT_SYMBOL(iowrite64be);=0A=
+#endif /* __powerpc64__ */=0A=
 =0A=
 /*=0A=
  * These are the "repeat read/write" functions. Note the=0A=
=0A=
=0A=
=0A=
=0A=

Re: [PATCH v2 4/8] powerpc: add io{read,write}64 accessors

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-05-11 00:35:09

On Tue, 2016-05-10 at 18:50 +0000, Scott Wood wrote:
On 05/09/2016 03:20 AM, Horia Ioan Geanta Neag wrote:
quoted
On 5/5/2016 6:37 PM, Horia Geantă wrote:
quoted
quoted
This will allow device drivers to consistently use io{read,write}XX
also for 64-bit accesses.

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
It would be great if PPC maintainers could Ack this patch.

As stated in the cover letter: https://lkml.org/lkml/2016/5/5/340
I'd like to go with the whole patch set via cryptodev-2.6 tree.
It looks good to me.  Michael?
I didn't get the cover letter, or any of the rest of the series, so although I
saw the patch I had no context. And I didn't have time to chase it up.

At a glance it seems fine, so:

Acked-by: Michael Ellerman <mpe@ellerman.id.au>

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help