From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: Olof Johansson <olof@lixom.net>, paulus@samba.org
Subject: Re: [PATCH] powerpc: make ioport_map() handle already mapped ranges
Date: Sun, 13 May 2007 00:18:42 +0200 [thread overview]
Message-ID: <200705130018.42612.arnd@arndb.de> (raw)
In-Reply-To: <20070512143221.GB12890@lixom.net>
On Saturday 12 May 2007, Olof Johansson wrote:
> Make ioport_map() handle already mapped port range without trying
> to add _IO_BASE to them.
>=20
>=20
> Signed-off-by: Olof Johansson <olof@lixom.net>
>=20
> Index: 2.6.21/arch/powerpc/kernel/iomap.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> --- 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);
> =A0
> =A0void __iomem *ioport_map(unsigned long port, unsigned int len)
> =A0{
> -=A0=A0=A0=A0=A0=A0=A0return (void __iomem *) (port + _IO_BASE);
> +=A0=A0=A0=A0=A0=A0=A0/* Do nothing if we're being asked to map an already
> +=A0=A0=A0=A0=A0=A0=A0 * ioremapped() address
> +=A0=A0=A0=A0=A0=A0=A0 */
> +=A0=A0=A0=A0=A0=A0=A0if (port >=3D IMALLOC_BASE && (port+len) < IMALLOC_=
END)
> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return (void __iomem *) por=
t;
> +=A0=A0=A0=A0=A0=A0=A0else
> +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0return (void __iomem *) (po=
rt + _IO_BASE);
> =A0}
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.
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=3D10840 .
Arnd <><
next prev parent reply other threads:[~2007-05-12 22:18 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 [this message]
2007-05-12 22:36 ` Olof Johansson
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=200705130018.42612.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=linuxppc-dev@ozlabs.org \
--cc=olof@lixom.net \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.