From: Al Viro <viro@ftp.linux.org.uk>
To: "David S. Miller" <davem@davemloft.net>
Cc: torvalds@osdl.org, linux-kernel@vger.kernel.org, tcallawa@redhat.com
Subject: Re: Linux v2.6.14-rc4
Date: Tue, 11 Oct 2005 05:24:12 +0100 [thread overview]
Message-ID: <20051011042412.GT7992@ftp.linux.org.uk> (raw)
In-Reply-To: <20051010.205827.122179808.davem@davemloft.net>
On Mon, Oct 10, 2005 at 08:58:27PM -0700, David S. Miller wrote:
> From: Al Viro <viro@ftp.linux.org.uk>
> Date: Tue, 11 Oct 2005 04:41:27 +0100
>
> > On Mon, Oct 10, 2005 at 06:31:12PM -0700, Linus Torvalds wrote:
> > > Tom 'spot' Callaway:
> > > [SPARC32]: Enable generic IOMAP.
> >
> > ... breaks non-PCI builds (aka the absolute majority of sparc32 boxen).
> > On sparc32 insl() et.al. are defined only if CONFIG_PCI is set.
> >
> > Moreover, I really doubt that generic_iomap is the right thing to do
> > there - all these guys end up as memory dereferences anyway, so ioread...()
> > et.al. have no reason to care about the origin of iomem pointer they get.
>
> Also, Tom never answered my query about the driver he stated
> this was needed for (sym53c8xx) which appears on no sparc32
> PCI box in the world :-)
>
> I'll revert this for now, push that to Linus, and we can hash it out
> better in 2.6.15
For sparc32 ioread*/iowrite* are _trivial_. Look, the only defining
properties are
* if p is ioremap(whatever, len), then for any q from p to p + len - 1
we have ioread8(q) == readb(q), etc.
* if p is ioport_map(whatever, len), then for any q from p to p + len - 1
we have ioread8(q) == inb(whatever + q - p), etc.
ioread8 readb inb
iowrite8 writeb outb
ioread16 readw inw
iowrite16 writew outw
ioread32 readl inl
iowrite32 writel outl
ioread.._rep loop of raw_read... ins...
iowrite.._rep loop of raw_write... outs...
And that's it. On sparc32 we can just have ioport_map() cast to void __iomem *
and be done with that. And have io...() do corresponding memory access;
the only thing to keep in mind is that _rep variants do native-endian
access.
lib/iomap.c versions assume that PIO space needs different low-level
primitives for access and can be shifted outside of iomem space.
There we have ioport_map() add offset to port number and io{read,write}...
check the address and either do iomem access or subtract that offset and
do PIO one. Nothing of that kind makes sense on sparc32 - the only
use for similar mechanism would be to try and encode AST into pointer.
But we are mapping them all into kernel context anyway, so there's no
need to bother with that...
next prev parent reply other threads:[~2005-10-11 4:24 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-11 1:31 Linux v2.6.14-rc4 Linus Torvalds
2005-10-11 3:41 ` Al Viro
2005-10-11 3:58 ` David S. Miller
2005-10-11 4:24 ` Al Viro [this message]
2005-10-11 4:40 ` David S. Miller
2005-10-11 14:54 ` [was: Linux v2.6.14-rc4] fix textsearch build warning Borislav Petkov
2005-10-11 20:59 ` Al Viro
2005-10-11 23:02 ` Borislav Petkov
2005-10-11 23:24 ` Al Viro
2005-10-11 23:33 ` Linus Torvalds
2005-10-11 23:38 ` Linus Torvalds
2005-10-11 23:49 ` Al Viro
2005-10-12 0:57 ` Linus Torvalds
2005-10-12 8:27 ` Borislav Petkov
-- strict thread matches above, loose matches on Subject: below --
2005-10-11 13:28 Linux v2.6.14-rc4 Salyzyn, Mark
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=20051011042412.GT7992@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=tcallawa@redhat.com \
--cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox