linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Pravin Bathija <pbathija@amcc.com>
Cc: linuxppc-dev@ozlabs.org, Eric.Moore@lsi.com,
	Wolfgang Denk <wd@denx.de>,
	linux-scsi@vger.kernel.org, "Desai,
	Kashyap" <Kashyap.Desai@lsi.com>
Subject: RE: [PATCH] [SCSI] mpt fusion: Fix 32 bit platforms with 64 bit resources.
Date: Fri, 04 Dec 2009 10:48:38 +1100	[thread overview]
Message-ID: <1259884118.2076.1232.camel@pasglop> (raw)
In-Reply-To: <9D1E2BDCB5C57B46B56E6D80843439EB097BB063@SDCEXCHANGE01.ad.amcc.com>

On Thu, 2009-12-03 at 15:21 -0800, Pravin Bathija wrote:
> Hi Wolfgang,

 .../...
 
> > I'm not sure if this one-liner really covers all the related issues.
> > We submitted a similar (but apparently more complete) patch more than
> > a year ago. Dunno why it has never been picked up. See
> > http://thread.gmane.org/gmane.linux.scsi/46082 for reference.
> > 
> 
> I submitted a patch on similar lines several weeks ago and it wasn't
> accepted on grounds that it was too tied to the powerpc platform. Below
> is a link
> 
> http://article.gmane.org/gmane.linux.scsi/55794

I believe the simple patch is fine. But only testing can tell, so it's
up to you guys to test it :-)

None of the churn related to PIO that was in the previous patches is
necessary.

PIO on powerpc "appears" to work just like x86, the illusion is
maintained by the arch code. PIO resources always fit inside 32-bit,
never need to be ioremapped etc... so as long as you use the result of
pci_resource_start() and pass that (or an offset from that) to
inb/outb/intw/outw... PIO should just work, no change is required to the
driver. IE. PIO resources don't contain physical addresses. The powerpc
PCI code puts in there an offset from _IO_BASE to an already ioremapped
area mapping the PCI host bridge IO space. It can use funky pointer
arithmetic so don't be surprised if the values look like negative 32-bit
ints, but it should just work.

The only problem I can see with the driver, which is fixed by the simple
patch, is that for -MMIO-, the resources (which in the case of MMIO do
contain physical addresses) can be >32 bit, and thus must be stored into
a type of the right size before being passed to ioremap(). This is what
the one-liner patch does and according to the patch author, it was
tested and appears to work.

So I'm happy with the one liner patch. If you have more concerns, please
explain precisely what you believe will not work :-)

Cheers,
Ben.

  reply	other threads:[~2009-12-03 23:49 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-03  1:51 [PATCH] [SCSI] mpt fusion: Fix 32 bit platforms with 64 bit resources Pravin Bathija
2009-12-03  2:59 ` Benjamin Herrenschmidt
2009-12-03  5:26   ` Desai, Kashyap
2009-12-03  8:56 ` Wolfgang Denk
2009-12-03 23:21   ` Pravin Bathija
2009-12-03 23:48     ` Benjamin Herrenschmidt [this message]
2009-12-10 15:43 ` James Bottomley
2009-12-10 16:36   ` Anatolij Gustschin
  -- strict thread matches above, loose matches on Subject: below --
2009-11-18  0:16 pbathija
2009-11-18  5:41 ` Benjamin Herrenschmidt
2009-09-15 22:25 pbathija
2009-11-05 13:43 ` Josh Boyer
2009-11-05 16:07   ` James Bottomley
2009-11-05 16:25     ` Josh Boyer
2009-11-05 20:00     ` Benjamin Herrenschmidt
2009-11-06  4:59       ` Desai, Kashyap
2009-11-06  5:49       ` Pravin Bathija
2009-11-06  5:57       ` Pravin Bathija
2009-09-09  0:15 pbathija
2009-09-15 10:29 ` 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=1259884118.2076.1232.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=Eric.Moore@lsi.com \
    --cc=Kashyap.Desai@lsi.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=pbathija@amcc.com \
    --cc=wd@denx.de \
    /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;
as well as URLs for NNTP newsgroup(s).