linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Walker <danielwa@cisco.com>
To: linux-pci@vger.kernel.org, Yinghai Lu <yinghai@kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>
Subject: Re: PCI: Enforce bus address limits in resource allocation
Date: Fri, 14 Sep 2018 08:16:35 -0700	[thread overview]
Message-ID: <abb9aa39-3128-3a4d-01f7-d0614d63f37e@cisco.com> (raw)


Hi,

Please forgive my ignorance of PCI. I know very little about it, but 
I'll try to convey the issue I'm seeing.

I have a powerpc system with PCI, and some devices attached to the PCI 
bus. In 3.10 everything worked fine, then we moved to 4.9 and we had 
some issues. I was able to bisect the issue down to the patch in the 
subject line.

f75b99d PCI: Enforce bus address limits in resource allocation


 From 3.10 here is part of the PCI initialization,

|pci 0001:0e:00.0: BAR 0: assigned [mem 0xfc0000000-0xfc00fffff pref]|
|pci 0001:07:09.0: PCI bridge to [bus 0e]|
|pci 0001:07:09.0: bridge window [mem 0xfc0000000-0xfc00fffff 64bit pref]|
         
       
|||In this section the memory resource for the bridge is 64bit, and the 
device "BAR 0" gets a 64bit range. However, it seems the device is 32bit.|
||
|Now fast forward to 4.9 we get this,|

||
|
pci 0001:0e:00.0: BAR 0: no space for [mem size 0x00100000 pref]
pci 0001:0e:00.0: BAR 0: failed to assign [mem size 0x00100000 pref]
pci 0001:07:09.0: PCI bridge to [bus 0e]
pci 0001:07:09.0: bridge window [mem 0xfc0000000-0xfc00fffff 64bit pref]

|
|Here it seems to have a larger size, I'm not sure where the size is 
coming from. I was able to work around the issue by setting 
IORESOURCE_MEM_64 on the resource for this device. I also was able to 
work around it by setting "max = avail.end" to "max = (-1);" inside 
pci_bus_alloc_resource(). |
||
||I don't know if the problem is the patch, or something else inside our 
system, but any thoughts are appreciated.

Daniel
||

||

||

             reply	other threads:[~2018-09-14 20:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-14 15:16 Daniel Walker [this message]
2018-09-17 18:39 ` PCI: Enforce bus address limits in resource allocation Daniel Walker
2018-09-18 13:20 ` Bjorn Helgaas
2018-09-18 14:24   ` Daniel Walker
2018-09-18 14:24     ` Daniel Walker
2018-09-18 18:47     ` Bjorn Helgaas
2018-09-18 18:56       ` Daniel Walker
2018-09-18 18:56         ` Daniel Walker
2018-09-18 20:48         ` Bjorn Helgaas
2018-09-19 14:25           ` Oliver
2018-09-19 14:25             ` Oliver
2018-09-19 21:13             ` Daniel Walker
2018-09-19 21:13               ` Daniel Walker
2018-09-19 22:12               ` 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=abb9aa39-3128-3a4d-01f7-d0614d63f37e@cisco.com \
    --to=danielwa@cisco.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    --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).