Linux-PCI Archive on lore.kernel.org
 help / color / Atom feed
From: Logan Gunthorpe <logang@deltatee.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Bjorn Helgaas <helgaas@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux PCI <linux-pci@vger.kernel.org>,
	Kit Chow <kchow@gigaio.com>, Yinghai Lu <yinghai@kernel.org>
Subject: Re: [PATCH 1/2] PCI: Prevent 64-bit resources from being counted in 32-bit bridge region
Date: Mon, 4 Mar 2019 13:39:01 -0700
Message-ID: <d547770e-9c9d-a73d-8f2d-8bcb8ee4f363@deltatee.com> (raw)
In-Reply-To: <CAErSpo5icDM2VgYoLdEp8C-CV5XEMThABMA8RBq64grhRSkRWA@mail.gmail.com>



On 2019-03-04 1:29 p.m., Bjorn Helgaas wrote:
>> I agree, but reworking this code scares me and I suspect it was designed
>> this way for a reason. I'm guessing there are a lot of corner cases and
>> unusual bios issues this stuff works around. We might end up fixing a
>> some cases and breaking a bunch of other cases.
> 
> Scares me too, which is one reason I haven't done anything about it.
> 
> I didn't mean to suggest that you should rework it for *this* issue.
> I just keep hoping that we can chip away at teensy pieces and in ten
> or twenty years maybe make some headway.

Sure. Just trying to brainstorm some ideas.

Another idea to chip away at things might be that instead of
pbus_size_mem() trying to find an appropriate bridge resources by
looping, we simply pass the resource it's supposed to use (which I
suspect __pci_bus_size_bridges should be able to figure out ahead of
time. So instead of guessing and testing for a bunch of different
resource window types we might have, just loop through the actually
available windows and group the resources in what we have. Once we've
sorted out these patches, when I have some free time, I might try
working out a cleanup patch in this direction that we could test and
merge slowly.

Logan

  reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-14 17:00 Logan Gunthorpe
2019-02-14 17:00 ` [PATCH 2/2] PCI: Fix disabling of bridge BARs when assigning bus resources Logan Gunthorpe
2019-03-04  0:23 ` [PATCH 1/2] PCI: Prevent 64-bit resources from being counted in 32-bit bridge region Bjorn Helgaas
2019-03-04 19:21   ` Logan Gunthorpe
2019-03-04 20:11     ` Bjorn Helgaas
2019-03-04 20:21       ` Logan Gunthorpe
2019-03-04 20:29         ` Bjorn Helgaas
2019-03-04 20:39           ` Logan Gunthorpe [this message]
2019-04-01 19:22       ` Logan Gunthorpe
2019-03-04 23:58     ` Logan Gunthorpe

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=d547770e-9c9d-a73d-8f2d-8bcb8ee4f363@deltatee.com \
    --to=logang@deltatee.com \
    --cc=bhelgaas@google.com \
    --cc=helgaas@kernel.org \
    --cc=kchow@gigaio.com \
    --cc=linux-kernel@vger.kernel.org \
    --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

Linux-PCI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-pci/0 linux-pci/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-pci linux-pci/ https://lore.kernel.org/linux-pci \
		linux-pci@vger.kernel.org
	public-inbox-index linux-pci

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-pci


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git