lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5057343C.2010201@gmail.com>
Date:	Mon, 17 Sep 2012 22:31:24 +0800
From:	Jiang Liu <liuj97@...il.com>
To:	Yinghai Lu <yinghai@...nel.org>
CC:	Bjorn Helgaas <bhelgaas@...gle.com>, Len Brown <lenb@...nel.org>,
	Tony Luck <tony.luck@...el.com>,
	Jiang Liu <jiang.liu@...wei.com>,
	Kenji Kaneshige <kaneshige.kenji@...fujitsu.com>,
	Yijing Wang <wangyijing@...wei.com>,
	linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
	linux-acpi@...r.kernel.org
Subject: Re: [PATCH v2 5/9] ACPI/pci-bind: remove bind/unbind callbacks from
 acpi_device_ops

On 09/16/2012 07:27 AM, Yinghai Lu wrote:
> On Fri, Sep 14, 2012 at 8:05 PM, Jiang Liu <liuj97@...il.com> wrote:
>>  From: Jiang Liu <jiang.liu@...wei.com>
>>
>> Now ACPI devices are created before/destroyed after corresponding PCI
>> devices, and acpi_platform_notify/acpi_platform_notify_remove will
>> update PCI<->ACPI binding relationship when creating/destroying PCI
>> devices, there's no need to invoke bind/unbind callbacks from ACPI
>> device probe/destroy routines anymore. So remove bind/unbind callbacks
>> from acpi_device_ops.
>>
>> Signed-off-by: Jiang Liu <jiang.liu@...wei.com>
>> Signed-off-by: Yijing Wang <wangyijing@...wei.com>
>> ---
>>  drivers/acpi/pci_bind.c     |  100 +++++++++----------------------------------
>>  drivers/acpi/pci_root.c     |    9 ----
>>  drivers/acpi/scan.c         |   21 +--------
>>  include/acpi/acpi_bus.h     |    4 --
>>  include/acpi/acpi_drivers.h |    1 -
>>  5 files changed, 23 insertions(+), 112 deletions(-)
>> diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
>> index d1ecca2..f31cb2f 100644
>> --- a/drivers/acpi/scan.c
>> +++ b/drivers/acpi/scan.c
>> @@ -1232,17 +1232,8 @@ static int acpi_bus_remove(struct acpi_device *dev, int rmdevice)
>>         dev->removal_type = ACPI_BUS_REMOVAL_EJECT;
>>         device_release_driver(&dev->dev);
>>
>> -       if (!rmdevice)
>> -               return 0;
>> -
>> -       /*
>> -        * unbind _ADR-Based Devices when hot removal
>> -        */
>> -       if (dev->flags.bus_address) {
>> -               if ((dev->parent) && (dev->parent->ops.unbind))
>> -                       dev->parent->ops.unbind(dev);
>> -       }
>> -       acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT);
>> +       if (rmdevice)
>> +               acpi_device_unregister(dev, ACPI_BUS_REMOVAL_EJECT);
>>
>>         return 0;
>>  }
> 
> for pci root bus, acpi_bus_trim() is used to remove acpi_device.
> 
> and later in acpi_pci_root_remove to stop pci drivers/ioapic driver,
> iommu driver then remove pci devices.
> 
> if call back is removed there, then could some functions in
> acpi_pci_unbind() will be skipped.
> 
> I really do not want to add pci_stop_bus_devices() in
> pci_root_hp.c::handle_root_bridge_removal before
> calling acpi_bus_trim...
Hi Yinghai,
	We are working on a ACPI based hotplug framework for CPU, memory and IOH.
With our framework, the sequence to remove a IOH is:
1) unbind all PCI device drivers for affected PCI devices.
2) stop and remove all affected PCI devices.
3) stop ACPI ioapic drivers(a new driver like PCI version).
4) destroy all ACPI devices.

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

Powered by Openwall GNU/*/Linux Powered by OpenVZ