All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bhelgaas@google.com>
To: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	jbarnes@virtuousgeek.org, torvalds@linux-foundation.org,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mips@linux-mips.org, eyal@mips.com, zenon@mips.com
Subject: Re: [PATCH 1/2] PCI: make pci_claim_resource() work with conflict resources as appropriate
Date: Mon, 1 Aug 2011 09:21:11 -0600	[thread overview]
Message-ID: <CAErSpo5A0At+U4gZ6s6ER2vzBzRiV9iJVkZtGH+gnAWeT+N=Ag@mail.gmail.com> (raw)
In-Reply-To: <CAOfQC9-vT0F-atsuQ1DRg1cFMzRq3rjfa3hvsemLqnRCJedFkA@mail.gmail.com>

On Mon, Aug 1, 2011 at 4:13 AM, Deng-Cheng Zhu <dengcheng.zhu@gmail.com> wrote:
> It was found that PCI quirks claim resources (by calling pci_claim_resource())
> *BEFORE* pcibios_fixup_bus() is called. In pcibios_fixup_bus(),
> pci_bus->resource[0] for the root bus DOES point to msc_io_resource. If PCI
> quirks do the resource claim after the arch-defined pcibios_fixup_bus() being
> called, then the problem with Malta goes away.

Oh, I see.  pcibios_fixup_bus() copies the hose resources to the root
bus pci_bus structure.  I think that's bogus because we have the
interval between mips_pcibios_init() and pcibios_fixup_bus() where the
root bus resources are incorrect.

I think it would be better to set up the resources correctly right
away, as we do on x86.  In fact, I'm dubious about pci_create_bus()
filling in ioport_resource and iomem_resource as defaults -- that's
never what we really want there, and we have to rely on the arch
coming back later to fix it up.

I'd like to see some sort of restructuring there so we could pass in a
list of resources at the time we create the bus.

Bjorn

  reply	other threads:[~2011-08-01 15:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 11:28 [PATCH 0/2] PCI driver to use insert_resource_conflict() to claim resources Deng-Cheng Zhu
2011-07-28 11:28 ` [PATCH 1/2] PCI: make pci_claim_resource() work with conflict resources as appropriate Deng-Cheng Zhu
2011-07-28 11:53   ` Ralf Baechle
2011-07-29  5:33     ` Deng-Cheng Zhu
2011-07-29  6:32     ` Deng-Cheng Zhu
2011-07-29 17:35       ` Bjorn Helgaas
2011-08-01 10:13         ` Deng-Cheng Zhu
2011-08-01 15:21           ` Bjorn Helgaas [this message]
2011-07-28 15:59   ` Bjorn Helgaas
2011-07-29  6:35     ` Deng-Cheng Zhu
2011-07-28 11:28 ` [PATCH 2/2] kernel/resource: enrich the comment for insert_resource_conflict() Deng-Cheng Zhu

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='CAErSpo5A0At+U4gZ6s6ER2vzBzRiV9iJVkZtGH+gnAWeT+N=Ag@mail.gmail.com' \
    --to=bhelgaas@google.com \
    --cc=dengcheng.zhu@gmail.com \
    --cc=eyal@mips.com \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=ralf@linux-mips.org \
    --cc=torvalds@linux-foundation.org \
    --cc=zenon@mips.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.