From: olof@lixom•net (Olof Johansson)
To: Arnd Bergmann <arnd@arndb•de>
Cc: linuxppc-dev@ozlabs•org, paulus@samba•org
Subject: Re: [PATCH] powerpc: make ioport_map() handle already mapped ranges
Date: Sat, 12 May 2007 17:36:23 -0500 [thread overview]
Message-ID: <20070512223623.GA16045@lixom.net> (raw)
In-Reply-To: <200705130018.42612.arnd@arndb.de>
On Sun, May 13, 2007 at 12:18:42AM +0200, Arnd Bergmann wrote:
> On Saturday 12 May 2007, Olof Johansson wrote:
> > Make ioport_map() handle already mapped port range without trying
> > to add _IO_BASE to them.
> >
> >
> > Signed-off-by: Olof Johansson <olof@lixom•net>
> >
> > Index: 2.6.21/arch/powerpc/kernel/iomap.c
> > ===================================================================
> > --- 2.6.21.orig/arch/powerpc/kernel/iomap.c
> > +++ 2.6.21/arch/powerpc/kernel/iomap.c
> > @@ -106,7 +106,13 @@ EXPORT_SYMBOL(iowrite32_rep);
> > ?
> > ?void __iomem *ioport_map(unsigned long port, unsigned int len)
> > ?{
> > -???????return (void __iomem *) (port + _IO_BASE);
> > +???????/* Do nothing if we're being asked to map an already
> > +??????? * ioremapped() address
> > +??????? */
> > +???????if (port >= IMALLOC_BASE && (port+len) < IMALLOC_END)
> > +???????????????return (void __iomem *) port;
> > +???????else
> > +???????????????return (void __iomem *) (port + _IO_BASE);
> > ?}
>
> This patch looks wrong to me, it's an indication that either a driver
> is confusing ioport and __iomem addresses, or that something went
> wrong during the initialization of the primary PCI bus.
It's not for PCI. See discussion in:
http://ozlabs.org/pipermail/linuxppc-dev/2007-May/035744.html
> We have a bug on cell that would be fixed with this patch, so it
> might be the same problem, see the patch that I suggested for
> this at http://patchwork.ozlabs.org/linuxppc/patch?id=10840 .
Not in this case, but thanks for the pointer. Your case is still based
on the fact that you only have one io space range, you're just making
sure you're allocating out of that range. In my case, I have two distinct
ranges, they're even on different busses...
-Olof
next prev parent reply other threads:[~2007-05-12 22:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-12 14:32 [PATCH] powerpc: make ioport_map() handle already mapped ranges Olof Johansson
2007-05-12 22:18 ` Arnd Bergmann
2007-05-12 22:36 ` Olof Johansson [this message]
2007-05-12 23:55 ` Arnd Bergmann
2007-05-13 1:46 ` Benjamin Herrenschmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070512223623.GA16045@lixom.net \
--to=olof@lixom$(echo .)net \
--cc=arnd@arndb$(echo .)de \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=paulus@samba$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox