All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@intel.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	ACPI Devel Mailing List <linux-acpi@vger.kernel.org>,
	Linux PCI <linux-pci@vger.kernel.org>
Subject: [PATCH 1/2] PCI: rename dsm uuid for PCI
Date: Mon, 23 Mar 2015 17:16:15 +0800	[thread overview]
Message-ID: <550FD9DF.7050306@intel.com> (raw)
In-Reply-To: <20150320210354.GK26935@google.com>

According to the PCI firmware spec, there is only one assigned UUID used
for PCI system so rename the device_label_dsm_uuid to something more
common as: pci_acpi_dsm_uuid and put it in drivers/pci/pci-acpi.c. Make
that uuid array extern in the pci.h so that other code can also make use
of it.

This patch shouldn't bring any functional change.

Signed-off-by: Aaron Lu <aaron.lu@intel.com>
---
 drivers/pci/pci-acpi.c  |  5 +++++
 drivers/pci/pci-label.c | 11 ++---------
 drivers/pci/pci.h       |  6 ++++++
 3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 489063987325..6ef2019073e2 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -18,6 +18,11 @@
 #include <linux/pm_qos.h>
 #include "pci.h"
 
+const u8 pci_acpi_dsm_uuid[] = {
+	0xd0, 0x37, 0xc9, 0xe5, 0x53, 0x35, 0x7a, 0x4d,
+	0x91, 0x17, 0xea, 0x4d, 0x19, 0xc3, 0x43, 0x4d
+};
+
 phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle)
 {
 	acpi_status status = AE_NOT_EXIST;
diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c
index 2ab1b47c7651..024b5c179348 100644
--- a/drivers/pci/pci-label.c
+++ b/drivers/pci/pci-label.c
@@ -31,8 +31,6 @@
 #include <linux/pci-acpi.h>
 #include "pci.h"
 
-#define	DEVICE_LABEL_DSM	0x07
-
 #ifdef CONFIG_DMI
 enum smbios_attr_enum {
 	SMBIOS_ATTR_NONE = 0,
@@ -148,11 +146,6 @@ static inline void pci_remove_smbiosname_file(struct pci_dev *pdev)
 #endif
 
 #ifdef CONFIG_ACPI
-static const char device_label_dsm_uuid[] = {
-	0xD0, 0x37, 0xC9, 0xE5, 0x53, 0x35, 0x7A, 0x4D,
-	0x91, 0x17, 0xEA, 0x4D, 0x19, 0xC3, 0x43, 0x4D
-};
-
 enum acpi_attr_enum {
 	ACPI_ATTR_LABEL_SHOW,
 	ACPI_ATTR_INDEX_SHOW,
@@ -179,7 +172,7 @@ static int dsm_get_label(struct device *dev, char *buf,
 	if (!handle)
 		return -1;
 
-	obj = acpi_evaluate_dsm(handle, device_label_dsm_uuid, 0x2,
+	obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 0x2,
 				DEVICE_LABEL_DSM, NULL);
 	if (!obj)
 		return -1;
@@ -219,7 +212,7 @@ static bool device_has_dsm(struct device *dev)
 	if (!handle)
 		return false;
 
-	return !!acpi_check_dsm(handle, device_label_dsm_uuid, 0x2,
+	return !!acpi_check_dsm(handle, pci_acpi_dsm_uuid, 0x2,
 				1 << DEVICE_LABEL_DSM);
 }
 
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index 4091f82239cd..c901ab84cf3b 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -321,4 +321,10 @@ static inline int pci_dev_specific_reset(struct pci_dev *dev, int probe)
 }
 #endif
 
+#ifdef CONFIG_ACPI
+extern const u8 pci_acpi_dsm_uuid[];
+
+#define DEVICE_LABEL_DSM	0x07
+#endif
+
 #endif /* DRIVERS_PCI_H */
-- 
2.1.0

  parent reply	other threads:[~2015-03-23  9:16 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09  7:46 [PATCH] PCI / ACPI: PCI delay optimization from ACPI Aaron Lu
2015-03-09 14:33 ` Rafael J. Wysocki
2015-03-10  6:47   ` Aaron Lu
2015-03-10  6:48   ` [PATCH update] " Aaron Lu
2015-03-20  6:14     ` Aaron Lu
2015-03-20 12:39       ` Rafael J. Wysocki
2015-03-20 21:03     ` Bjorn Helgaas
2015-03-23  5:35       ` Aaron Lu
2015-03-23  9:15         ` Aaron Lu
2015-03-23  9:16       ` Aaron Lu [this message]
2015-03-24  0:24         ` [PATCH 1/2] PCI: rename dsm uuid for PCI Rafael J. Wysocki
2015-03-24  0:35           ` Aaron Lu
2015-03-24  1:03             ` Rafael J. Wysocki
2015-03-24  9:04               ` [PATCH v2 1/2] PCI: rename _DSM UUID array Aaron Lu
2015-03-24 21:57                 ` Rafael J. Wysocki
2015-03-23  9:17       ` [PATCH 2/2] PCI / ACPI: PCI delay optimization from ACPI Aaron Lu
2015-03-23 15:09         ` Bjorn Helgaas
2015-03-24  9:04           ` [PATCH v2 " Aaron Lu
2015-03-24 14:08             ` Bjorn Helgaas
2015-03-24 15:16               ` Aaron Lu
2015-03-24 22:09                 ` Bjorn Helgaas
2015-03-24 15:37               ` Aaron Lu
2015-03-24 22:10                 ` Bjorn Helgaas
2015-03-25  6:30 ` [PATCH v3 0/3] " Aaron Lu
2015-03-25  6:31   ` [PATCH v3 1/3] PCI: rename _DSM UUID array Aaron Lu
2015-03-25  6:32   ` [PATCH v3 2/3] PCI: rename find_pci_host_bridge and export it Aaron Lu
2015-03-25  6:37   ` [PATCH v3 3/3] PCI / ACPI: PCI delay optimization from ACPI Aaron Lu
2015-03-29 14:17   ` [PATCH v3 0/3] " Aaron Lu
2015-04-08 21:32   ` Bjorn Helgaas

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=550FD9DF.7050306@intel.com \
    --to=aaron.lu@intel.com \
    --cc=bhelgaas@google.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.