[PATCH 1/1] ppc64: Block config accesses during BIST

Nathan Lynch nathanl at austin.ibm.com
Wed Sep 15 01:52:45 EST 2004


On Mon, 2004-09-13 at 16:53, brking at us.ibm.com wrote:
> Some PCI adapters on pSeries and iSeries hardware (ipr scsi adapters)
> have an exposure today in that they issue BIST to the adapter to reset
> the card. If, during the time it takes to complete BIST, userspace attempts
> to access PCI config space, the host bus bridge will master abort the access
> since the ipr adapter does not respond on the PCI bus for a brief period of
> time when running BIST. This master abort results in the host PCI bridge
> isolating that PCI device from the rest of the system, making the device
> unusable until Linux is rebooted. This patch is an attempt to close that
> exposure by introducing some blocking code in the arch specific PCI code.
> The intent is to have the ipr device driver invoke these routines to
> prevent userspace PCI accesses from occurring during this window.

Is there a way to make an attempted config space read sleep until the
BIST is done?  E.g. the device's config space is protected by a
semaphore which must be held during accesses or during BIST.  Or is it
legal for the driver to access config space in interrupt context?

Adding a spinlock to the (pSeries-only) device_node structure makes me
concerned about the potential for deadlock, since it's not clear to me
what the lock ordering rules should be with respect to the per-device
node config_lock and the global device tree lock.

Nathan





More information about the Linuxppc64-dev mailing list