linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiang Liu <jiang.liu@huawei.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Jiang Liu <liuj97@gmail.com>, Bjorn Helgaas <bhelgaas@google.com>,
	"Rafael J . Wysocki" <rjw@sisk.pl>,
	Myron Stowe <myron.stowe@redhat.com>,
	Yijing Wang <wangyijing@huawei.com>,
	<linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Toshi Kani <toshi.kani@hp.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH v8 13/13] PCI, ACPI: remove support of ACPI PCI subdrivers
Date: Wed, 27 Feb 2013 08:42:07 +0800	[thread overview]
Message-ID: <512D565F.1010403@huawei.com> (raw)
In-Reply-To: <CAE9FiQV_hv3fD166LuZYhTKGxeKKKCw-Dak+8UYou7tRa-4hYw@mail.gmail.com>

On 2013-2-27 3:07, Yinghai Lu wrote:
> On Tue, Feb 26, 2013 at 7:25 AM, Jiang Liu <liuj97@gmail.com> wrote:
>> From: Myron Stowe <myron.stowe@redhat.com>
>>
>> Both sub-drivers of the "PCI Root Bridge ("pci_bridge")" driver, "acpiphp"
>> and "pci_slot", have been converted to hook directly into the PCI core.
>>
>> With the conversions there are no remaining usages of the 'struct
>> acpi_pci_driver' list based infrastructure.  This patch removes it.
>>
>> Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
>> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
>> Cc: Yinghai Lu <yinghai@kernel.org>
>> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
>> Cc: Toshi Kani <toshi.kani@hp.com>
>> Cc: linux-pci@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
> 
> Nice cleanup!
> 
> for 1-13,
> Reviewed-by: Yinghai Lu <yinghai@kernel.org>
HiYinghai,
	Thanks for review!
	Regards!
	Gerry

> 
> Thanks
> 
> Yinghai
> 
>> ---
>>  drivers/acpi/pci_root.c |   48 +----------------------------------------------
>>  include/linux/acpi.h    |    9 ---------
>>  2 files changed, 1 insertion(+), 56 deletions(-)
>>
>> diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
>> index 8b5a73b..2ef0c91 100644
>> --- a/drivers/acpi/pci_root.c
>> +++ b/drivers/acpi/pci_root.c
>> @@ -69,44 +69,12 @@ static struct acpi_driver acpi_pci_root_driver = {
>>                 },
>>  };
>>
>> -/* Lock to protect both acpi_pci_roots and acpi_pci_drivers lists */
>> +/* Lock to protect both acpi_pci_roots lists */
>>  static DEFINE_MUTEX(acpi_pci_root_lock);
>>  static LIST_HEAD(acpi_pci_roots);
>> -static LIST_HEAD(acpi_pci_drivers);
>>
>>  static DEFINE_MUTEX(osc_lock);
>>
>> -int acpi_pci_register_driver(struct acpi_pci_driver *driver)
>> -{
>> -       int n = 0;
>> -       struct acpi_pci_root *root;
>> -
>> -       mutex_lock(&acpi_pci_root_lock);
>> -       list_add_tail(&driver->node, &acpi_pci_drivers);
>> -       if (driver->add)
>> -               list_for_each_entry(root, &acpi_pci_roots, node) {
>> -                       driver->add(root);
>> -                       n++;
>> -               }
>> -       mutex_unlock(&acpi_pci_root_lock);
>> -
>> -       return n;
>> -}
>> -EXPORT_SYMBOL(acpi_pci_register_driver);
>> -
>> -void acpi_pci_unregister_driver(struct acpi_pci_driver *driver)
>> -{
>> -       struct acpi_pci_root *root;
>> -
>> -       mutex_lock(&acpi_pci_root_lock);
>> -       list_del(&driver->node);
>> -       if (driver->remove)
>> -               list_for_each_entry(root, &acpi_pci_roots, node)
>> -                       driver->remove(root);
>> -       mutex_unlock(&acpi_pci_root_lock);
>> -}
>> -EXPORT_SYMBOL(acpi_pci_unregister_driver);
>> -
>>  /**
>>   * acpi_is_root_bridge - determine whether an ACPI CA node is a PCI root bridge
>>   * @handle - the ACPI CA node in question.
>> @@ -416,7 +384,6 @@ static int acpi_pci_root_add(struct acpi_device *device)
>>         acpi_status status;
>>         int result;
>>         struct acpi_pci_root *root;
>> -       struct acpi_pci_driver *driver;
>>         u32 flags, base_flags;
>>         bool is_osc_granted = false;
>>
>> @@ -576,12 +543,6 @@ static int acpi_pci_root_add(struct acpi_device *device)
>>                 pci_assign_unassigned_bus_resources(root->bus);
>>         }
>>
>> -       mutex_lock(&acpi_pci_root_lock);
>> -       list_for_each_entry(driver, &acpi_pci_drivers, node)
>> -               if (driver->add)
>> -                       driver->add(root);
>> -       mutex_unlock(&acpi_pci_root_lock);
>> -
>>         /* need to after hot-added ioapic is registered */
>>         if (system_state != SYSTEM_BOOTING)
>>                 pci_enable_bridges(root->bus);
>> @@ -602,16 +563,9 @@ end:
>>  static int acpi_pci_root_remove(struct acpi_device *device, int type)
>>  {
>>         struct acpi_pci_root *root = acpi_driver_data(device);
>> -       struct acpi_pci_driver *driver;
>>
>>         pci_stop_root_bus(root->bus);
>>
>> -       mutex_lock(&acpi_pci_root_lock);
>> -       list_for_each_entry_reverse(driver, &acpi_pci_drivers, node)
>> -               if (driver->remove)
>> -                       driver->remove(root);
>> -       mutex_unlock(&acpi_pci_root_lock);
>> -
>>         device_set_run_wake(root->bus->bridge, false);
>>         pci_acpi_remove_bus_pm_notifier(device);
>>
>> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
>> index 8c1d6f2..eeb5600 100644
>> --- a/include/linux/acpi.h
>> +++ b/include/linux/acpi.h
>> @@ -147,15 +147,6 @@ void acpi_penalize_isa_irq(int irq, int active);
>>
>>  void acpi_pci_irq_disable (struct pci_dev *dev);
>>
>> -struct acpi_pci_driver {
>> -       struct list_head node;
>> -       int (*add)(struct acpi_pci_root *root);
>> -       void (*remove)(struct acpi_pci_root *root);
>> -};
>> -
>> -int acpi_pci_register_driver(struct acpi_pci_driver *driver);
>> -void acpi_pci_unregister_driver(struct acpi_pci_driver *driver);
>> -
>>  extern int ec_read(u8 addr, u8 *val);
>>  extern int ec_write(u8 addr, u8 val);
>>  extern int ec_transaction(u8 command,
>> --
>> 1.7.9.5
>>
> 
> .
> 



      reply	other threads:[~2013-02-27  0:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-26 15:25 [PATCH v8 00/13] Get rid of the ACPI PCI subdriver mechanism Jiang Liu
2013-02-26 15:25 ` [PATCH v8 01/13] PCI: do not check is_added flag in pci_remove_bus() Jiang Liu
2013-02-26 15:25 ` [PATCH v8 02/13] PCI/acpiphp: use list_for_each_entry_safe() in acpiphp_sanitize_bus() Jiang Liu
2013-02-26 15:25 ` [PATCH v8 03/13] PCI/acpiphp: don't rely on function 0 in disable_device() Jiang Liu
2013-02-26 15:25 ` [PATCH v8 04/13] ACPI/acpiphp: replace local macros with standard ACPI macros Jiang Liu
2013-02-26 15:25 ` [PATCH v8 05/13] PCI: introduce platform dependent hooks for creating/destroying PCI busses Jiang Liu
2013-02-26 15:25 ` [PATCH v8 06/13] PCI, ACPI: prepare stub functions to handle ACPI PCI (hotplug) slots Jiang Liu
2013-02-26 15:25 ` [PATCH v8 07/13] PCI, IA64: implement pcibios_{add|remove}_bus() hooks Jiang Liu
2013-02-26 15:25 ` [PATCH v8 08/13] PCI, x86: " Jiang Liu
2013-02-26 15:25 ` [PATCH v8 09/13] PCI, ACPI: handle PCI slot devices when creating/destroying PCI busses Jiang Liu
2013-02-26 15:25 ` [PATCH v8 10/13] PCI/acpiphp: do not use ACPI PCI subdriver mechanism Jiang Liu
2013-04-09 23:38   ` Bjorn Helgaas
2013-04-10 16:14     ` Jiang Liu
2013-04-10 17:07       ` Bjorn Helgaas
2013-04-11  1:50         ` Yijing Wang
2013-04-11 17:29           ` Bjorn Helgaas
2013-04-12  1:04             ` Yijing Wang
2013-02-26 15:25 ` [PATCH v8 11/13] PCI/acpiphp: use normal list to simplify implementation Jiang Liu
2013-02-26 15:25 ` [PATCH v8 12/13] PCI/acpiphp: protect acpiphp data structures from concurrent updating Jiang Liu
2013-02-26 15:25 ` [PATCH v8 13/13] PCI, ACPI: remove support of ACPI PCI subdrivers Jiang Liu
2013-02-26 19:07   ` Yinghai Lu
2013-02-27  0:42     ` Jiang Liu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=512D565F.1010403@huawei.com \
    --to=jiang.liu@huawei.com \
    --cc=bhelgaas@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=liuj97@gmail.com \
    --cc=myron.stowe@redhat.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@sisk.pl \
    --cc=toshi.kani@hp.com \
    --cc=wangyijing@huawei.com \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).