[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-hotplug
Subject:    Re: About PCI hot-plugging & resource management
From:       Greg KH <greg () kroah ! com>
Date:       2010-02-01 20:38:56
Message-ID: 20100201203856.GA21456 () kroah ! com
[Download RAW message or body]

On Mon, Feb 01, 2010 at 12:24:41PM +0530, Rajat Jain wrote:
> Hello,
> 
> Pardon me for asking few basic questions, but I'm trying to understand
> the basics of the PCI hot-plugging:
> 
> 1) From what I understand, Linux kernel does not use the PCI resource
> allocation done by the BIOS or the boot loader. Rather it enumerates the
> PCI buses and devices again and thus the PCI bus numbers and the
> resources that are allocated may differ from what was done by the BIOS,
> right?

No, not always.  It depends on the platform involved as to what it does.

> 2) Now as per my understanding when a new device is added later on [and
> that device may a whole new PCI tree including PCI bridges and other
> devices on it], there will be a need to allocate PCI bus numbers, and
> PCI resources to the new devices. 
> 
> As far as I understand, the PCI bus numbers needs to be within the range
> of subordinate bus numbers of the parent PCI bridges, the same is also
> true for PCI memory resources I think. Hence in a nutshell, there will
> be a need for having reserved "holes" in the PCI resource space. Is my
> understanding correct?
> 
> 3) What approach does Linux take towards dealing with the above
> situation? I'd appreciate if you could please point me to appropriate
> links or code references...

The PCI Hotplug controller is responsible for ensuring that there is a
range of resources and bus numbers for any PCI devices that are added
after the machine is up and running.  Or the BIOS/firmware if that is
what the platform is using.  Either way, it's not the kernel's job to
reserve space for new PCI devices.

See the PCI hotplug spec from the PCI sig if you have questions about
the details.

hope this helps,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic