All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Romanick <idr@us.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org,
	paulus@samba.org, anton@samba.org, airlied@gmail.com
Subject: Re: [PATCH/RFC] powerpc: Fix mmap of PCI resource with hack for X
Date: Mon, 13 Nov 2006 18:15:28 -0800	[thread overview]
Message-ID: <455926C0.9080906@us.ibm.com> (raw)
In-Reply-To: <20061113.163138.98554015.davem@davemloft.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Miller wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Date: Mon, 13 Nov 2006 19:16:30 +1100
> 
>> X is still broken when built 32 bits on machines where PCI MMIO can be
>> above 32 bits space unfortunately. It looks like somebody (DaveM ?)
>> hacked a fix in X to handle long long resources and had the good idea
>> to wrap it in #ifdef __sparc__ :-(
> 
> Sorry, it was the only 32/64 platform at the time that old X code was
> written and the X maintainers at the time were unbelievably anal :-/
> 
> So the gist of your change is that X isn't obtaining BAR values
> in the correct context on powerpc, and so you're going to hack up
> the "devices" files output to "help" X out.
> 
> This doesn't sound sane to me.

It doesn't sound terribly sane to me.  What's wrong with just opening
/sys/bus/pci/devices/*/resource[0-5]?  It seems like that solves all the
problems.

> What sounds better to me is that X does the right thing, which is
> obtain the BAR from the PCI config space to determine what values to
> pass in to /proc/bus/pci mmap() calls.  And if it wants raw addresses
> to pass in to /dev/mem mmap()'s on platforms where that works (ie. not
> Sparc, to begin with) it should obtain those values from the "devices"
> file which must be values suitable as /dev/mem offsets.
> 
> I strongly look forward to Ian's new X code, that is for sure :-)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFWSbAX1gOwKyEAw8RAtceAKCc2PrYJNg8v2LcClLwTfEmo1aGzwCfRR7o
TkJnY+7IMpmWUQt/7FAW6A4=
=tDJc
-----END PGP SIGNATURE-----

WARNING: multiple messages have this Message-ID (diff)
From: Ian Romanick <idr@us.ibm.com>
To: David Miller <davem@davemloft.net>
Cc: benh@kernel.crashing.org, linuxppc-dev@ozlabs.org,
	linux-kernel@vger.kernel.org, anton@samba.org, airlied@gmail.com,
	paulus@samba.org
Subject: Re: [PATCH/RFC] powerpc: Fix mmap of PCI resource with hack for X
Date: Mon, 13 Nov 2006 18:15:28 -0800	[thread overview]
Message-ID: <455926C0.9080906@us.ibm.com> (raw)
In-Reply-To: <20061113.163138.98554015.davem@davemloft.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Miller wrote:
> From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> Date: Mon, 13 Nov 2006 19:16:30 +1100
> 
>> X is still broken when built 32 bits on machines where PCI MMIO can be
>> above 32 bits space unfortunately. It looks like somebody (DaveM ?)
>> hacked a fix in X to handle long long resources and had the good idea
>> to wrap it in #ifdef __sparc__ :-(
> 
> Sorry, it was the only 32/64 platform at the time that old X code was
> written and the X maintainers at the time were unbelievably anal :-/
> 
> So the gist of your change is that X isn't obtaining BAR values
> in the correct context on powerpc, and so you're going to hack up
> the "devices" files output to "help" X out.
> 
> This doesn't sound sane to me.

It doesn't sound terribly sane to me.  What's wrong with just opening
/sys/bus/pci/devices/*/resource[0-5]?  It seems like that solves all the
problems.

> What sounds better to me is that X does the right thing, which is
> obtain the BAR from the PCI config space to determine what values to
> pass in to /proc/bus/pci mmap() calls.  And if it wants raw addresses
> to pass in to /dev/mem mmap()'s on platforms where that works (ie. not
> Sparc, to begin with) it should obtain those values from the "devices"
> file which must be values suitable as /dev/mem offsets.
> 
> I strongly look forward to Ian's new X code, that is for sure :-)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)

iD8DBQFFWSbAX1gOwKyEAw8RAtceAKCc2PrYJNg8v2LcClLwTfEmo1aGzwCfRR7o
TkJnY+7IMpmWUQt/7FAW6A4=
=tDJc
-----END PGP SIGNATURE-----

  parent reply	other threads:[~2006-11-14  2:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-13  8:16 [PATCH/RFC] powerpc: Fix mmap of PCI resource with hack for X Benjamin Herrenschmidt
2006-11-13  8:16 ` Benjamin Herrenschmidt
2006-11-14  0:31 ` David Miller
2006-11-14  0:31   ` David Miller
2006-11-14  1:59   ` Benjamin Herrenschmidt
2006-11-14  1:59     ` Benjamin Herrenschmidt
2006-11-14  5:07     ` David Miller
2006-11-14  5:07       ` David Miller
2006-11-14  5:16       ` Benjamin Herrenschmidt
2006-11-14  5:16         ` Benjamin Herrenschmidt
2006-11-14  2:15   ` Ian Romanick [this message]
2006-11-14  2:15     ` Ian Romanick
2006-11-14  3:02     ` Benjamin Herrenschmidt
2006-11-14  3:02       ` 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=455926C0.9080906@us.ibm.com \
    --to=idr@us.ibm.com \
    --cc=airlied@gmail.com \
    --cc=anton@samba.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --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.