* ioremap_nocache() in setup_port() ok?
@ 2006-03-30 7:54 Grant Grundler
2006-03-30 7:57 ` Russell King
0 siblings, 1 reply; 3+ messages in thread
From: Grant Grundler @ 2006-03-30 7:54 UTC (permalink / raw)
To: linux-serial; +Cc: rmk+serial
Hi Russell,
This patch fixes a warning in the parisc-linux.org developement
tree. Helge Deller has done substantial work to enable proper
ioremap() functionality in parisc port and exposed some problems
with ioremap() vs ioremap_nocache() usage.
Most device drivers really want ioremap_nocache().
But we've been really sloppy since most implementations
treat MMIO space as uncached.
Am I correct that serial also wants _nocache() for MMIO space?
thanks,
grant
--- a/drivers/serial/8250_pci.c 13 Feb 2006 03:51:52 -0000 1.35
+++ b/drivers/serial/8250_pci.c 30 Mar 2006 07:21:03 -0000
@@ -87,7 +87,7 @@ setup_port(struct serial_private *priv,
len = pci_resource_len(dev, bar);
if (!priv->remapped_bar[bar])
- priv->remapped_bar[bar] = ioremap(base, len);
+ priv->remapped_bar[bar] = ioremap_nocache(base, len);
if (!priv->remapped_bar[bar])
return -ENOMEM;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ioremap_nocache() in setup_port() ok?
2006-03-30 7:54 ioremap_nocache() in setup_port() ok? Grant Grundler
@ 2006-03-30 7:57 ` Russell King
2006-03-30 18:12 ` Grant Grundler
0 siblings, 1 reply; 3+ messages in thread
From: Russell King @ 2006-03-30 7:57 UTC (permalink / raw)
To: Grant Grundler; +Cc: linux-serial
On Thu, Mar 30, 2006 at 12:54:10AM -0700, Grant Grundler wrote:
> Am I correct that serial also wants _nocache() for MMIO space?
Don't know - I've always taken ioremap_nocache() as a mis-understanding
of what ioremap() itself is supposed to do. Indeed, if you look at
IO-mapping.txt, ioremap_nocache() is not mentioned, and it's pretty
clear that ioremap() is what is intended to be used to map MMIO.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ioremap_nocache() in setup_port() ok?
2006-03-30 7:57 ` Russell King
@ 2006-03-30 18:12 ` Grant Grundler
0 siblings, 0 replies; 3+ messages in thread
From: Grant Grundler @ 2006-03-30 18:12 UTC (permalink / raw)
To: Russell King; +Cc: Grant Grundler, linux-serial, willy
On Thu, Mar 30, 2006 at 08:57:52AM +0100, Russell King wrote:
> On Thu, Mar 30, 2006 at 12:54:10AM -0700, Grant Grundler wrote:
> > Am I correct that serial also wants _nocache() for MMIO space?
>
> Don't know - I've always taken ioremap_nocache() as a mis-understanding
> of what ioremap() itself is supposed to do. Indeed, if you look at
> IO-mapping.txt, ioremap_nocache() is not mentioned, and it's pretty
> clear that ioremap() is what is intended to be used to map MMIO.
I think IO-mapping.txt is stale and whoever added ioremap_nocache
failed to update it.
It would be reasonable to ignore my patch (unless you wanted
to document the expected behavior of serial) if what willy
proposed an hour ago is accepted:
http://lkml.org/lkml/2006/3/30/251
I'll update the IO-mapping.txt based on the outcome of
willy's patch.
thanks,
grant
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-03-30 18:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-30 7:54 ioremap_nocache() in setup_port() ok? Grant Grundler
2006-03-30 7:57 ` Russell King
2006-03-30 18:12 ` Grant Grundler
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.