[Top] [All Lists]

Re: [PATCH 1/2] PCI: make pci_claim_resource() work with conflict resour

To: Deng-Cheng Zhu <>
Subject: Re: [PATCH 1/2] PCI: make pci_claim_resource() work with conflict resources as appropriate
From: Bjorn Helgaas <>
Date: Mon, 1 Aug 2011 09:21:11 -0600
Cc: Ralf Baechle <>,,,,,,,
Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed;; s=beta; t=1312212093; bh=AKiBxZMGLYI5I574yKyO9UnB5h4=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=XhSbU6tfHHHJpx8m2hygsCV/POtn0a4biE11W4vS4FbtGgaME2wBLaWhxVNLYCs68 dbgm6+LsfNfwzyQ04n+uQ==
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=NchbzGmEuo1h8EIACrlAGfIRcUwrshqZqlsQN5HQQuA=; b=IqA2AV4gSXVCGBEOlTEjoJbAHlE/1+AVDKLc19NX0S9I3V6dr96/wIECKAcba/K19P sqUY8Ko/+o293msrhQ8g==
Domainkey-signature: a=rsa-sha1; s=beta;; c=nofws; q=dns; h=dkim-signature:mime-version:in-reply-to:references:from:date: message-id:subject:to:cc:content-type:x-system-of-record; b=YDqegdRi81+tDsX0IKb11Kj/YDCxZIZy0+MtrJ9oZsiHN8vJ+U1/+ME9WVaYFc5XS 5a+ZgfhqINlk6MaeQQh7A==
In-reply-to: <>
References: <> <> <> <> <> <>
On Mon, Aug 1, 2011 at 4:13 AM, Deng-Cheng Zhu <> 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.


<Prev in Thread] Current Thread [Next in Thread>