Re: [PATCH 00/10] PCI, ACPI: Use bus type notifier for root bus hotplug

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

 



Hi Yinghai,
	I like your idea to get rid of acpi_device_ops->start() method, actually
that's on my TODO list too.
	I think the ACPI based system device hotplug framework we are working on
may help to solve this issue. We define CPU, memory, PCI host bridge, IOAPIC,
and CONTAINER as system devices. We have added some callbacks into acpi_device_ops
to support system device hotplug. With the new ACPI system device hotplug framework,
the sequence is:
1) Walk hot-added ACPI subtree, creates acpi devices and binds acpi drivers. Now
acpi_device_ops->add() method only setup basic data structure to manage the ACPI
device but without actually starting the system device.
2) Classify hot-added ACPI devices into classes, such CPU, MEM, PCI HOST BRIGE, IOAPIC,
CONTAINER.
3) Add all hot-added system device into running system in following order:
CONTAINER -> MEM -> CPU -> IOAPIC -> PCI_HOST_BRIDGE.

With above sequence, we could scan and start PCI devices in step 3 above.

We have refined ACPI container and processor driver to support the new framework, and
we have a prototype for pci_root and mem_hotplug drivers too. I will try to post them
as soon as possible.

Thanks
Gerry

1) scan and bind 
On 10/02/2012 02:32 PM, Yinghai Lu wrote:
> Add device drivers_autoprobe to make hotplug path more like booting path:
> create all acpi device and add them to device tree at first
>  then attach acpi drivers.
> create all pci devices and add them to device tree at first
>  then attach pci drivers.
> 
> 1. kill acpi_pci_root_start.
> 2. register pci devices to device tree as soon as possible after pci devices
>    and bus get created.
>    After pci_scan_child_bus, all bus and devices get into devices already.
>    pci_bus_add_devices will only attach driver to pci devices.
> 
> could get from
>         git://git.kernel.org/pub/scm/linux/kernel/git/yinghai/linux-yinghai.git for-pci-next
> 
> Yinghai Lu (10):
>   device: add drivers_autoprobe in struct device
>   ACPI: use device drivers_autoprobe to delay loading acpi drivers
>   PCI: prepare to use device drivers_autoprobe to delay attach drivers
>   PCI: Use device_add for device and bus early
>   PCI, ACPI: Separate out acpi_pci_root_osc_contorl_set
>   PCI, ACPI: Move hot add root bus conf code to acpi_pci_root_add
>   PCI, ACPI: Remove not used acpi_pci_root_start()
>   PCI: Add dev_is_pci_host_bridge() helper
>   PCI, ACPI: using acpi/pci bind path for pci_host_bridge
>   PCI, ACPI: use bus_type notifier for acpi_pci_bind_notify
> 
>  drivers/acpi/glue.c         |    4 -
>  drivers/acpi/pci_bind.c     |   99 +++++++++++++++----
>  drivers/acpi/pci_root.c     |  223 +++++++++++++++++++++++--------------------
>  drivers/acpi/scan.c         |   48 +++++++++-
>  drivers/base/bus.c          |    2 +-
>  drivers/base/core.c         |    1 +
>  drivers/pci/bus.c           |   45 +++------
>  drivers/pci/hotplug.c       |   25 +++++
>  drivers/pci/iov.c           |    7 --
>  drivers/pci/probe.c         |   25 ++++--
>  include/acpi/acpi_drivers.h |    2 +
>  include/linux/device.h      |    1 +
>  include/linux/pci.h         |    1 +
>  13 files changed, 310 insertions(+), 173 deletions(-)
> 

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