From: Jiang Liu <liuj97@gmail.com>
To: Bjorn Helgaas <bhelgaas@google.com>, Yinghai Lu <yinghai@kernel.org>
Cc: Jiang Liu <jiang.liu@huawei.com>,
"Rafael J . Wysocki" <rjw@sisk.pl>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Gu Zheng <guz.fnst@cn.fujitsu.com>,
Toshi Kani <toshi.kani@hp.com>,
Myron Stowe <myron.stowe@redhat.com>,
Yijing Wang <wangyijing@huawei.com>, Jiang Liu <liuj97@gmail.com>,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org
Subject: [PATCH v2, part 1 5/9] ACPI, PCI: remove unused global list acpi_pci_roots in pci_root.c
Date: Tue, 14 May 2013 00:08:29 +0800 [thread overview]
Message-ID: <1368461313-4371-6-git-send-email-jiang.liu@huawei.com> (raw)
In-Reply-To: <1368461313-4371-1-git-send-email-jiang.liu@huawei.com>
Now the global list acpi_pci_roots pci_root.c is useless, remove it.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Len Brown <lenb@kernel.org>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: linux-acpi@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
drivers/acpi/pci_root.c | 25 +++----------------------
include/acpi/acpi_bus.h | 1 -
2 files changed, 3 insertions(+), 23 deletions(-)
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c
index b80e06e..91ddfd6 100644
--- a/drivers/acpi/pci_root.c
+++ b/drivers/acpi/pci_root.c
@@ -65,10 +65,6 @@ static struct acpi_scan_handler pci_root_handler = {
.detach = acpi_pci_root_remove,
};
-/* Lock to protect both acpi_pci_roots lists */
-static DEFINE_MUTEX(acpi_pci_root_lock);
-static LIST_HEAD(acpi_pci_roots);
-
static DEFINE_MUTEX(osc_lock);
/**
@@ -423,7 +419,6 @@ static int acpi_pci_root_add(struct acpi_device *device,
}
}
- INIT_LIST_HEAD(&root->node);
root->device = device;
root->segment = segment & 0xFFFF;
strcpy(acpi_device_name(device), ACPI_PCI_ROOT_DEVICE_NAME);
@@ -501,10 +496,6 @@ static int acpi_pci_root_add(struct acpi_device *device,
* TBD: Need PCI interface for enumeration/configuration of roots.
*/
- mutex_lock(&acpi_pci_root_lock);
- list_add_tail(&root->node, &acpi_pci_roots);
- mutex_unlock(&acpi_pci_root_lock);
-
/*
* Scan the Root Bridge
* --------------------
@@ -518,7 +509,7 @@ static int acpi_pci_root_add(struct acpi_device *device,
"Bus %04x:%02x not present in PCI namespace\n",
root->segment, (unsigned int)root->secondary.start);
result = -ENODEV;
- goto out_del_root;
+ goto end;
}
/* ASPM setting */
@@ -538,20 +529,13 @@ static int acpi_pci_root_add(struct acpi_device *device,
if (system_state != SYSTEM_BOOTING) {
pcibios_resource_survey_bus(root->bus);
pci_assign_unassigned_bus_resources(root->bus);
- }
-
- /* need to after hot-added ioapic is registered */
- if (system_state != SYSTEM_BOOTING)
+ /* need to after hot-added ioapic is registered */
pci_enable_bridges(root->bus);
+ }
pci_bus_add_devices(root->bus);
return 1;
-out_del_root:
- mutex_lock(&acpi_pci_root_lock);
- list_del(&root->node);
- mutex_unlock(&acpi_pci_root_lock);
-
end:
kfree(root);
return result;
@@ -568,9 +552,6 @@ static void acpi_pci_root_remove(struct acpi_device *device)
pci_remove_root_bus(root->bus);
- mutex_lock(&acpi_pci_root_lock);
- list_del(&root->node);
- mutex_unlock(&acpi_pci_root_lock);
kfree(root);
}
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 22ba56e..4eb9a88 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -447,7 +447,6 @@ int register_acpi_bus_type(struct acpi_bus_type *);
int unregister_acpi_bus_type(struct acpi_bus_type *);
struct acpi_pci_root {
- struct list_head node;
struct acpi_device * device;
struct pci_bus *bus;
u16 segment;
--
1.8.1.2
next prev parent reply other threads:[~2013-05-13 16:09 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-13 16:08 [PATCH v2, part 1 0/9] Prepare for introducing PCI bus lock interfaces Jiang Liu
2013-05-13 16:08 ` [PATCH v2, part 1 1/9] PCI: introduce pci_bus_{get|put}() to manage PCI bus reference count Jiang Liu
2013-05-13 16:08 ` [PATCH v2, part 1 2/9] PCI: Introduce pci_alloc_dev(struct pci_bus*) to replace alloc_pci_dev() Jiang Liu
2013-05-13 16:08 ` [PATCH v2, part 1 3/9] PCI: Convert alloc_pci_dev(void) to pci_alloc_dev(bus) instead Jiang Liu
2013-05-13 17:23 ` Yinghai Lu
2013-05-14 8:26 ` Gu Zheng
2013-05-14 14:59 ` Liu Jiang
2013-05-14 15:10 ` Yinghai Lu
2013-05-14 16:57 ` Liu Jiang
2013-05-14 18:52 ` Yinghai Lu
2013-05-15 14:39 ` Liu Jiang
2013-05-15 14:43 ` Yinghai Lu
2013-05-15 14:46 ` Liu Jiang
2013-05-15 14:58 ` Yinghai Lu
2013-05-15 21:32 ` Benjamin Herrenschmidt
2013-05-15 21:52 ` Yinghai Lu
2013-05-15 21:29 ` Benjamin Herrenschmidt
2013-05-15 23:46 ` Liu Jiang
2013-05-13 16:08 ` [PATCH v2, part 1 4/9] PCI: mark pci_scan_bus_parented() as __deprecated Jiang Liu
2013-05-13 16:08 ` Jiang Liu [this message]
2013-05-13 23:28 ` [PATCH v2, part 1 5/9] ACPI, PCI: remove unused global list acpi_pci_roots in pci_root.c Rafael J. Wysocki
2013-05-14 12:41 ` Liu Jiang
2013-05-14 13:01 ` Rafael J. Wysocki
2013-05-13 16:08 ` [PATCH v2, part 1 6/9] ACPI, pci_root: use acpi_handle_print() and pr_xxx() to print messages Jiang Liu
2013-05-13 23:27 ` Rafael J. Wysocki
2013-05-14 12:46 ` Liu Jiang
2013-05-14 8:43 ` Gu Zheng
2013-05-13 16:08 ` [PATCH v2, part 1 7/9] PCI, IA64: minor code clean up Jiang Liu
2013-05-13 16:08 ` [PATCH v2, part 1 8/9] PCI: make PCI host bridge/bus creating and destroying logic symmetric Jiang Liu
2013-05-20 6:35 ` Gu Zheng
2013-05-20 15:52 ` Liu Jiang
2013-05-13 16:08 ` [PATCH v2, part 1 9/9] PCI, unicore, m68k: remove redundant call of pci_bus_add_devices() Jiang Liu
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=1368461313-4371-6-git-send-email-jiang.liu@huawei.com \
--to=liuj97@gmail.com \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=guz.fnst@cn.fujitsu.com \
--cc=jiang.liu@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=myron.stowe@redhat.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).