linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/6] ACPI / utils: add new helper for HID/UID match
@ 2019-09-24 19:37 Andy Shevchenko
  2019-09-24 19:37 ` [PATCH v2 1/6] ACPI / utils: Describe function parameters in kernel-doc Andy Shevchenko
                   ` (5 more replies)
  0 siblings, 6 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-09-24 19:37 UTC (permalink / raw)
  To: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi
  Cc: Andy Shevchenko

There are few users outside of ACPI realm that re-introduce a custom
solution to match ACPI device against HID/UID. Add a generic helper for
them.

The series is supposed to go via linux-pm tree.

In v2:
- add patch 2 due to latent issue in the header (lkp)
- get rid of match_hid_uid() completely in patch 6

Andy Shevchenko (6):
  ACPI / utils: Describe function parameters in kernel-doc
  ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI
  ACPI / utils: Introduce acpi_dev_hid_uid_match() helper
  ACPI / LPSS: Switch to use acpi_dev_hid_uid_match()
  mmc: sdhci-acpi: Switch to use acpi_dev_hid_uid_match()
  iommu/amd: Switch to use acpi_dev_hid_uid_match()

 drivers/acpi/acpi_lpss.c      | 21 +++------------
 drivers/acpi/utils.c          | 32 +++++++++++++++++++++++
 drivers/iommu/amd_iommu.c     | 30 ++++-----------------
 drivers/mmc/host/sdhci-acpi.c | 49 ++++++++++++-----------------------
 include/acpi/acpi_bus.h       |  8 +++---
 include/linux/acpi.h          |  6 +++++
 6 files changed, 67 insertions(+), 79 deletions(-)

-- 
2.23.0


^ permalink raw reply	[flat|nested] 19+ messages in thread

* [PATCH v2 1/6] ACPI / utils: Describe function parameters in kernel-doc
  2019-09-24 19:37 [PATCH v2 0/6] ACPI / utils: add new helper for HID/UID match Andy Shevchenko
@ 2019-09-24 19:37 ` Andy Shevchenko
  2019-10-01  9:32   ` Mika Westerberg
  2019-09-24 19:37 ` [PATCH v2 2/6] ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI Andy Shevchenko
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2019-09-24 19:37 UTC (permalink / raw)
  To: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi
  Cc: Andy Shevchenko

Kernel documentation script complains that some of the function parameters
are not described:

drivers/acpi/utils.c:462: warning: Function parameter or member 'handle' not described in 'acpi_handle_path'
drivers/acpi/utils.c:484: warning: Function parameter or member 'level' not described in 'acpi_handle_printk'
drivers/acpi/utils.c:484: warning: Function parameter or member 'handle' not described in 'acpi_handle_printk'
drivers/acpi/utils.c:484: warning: Function parameter or member 'fmt' not described in 'acpi_handle_printk'
drivers/acpi/utils.c:513: warning: Function parameter or member 'descriptor' not described in '__acpi_handle_debug'
drivers/acpi/utils.c:513: warning: Function parameter or member 'handle' not described in '__acpi_handle_debug'
drivers/acpi/utils.c:513: warning: Function parameter or member 'fmt' not described in '__acpi_handle_debug'

Describe function parameters where it's appropriate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/acpi/utils.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index e3974a8f8fd4..dbd1c4cfd7d1 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -455,6 +455,7 @@ EXPORT_SYMBOL(acpi_evaluate_ost);
 
 /**
  * acpi_handle_path: Return the object path of handle
+ * @handle: ACPI device handle
  *
  * Caller must free the returned buffer
  */
@@ -473,6 +474,9 @@ static char *acpi_handle_path(acpi_handle handle)
 
 /**
  * acpi_handle_printk: Print message with ACPI prefix and object path
+ * @level: log level
+ * @handle: ACPI device handle
+ * @fmt: format string
  *
  * This function is called through acpi_handle_<level> macros and prints
  * a message with ACPI prefix and object path.  This function acquires
@@ -501,6 +505,9 @@ EXPORT_SYMBOL(acpi_handle_printk);
 #if defined(CONFIG_DYNAMIC_DEBUG)
 /**
  * __acpi_handle_debug: pr_debug with ACPI prefix and object path
+ * @descriptor: Dynamic Debug descriptor
+ * @handle: ACPI device handle
+ * @fmt: format string
  *
  * This function is called through acpi_handle_debug macro and debug
  * prints a message with ACPI prefix and object path. This function
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 2/6] ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI
  2019-09-24 19:37 [PATCH v2 0/6] ACPI / utils: add new helper for HID/UID match Andy Shevchenko
  2019-09-24 19:37 ` [PATCH v2 1/6] ACPI / utils: Describe function parameters in kernel-doc Andy Shevchenko
@ 2019-09-24 19:37 ` Andy Shevchenko
  2019-10-01  9:32   ` Mika Westerberg
  2019-09-24 19:37 ` [PATCH v2 3/6] ACPI / utils: Introduce acpi_dev_hid_uid_match() helper Andy Shevchenko
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2019-09-24 19:37 UTC (permalink / raw)
  To: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi
  Cc: Andy Shevchenko, kbuild test robot

We have a stub defined for the acpi_dev_get_first_match_dev() in acpi.h
for the case when CONFIG_ACPI=n.

Moreover, acpi_dev_put(), counterpart function, is already placed under
CONFIG_ACPI.

Thus, move acpi_dev_get_first_match_dev() under CONFIG_ACPI as well.

Fixes: 817b4d64da03 ("Introduce acpi_dev_get_first_match_dev() helper")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/acpi/acpi_bus.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 175f7b40c585..3f6fddeb7519 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -78,9 +78,6 @@ acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
 bool acpi_dev_found(const char *hid);
 bool acpi_dev_present(const char *hid, const char *uid, s64 hrv);
 
-struct acpi_device *
-acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv);
-
 #ifdef CONFIG_ACPI
 
 #include <linux/proc_fs.h>
@@ -683,6 +680,9 @@ static inline bool acpi_device_can_poweroff(struct acpi_device *adev)
 		adev->power.states[ACPI_STATE_D3_HOT].flags.explicit_set);
 }
 
+struct acpi_device *
+acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv);
+
 static inline void acpi_dev_put(struct acpi_device *adev)
 {
 	put_device(&adev->dev);
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 3/6] ACPI / utils: Introduce acpi_dev_hid_uid_match() helper
  2019-09-24 19:37 [PATCH v2 0/6] ACPI / utils: add new helper for HID/UID match Andy Shevchenko
  2019-09-24 19:37 ` [PATCH v2 1/6] ACPI / utils: Describe function parameters in kernel-doc Andy Shevchenko
  2019-09-24 19:37 ` [PATCH v2 2/6] ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI Andy Shevchenko
@ 2019-09-24 19:37 ` Andy Shevchenko
  2019-10-01  9:38   ` Mika Westerberg
  2019-09-24 19:37 ` [PATCH v2 4/6] ACPI / LPSS: Switch to use acpi_dev_hid_uid_match() Andy Shevchenko
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2019-09-24 19:37 UTC (permalink / raw)
  To: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi
  Cc: Andy Shevchenko

There are users outside of ACPI realm which reimplementing the comparator
function to check if the given device matches to given HID and UID.

For better utilization, introduce a helper for everyone to use.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/acpi/utils.c    | 25 +++++++++++++++++++++++++
 include/acpi/acpi_bus.h |  2 ++
 include/linux/acpi.h    |  6 ++++++
 3 files changed, 33 insertions(+)

diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index dbd1c4cfd7d1..804ac0df58ec 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -701,6 +701,31 @@ bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs)
 }
 EXPORT_SYMBOL(acpi_check_dsm);
 
+/**
+ * acpi_dev_hid_uid_match - Match device by supplied HID and UID
+ * @adev: ACPI device to match.
+ * @hid2: Hardware ID of the device.
+ * @uid2: Unique ID of the device, pass NULL to not check _UID.
+ *
+ * Matches HID and UID in @adev with given @hid2 and @uid2.
+ * Returns true if matches.
+ */
+bool acpi_dev_hid_uid_match(struct acpi_device *adev,
+			    const char *hid2, const char *uid2)
+{
+	const char *hid1 = acpi_device_hid(adev);
+	const char *uid1 = acpi_device_uid(adev);
+
+	if (strcmp(hid1, hid2))
+		return false;
+
+	if (!uid2)
+		return true;
+
+	return uid1 && !strcmp(uid1, uid2);
+}
+EXPORT_SYMBOL(acpi_dev_hid_uid_match);
+
 /**
  * acpi_dev_found - Detect presence of a given ACPI device in the namespace.
  * @hid: Hardware ID of the device.
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 3f6fddeb7519..0c23fd0548d1 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -680,6 +680,8 @@ static inline bool acpi_device_can_poweroff(struct acpi_device *adev)
 		adev->power.states[ACPI_STATE_D3_HOT].flags.explicit_set);
 }
 
+bool acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, const char *uid2);
+
 struct acpi_device *
 acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv);
 
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 9426b9aaed86..34778e4757fd 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -672,6 +672,12 @@ static inline bool acpi_dev_present(const char *hid, const char *uid, s64 hrv)
 	return false;
 }
 
+static inline bool
+acpi_dev_hid_uid_match(struct acpi_device *adev, const char *hid2, const char *uid2)
+{
+	return false;
+}
+
 static inline struct acpi_device *
 acpi_dev_get_first_match_dev(const char *hid, const char *uid, s64 hrv)
 {
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 4/6] ACPI / LPSS: Switch to use acpi_dev_hid_uid_match()
  2019-09-24 19:37 [PATCH v2 0/6] ACPI / utils: add new helper for HID/UID match Andy Shevchenko
                   ` (2 preceding siblings ...)
  2019-09-24 19:37 ` [PATCH v2 3/6] ACPI / utils: Introduce acpi_dev_hid_uid_match() helper Andy Shevchenko
@ 2019-09-24 19:37 ` Andy Shevchenko
  2019-10-01  9:40   ` Mika Westerberg
  2019-09-24 19:37 ` [PATCH v2 5/6] mmc: sdhci-acpi: " Andy Shevchenko
  2019-09-24 19:37 ` [PATCH v2 6/6] iommu/amd: " Andy Shevchenko
  5 siblings, 1 reply; 19+ messages in thread
From: Andy Shevchenko @ 2019-09-24 19:37 UTC (permalink / raw)
  To: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi
  Cc: Andy Shevchenko

Since we have a generic helper, drop custom implementation in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/acpi/acpi_lpss.c | 21 +++------------------
 1 file changed, 3 insertions(+), 18 deletions(-)

diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c
index d696f165a50e..1e6d959bd968 100644
--- a/drivers/acpi/acpi_lpss.c
+++ b/drivers/acpi/acpi_lpss.c
@@ -476,31 +476,16 @@ static const struct lpss_device_links lpss_device_links[] = {
 	{"80860F41", "5", "LNXVIDEO", NULL, DL_FLAG_PM_RUNTIME},
 };
 
-static bool hid_uid_match(struct acpi_device *adev,
-			  const char *hid2, const char *uid2)
-{
-	const char *hid1 = acpi_device_hid(adev);
-	const char *uid1 = acpi_device_uid(adev);
-
-	if (strcmp(hid1, hid2))
-		return false;
-
-	if (!uid2)
-		return true;
-
-	return uid1 && !strcmp(uid1, uid2);
-}
-
 static bool acpi_lpss_is_supplier(struct acpi_device *adev,
 				  const struct lpss_device_links *link)
 {
-	return hid_uid_match(adev, link->supplier_hid, link->supplier_uid);
+	return acpi_dev_hid_uid_match(adev, link->supplier_hid, link->supplier_uid);
 }
 
 static bool acpi_lpss_is_consumer(struct acpi_device *adev,
 				  const struct lpss_device_links *link)
 {
-	return hid_uid_match(adev, link->consumer_hid, link->consumer_uid);
+	return acpi_dev_hid_uid_match(adev, link->consumer_hid, link->consumer_uid);
 }
 
 struct hid_uid {
@@ -516,7 +501,7 @@ static int match_hid_uid(struct device *dev, const void *data)
 	if (!adev)
 		return 0;
 
-	return hid_uid_match(adev, id->hid, id->uid);
+	return acpi_dev_hid_uid_match(adev, id->hid, id->uid);
 }
 
 static struct device *acpi_lpss_find_device(const char *hid, const char *uid)
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 5/6] mmc: sdhci-acpi: Switch to use acpi_dev_hid_uid_match()
  2019-09-24 19:37 [PATCH v2 0/6] ACPI / utils: add new helper for HID/UID match Andy Shevchenko
                   ` (3 preceding siblings ...)
  2019-09-24 19:37 ` [PATCH v2 4/6] ACPI / LPSS: Switch to use acpi_dev_hid_uid_match() Andy Shevchenko
@ 2019-09-24 19:37 ` Andy Shevchenko
  2019-10-01  9:40   ` Mika Westerberg
  2019-10-01 12:37   ` Adrian Hunter
  2019-09-24 19:37 ` [PATCH v2 6/6] iommu/amd: " Andy Shevchenko
  5 siblings, 2 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-09-24 19:37 UTC (permalink / raw)
  To: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi
  Cc: Andy Shevchenko

Since we have a generic helper, drop custom implementation in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mmc/host/sdhci-acpi.c | 49 ++++++++++++-----------------------
 1 file changed, 16 insertions(+), 33 deletions(-)

diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index 1604f512c7bd..f913c3f57bbf 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -61,7 +61,7 @@ struct sdhci_acpi_slot {
 	mmc_pm_flag_t	pm_caps;
 	unsigned int	flags;
 	size_t		priv_size;
-	int (*probe_slot)(struct platform_device *, const char *, const char *);
+	int (*probe_slot)(struct platform_device *, struct acpi_device *);
 	int (*remove_slot)(struct platform_device *);
 	int (*free_slot)(struct platform_device *pdev);
 	int (*setup_host)(struct platform_device *pdev);
@@ -325,12 +325,10 @@ static bool sdhci_acpi_cht_pci_wifi(unsigned int vendor, unsigned int device,
  * wifi card in the expected slot with an ACPI companion node, is used to
  * indicate that acpi_device_fix_up_power() should be avoided.
  */
-static inline bool sdhci_acpi_no_fixup_child_power(const char *hid,
-						   const char *uid)
+static inline bool sdhci_acpi_no_fixup_child_power(struct acpi_device *adev)
 {
 	return sdhci_acpi_cht() &&
-	       !strcmp(hid, "80860F14") &&
-	       !strcmp(uid, "2") &&
+	       acpi_dev_hid_uid_match(adev, "80860F14", "2") &&
 	       sdhci_acpi_cht_pci_wifi(0x14e4, 0x43ec, 0, 28);
 }
 
@@ -345,8 +343,7 @@ static inline bool sdhci_acpi_byt_defer(struct device *dev)
 	return false;
 }
 
-static inline bool sdhci_acpi_no_fixup_child_power(const char *hid,
-						   const char *uid)
+static inline bool sdhci_acpi_no_fixup_child_power(struct acpi_device *adev)
 {
 	return false;
 }
@@ -375,19 +372,18 @@ static int bxt_get_cd(struct mmc_host *mmc)
 	return ret;
 }
 
-static int intel_probe_slot(struct platform_device *pdev, const char *hid,
-			    const char *uid)
+static int intel_probe_slot(struct platform_device *pdev, struct acpi_device *adev)
 {
 	struct sdhci_acpi_host *c = platform_get_drvdata(pdev);
 	struct intel_host *intel_host = sdhci_acpi_priv(c);
 	struct sdhci_host *host = c->host;
 
-	if (hid && uid && !strcmp(hid, "80860F14") && !strcmp(uid, "1") &&
+	if (acpi_dev_hid_uid_match(adev, "80860F14", "1") &&
 	    sdhci_readl(host, SDHCI_CAPABILITIES) == 0x446cc8b2 &&
 	    sdhci_readl(host, SDHCI_CAPABILITIES_1) == 0x00000807)
 		host->timeout_clk = 1000; /* 1000 kHz i.e. 1 MHz */
 
-	if (hid && !strcmp(hid, "80865ACA"))
+	if (acpi_dev_hid_uid_match(adev, "80865ACA", NULL))
 		host->mmc_host_ops.get_cd = bxt_get_cd;
 
 	intel_dsm_init(intel_host, &pdev->dev, host->mmc);
@@ -473,8 +469,7 @@ static irqreturn_t sdhci_acpi_qcom_handler(int irq, void *ptr)
 	return IRQ_HANDLED;
 }
 
-static int qcom_probe_slot(struct platform_device *pdev, const char *hid,
-			   const char *uid)
+static int qcom_probe_slot(struct platform_device *pdev, struct acpi_device *adev)
 {
 	struct sdhci_acpi_host *c = platform_get_drvdata(pdev);
 	struct sdhci_host *host = c->host;
@@ -482,7 +477,7 @@ static int qcom_probe_slot(struct platform_device *pdev, const char *hid,
 
 	*irq = -EINVAL;
 
-	if (strcmp(hid, "QCOM8051"))
+	if (acpi_dev_hid_uid_match(adev, "QCOM8051", NULL))
 		return 0;
 
 	*irq = platform_get_irq(pdev, 1);
@@ -501,14 +496,12 @@ static int qcom_free_slot(struct platform_device *pdev)
 	struct sdhci_host *host = c->host;
 	struct acpi_device *adev;
 	int *irq = sdhci_acpi_priv(c);
-	const char *hid;
 
 	adev = ACPI_COMPANION(dev);
 	if (!adev)
 		return -ENODEV;
 
-	hid = acpi_device_hid(adev);
-	if (strcmp(hid, "QCOM8051"))
+	if (!acpi_dev_hid_uid_match(adev, "QCOM8051", NULL))
 		return 0;
 
 	if (*irq < 0)
@@ -583,7 +576,7 @@ static const struct sdhci_acpi_chip sdhci_acpi_chip_amd = {
 };
 
 static int sdhci_acpi_emmc_amd_probe_slot(struct platform_device *pdev,
-					  const char *hid, const char *uid)
+					  struct acpi_device *adev)
 {
 	struct sdhci_acpi_host *c = platform_get_drvdata(pdev);
 	struct sdhci_host *host   = c->host;
@@ -654,17 +647,12 @@ static const struct acpi_device_id sdhci_acpi_ids[] = {
 };
 MODULE_DEVICE_TABLE(acpi, sdhci_acpi_ids);
 
-static const struct sdhci_acpi_slot *sdhci_acpi_get_slot(const char *hid,
-							 const char *uid)
+static const struct sdhci_acpi_slot *sdhci_acpi_get_slot(struct acpi_device *adev)
 {
 	const struct sdhci_acpi_uid_slot *u;
 
 	for (u = sdhci_acpi_uids; u->hid; u++) {
-		if (strcmp(u->hid, hid))
-			continue;
-		if (!u->uid)
-			return u->slot;
-		if (uid && !strcmp(u->uid, uid))
+		if (acpi_dev_hid_uid_match(adev, u->hid, u->uid))
 			return u->slot;
 	}
 	return NULL;
@@ -680,22 +668,17 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
 	struct resource *iomem;
 	resource_size_t len;
 	size_t priv_size;
-	const char *hid;
-	const char *uid;
 	int err;
 
 	device = ACPI_COMPANION(dev);
 	if (!device)
 		return -ENODEV;
 
-	hid = acpi_device_hid(device);
-	uid = acpi_device_uid(device);
-
-	slot = sdhci_acpi_get_slot(hid, uid);
+	slot = sdhci_acpi_get_slot(device);
 
 	/* Power on the SDHCI controller and its children */
 	acpi_device_fix_up_power(device);
-	if (!sdhci_acpi_no_fixup_child_power(hid, uid)) {
+	if (!sdhci_acpi_no_fixup_child_power(device)) {
 		list_for_each_entry(child, &device->children, node)
 			if (child->status.present && child->status.enabled)
 				acpi_device_fix_up_power(child);
@@ -745,7 +728,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
 
 	if (c->slot) {
 		if (c->slot->probe_slot) {
-			err = c->slot->probe_slot(pdev, hid, uid);
+			err = c->slot->probe_slot(pdev, device);
 			if (err)
 				goto err_free;
 		}
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [PATCH v2 6/6] iommu/amd: Switch to use acpi_dev_hid_uid_match()
  2019-09-24 19:37 [PATCH v2 0/6] ACPI / utils: add new helper for HID/UID match Andy Shevchenko
                   ` (4 preceding siblings ...)
  2019-09-24 19:37 ` [PATCH v2 5/6] mmc: sdhci-acpi: " Andy Shevchenko
@ 2019-09-24 19:37 ` Andy Shevchenko
  2019-10-01  9:41   ` Mika Westerberg
                     ` (2 more replies)
  5 siblings, 3 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-09-24 19:37 UTC (permalink / raw)
  To: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi
  Cc: Andy Shevchenko

Since we have a generic helper, drop custom implementation in the driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/iommu/amd_iommu.c | 30 +++++-------------------------
 1 file changed, 5 insertions(+), 25 deletions(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index 61de81965c44..79d38191e502 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -125,30 +125,6 @@ static struct lock_class_key reserved_rbtree_key;
  *
  ****************************************************************************/
 
-static inline int match_hid_uid(struct device *dev,
-				struct acpihid_map_entry *entry)
-{
-	struct acpi_device *adev = ACPI_COMPANION(dev);
-	const char *hid, *uid;
-
-	if (!adev)
-		return -ENODEV;
-
-	hid = acpi_device_hid(adev);
-	uid = acpi_device_uid(adev);
-
-	if (!hid || !(*hid))
-		return -ENODEV;
-
-	if (!uid || !(*uid))
-		return strcmp(hid, entry->hid);
-
-	if (!(*entry->uid))
-		return strcmp(hid, entry->hid);
-
-	return (strcmp(hid, entry->hid) || strcmp(uid, entry->uid));
-}
-
 static inline u16 get_pci_device_id(struct device *dev)
 {
 	struct pci_dev *pdev = to_pci_dev(dev);
@@ -159,10 +135,14 @@ static inline u16 get_pci_device_id(struct device *dev)
 static inline int get_acpihid_device_id(struct device *dev,
 					struct acpihid_map_entry **entry)
 {
+	struct acpi_device *adev = ACPI_COMPANION(dev);
 	struct acpihid_map_entry *p;
 
+	if (!adev)
+		return -ENODEV;
+
 	list_for_each_entry(p, &acpihid_map, list) {
-		if (!match_hid_uid(dev, p)) {
+		if (acpi_dev_hid_uid_match(adev, p->hid, p->uid)) {
 			if (entry)
 				*entry = p;
 			return p->devid;
-- 
2.23.0


^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 1/6] ACPI / utils: Describe function parameters in kernel-doc
  2019-09-24 19:37 ` [PATCH v2 1/6] ACPI / utils: Describe function parameters in kernel-doc Andy Shevchenko
@ 2019-10-01  9:32   ` Mika Westerberg
  0 siblings, 0 replies; 19+ messages in thread
From: Mika Westerberg @ 2019-10-01  9:32 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi

On Tue, Sep 24, 2019 at 10:37:34PM +0300, Andy Shevchenko wrote:
> Kernel documentation script complains that some of the function parameters
> are not described:
> 
> drivers/acpi/utils.c:462: warning: Function parameter or member 'handle' not described in 'acpi_handle_path'
> drivers/acpi/utils.c:484: warning: Function parameter or member 'level' not described in 'acpi_handle_printk'
> drivers/acpi/utils.c:484: warning: Function parameter or member 'handle' not described in 'acpi_handle_printk'
> drivers/acpi/utils.c:484: warning: Function parameter or member 'fmt' not described in 'acpi_handle_printk'
> drivers/acpi/utils.c:513: warning: Function parameter or member 'descriptor' not described in '__acpi_handle_debug'
> drivers/acpi/utils.c:513: warning: Function parameter or member 'handle' not described in '__acpi_handle_debug'
> drivers/acpi/utils.c:513: warning: Function parameter or member 'fmt' not described in '__acpi_handle_debug'
> 
> Describe function parameters where it's appropriate.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 2/6] ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI
  2019-09-24 19:37 ` [PATCH v2 2/6] ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI Andy Shevchenko
@ 2019-10-01  9:32   ` Mika Westerberg
  0 siblings, 0 replies; 19+ messages in thread
From: Mika Westerberg @ 2019-10-01  9:32 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi, kbuild test robot

On Tue, Sep 24, 2019 at 10:37:35PM +0300, Andy Shevchenko wrote:
> We have a stub defined for the acpi_dev_get_first_match_dev() in acpi.h
> for the case when CONFIG_ACPI=n.
> 
> Moreover, acpi_dev_put(), counterpart function, is already placed under
> CONFIG_ACPI.
> 
> Thus, move acpi_dev_get_first_match_dev() under CONFIG_ACPI as well.
> 
> Fixes: 817b4d64da03 ("Introduce acpi_dev_get_first_match_dev() helper")
> Reported-by: kbuild test robot <lkp@intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 3/6] ACPI / utils: Introduce acpi_dev_hid_uid_match() helper
  2019-09-24 19:37 ` [PATCH v2 3/6] ACPI / utils: Introduce acpi_dev_hid_uid_match() helper Andy Shevchenko
@ 2019-10-01  9:38   ` Mika Westerberg
  2019-10-01  9:59     ` Andy Shevchenko
  0 siblings, 1 reply; 19+ messages in thread
From: Mika Westerberg @ 2019-10-01  9:38 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi

On Tue, Sep 24, 2019 at 10:37:36PM +0300, Andy Shevchenko wrote:
> There are users outside of ACPI realm which reimplementing the comparator
> function to check if the given device matches to given HID and UID.
> 
> For better utilization, introduce a helper for everyone to use.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> ---
>  drivers/acpi/utils.c    | 25 +++++++++++++++++++++++++
>  include/acpi/acpi_bus.h |  2 ++
>  include/linux/acpi.h    |  6 ++++++
>  3 files changed, 33 insertions(+)
> 
> diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
> index dbd1c4cfd7d1..804ac0df58ec 100644
> --- a/drivers/acpi/utils.c
> +++ b/drivers/acpi/utils.c
> @@ -701,6 +701,31 @@ bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs)
>  }
>  EXPORT_SYMBOL(acpi_check_dsm);
>  
> +/**
> + * acpi_dev_hid_uid_match - Match device by supplied HID and UID
> + * @adev: ACPI device to match.
> + * @hid2: Hardware ID of the device.
> + * @uid2: Unique ID of the device, pass NULL to not check _UID.
> + *
> + * Matches HID and UID in @adev with given @hid2 and @uid2.
> + * Returns true if matches.
> + */
> +bool acpi_dev_hid_uid_match(struct acpi_device *adev,
> +			    const char *hid2, const char *uid2)
> +{
> +	const char *hid1 = acpi_device_hid(adev);
> +	const char *uid1 = acpi_device_uid(adev);
> +
> +	if (strcmp(hid1, hid2))
> +		return false;
> +
> +	if (!uid2)
> +		return true;
> +
> +	return uid1 && !strcmp(uid1, uid2);
> +}
> +EXPORT_SYMBOL(acpi_dev_hid_uid_match);

Should this be _GPL?

In any case looks good,

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 4/6] ACPI / LPSS: Switch to use acpi_dev_hid_uid_match()
  2019-09-24 19:37 ` [PATCH v2 4/6] ACPI / LPSS: Switch to use acpi_dev_hid_uid_match() Andy Shevchenko
@ 2019-10-01  9:40   ` Mika Westerberg
  0 siblings, 0 replies; 19+ messages in thread
From: Mika Westerberg @ 2019-10-01  9:40 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi

On Tue, Sep 24, 2019 at 10:37:37PM +0300, Andy Shevchenko wrote:
> Since we have a generic helper, drop custom implementation in the driver.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 5/6] mmc: sdhci-acpi: Switch to use acpi_dev_hid_uid_match()
  2019-09-24 19:37 ` [PATCH v2 5/6] mmc: sdhci-acpi: " Andy Shevchenko
@ 2019-10-01  9:40   ` Mika Westerberg
  2019-10-01 12:37   ` Adrian Hunter
  1 sibling, 0 replies; 19+ messages in thread
From: Mika Westerberg @ 2019-10-01  9:40 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi

On Tue, Sep 24, 2019 at 10:37:38PM +0300, Andy Shevchenko wrote:
> Since we have a generic helper, drop custom implementation in the driver.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 6/6] iommu/amd: Switch to use acpi_dev_hid_uid_match()
  2019-09-24 19:37 ` [PATCH v2 6/6] iommu/amd: " Andy Shevchenko
@ 2019-10-01  9:41   ` Mika Westerberg
  2019-10-07 15:28   ` Joerg Roedel
  2019-10-07 18:24   ` Jerry Snitselaar
  2 siblings, 0 replies; 19+ messages in thread
From: Mika Westerberg @ 2019-10-01  9:41 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi

On Tue, Sep 24, 2019 at 10:37:39PM +0300, Andy Shevchenko wrote:
> Since we have a generic helper, drop custom implementation in the driver.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 3/6] ACPI / utils: Introduce acpi_dev_hid_uid_match() helper
  2019-10-01  9:38   ` Mika Westerberg
@ 2019-10-01  9:59     ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-10-01  9:59 UTC (permalink / raw)
  To: Mika Westerberg
  Cc: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi

On Tue, Oct 01, 2019 at 12:38:54PM +0300, Mika Westerberg wrote:
> On Tue, Sep 24, 2019 at 10:37:36PM +0300, Andy Shevchenko wrote:
> > There are users outside of ACPI realm which reimplementing the comparator
> > function to check if the given device matches to given HID and UID.
> > 
> > For better utilization, introduce a helper for everyone to use.

> > +EXPORT_SYMBOL(acpi_dev_hid_uid_match);
> 
> Should this be _GPL?

No, the rest of the acpi_dev_*() are marked without it.

> In any case looks good,
> 
> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>

Thanks!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 5/6] mmc: sdhci-acpi: Switch to use acpi_dev_hid_uid_match()
  2019-09-24 19:37 ` [PATCH v2 5/6] mmc: sdhci-acpi: " Andy Shevchenko
  2019-10-01  9:40   ` Mika Westerberg
@ 2019-10-01 12:37   ` Adrian Hunter
  2019-10-01 13:04     ` Andy Shevchenko
  1 sibling, 1 reply; 19+ messages in thread
From: Adrian Hunter @ 2019-10-01 12:37 UTC (permalink / raw)
  To: Andy Shevchenko, Joerg Roedel, iommu, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi

On 24/09/19 10:37 PM, Andy Shevchenko wrote:
> Since we have a generic helper, drop custom implementation in the driver.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/mmc/host/sdhci-acpi.c | 49 ++++++++++++-----------------------
>  1 file changed, 16 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
> index 1604f512c7bd..f913c3f57bbf 100644
> --- a/drivers/mmc/host/sdhci-acpi.c
> +++ b/drivers/mmc/host/sdhci-acpi.c
> @@ -61,7 +61,7 @@ struct sdhci_acpi_slot {
>  	mmc_pm_flag_t	pm_caps;
>  	unsigned int	flags;
>  	size_t		priv_size;
> -	int (*probe_slot)(struct platform_device *, const char *, const char *);
> +	int (*probe_slot)(struct platform_device *, struct acpi_device *);
>  	int (*remove_slot)(struct platform_device *);
>  	int (*free_slot)(struct platform_device *pdev);
>  	int (*setup_host)(struct platform_device *pdev);
> @@ -325,12 +325,10 @@ static bool sdhci_acpi_cht_pci_wifi(unsigned int vendor, unsigned int device,
>   * wifi card in the expected slot with an ACPI companion node, is used to
>   * indicate that acpi_device_fix_up_power() should be avoided.
>   */
> -static inline bool sdhci_acpi_no_fixup_child_power(const char *hid,
> -						   const char *uid)
> +static inline bool sdhci_acpi_no_fixup_child_power(struct acpi_device *adev)
>  {
>  	return sdhci_acpi_cht() &&
> -	       !strcmp(hid, "80860F14") &&
> -	       !strcmp(uid, "2") &&
> +	       acpi_dev_hid_uid_match(adev, "80860F14", "2") &&
>  	       sdhci_acpi_cht_pci_wifi(0x14e4, 0x43ec, 0, 28);
>  }
>  
> @@ -345,8 +343,7 @@ static inline bool sdhci_acpi_byt_defer(struct device *dev)
>  	return false;
>  }
>  
> -static inline bool sdhci_acpi_no_fixup_child_power(const char *hid,
> -						   const char *uid)
> +static inline bool sdhci_acpi_no_fixup_child_power(struct acpi_device *adev)
>  {
>  	return false;
>  }
> @@ -375,19 +372,18 @@ static int bxt_get_cd(struct mmc_host *mmc)
>  	return ret;
>  }
>  
> -static int intel_probe_slot(struct platform_device *pdev, const char *hid,
> -			    const char *uid)
> +static int intel_probe_slot(struct platform_device *pdev, struct acpi_device *adev)
>  {
>  	struct sdhci_acpi_host *c = platform_get_drvdata(pdev);
>  	struct intel_host *intel_host = sdhci_acpi_priv(c);
>  	struct sdhci_host *host = c->host;
>  
> -	if (hid && uid && !strcmp(hid, "80860F14") && !strcmp(uid, "1") &&
> +	if (acpi_dev_hid_uid_match(adev, "80860F14", "1") &&
>  	    sdhci_readl(host, SDHCI_CAPABILITIES) == 0x446cc8b2 &&
>  	    sdhci_readl(host, SDHCI_CAPABILITIES_1) == 0x00000807)
>  		host->timeout_clk = 1000; /* 1000 kHz i.e. 1 MHz */
>  
> -	if (hid && !strcmp(hid, "80865ACA"))
> +	if (acpi_dev_hid_uid_match(adev, "80865ACA", NULL))
>  		host->mmc_host_ops.get_cd = bxt_get_cd;
>  
>  	intel_dsm_init(intel_host, &pdev->dev, host->mmc);
> @@ -473,8 +469,7 @@ static irqreturn_t sdhci_acpi_qcom_handler(int irq, void *ptr)
>  	return IRQ_HANDLED;
>  }
>  
> -static int qcom_probe_slot(struct platform_device *pdev, const char *hid,
> -			   const char *uid)
> +static int qcom_probe_slot(struct platform_device *pdev, struct acpi_device *adev)
>  {
>  	struct sdhci_acpi_host *c = platform_get_drvdata(pdev);
>  	struct sdhci_host *host = c->host;
> @@ -482,7 +477,7 @@ static int qcom_probe_slot(struct platform_device *pdev, const char *hid,
>  
>  	*irq = -EINVAL;
>  
> -	if (strcmp(hid, "QCOM8051"))
> +	if (acpi_dev_hid_uid_match(adev, "QCOM8051", NULL))

Logic is inverted

>  		return 0;
>  
>  	*irq = platform_get_irq(pdev, 1);
> @@ -501,14 +496,12 @@ static int qcom_free_slot(struct platform_device *pdev)
>  	struct sdhci_host *host = c->host;
>  	struct acpi_device *adev;
>  	int *irq = sdhci_acpi_priv(c);
> -	const char *hid;
>  
>  	adev = ACPI_COMPANION(dev);
>  	if (!adev)
>  		return -ENODEV;
>  
> -	hid = acpi_device_hid(adev);
> -	if (strcmp(hid, "QCOM8051"))
> +	if (!acpi_dev_hid_uid_match(adev, "QCOM8051", NULL))
>  		return 0;
>  
>  	if (*irq < 0)
> @@ -583,7 +576,7 @@ static const struct sdhci_acpi_chip sdhci_acpi_chip_amd = {
>  };
>  
>  static int sdhci_acpi_emmc_amd_probe_slot(struct platform_device *pdev,
> -					  const char *hid, const char *uid)
> +					  struct acpi_device *adev)
>  {
>  	struct sdhci_acpi_host *c = platform_get_drvdata(pdev);
>  	struct sdhci_host *host   = c->host;
> @@ -654,17 +647,12 @@ static const struct acpi_device_id sdhci_acpi_ids[] = {
>  };
>  MODULE_DEVICE_TABLE(acpi, sdhci_acpi_ids);
>  
> -static const struct sdhci_acpi_slot *sdhci_acpi_get_slot(const char *hid,
> -							 const char *uid)
> +static const struct sdhci_acpi_slot *sdhci_acpi_get_slot(struct acpi_device *adev)
>  {
>  	const struct sdhci_acpi_uid_slot *u;
>  
>  	for (u = sdhci_acpi_uids; u->hid; u++) {
> -		if (strcmp(u->hid, hid))
> -			continue;
> -		if (!u->uid)
> -			return u->slot;
> -		if (uid && !strcmp(u->uid, uid))
> +		if (acpi_dev_hid_uid_match(adev, u->hid, u->uid))
>  			return u->slot;
>  	}
>  	return NULL;
> @@ -680,22 +668,17 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
>  	struct resource *iomem;
>  	resource_size_t len;
>  	size_t priv_size;
> -	const char *hid;
> -	const char *uid;
>  	int err;
>  
>  	device = ACPI_COMPANION(dev);
>  	if (!device)
>  		return -ENODEV;
>  
> -	hid = acpi_device_hid(device);
> -	uid = acpi_device_uid(device);
> -
> -	slot = sdhci_acpi_get_slot(hid, uid);
> +	slot = sdhci_acpi_get_slot(device);
>  
>  	/* Power on the SDHCI controller and its children */
>  	acpi_device_fix_up_power(device);
> -	if (!sdhci_acpi_no_fixup_child_power(hid, uid)) {
> +	if (!sdhci_acpi_no_fixup_child_power(device)) {
>  		list_for_each_entry(child, &device->children, node)
>  			if (child->status.present && child->status.enabled)
>  				acpi_device_fix_up_power(child);
> @@ -745,7 +728,7 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
>  
>  	if (c->slot) {
>  		if (c->slot->probe_slot) {
> -			err = c->slot->probe_slot(pdev, hid, uid);
> +			err = c->slot->probe_slot(pdev, device);
>  			if (err)
>  				goto err_free;
>  		}
> 


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 5/6] mmc: sdhci-acpi: Switch to use acpi_dev_hid_uid_match()
  2019-10-01 12:37   ` Adrian Hunter
@ 2019-10-01 13:04     ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-10-01 13:04 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Joerg Roedel, iommu, Ulf Hansson, linux-mmc, Rafael J. Wysocki,
	linux-acpi

On Tue, Oct 01, 2019 at 03:37:08PM +0300, Adrian Hunter wrote:
> On 24/09/19 10:37 PM, Andy Shevchenko wrote:
> > Since we have a generic helper, drop custom implementation in the driver.

> > -	if (strcmp(hid, "QCOM8051"))
> > +	if (acpi_dev_hid_uid_match(adev, "QCOM8051", NULL))
> 
> Logic is inverted

Good catch! I forgot to double check it here while below it's okay...

> > -	if (strcmp(hid, "QCOM8051"))
> > +	if (!acpi_dev_hid_uid_match(adev, "QCOM8051", NULL))

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 6/6] iommu/amd: Switch to use acpi_dev_hid_uid_match()
  2019-09-24 19:37 ` [PATCH v2 6/6] iommu/amd: " Andy Shevchenko
  2019-10-01  9:41   ` Mika Westerberg
@ 2019-10-07 15:28   ` Joerg Roedel
  2019-10-08 13:54     ` Andy Shevchenko
  2019-10-07 18:24   ` Jerry Snitselaar
  2 siblings, 1 reply; 19+ messages in thread
From: Joerg Roedel @ 2019-10-07 15:28 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: iommu, Adrian Hunter, Ulf Hansson, linux-mmc, Rafael J. Wysocki,
	linux-acpi

On Tue, Sep 24, 2019 at 10:37:39PM +0300, Andy Shevchenko wrote:
> Since we have a generic helper, drop custom implementation in the driver.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/iommu/amd_iommu.c | 30 +++++-------------------------
>  1 file changed, 5 insertions(+), 25 deletions(-)

Acked-by: Joerg Roedel <jroedel@suse.de>

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 6/6] iommu/amd: Switch to use acpi_dev_hid_uid_match()
  2019-09-24 19:37 ` [PATCH v2 6/6] iommu/amd: " Andy Shevchenko
  2019-10-01  9:41   ` Mika Westerberg
  2019-10-07 15:28   ` Joerg Roedel
@ 2019-10-07 18:24   ` Jerry Snitselaar
  2 siblings, 0 replies; 19+ messages in thread
From: Jerry Snitselaar @ 2019-10-07 18:24 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Joerg Roedel, iommu, Adrian Hunter, Ulf Hansson, linux-mmc,
	Rafael J. Wysocki, linux-acpi

On Tue Sep 24 19, Andy Shevchenko wrote:
>Since we have a generic helper, drop custom implementation in the driver.
>
>Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>---

Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>


^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PATCH v2 6/6] iommu/amd: Switch to use acpi_dev_hid_uid_match()
  2019-10-07 15:28   ` Joerg Roedel
@ 2019-10-08 13:54     ` Andy Shevchenko
  0 siblings, 0 replies; 19+ messages in thread
From: Andy Shevchenko @ 2019-10-08 13:54 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: iommu, Adrian Hunter, Ulf Hansson, linux-mmc, Rafael J. Wysocki,
	linux-acpi

On Mon, Oct 07, 2019 at 05:28:48PM +0200, Joerg Roedel wrote:
> On Tue, Sep 24, 2019 at 10:37:39PM +0300, Andy Shevchenko wrote:
> > Since we have a generic helper, drop custom implementation in the driver.
> > 
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > ---
> >  drivers/iommu/amd_iommu.c | 30 +++++-------------------------
> >  1 file changed, 5 insertions(+), 25 deletions(-)
> 
> Acked-by: Joerg Roedel <jroedel@suse.de>

Thanks!
There is v3 available, does it apply to it?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-10-08 13:54 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-24 19:37 [PATCH v2 0/6] ACPI / utils: add new helper for HID/UID match Andy Shevchenko
2019-09-24 19:37 ` [PATCH v2 1/6] ACPI / utils: Describe function parameters in kernel-doc Andy Shevchenko
2019-10-01  9:32   ` Mika Westerberg
2019-09-24 19:37 ` [PATCH v2 2/6] ACPI / utils: Move acpi_dev_get_first_match_dev() under CONFIG_ACPI Andy Shevchenko
2019-10-01  9:32   ` Mika Westerberg
2019-09-24 19:37 ` [PATCH v2 3/6] ACPI / utils: Introduce acpi_dev_hid_uid_match() helper Andy Shevchenko
2019-10-01  9:38   ` Mika Westerberg
2019-10-01  9:59     ` Andy Shevchenko
2019-09-24 19:37 ` [PATCH v2 4/6] ACPI / LPSS: Switch to use acpi_dev_hid_uid_match() Andy Shevchenko
2019-10-01  9:40   ` Mika Westerberg
2019-09-24 19:37 ` [PATCH v2 5/6] mmc: sdhci-acpi: " Andy Shevchenko
2019-10-01  9:40   ` Mika Westerberg
2019-10-01 12:37   ` Adrian Hunter
2019-10-01 13:04     ` Andy Shevchenko
2019-09-24 19:37 ` [PATCH v2 6/6] iommu/amd: " Andy Shevchenko
2019-10-01  9:41   ` Mika Westerberg
2019-10-07 15:28   ` Joerg Roedel
2019-10-08 13:54     ` Andy Shevchenko
2019-10-07 18:24   ` Jerry Snitselaar

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