public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-alpha@vger.kernel.org
Subject: Re: [PATCH v3 08/34] alpha/PCI: convert to pci_scan_root_bus() for correct root bus resources
Date: Wed, 4 Jan 2012 09:38:34 -0800	[thread overview]
Message-ID: <20120104093834.39614a85@jbarnes-desktop> (raw)
In-Reply-To: <CAErSpo7WHixAQL2=ptHj+JUsE8W6PTG0ZEM1T0fYQAixqjm=pQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3446 bytes --]

On Fri, 16 Dec 2011 14:24:01 -0700
Bjorn Helgaas <bhelgaas@google.com> wrote:

> On Fri, Oct 28, 2011 at 4:26 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> > Convert from pci_scan_bus() to pci_scan_root_bus() and remove root bus
> > resource fixups.  This fixes the problem of "early" and "header" quirks
> > seeing incorrect root bus resources.
> >
> > CC: linux-alpha@vger.kernel.org
> > Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
> > ---
> >  arch/alpha/kernel/pci.c |   37 ++++++++++++++++++++-----------------
> >  1 files changed, 20 insertions(+), 17 deletions(-)
> >
> > diff --git a/arch/alpha/kernel/pci.c b/arch/alpha/kernel/pci.c
> > index c9ab94e..e9e78a2 100644
> > --- a/arch/alpha/kernel/pci.c
> > +++ b/arch/alpha/kernel/pci.c
> > @@ -286,22 +286,7 @@ pcibios_fixup_bus(struct pci_bus *bus)
> >        struct pci_controller *hose = bus->sysdata;
> >        struct pci_dev *dev = bus->self;
> >
> > -       if (!dev) {
> > -               /* Root bus. */
> > -               u32 pci_mem_end;
> > -               u32 sg_base = hose->sg_pci ? hose->sg_pci->dma_base : ~0;
> > -               unsigned long end;
> > -
> > -               bus->resource[0] = hose->io_space;
> > -               bus->resource[1] = hose->mem_space;
> > -
> > -               /* Adjust hose mem_space limit to prevent PCI allocations
> > -                  in the iommu windows. */
> > -               pci_mem_end = min((u32)__direct_map_base, sg_base) - 1;
> > -               end = hose->mem_space->start + pci_mem_end;
> > -               if (hose->mem_space->end > end)
> > -                       hose->mem_space->end = end;
> > -       } else if (pci_probe_only &&
> > +       if (pci_probe_only && dev &&
> >                   (dev->class >> 8) == PCI_CLASS_BRIDGE_PCI) {
> >                pci_read_bridge_bases(bus);
> >                pcibios_fixup_device_resources(dev, bus);
> > @@ -414,13 +399,31 @@ void __init
> >  common_init_pci(void)
> >  {
> >        struct pci_controller *hose;
> > +       struct list_head resources;
> >        struct pci_bus *bus;
> >        int next_busno;
> >        int need_domain_info = 0;
> > +       u32 pci_mem_end;
> > +       u32 sg_base;
> > +       unsigned long end;
> >
> >        /* Scan all of the recorded PCI controllers.  */
> >        for (next_busno = 0, hose = hose_head; hose; hose = hose->next) {
> > -               bus = pci_scan_bus(next_busno, alpha_mv.pci_ops, hose);
> > +               sg_base = hose->sg_pci ? hose->sg_pci->dma_base : ~0;
> > +
> > +               /* Adjust hose mem_space limit to prevent PCI allocations
> > +                  in the iommu windows. */
> > +               pci_mem_end = min((u32)__direct_map_base, sg_base) - 1;
> > +               end = hose->mem_space->start + pci_mem_end;
> > +               if (hose->mem_space->end > end)
> > +                       hose->mem_space->end = end;
> > +
> > +               INIT_LIST_HEAD(&resources);
> > +               pci_add_resource(&resources, &hose->io_space);
> > +               pci_add_resource(&resources, &hose->mem_space);
> 
> These two lines are errors: hose->io_space is already a struct
> resource pointer, so we shouldn't take the pointer's address.  Updated
> patch and incremental patch attached.

Squashed into the original alpha patch, thanks.

-- 
Jesse Barnes, Intel Open Source Technology Center

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-01-04 17:38 UTC|newest]

Thread overview: 72+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28 22:25 [PATCH v3 00/34] Create PCI root buses with correct resources Bjorn Helgaas
2011-10-28 22:25 ` [PATCH v3 01/34] PCI: add helpers for building PCI bus resource lists Bjorn Helgaas
2011-12-05 19:54   ` Jesse Barnes
2011-10-28 22:25 ` [PATCH v3 02/34] PCI: show host bridges and root bus resources Bjorn Helgaas
2011-10-28 22:25   ` Bjorn Helgaas
2011-10-28 22:25 ` [PATCH v3 03/34] PCI: add pci_create_root_bus() that accepts resource list Bjorn Helgaas
2011-10-28 22:25 ` [PATCH v3 04/34] PCI: add pci_scan_root_bus() " Bjorn Helgaas
2011-10-28 22:25 ` [PATCH v3 05/34] PCI: convert pci_scan_bus() to use pci_create_root_bus() Bjorn Helgaas
2011-10-28 22:26 ` [PATCH v3 06/34] PCI: convert pci_scan_bus_parented() " Bjorn Helgaas
2011-10-28 22:26 ` [PATCH v3 07/34] PCI: deprecate pci_scan_bus_parented() Bjorn Helgaas
2011-10-28 22:26   ` Bjorn Helgaas
2011-10-28 22:26 ` [PATCH v3 08/34] alpha/PCI: convert to pci_scan_root_bus() for correct root bus resources Bjorn Helgaas
2011-10-28 22:26   ` Bjorn Helgaas
2011-12-16 21:24   ` Bjorn Helgaas
2012-01-04 17:38     ` Jesse Barnes [this message]
2012-01-04 17:38       ` Jesse Barnes
2011-10-28 22:26 ` [PATCH v3 09/34] arm/PCI: " Bjorn Helgaas
2011-10-28 22:26   ` Bjorn Helgaas
2011-12-23  1:10   ` Bjorn Helgaas
2012-01-04 17:28     ` Jesse Barnes
2012-01-04 17:28       ` Jesse Barnes
2011-10-28 22:26 ` [PATCH v3 10/34] frv/PCI: " Bjorn Helgaas
2011-10-28 22:26   ` Bjorn Helgaas
2011-10-28 22:26 ` [PATCH v3 11/34] ia64/PCI: use pci_create_bus() instead of pci_scan_bus_parented() Bjorn Helgaas
2011-10-28 22:26   ` Bjorn Helgaas
2011-10-28 22:26 ` [PATCH v3 12/34] ia64/PCI: convert to pci_create_root_bus() for correct root bus resources Bjorn Helgaas
2011-10-28 22:26 ` [PATCH v3 13/34] microblaze/PCI: fix pci_bus_for_each_resource() usage Bjorn Helgaas
2011-10-28 22:26 ` [PATCH v3 14/34] microblaze/PCI: make pcibios_setup_phb_resources() static Bjorn Helgaas
2011-10-28 22:26   ` Bjorn Helgaas
2011-10-28 22:26 ` [PATCH v3 15/34] microblaze/PCI: convert to pci_create_root_bus() for correct root bus resources Bjorn Helgaas
2011-10-28 22:26   ` Bjorn Helgaas
2011-10-28 22:26 ` [PATCH v3 16/34] microblaze/PCI: use pci_scan_root_bus() Bjorn Helgaas
2011-10-28 22:26   ` Bjorn Helgaas
2011-10-28 22:26 ` [PATCH v3 17/34] mips/PCI: convert to pci_scan_root_bus() for correct root bus resources Bjorn Helgaas
2011-10-28 22:26   ` Bjorn Helgaas
2011-10-28 22:27 ` [PATCH v3 18/34] mn10300/PCI: " Bjorn Helgaas
2011-10-28 22:27 ` [PATCH v3 19/34] parisc/PCI: dino: use pci_create_bus() instead of pci_scan_bus_parented() Bjorn Helgaas
2011-10-28 22:27   ` Bjorn Helgaas
2011-10-28 22:27 ` [PATCH v3 20/34] parisc/PCI: dino: convert to pci_create_root_bus() for correct root bus resources Bjorn Helgaas
2011-10-28 22:27   ` Bjorn Helgaas
2011-10-28 22:27 ` [PATCH v3 21/34] parisc/PCI: lba: deal with LMMIO/PAT overlaps before creating PCI root bus Bjorn Helgaas
2011-10-28 22:27   ` Bjorn Helgaas
2011-10-28 22:27 ` [PATCH v3 22/34] parisc/PCI: lba: use pci_create_bus() instead of pci_scan_bus_parented() Bjorn Helgaas
2011-10-28 22:27   ` Bjorn Helgaas
2011-10-28 22:27 ` [PATCH v3 23/34] parisc/PCI: lba: convert to pci_create_root_bus() for correct root bus resources Bjorn Helgaas
2011-10-28 22:27 ` [PATCH v3 24/34] powerpc/PCI: make pcibios_setup_phb_resources() static Bjorn Helgaas
2011-10-28 22:27   ` Bjorn Helgaas
2011-10-28 22:27 ` [PATCH v3 25/34] powerpc/PCI: split PHB part out of pcibios_map_io_space() Bjorn Helgaas
2011-10-28 22:27   ` Bjorn Helgaas
2011-12-06 18:07   ` Bjorn Helgaas
2011-10-28 22:27 ` [PATCH v3 26/34] powerpc/PCI: convert to pci_create_root_bus() Bjorn Helgaas
2011-10-28 22:27   ` Bjorn Helgaas
2011-12-06 18:09   ` Bjorn Helgaas
2011-12-06 18:09     ` Bjorn Helgaas
2011-10-28 22:27 ` [PATCH v3 27/34] sh/PCI: convert to pci_scan_root_bus() for correct root bus resources Bjorn Helgaas
2011-10-28 22:27   ` Bjorn Helgaas
2011-10-28 22:27 ` [PATCH v3 28/34] sparc/PCI: convert to pci_create_root_bus() Bjorn Helgaas
2011-10-28 22:27   ` Bjorn Helgaas
2011-10-28 22:27 ` [PATCH v3 29/34] sparc32, leon/PCI: convert to pci_scan_root_bus() for correct root bus resources Bjorn Helgaas
2011-10-28 22:27   ` Bjorn Helgaas
2011-10-28 22:28 ` [PATCH v3 30/34] x86/PCI: read Broadcom CNB20LE host bridge info before PCI scan Bjorn Helgaas
2011-10-28 22:28 ` [PATCH v3 31/34] x86/PCI: use pci_scan_bus() instead of pci_scan_bus_parented() Bjorn Helgaas
2011-10-28 22:28   ` Bjorn Helgaas
2011-10-28 22:28 ` [PATCH v3 32/34] x86/PCI: convert to pci_create_root_bus() and pci_scan_root_bus() Bjorn Helgaas
2011-10-28 22:28   ` Bjorn Helgaas
2011-10-28 22:28 ` [PATCH v3 33/34] xtensa/PCI: convert to pci_scan_root_bus() for correct root bus resources Bjorn Helgaas
2011-10-28 22:28 ` [PATCH v3 34/34] PCI: remove pci_create_bus() Bjorn Helgaas
2011-10-29 16:25 ` [PATCH v3 00/34] Create PCI root buses with correct resources Bjorn Helgaas
2011-11-11 16:40   ` Bjorn Helgaas
2011-11-11 16:40     ` Bjorn Helgaas
2011-11-28 18:58     ` Bjorn Helgaas
2011-11-28 18:58       ` Bjorn Helgaas

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=20120104093834.39614a85@jbarnes-desktop \
    --to=jbarnes@virtuousgeek.org \
    --cc=bhelgaas@google.com \
    --cc=linux-alpha@vger.kernel.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-pci@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox