Skip to contentSkip to conversation

S390: add pci_iomap_wc() and pci_iomap_wc_range()

PATCH In review Luis R. Rodriguez 5 participants 5 messages Aug 26, 2015 – Aug 29, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 S390: add pci_iomap_wc() and pci_iomap_wc_range()

From: "Luis R. Rodriguez" <[email protected]>

S390 requires its own implementation of pcio_iomap*() calls is because it has its "BAR spaces are not disjunctive on s390 so we need the bar parameter of pci_iomap to find the corresponding device and create the mapping cookie" -- in summary, it has its own lookup/lock solution.

It does not include asm-generic/pci_iomap.h

Since it currenty maps ioremap_wc() to ioremap_nocache() and that's the architecture default we can easily just map the wc calls to the default calls as well.

Cc Guenter Roeck <[email protected]>
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Fengguang Wu <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Steven Rostedt <[email protected]>
Reported-by 0 day bot

---

This broke through some series that went into Ingo's tip tree which I added. As such I *think* this should go through Ingo's tip tree. Let me know. Up to you guys.

 arch/s390/include/asm/io.h | 2 ++
 1 file changed, 2 insertions(+)
arch/s390/include/asm/io.h +2 -0
index cb5fdf3a78fc..437e9af96688 100644
@@ -57,6 +57,8 @@ static inline void ioport_unmap(void __iomem *p)
  */
 #define pci_iomap pci_iomap
 #define pci_iounmap pci_iounmap
+#define pci_iomap_wc pci_iomap
+#define pci_iomap_wc_range pci_iomap_range
 
 #define memcpy_fromio(dst, src, count)	zpci_memcpy_fromio(dst, src, count)
 #define memcpy_toio(dst, src, count)	zpci_memcpy_toio(dst, src, count)
Signature · 1 line
2.4.3
#1 lore raw
Quoted 26 lines · Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

S390 requires its own implementation of pcio_iomap*() calls is because it has its "BAR spaces are not disjunctive on s390 so we need the bar parameter of pci_iomap to find the corresponding device and create the mapping cookie" -- in summary, it has its own lookup/lock solution.

It does not include asm-generic/pci_iomap.h

Since it currenty maps ioremap_wc() to ioremap_nocache() and that's the architecture default we can easily just map the wc calls to the default calls as well.

Cc Guenter Roeck <[email protected]>
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Fengguang Wu <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Steven Rostedt <[email protected]>
Reported-by 0 day bot
Quoted 5 lines

---

This broke through some series that went into Ingo's tip tree which I added. As such I *think* this should go through Ingo's tip tree. Let me know. Up to you guys.

I fixed the changelog to explain all this.

Also, is there any other architecture that got broken by:

1b3d4200c1e0 PCI: Add pci_iomap_wc() variants

?

Thanks,

Ingo

#4 lore raw

[tip:x86/mm] s390/io: Add pci_iomap_wc() and pci_iomap_wc_range()

In reply to Luis R. Rodriguez
s390/io: Add pci_iomap_wc() and pci_iomap_wc_range()
Commit-ID:  ee03c5868e74847ba0bd1e6dccbbe26e6504466d
Gitweb:     http://git.kernel.org/tip/ee03c5868e74847ba0bd1e6dccbbe26e6504466d
Author:     Luis R. Rodriguez <[email protected]>
AuthorDate: Wed, 26 Aug 2015 16:34:10 -0700
Committer:  Ingo Molnar <[email protected]>
CommitDate: Fri, 28 Aug 2015 08:04:48 +0200

s390/io: Add pci_iomap_wc() and pci_iomap_wc_range()

The following commit:

1b3d4200c1e0 ("PCI: Add pci_iomap_wc() variants")

Introduced pci_iomap_wc() variants but broke the s390 build, because s390 requires its own implementation of pcio_iomap*() calls.

The reason for that is that:

"BAR spaces are not disjunctive on s390 so we need the bar
parameter of pci_iomap to find the corresponding device and create the mapping cookie"

so it has its own lookup/lock solution and it does not include asm-generic/pci_iomap.h.

Since it currenty maps ioremap_wc() to ioremap_nocache() and that's the architecture default we can easily just map the wc calls to the default calls as well.

Cc Andrew Morton <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Fengguang Wu <[email protected]>
Cc Frank Blaschka <[email protected]>
Cc Guenter Roeck <[email protected]>
Cc Heiko Carstens <[email protected]>
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Martin Schwidefsky <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Thierry Reding <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Toshi Kani <[email protected]>
Cc Will Deacon <[email protected]>
---
 arch/s390/include/asm/io.h | 2 ++
 1 file changed, 2 insertions(+)
arch/s390/include/asm/io.h +2 -0
index cb5fdf3..437e9af 100644
@@ -57,6 +57,8 @@ static inline void ioport_unmap(void __iomem *p)
  */
 #define pci_iomap pci_iomap
 #define pci_iounmap pci_iounmap
+#define pci_iomap_wc pci_iomap
+#define pci_iomap_wc_range pci_iomap_range
 
 #define memcpy_fromio(dst, src, count)	zpci_memcpy_fromio(dst, src, count)
 #define memcpy_toio(dst, src, count)	zpci_memcpy_toio(dst, src, count)
#2 lore raw
In reply to Ingo Molnar
Quoted 35 lines · Ingo Molnar
Quoted 26 lines · Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

S390 requires its own implementation of pcio_iomap*() calls is because it has its "BAR spaces are not disjunctive on s390 so we need the bar parameter of pci_iomap to find the corresponding device and create the mapping cookie" -- in summary, it has its own lookup/lock solution.

It does not include asm-generic/pci_iomap.h

Since it currenty maps ioremap_wc() to ioremap_nocache() and that's the architecture default we can easily just map the wc calls to the default calls as well.

Cc Guenter Roeck <[email protected]>
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Fengguang Wu <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Steven Rostedt <[email protected]>
Reported-by 0 day bot
Quoted 5 lines

---

This broke through some series that went into Ingo's tip tree which I added. As such I *think* this should go through Ingo's tip tree. Let me know. Up to you guys.

Quoted 6 lines

I fixed the changelog to explain all this.

Also, is there any other architecture that got broken by:

    1b3d4200c1e0 PCI: Add pci_iomap_wc() variants

Should be the only one. There are only two implementations of pci_iomap(), one in s390 code and the generic implementation.

Guenter

#3 lore raw
Quoted 38 lines · Guenter Roeck
Quoted 37 lines · Ingo Molnar
Quoted 26 lines · Luis R. Rodriguez

From: "Luis R. Rodriguez" <[email protected]>

S390 requires its own implementation of pcio_iomap*() calls is because it has its "BAR spaces are not disjunctive on s390 so we need the bar parameter of pci_iomap to find the corresponding device and create the mapping cookie" -- in summary, it has its own lookup/lock solution.

It does not include asm-generic/pci_iomap.h

Since it currenty maps ioremap_wc() to ioremap_nocache() and that's the architecture default we can easily just map the wc calls to the default calls as well.

Cc Guenter Roeck <[email protected]>
Cc Jean-Christophe Plagniol-Villard <[email protected]>
Cc Tomi Valkeinen <[email protected]>
Cc Borislav Petkov <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Fengguang Wu <[email protected]>
Cc Andrew Morton <[email protected]>
Cc Steven Rostedt <[email protected]>
Reported-by 0 day bot
Quoted 5 lines

---

This broke through some series that went into Ingo's tip tree which I added. As such I *think* this should go through Ingo's tip tree. Let me know. Up to you guys.

I fixed the changelog to explain all this.

Quoted 7 lines
Quoted 4 lines

Also, is there any other architecture that got broken by:

   1b3d4200c1e0 PCI: Add pci_iomap_wc() variants

Should be the only one. There are only two implementations of pci_iomap(), one in s390 code and the generic implementation.

Indeed, sadly there is no semantics well defined to establish this requirement so the best we can do is infer:

mcgrof@ergon ~/linux-next (git::20150805-pend-all)$ git grep pci_iomap_range arch/ arch/s390/include/asm/io.h:#define pci_iomap_wc_range pci_iomap_range arch/s390/pci/pci.c:void __iomem *pci_iomap_range(struct pci_dev *pdev, arch/s390/pci/pci.c:EXPORT_SYMBOL(pci_iomap_range);
arch/s390/pci/pci.c: return pci_iomap_range(dev, bar, 0, maxlen);

To this end a Kconfig option to implicate this might be more well suited for future lookups and make other architectures which are incompatible with generic pci_iomap clearer. Will post an RFC.

Luis