From: "Gérard Roudier" <groudier@free.fr>
To: Anton Blanchard <anton@samba.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] small sym-2 fix
Date: Wed, 21 Nov 2001 18:19:27 +0100 (CET) [thread overview]
Message-ID: <20011121175658.I1828-100000@gerard> (raw)
In-Reply-To: <20011121131900.B13279@krispykreme>
On Wed, 21 Nov 2001, Anton Blanchard wrote:
> Hi,
>
> > Linux/ppc64 looks strange invention to me. As you know IO base addresses
> > are limited to 32 bit in PCI. And, btw, 32 bits seems to work just fine
> > here as PPC is defined from the driver as using normal IO. But, IIRC, the
> > strange Linux/PPC invention only supports MMIO. :-)
>
> Since all PCI IO is memory mapped on ppc64, IO addresses end up > 32 bits.
> Until recently we used to have an IO offset that we added to all accesses
> which kept the driver visible IO addresses < 32 bits. (This is still the
> case with ppc32)
>
> The change was made to support error handling, the 64 bit token has the
> pci bus,dev,fn embedded in it so that the low level IO routines can do
> error recovery if in{b,w,l} fails.
When it happens to implement a driver that involves both C code and some
firmware that works on the PCI-chip, using opaque handles as for C is not
enough. If you think your driver only with those abstractions, you will
get a bag of bits that does not work.
In such situations C abstractions are just dreams of some ideal world that
does not exists and that will never do. Having in mind and in some places
of the code the _reality_ is required if you want your stuff to have
chance to work.
> I didnt make these changes and it would seem we can link IO address <->
> pci bus,dev,fn in other ways, if it turns out many drivers cannot use u64
> for IO ports then we will have to investigate them.
The sym driver can do all what I wrote about regarding DMA addressing,
given expected kernel interfaces and appropriate hardware.
> > If you want to play with _explicit_ MMIO, you just have to remove a couple
> > of line from sym53c8xx.h. Here they are:
>
> Yes MMIO works fine. Is there a reason we force PCI IO on __powerpc__?
My opinion, may-be just 0.02 euros:
At the time of early PPC port, only a few courageous PCI device drivers
wanted to default to PCI-recommended MMIO. There were a least 1 driver
that wanted so, but not may more :). At this early time, the MMIO kernel
interface in ppc port was not behaving as expected and MMIO wasn't usable.
This lasted years. I would be very glad if MMIO related kernel interface
is now fine, but allow me to still doubt a bit about.
If Linux/ppc team can ensure that Linux/ppc is now ok for MMIO, then you
can send the corresponding patch, that default PPC to MMIO as seen by the
driver, to kernel maintainer(s) with my _full_ approbation.
Regards,
Gérard.
next prev parent reply other threads:[~2001-11-21 20:06 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-15 4:36 Anton Blanchard
2001-11-15 10:19 ` David S. Miller
2001-11-15 11:35 ` Anton Blanchard
2001-11-15 11:41 ` David S. Miller
2001-11-15 12:17 ` Anton Blanchard
2001-11-15 16:27 ` Gérard Roudier
2001-11-15 19:46 ` Gérard Roudier
2001-11-15 22:44 ` David S. Miller
2001-11-20 6:02 ` Anton Blanchard
2001-11-20 17:26 ` Gérard Roudier
2001-11-21 2:19 ` Anton Blanchard
2001-11-21 17:19 ` Gérard Roudier [this message]
2001-11-22 5:19 ` Paul Mackerras
2001-11-21 3:49 ` David S. Miller
2001-11-15 22:39 ` David S. Miller
2001-11-15 20:41 ` Gérard Roudier
2001-11-15 19:26 ` David S. Miller
2001-11-15 18:07 ` Gérard Roudier
2001-11-15 21:22 ` Hugh Dickins
2001-11-15 20:22 ` Gérard Roudier
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=20011121175658.I1828-100000@gerard \
--to=groudier@free.fr \
--cc=anton@samba.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®