* [PATCH] S390: add pci_iomap_wc() and pci_iomap_wc_range()
@ 2015-08-26 23:34 Luis R. Rodriguez
2015-08-28 6:06 ` Ingo Molnar
0 siblings, 1 reply; 4+ messages in thread
From: Luis R. Rodriguez @ 2015-08-26 23:34 UTC (permalink / raw)
To: mingo, schwidefsky, heiko.carstens, linux-s390
Cc: bp, linux, plagnioj, tomi.valkeinen, linux-fbdev, linux-kernel,
fengguang.wu, akpm, rostedt, Luis R. Rodriguez
From: "Luis R. Rodriguez" <mcgrof@suse.com>
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 <linux@roeck-us.net>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: Borislav Petkov <bp@suse.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Reported-by: 0 day bot
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
---
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(+)
diff --git a/arch/s390/include/asm/io.h b/arch/s390/include/asm/io.h
index cb5fdf3a78fc..437e9af96688 100644
--- a/arch/s390/include/asm/io.h
+++ b/arch/s390/include/asm/io.h
@@ -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.4.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] S390: add pci_iomap_wc() and pci_iomap_wc_range()
2015-08-26 23:34 [PATCH] S390: add pci_iomap_wc() and pci_iomap_wc_range() Luis R. Rodriguez
@ 2015-08-28 6:06 ` Ingo Molnar
2015-08-28 8:22 ` Guenter Roeck
0 siblings, 1 reply; 4+ messages in thread
From: Ingo Molnar @ 2015-08-28 6:06 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: schwidefsky, heiko.carstens, linux-s390, bp, linux, plagnioj,
tomi.valkeinen, linux-fbdev, linux-kernel, fengguang.wu, akpm,
rostedt, Luis R. Rodriguez
* Luis R. Rodriguez <mcgrof@do-not-panic.com> wrote:
> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>
> 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 <linux@roeck-us.net>
> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Cc: linux-fbdev@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Fengguang Wu <fengguang.wu@intel.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Steven Rostedt <rostedt@goodmis.org>
> Reported-by: 0 day bot
> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
> ---
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] S390: add pci_iomap_wc() and pci_iomap_wc_range()
2015-08-28 6:06 ` Ingo Molnar
@ 2015-08-28 8:22 ` Guenter Roeck
2015-08-29 0:14 ` Luis R. Rodriguez
0 siblings, 1 reply; 4+ messages in thread
From: Guenter Roeck @ 2015-08-28 8:22 UTC (permalink / raw)
To: Ingo Molnar, Luis R. Rodriguez
Cc: schwidefsky, heiko.carstens, linux-s390, bp, plagnioj,
tomi.valkeinen, linux-fbdev, linux-kernel, fengguang.wu, akpm,
rostedt, Luis R. Rodriguez
On 08/27/2015 11:06 PM, Ingo Molnar wrote:
>
> * Luis R. Rodriguez <mcgrof@do-not-panic.com> wrote:
>
>> From: "Luis R. Rodriguez" <mcgrof@suse.com>
>>
>> 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 <linux@roeck-us.net>
>> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
>> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> Cc: linux-fbdev@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> Cc: Borislav Petkov <bp@suse.de>
>> Cc: Ingo Molnar <mingo@kernel.org>
>> Cc: Fengguang Wu <fengguang.wu@intel.com>
>> Cc: Andrew Morton <akpm@linux-foundation.org>
>> Cc: Steven Rostedt <rostedt@goodmis.org>
>> Reported-by: 0 day bot
>> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
>> ---
>>
>> 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
>
Should be the only one. There are only two implementations of pci_iomap(),
one in s390 code and the generic implementation.
Guenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] S390: add pci_iomap_wc() and pci_iomap_wc_range()
2015-08-28 8:22 ` Guenter Roeck
@ 2015-08-29 0:14 ` Luis R. Rodriguez
0 siblings, 0 replies; 4+ messages in thread
From: Luis R. Rodriguez @ 2015-08-29 0:14 UTC (permalink / raw)
To: Guenter Roeck
Cc: Ingo Molnar, Luis R. Rodriguez, schwidefsky, heiko.carstens,
linux-s390, bp, plagnioj, tomi.valkeinen, linux-fbdev,
linux-kernel, fengguang.wu, akpm, rostedt, linux-arch
On Fri, Aug 28, 2015 at 01:22:27AM -0700, Guenter Roeck wrote:
> On 08/27/2015 11:06 PM, Ingo Molnar wrote:
> >
> >* Luis R. Rodriguez <mcgrof@do-not-panic.com> wrote:
> >
> >>From: "Luis R. Rodriguez" <mcgrof@suse.com>
> >>
> >>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 <linux@roeck-us.net>
> >>Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
> >>Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> >>Cc: linux-fbdev@vger.kernel.org
> >>Cc: linux-kernel@vger.kernel.org
> >>Cc: Borislav Petkov <bp@suse.de>
> >>Cc: Ingo Molnar <mingo@kernel.org>
> >>Cc: Fengguang Wu <fengguang.wu@intel.com>
> >>Cc: Andrew Morton <akpm@linux-foundation.org>
> >>Cc: Steven Rostedt <rostedt@goodmis.org>
> >>Reported-by: 0 day bot
> >>Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
> >>---
> >>
> >>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
> >
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-08-29 0:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-26 23:34 [PATCH] S390: add pci_iomap_wc() and pci_iomap_wc_range() Luis R. Rodriguez
2015-08-28 6:06 ` Ingo Molnar
2015-08-28 8:22 ` Guenter Roeck
2015-08-29 0:14 ` Luis R. Rodriguez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).