linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* About PCI hot-plugging & resource management
@ 2010-02-01  7:06 Rajat Jain
  2010-02-01 20:38 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Rajat Jain @ 2010-02-01  7:06 UTC (permalink / raw)
  To: linux-hotplug

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?

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...

Thanks,

Rajat

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: About PCI hot-plugging & resource management
  2010-02-01  7:06 About PCI hot-plugging & resource management Rajat Jain
@ 2010-02-01 20:38 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2010-02-01 20:38 UTC (permalink / raw)
  To: linux-hotplug

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-01 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-01  7:06 About PCI hot-plugging & resource management Rajat Jain
2010-02-01 20:38 ` Greg KH

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).