From: Guenter Roeck <linux@roeck-us.net>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Bjorn Helgaas <bhelgaas@google.com>
Cc: Yinghai Lu <yinghai@kernel.org>,
"oe5hpm@gmail.com" <oe5hpm@gmail.com>,
Ralf Baechle <ralf@linux-mips.org>,
"James E.J. Bottomley" <jejb@parisc-linux.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Richard Henderson <rth@twiddle.net>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
David Howells <dhowells@redhat.com>,
Russell King <linux@arm.linux.org.uk>,
Tony Luck <tony.luck@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Ingo Molnar <mingo@redhat.com>, Michal Simek <monstr@monstr.eu>,
Chris Zankel <chris@zankel.net>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: trouble with PCI: Call pci_read_bridge_bases() from core instead of arch code
Date: Tue, 15 Sep 2015 09:51:54 -0700 [thread overview]
Message-ID: <55F84CAA.8060901@roeck-us.net> (raw)
In-Reply-To: <20150915163000.GA16240@red-moon>
On 09/15/2015 09:30 AM, Lorenzo Pieralisi wrote:
> On Tue, Sep 15, 2015 at 04:57:07PM +0100, Bjorn Helgaas wrote:
>> On Tue, Sep 15, 2015 at 4:46 AM, Lorenzo Pieralisi
>> <lorenzo.pieralisi@arm.com> wrote:
>>> On Tue, Sep 15, 2015 at 12:58:20AM +0100, Yinghai Lu wrote:
>>>> On Mon, Sep 14, 2015 at 10:36 AM, Yinghai Lu <yinghai@kernel.org> wrote:
>>>>> On Mon, Sep 14, 2015 at 9:28 AM, Lorenzo Pieralisi
>>>>> <lorenzo.pieralisi@arm.com> wrote:
>>>>>> On Mon, Sep 14, 2015 at 05:05:50PM +0100, Yinghai Lu wrote:
>>>>>>> We could just revert
>>>>>>> dff22d2054b5 (" PCI: Call pci_read_bridge_bases() from core instead of
>>>>>>> arch code")
>>>>>>> instead.
>>>>>>
>>>>
>>>>> if arch code called pci_read_bridge_bases() via pcibios_fixup_bus(),
>>>>> then it need to have
>>>>> to call pcibios_allocate_bus_resources() later.
>>>>>
>>>>> but now arm (mips ?) does not have calling pcibios_allocate_bus_resources().
>>>
>>> pcibios_allocate_bus_resources() is an arch specific function and arm
>>> and (and mips ?) does not need to create/call it because ARM reassigns
>>> ALL resources in ALL platforms, hoping FW can provide a reasonable PCI
>>> bridge apertures set-up on ARM is wishful thinking at present.
>>>
>>> If PCI core code is written with that assumption (ie that arch code zeroes
>>> the bridge apertures if they can't be claimed), pci_read_bridge_bases()
>>> can't be moved to PCI core code at present, sad and simple.
>>>
>>> I already asked many times why __pci_bus_size_bridges() cares about
>>> the old bridge size on first scan and got no answer so I would ask Bjorn
>>> to revert dff22d2054b5 (" PCI: Call pci_read_bridge_bases() from core
>>> instead of arch code") or we apply an ARM specific plaster, we are making
>>> no progress on this.
>>>
>>>> Found other problem that is caused by
>>>> dff22d2054b5 (" PCI: Call pci_read_bridge_bases() from core instead of
>>>> arch code")
>>>>
>>>> If that commit does not get reverted, will need to have attached patch
>>>
>>> I see what you mean and I see why there is a reason to apply the patch
>>> below if we do not revert dff22d2054b5 (" PCI: Call pci_read_bridge_bases()
>>> from core instead of arch code"), but I am afraid the commit log has to
>>> be rewritten to explain the problem in a way that properly describes
>>> the issue, and that's not the first one I read in the last couple of
>>> weeks to figure out how to fix this regression.
>>
>> I'm inclined to revert dff22d2054b5 ("PCI: Call
>> pci_read_bridge_bases() from core instead of arch code") until we can
>> figure this out. I think the idea of moving that work from
>> arch-specific code to the core is good, but it seems like it leads to
>> more hacky workarounds than real cleanup right now. What would break
>> if we simply reverted it? Would that reintroduce any problems?
>
> None that I am aware of, I know Guenter required it for this series:
>
> https://lkml.org/lkml/2015/7/30/861
>
> but it was not merged so, as far as I understand, reverting the patch
> should get things to normal. I think it unearthed a couple of niggles
It looks like me and Yinghai disagree how the problem I was trying to fix
should be handled, I don't understand Yinghai's concerns, and unfortunately
I just don't have the time I would need to get a better understanding.
It is fine with me to revert your patch and abandon mine.
Guenter
next prev parent reply other threads:[~2015-09-15 16:52 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-02 9:51 trouble with PCI: Call pci_read_bridge_bases() from core instead of arch code oe5hpm
2015-09-02 17:47 ` Lorenzo Pieralisi
2015-09-02 20:32 ` Bjorn Helgaas
2015-09-03 10:01 ` Lorenzo Pieralisi
2015-09-03 16:21 ` Bjorn Helgaas
2015-09-03 17:57 ` Lorenzo Pieralisi
2015-09-04 14:19 ` Lorenzo Pieralisi
2015-09-04 16:00 ` Yinghai Lu
2015-09-04 16:44 ` Lorenzo Pieralisi
2015-09-04 23:53 ` Yinghai Lu
2015-09-07 9:12 ` Lorenzo Pieralisi
2015-09-14 10:09 ` Lorenzo Pieralisi
2015-09-14 16:05 ` Yinghai Lu
2015-09-14 16:28 ` Lorenzo Pieralisi
2015-09-14 17:36 ` Yinghai Lu
2015-09-14 23:58 ` Yinghai Lu
2015-09-15 9:46 ` Lorenzo Pieralisi
2015-09-15 15:57 ` Bjorn Helgaas
2015-09-15 16:30 ` Lorenzo Pieralisi
2015-09-15 16:51 ` Guenter Roeck [this message]
2015-09-15 19:25 ` Bjorn Helgaas
2015-09-15 20:26 ` Yinghai Lu
2015-09-16 8:58 ` Lorenzo Pieralisi
2015-09-15 20:17 ` Yinghai Lu
2015-09-15 21:07 ` Guenter Roeck
2015-09-15 21:12 ` Yinghai Lu
2015-09-09 11:32 ` Lorenzo Pieralisi
2015-09-09 16:59 ` Yinghai Lu
2015-09-09 17:22 ` Yinghai Lu
2015-09-09 17:38 ` Lorenzo Pieralisi
2015-09-03 10:03 ` oe5hpm
2015-09-03 10:30 ` oe5hpm
2015-09-03 10:51 ` Lorenzo Pieralisi
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=55F84CAA.8060901@roeck-us.net \
--to=linux@roeck-us.net \
--cc=benh@kernel.crashing.org \
--cc=bhelgaas@google.com \
--cc=chris@zankel.net \
--cc=davem@davemloft.net \
--cc=dhowells@redhat.com \
--cc=jejb@parisc-linux.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=lorenzo.pieralisi@arm.com \
--cc=mingo@redhat.com \
--cc=monstr@monstr.eu \
--cc=mpe@ellerman.id.au \
--cc=oe5hpm@gmail.com \
--cc=ralf@linux-mips.org \
--cc=rth@twiddle.net \
--cc=tony.luck@intel.com \
--cc=yinghai@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;
as well as URLs for NNTP newsgroup(s).