Re: [PATCH] PCI: update bridge resources to get bigger ranges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Apr 27, 2011 at 1:38 AM, Ram Pai <linuxram@xxxxxxxxxx> wrote:
> On Tue, Apr 26, 2011 at 05:25:00PM -0600, Bjorn Helgaas wrote:
>> I'm uneasy about release_child_resources().  This patch doesn't add
>> it, but it does add another use of it.
>>
>> What makes it safe for us to blindly release child resources?  If we
>> start with something like this:
>>
>> f2500000-f25fffff : PCI Bus 0000:0d
>>   f2500000-f25000ff : 0000:0d:00.0
>>     f2500000-f25000ff : mmc0
>>
>> and we call release_child_resources() on the top-level bridge window
>> (f2500000-f25fffff), I think we will also release the 0000:0d:00.0 and
>> mmc resources.  This might not be a problem at boot-time, when the
>> driver won't have claimed the device yet, but often we want to shuffle
>> resources to make a hot-plugged device work, and then we do have to
>> worry about other drivers.
>>
>> It seems like we need to check whether a driver is bound to a device,
>> and if so, leave its resources alone.  I didn't see anything like
>> that, but maybe I missed it.
>
> But pci_assign_unassigned_resources() is called only during boot-time,
> before any resources are assigned to any drivers. right?

That's true today, but I expect it will be false soon.  The problem of
assigning resources and finding that we need to rearrange things is
really the same, whether it occurs at boot-time or at hot-add time.  I
think we ought to use the same strategy either way.

I think we're building on a faulty foundation, and I'd rather fix it
now before we build more things on top of it.

Bjorn
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux