Re: [PATCH] PCI: read memory ranges out of Broadcom CNB20LE host bridge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 01, 2010 at 12:54:37PM -0600, Bjorn Helgaas wrote:
> On Thursday 01 April 2010 12:15:49 pm Yinghai Lu wrote:
> > On Wed, Mar 31, 2010 at 3:56 PM, Ira W. Snyder <iws@xxxxxxxxxxxxxxxx> wrote:
> > > On Wed, Mar 31, 2010 at 03:32:09PM -0600, Bjorn Helgaas wrote:
> > >> On Wednesday 31 March 2010 12:45:14 pm Ira W. Snyder wrote:
> > >> > On Wed, Mar 31, 2010 at 12:13:46PM -0600, Bjorn Helgaas wrote:
> > >> > > On Wednesday 31 March 2010 10:38:42 am Ira W. Snyder wrote:
> > >>
> > >> > > The CNB20LE might also be used in systems that *do* have ACPI, and in
> > >> > > that case, I think we should use ACPI rather than read the info out of
> > >> > > the hardware.  I expect that's what Windows will do, and Linux should
> > >> > > do the same as Windows when it's practical.  Also, that's what the BIOS
> > >> > > writers expect the OS to do, and _CRS is the logical place for them to
> > >> > > put platform-specific workarounds.
> > >> >
> > >> > Is there any way to detect if we do have ACPI and shouldn't run this
> > >> > quirk? How?
> > >>
> > >> Probably check "acpi_disabled".
> > >>
> > >
> > > Ok, I'll give this a shot.
> > 
> > do not need that. bus_numa.c already did that check for you.
> > 
> > void x86_pci_root_bus_res_quirks(struct pci_bus *b)
> > {
> >         int i;
> >         int j;
> >         struct pci_root_info *info;
> > 
> >         /* don't go for it if _CRS is used already */
> >         if (b->resource[0] != &ioport_resource ||
> >             b->resource[1] != &iomem_resource)
> >                 return;
> 
> Uh, ok.  I think that's a pretty non-obvious connection, but I suppose
> it does work.  I'd rather write code that says what you mean, rather
> than relying on a side-effect of something else.
> 

In my newer patch, I put a comment about this.

I don't know the ACPI _CRS code nearly as well as both of you. If a BIOS
from 1999 (very old, but that's the date on mine, IIRC) provided an ACPI
_CRS table, would you use it to determine host bridge windows?

What I'm wondering is if the code:

if (!acpi_disabled)
	return;

at the beginning of the cnb20le_res() function would still exit the
function in the case where the system:
1) has a working ACPI implementation
2) does not have an ACPI _CRS table

I think that we would exit the function early, but fail to read the
bridge windows. This means that PCI hotplug would not work on this
system.

Is the ACPI _CRS optional or mandatory? If it is optional, then I think
Yinghai's solution is better. That is what I did in my v2 patch.

Thanks,
Ira
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux