Re: PCI: Fix boot-time hang on G31/G33 PC

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jesse Barnes <jesse.barnes@...>
Cc: Greg KH <greg@...>, <linux-pci@...>, Matthew Wilcox <matthew@...>, <linux-kernel@...>, Robert Hancock <hancockr@...>
Date: Thursday, September 27, 2007 - 10:31 am

On Wed, Sep 26, 2007 at 03:20:40PM -0700, Jesse Barnes wrote:

Yes, nobody is arguing that moving the BAR around is unsafe, but generally
it's the less of two evils.

The major problem here is that with IO and MEM bits cleared in the command
register you disable *all* address decoders on the device, not just ranges
that have respective BARs. At least this behaviour is required by PCI spec.
Examples:
- legacy VGA IO and memory (no corresponding BARs);
- base/limit registers of P2P bridge;
- PMU and SMBus registers (sort of normal BARs, but hidden elsewhere
  in the config space);
- IDE legacy mode registers;
- IO-APIC registers (typically sort of read-only BAR).

For all of these address ranges our current BAR probe is effectively
a no-op, but disable/re-enable clearly isn't.


There are two other solutions: one is to disable decode selectively,
only on devices or systems where it's necessary and known to be safe.
I've posted a patch which introduces "disable_while_probe" pci_dev field
for that purpose.
Another one is to delay mmconfig probe until after the PCI probe is done,
as Matthew suggested, and Robert confirmed that it's feasible.

Ivan.
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Fix boot-time hang on G31/G33 PC, Matthew Wilcox, (Sat Aug 25, 9:55 pm)
Re: PCI: Fix boot-time hang on G31/G33 PC, Greg KH, (Wed Sep 26, 5:18 pm)
Re: PCI: Fix boot-time hang on G31/G33 PC, Jesse Barnes, (Wed Sep 26, 5:55 pm)
Re: PCI: Fix boot-time hang on G31/G33 PC, Greg KH, (Wed Sep 26, 5:56 pm)
Re: PCI: Fix boot-time hang on G31/G33 PC, Jesse Barnes, (Wed Sep 26, 6:20 pm)
Re: PCI: Fix boot-time hang on G31/G33 PC, Ivan Kokshaysky, (Thu Sep 27, 10:31 am)
Re: PCI: Fix boot-time hang on G31/G33 PC, Kok, Auke, (Thu Sep 27, 2:36 pm)
Re: PCI: Fix boot-time hang on G31/G33 PC, Greg KH, (Thu Sep 27, 7:13 pm)
Re: PCI: Fix boot-time hang on G31/G33 PC, Vitaliy Gusev, (Fri Oct 12, 10:26 am)
Re: PCI: Fix boot-time hang on G31/G33 PC, Kok, Auke, (Fri Oct 12, 1:07 pm)
Re: PCI: Fix boot-time hang on G31/G33 PC, Robert Hancock, (Wed Sep 26, 7:04 pm)
Re: [PATCH] Fix boot-time hang on G31/G33 PC, Grant Grundler, (Tue Aug 28, 1:59 pm)
Re: [PATCH] Fix boot-time hang on G31/G33 PC, Grant Grundler, (Tue Aug 28, 2:28 pm)
Re: [PATCH] Fix boot-time hang on G31/G33 PC, Robert Hancock, (Sun Aug 26, 12:24 am)
Re: [PATCH] Fix boot-time hang on G31/G33 PC, Matthew Wilcox, (Sun Aug 26, 8:55 am)
Re: [PATCH] Fix boot-time hang on G31/G33 PC, Matthew Wilcox, (Sun Aug 26, 10:07 am)
Re: [PATCH] Fix boot-time hang on G31/G33 PC, Robert Hancock, (Sun Aug 26, 1:59 pm)
Re: [PATCH] Fix boot-time hang on G31/G33 PC, Jesse Barnes, (Tue Aug 28, 1:22 pm)