[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQX33xEAe=gEYqemcq3UeTjGrZPE43dcBv0ELBnMspu8fA@mail.gmail.com>
Date: Mon, 17 Sep 2012 20:18:34 -0700
From: Yinghai Lu <yinghai@...nel.org>
To: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Taku Izumi <izumi.taku@...fujitsu.com>,
Jiang Liu <jiang.liu@...wei.com>, x86 <x86@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-acpi@...r.kernel.org
Subject: Re: [PATCH part2 4/6] x86, PCI: Separate rom resource claim out
On Mon, Sep 17, 2012 at 4:38 PM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
> On Sun, Sep 2, 2012 at 3:50 PM, Yinghai Lu <yinghai@...nel.org> wrote:
>> So could use it with hot-added root bus.
>>
>> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>> ---
>> arch/x86/pci/i386.c | 58 ++++++++++++++++++++++++++++++++++++---------------
>> 1 files changed, 41 insertions(+), 17 deletions(-)
>>
>> diff --git a/arch/x86/pci/i386.c b/arch/x86/pci/i386.c
>> index 84696ed..4fdf0b2 100644
>> --- a/arch/x86/pci/i386.c
>> +++ b/arch/x86/pci/i386.c
>> @@ -298,27 +298,51 @@ static void __init pcibios_allocate_resources(struct pci_bus *bus, int pass)
>> }
>> }
>>
>> +static void __init __pcibios_allocate_rom_resources(struct pci_bus *bus)
>> +{
>> + struct pci_dev *dev;
>> + struct pci_bus *child;
>> +
>> + list_for_each_entry(dev, &bus->devices, bus_list) {
>> + pcibios_allocate_dev_rom_resource(dev);
>> +
>> + child = dev->subordinate;
>> + if (child)
>> + __pcibios_allocate_rom_resources(child);
>
> I really dislike the "__" prefix on the function names. It seems
> pointless to add another function and the "__" when all you need is a
> test of PCI_ASSIGN_ROMS. Also, it makes the structure of
> __pcibios_allocate_rom_resources() different from
> pcibios_allocate_resources() when they should be exactly the same.
>
> What if you made pcibios_assign_resources() look like this:
>
> if (!!(pci_probe & PCI_ASSIGN_ROMS)) {
> list_for_each_entry(bus, &pci_root_buses, node)
> pcibios_allocate_rom_resources(bus);
> }
>
> Then I don't think you'd need the extra function.
ok, will just move pci_probe checking back to
pcibios_allocate_rom_resources directly.
Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists