public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Greg KH <greg@kroah.com>,
	linux-pci@atrey.karlin.mff.cuni.cz, linux-kernel@vger.kernel.org,
	linux-ia64@vger.kernel.org
Subject: Re: [PATCH] Introduce PCI <-> CPU address conversion [1/2]
Date: Thu, 14 Oct 2004 14:27:04 +0000	[thread overview]
Message-ID: <20041014182704.A13971@jurassic.park.msu.ru> (raw)
In-Reply-To: <20041014124737.GM16153@parcelfarce.linux.theplanet.co.uk>; from matthew@wil.cx on Thu, Oct 14, 2004 at 01:47:37PM +0100

On Thu, Oct 14, 2004 at 01:47:37PM +0100, Matthew Wilcox wrote:
> Some machines have a different address space on the PCI bus from the
> CPU's bus.  This is currently fixed up in pcibios_fixup_bus().  However,
> this is not called for hotplug devices.  Calling pcibios_fixup_bus() when
> a device is hotplugged onto a bus is also wrong as it would attempt to
> fixup devices that have already been fixed up with potentially horrific
> consequences.

This logic makes sense only if you have sort of firmware which
properly initializes the hotplug devices, so I think that the fixup
should belong in that particular hotplug driver (or architecture).
In general case the newly inserted device will have 0s in the BARs,
so there is no point for bus to CPU conversion. You have to use
pci_assign_resource() which does know about different address
spaces.

> This patch teaches the generic PCI layer that there may be different
> address spaces, and converts from bus views to cpu views when reading
> from BARs.  Some drivers (eg sym2, acpiphp) need to go back the other
> way, so it also introduces the inverse operation.

This one already exists - pcibios_resource_to_bus().

Ivan.

  parent reply	other threads:[~2004-10-14 14:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-14 12:47 [PATCH] Introduce PCI <-> CPU address conversion [1/2] Matthew Wilcox
2004-10-14 12:53 ` Christoph Hellwig
2004-10-14 13:53   ` Matthew Wilcox
2004-10-14 18:00     ` Christoph Hellwig
2004-10-14 18:07       ` Matthew Wilcox
2004-10-14 22:37         ` Colin Ngam
2004-10-15  0:36           ` Matthew Wilcox
2004-10-14 14:27 ` Ivan Kokshaysky [this message]
2004-10-14 14:39   ` Matthew Wilcox
2004-10-15  7:19     ` Richard Henderson
2004-10-15 10:34       ` Ivan Kokshaysky

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=20041014182704.A13971@jurassic.park.msu.ru \
    --to=ink@jurassic.park.msu.ru \
    --cc=greg@kroah.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@atrey.karlin.mff.cuni.cz \
    --cc=matthew@wil.cx \
    /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