All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] ACPI et al: convert to use new UUID API
@ 2017-05-31 19:41 ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-05-31 19:41 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx
  Cc: Andy Shevchenko

This series converts ACPI and users of acpi_evaluate_dsm() to new UUID
API which includes new types and methods.

Patches are based on uuid tree [1] from Christoph Hellwig and supposed to
go through it.

(Christoph, I think it would be nice to attach them to your stuff)

[1]: git://git.infradead.org/users/hch/uuid.git

Changelog v2:
- append tags I have got so far
- split single patch to few (5)
- rebased on top of latest version of uuid-types branch [1]

Andy Shevchenko (5):
  acpi, nfit: Switch to use new generic UUID API
  ACPI / APEI: Switch to use new generic UUID API
  ACPI / bus: Switch to use new generic UUID API
  ACPI / extlog: Switch to use new generic UUID API
  ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()

 drivers/acpi/acpi_extlog.c                         | 20 ++++----
 drivers/acpi/apei/ghes.c                           |  8 ++--
 drivers/acpi/bus.c                                 | 29 ++----------
 drivers/acpi/nfit/core.c                           | 54 +++++++++++-----------
 drivers/acpi/nfit/nfit.h                           |  3 +-
 drivers/acpi/utils.c                               | 16 +++----
 drivers/char/tpm/tpm_crb.c                         |  9 ++--
 drivers/char/tpm/tpm_ppi.c                         | 20 ++++----
 drivers/gpu/drm/i915/intel_acpi.c                  | 14 ++----
 drivers/gpu/drm/nouveau/nouveau_acpi.c             | 20 ++++----
 drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c     |  9 ++--
 drivers/hid/i2c-hid/i2c-hid.c                      |  9 ++--
 drivers/iommu/dmar.c                               | 11 ++---
 drivers/mmc/host/sdhci-pci-core.c                  |  9 ++--
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 15 +++---
 drivers/pci/pci-acpi.c                             | 13 +++---
 drivers/pci/pci-label.c                            |  4 +-
 drivers/usb/dwc3/dwc3-pci.c                        | 10 ++--
 drivers/usb/host/xhci-pci.c                        |  9 ++--
 drivers/usb/misc/ucsi.c                            |  6 +--
 drivers/usb/typec/typec_wcove.c                    |  8 ++--
 include/acpi/acpi_bus.h                            | 11 +++--
 include/linux/acpi.h                               |  4 +-
 include/linux/pci-acpi.h                           |  2 +-
 sound/soc/intel/skylake/skl-nhlt.c                 |  7 +--
 tools/testing/nvdimm/test/iomap.c                  |  6 +--
 tools/testing/nvdimm/test/nfit.c                   |  2 +-
 27 files changed, 144 insertions(+), 184 deletions(-)

-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH v2 0/5] ACPI et al: convert to use new UUID API
@ 2017-05-31 19:41 ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-05-31 19:41 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx
  Cc: Andy Shevchenko

This series converts ACPI and users of acpi_evaluate_dsm() to new UUID
API which includes new types and methods.

Patches are based on uuid tree [1] from Christoph Hellwig and supposed to
go through it.

(Christoph, I think it would be nice to attach them to your stuff)

[1]: git://git.infradead.org/users/hch/uuid.git

Changelog v2:
- append tags I have got so far
- split single patch to few (5)
- rebased on top of latest version of uuid-types branch [1]

Andy Shevchenko (5):
  acpi, nfit: Switch to use new generic UUID API
  ACPI / APEI: Switch to use new generic UUID API
  ACPI / bus: Switch to use new generic UUID API
  ACPI / extlog: Switch to use new generic UUID API
  ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()

 drivers/acpi/acpi_extlog.c                         | 20 ++++----
 drivers/acpi/apei/ghes.c                           |  8 ++--
 drivers/acpi/bus.c                                 | 29 ++----------
 drivers/acpi/nfit/core.c                           | 54 +++++++++++-----------
 drivers/acpi/nfit/nfit.h                           |  3 +-
 drivers/acpi/utils.c                               | 16 +++----
 drivers/char/tpm/tpm_crb.c                         |  9 ++--
 drivers/char/tpm/tpm_ppi.c                         | 20 ++++----
 drivers/gpu/drm/i915/intel_acpi.c                  | 14 ++----
 drivers/gpu/drm/nouveau/nouveau_acpi.c             | 20 ++++----
 drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c     |  9 ++--
 drivers/hid/i2c-hid/i2c-hid.c                      |  9 ++--
 drivers/iommu/dmar.c                               | 11 ++---
 drivers/mmc/host/sdhci-pci-core.c                  |  9 ++--
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 15 +++---
 drivers/pci/pci-acpi.c                             | 13 +++---
 drivers/pci/pci-label.c                            |  4 +-
 drivers/usb/dwc3/dwc3-pci.c                        | 10 ++--
 drivers/usb/host/xhci-pci.c                        |  9 ++--
 drivers/usb/misc/ucsi.c                            |  6 +--
 drivers/usb/typec/typec_wcove.c                    |  8 ++--
 include/acpi/acpi_bus.h                            | 11 +++--
 include/linux/acpi.h                               |  4 +-
 include/linux/pci-acpi.h                           |  2 +-
 sound/soc/intel/skylake/skl-nhlt.c                 |  7 +--
 tools/testing/nvdimm/test/iomap.c                  |  6 +--
 tools/testing/nvdimm/test/nfit.c                   |  2 +-
 27 files changed, 144 insertions(+), 184 deletions(-)

-- 
2.11.0

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

* [PATCH v2 1/5] acpi, nfit: Switch to use new generic UUID API
  2017-05-31 19:41 ` Andy Shevchenko
@ 2017-05-31 19:41   ` Andy Shevchenko
  -1 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-05-31 19:41 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx
  Cc: Andy Shevchenko

There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/acpi/nfit/core.c | 54 ++++++++++++++++++++++++------------------------
 drivers/acpi/nfit/nfit.h |  3 +--
 include/linux/acpi.h     |  1 +
 3 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index 656acb5d7166..50753582a0b1 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -74,11 +74,11 @@ struct nfit_table_prev {
 	struct list_head flushes;
 };
 
-static u8 nfit_uuid[NFIT_UUID_MAX][16];
+static guid_t nfit_uuid[NFIT_UUID_MAX];
 
-const u8 *to_nfit_uuid(enum nfit_uuids id)
+const guid_t *to_nfit_uuid(enum nfit_uuids id)
 {
-	return nfit_uuid[id];
+	return &nfit_uuid[id];
 }
 EXPORT_SYMBOL(to_nfit_uuid);
 
@@ -222,7 +222,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
 	u32 offset, fw_status = 0;
 	acpi_handle handle;
 	unsigned int func;
-	const u8 *uuid;
+	const guid_t *guid;
 	int rc, i;
 
 	func = cmd;
@@ -245,7 +245,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
 		cmd_mask = nvdimm_cmd_mask(nvdimm);
 		dsm_mask = nfit_mem->dsm_mask;
 		desc = nd_cmd_dimm_desc(cmd);
-		uuid = to_nfit_uuid(nfit_mem->family);
+		guid = to_nfit_uuid(nfit_mem->family);
 		handle = adev->handle;
 	} else {
 		struct acpi_device *adev = to_acpi_dev(acpi_desc);
@@ -254,7 +254,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
 		cmd_mask = nd_desc->cmd_mask;
 		dsm_mask = cmd_mask;
 		desc = nd_cmd_bus_desc(cmd);
-		uuid = to_nfit_uuid(NFIT_DEV_BUS);
+		guid = to_nfit_uuid(NFIT_DEV_BUS);
 		handle = adev->handle;
 		dimm_name = "bus";
 	}
@@ -289,7 +289,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
 			in_buf.buffer.pointer,
 			min_t(u32, 256, in_buf.buffer.length), true);
 
-	out_obj = acpi_evaluate_dsm(handle, uuid, 1, func, &in_obj);
+	out_obj = acpi_evaluate_dsm(handle, guid.b, 1, func, &in_obj);
 	if (!out_obj) {
 		dev_dbg(dev, "%s:%s _DSM failed cmd: %s\n", __func__, dimm_name,
 				cmd_name);
@@ -409,7 +409,7 @@ int nfit_spa_type(struct acpi_nfit_system_address *spa)
 	int i;
 
 	for (i = 0; i < NFIT_UUID_MAX; i++)
-		if (memcmp(to_nfit_uuid(i), spa->range_guid, 16) == 0)
+		if (!guid_equal(to_nfit_uuid(i), (guid_t *)&spa->range_guid))
 			return i;
 	return -1;
 }
@@ -1415,7 +1415,7 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
 	struct acpi_device *adev, *adev_dimm;
 	struct device *dev = acpi_desc->dev;
 	unsigned long dsm_mask;
-	const u8 *uuid;
+	const guid_t *guid;
 	int i;
 	int family = -1;
 
@@ -1444,7 +1444,7 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
 	/*
 	 * Until standardization materializes we need to consider 4
 	 * different command sets.  Note, that checking for function0 (bit0)
-	 * tells us if any commands are reachable through this uuid.
+	 * tells us if any commands are reachable through this GUID.
 	 */
 	for (i = NVDIMM_FAMILY_INTEL; i <= NVDIMM_FAMILY_MSFT; i++)
 		if (acpi_check_dsm(adev_dimm->handle, to_nfit_uuid(i), 1, 1))
@@ -1474,9 +1474,9 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
 		return 0;
 	}
 
-	uuid = to_nfit_uuid(nfit_mem->family);
+	guid = to_nfit_uuid(nfit_mem->family);
 	for_each_set_bit(i, &dsm_mask, BITS_PER_LONG)
-		if (acpi_check_dsm(adev_dimm->handle, uuid, 1, 1ULL << i))
+		if (acpi_check_dsm(adev_dimm->handle, guid.b, 1, 1ULL << i))
 			set_bit(i, &nfit_mem->dsm_mask);
 
 	return 0;
@@ -1611,7 +1611,7 @@ static int acpi_nfit_register_dimms(struct acpi_nfit_desc *acpi_desc)
 static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc)
 {
 	struct nvdimm_bus_descriptor *nd_desc = &acpi_desc->nd_desc;
-	const u8 *uuid = to_nfit_uuid(NFIT_DEV_BUS);
+	const guid_t *guid = to_nfit_uuid(NFIT_DEV_BUS);
 	struct acpi_device *adev;
 	int i;
 
@@ -1621,7 +1621,7 @@ static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc)
 		return;
 
 	for (i = ND_CMD_ARS_CAP; i <= ND_CMD_CLEAR_ERROR; i++)
-		if (acpi_check_dsm(adev->handle, uuid, 1, 1ULL << i))
+		if (acpi_check_dsm(adev->handle, guid.b, 1, 1ULL << i))
 			set_bit(i, &nd_desc->cmd_mask);
 }
 
@@ -3051,19 +3051,19 @@ static __init int nfit_init(void)
 	BUILD_BUG_ON(sizeof(struct acpi_nfit_control_region) != 80);
 	BUILD_BUG_ON(sizeof(struct acpi_nfit_data_region) != 40);
 
-	acpi_str_to_uuid(UUID_VOLATILE_MEMORY, nfit_uuid[NFIT_SPA_VOLATILE]);
-	acpi_str_to_uuid(UUID_PERSISTENT_MEMORY, nfit_uuid[NFIT_SPA_PM]);
-	acpi_str_to_uuid(UUID_CONTROL_REGION, nfit_uuid[NFIT_SPA_DCR]);
-	acpi_str_to_uuid(UUID_DATA_REGION, nfit_uuid[NFIT_SPA_BDW]);
-	acpi_str_to_uuid(UUID_VOLATILE_VIRTUAL_DISK, nfit_uuid[NFIT_SPA_VDISK]);
-	acpi_str_to_uuid(UUID_VOLATILE_VIRTUAL_CD, nfit_uuid[NFIT_SPA_VCD]);
-	acpi_str_to_uuid(UUID_PERSISTENT_VIRTUAL_DISK, nfit_uuid[NFIT_SPA_PDISK]);
-	acpi_str_to_uuid(UUID_PERSISTENT_VIRTUAL_CD, nfit_uuid[NFIT_SPA_PCD]);
-	acpi_str_to_uuid(UUID_NFIT_BUS, nfit_uuid[NFIT_DEV_BUS]);
-	acpi_str_to_uuid(UUID_NFIT_DIMM, nfit_uuid[NFIT_DEV_DIMM]);
-	acpi_str_to_uuid(UUID_NFIT_DIMM_N_HPE1, nfit_uuid[NFIT_DEV_DIMM_N_HPE1]);
-	acpi_str_to_uuid(UUID_NFIT_DIMM_N_HPE2, nfit_uuid[NFIT_DEV_DIMM_N_HPE2]);
-	acpi_str_to_uuid(UUID_NFIT_DIMM_N_MSFT, nfit_uuid[NFIT_DEV_DIMM_N_MSFT]);
+	guid_parse(UUID_VOLATILE_MEMORY, &nfit_uuid[NFIT_SPA_VOLATILE]);
+	guid_parse(UUID_PERSISTENT_MEMORY, &nfit_uuid[NFIT_SPA_PM]);
+	guid_parse(UUID_CONTROL_REGION, &nfit_uuid[NFIT_SPA_DCR]);
+	guid_parse(UUID_DATA_REGION, &nfit_uuid[NFIT_SPA_BDW]);
+	guid_parse(UUID_VOLATILE_VIRTUAL_DISK, &nfit_uuid[NFIT_SPA_VDISK]);
+	guid_parse(UUID_VOLATILE_VIRTUAL_CD, &nfit_uuid[NFIT_SPA_VCD]);
+	guid_parse(UUID_PERSISTENT_VIRTUAL_DISK, &nfit_uuid[NFIT_SPA_PDISK]);
+	guid_parse(UUID_PERSISTENT_VIRTUAL_CD, &nfit_uuid[NFIT_SPA_PCD]);
+	guid_parse(UUID_NFIT_BUS, &nfit_uuid[NFIT_DEV_BUS]);
+	guid_parse(UUID_NFIT_DIMM, &nfit_uuid[NFIT_DEV_DIMM]);
+	guid_parse(UUID_NFIT_DIMM_N_HPE1, &nfit_uuid[NFIT_DEV_DIMM_N_HPE1]);
+	guid_parse(UUID_NFIT_DIMM_N_HPE2, &nfit_uuid[NFIT_DEV_DIMM_N_HPE2]);
+	guid_parse(UUID_NFIT_DIMM_N_MSFT, &nfit_uuid[NFIT_DEV_DIMM_N_MSFT]);
 
 	nfit_wq = create_singlethread_workqueue("nfit");
 	if (!nfit_wq)
diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h
index 58fb7d68e04a..29bdd959517f 100644
--- a/drivers/acpi/nfit/nfit.h
+++ b/drivers/acpi/nfit/nfit.h
@@ -18,7 +18,6 @@
 #include <linux/libnvdimm.h>
 #include <linux/ndctl.h>
 #include <linux/types.h>
-#include <linux/uuid.h>
 #include <linux/acpi.h>
 #include <acpi/acuuid.h>
 
@@ -237,7 +236,7 @@ static inline struct acpi_nfit_desc *to_acpi_desc(
 	return container_of(nd_desc, struct acpi_nfit_desc, nd_desc);
 }
 
-const u8 *to_nfit_uuid(enum nfit_uuids id);
+const guid_t *to_nfit_uuid(enum nfit_uuids id);
 int acpi_nfit_init(struct acpi_nfit_desc *acpi_desc, void *nfit, acpi_size sz);
 void acpi_nfit_shutdown(void *data);
 void __acpi_nfit_notify(struct device *dev, acpi_handle handle, u32 event);
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 137e4a3d89c5..b0e1636ca5c3 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -39,6 +39,7 @@
 #include <linux/dynamic_debug.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
+#include <linux/uuid.h>
 
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH v2 1/5] acpi, nfit: Switch to use new generic UUID API
@ 2017-05-31 19:41   ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-05-31 19:41 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx
  Cc: Andy Shevchenko

There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/acpi/nfit/core.c | 54 ++++++++++++++++++++++++------------------------
 drivers/acpi/nfit/nfit.h |  3 +--
 include/linux/acpi.h     |  1 +
 3 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index 656acb5d7166..50753582a0b1 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -74,11 +74,11 @@ struct nfit_table_prev {
 	struct list_head flushes;
 };
 
-static u8 nfit_uuid[NFIT_UUID_MAX][16];
+static guid_t nfit_uuid[NFIT_UUID_MAX];
 
-const u8 *to_nfit_uuid(enum nfit_uuids id)
+const guid_t *to_nfit_uuid(enum nfit_uuids id)
 {
-	return nfit_uuid[id];
+	return &nfit_uuid[id];
 }
 EXPORT_SYMBOL(to_nfit_uuid);
 
@@ -222,7 +222,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
 	u32 offset, fw_status = 0;
 	acpi_handle handle;
 	unsigned int func;
-	const u8 *uuid;
+	const guid_t *guid;
 	int rc, i;
 
 	func = cmd;
@@ -245,7 +245,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
 		cmd_mask = nvdimm_cmd_mask(nvdimm);
 		dsm_mask = nfit_mem->dsm_mask;
 		desc = nd_cmd_dimm_desc(cmd);
-		uuid = to_nfit_uuid(nfit_mem->family);
+		guid = to_nfit_uuid(nfit_mem->family);
 		handle = adev->handle;
 	} else {
 		struct acpi_device *adev = to_acpi_dev(acpi_desc);
@@ -254,7 +254,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
 		cmd_mask = nd_desc->cmd_mask;
 		dsm_mask = cmd_mask;
 		desc = nd_cmd_bus_desc(cmd);
-		uuid = to_nfit_uuid(NFIT_DEV_BUS);
+		guid = to_nfit_uuid(NFIT_DEV_BUS);
 		handle = adev->handle;
 		dimm_name = "bus";
 	}
@@ -289,7 +289,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
 			in_buf.buffer.pointer,
 			min_t(u32, 256, in_buf.buffer.length), true);
 
-	out_obj = acpi_evaluate_dsm(handle, uuid, 1, func, &in_obj);
+	out_obj = acpi_evaluate_dsm(handle, guid.b, 1, func, &in_obj);
 	if (!out_obj) {
 		dev_dbg(dev, "%s:%s _DSM failed cmd: %s\n", __func__, dimm_name,
 				cmd_name);
@@ -409,7 +409,7 @@ int nfit_spa_type(struct acpi_nfit_system_address *spa)
 	int i;
 
 	for (i = 0; i < NFIT_UUID_MAX; i++)
-		if (memcmp(to_nfit_uuid(i), spa->range_guid, 16) == 0)
+		if (!guid_equal(to_nfit_uuid(i), (guid_t *)&spa->range_guid))
 			return i;
 	return -1;
 }
@@ -1415,7 +1415,7 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
 	struct acpi_device *adev, *adev_dimm;
 	struct device *dev = acpi_desc->dev;
 	unsigned long dsm_mask;
-	const u8 *uuid;
+	const guid_t *guid;
 	int i;
 	int family = -1;
 
@@ -1444,7 +1444,7 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
 	/*
 	 * Until standardization materializes we need to consider 4
 	 * different command sets.  Note, that checking for function0 (bit0)
-	 * tells us if any commands are reachable through this uuid.
+	 * tells us if any commands are reachable through this GUID.
 	 */
 	for (i = NVDIMM_FAMILY_INTEL; i <= NVDIMM_FAMILY_MSFT; i++)
 		if (acpi_check_dsm(adev_dimm->handle, to_nfit_uuid(i), 1, 1))
@@ -1474,9 +1474,9 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
 		return 0;
 	}
 
-	uuid = to_nfit_uuid(nfit_mem->family);
+	guid = to_nfit_uuid(nfit_mem->family);
 	for_each_set_bit(i, &dsm_mask, BITS_PER_LONG)
-		if (acpi_check_dsm(adev_dimm->handle, uuid, 1, 1ULL << i))
+		if (acpi_check_dsm(adev_dimm->handle, guid.b, 1, 1ULL << i))
 			set_bit(i, &nfit_mem->dsm_mask);
 
 	return 0;
@@ -1611,7 +1611,7 @@ static int acpi_nfit_register_dimms(struct acpi_nfit_desc *acpi_desc)
 static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc)
 {
 	struct nvdimm_bus_descriptor *nd_desc = &acpi_desc->nd_desc;
-	const u8 *uuid = to_nfit_uuid(NFIT_DEV_BUS);
+	const guid_t *guid = to_nfit_uuid(NFIT_DEV_BUS);
 	struct acpi_device *adev;
 	int i;
 
@@ -1621,7 +1621,7 @@ static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc)
 		return;
 
 	for (i = ND_CMD_ARS_CAP; i <= ND_CMD_CLEAR_ERROR; i++)
-		if (acpi_check_dsm(adev->handle, uuid, 1, 1ULL << i))
+		if (acpi_check_dsm(adev->handle, guid.b, 1, 1ULL << i))
 			set_bit(i, &nd_desc->cmd_mask);
 }
 
@@ -3051,19 +3051,19 @@ static __init int nfit_init(void)
 	BUILD_BUG_ON(sizeof(struct acpi_nfit_control_region) != 80);
 	BUILD_BUG_ON(sizeof(struct acpi_nfit_data_region) != 40);
 
-	acpi_str_to_uuid(UUID_VOLATILE_MEMORY, nfit_uuid[NFIT_SPA_VOLATILE]);
-	acpi_str_to_uuid(UUID_PERSISTENT_MEMORY, nfit_uuid[NFIT_SPA_PM]);
-	acpi_str_to_uuid(UUID_CONTROL_REGION, nfit_uuid[NFIT_SPA_DCR]);
-	acpi_str_to_uuid(UUID_DATA_REGION, nfit_uuid[NFIT_SPA_BDW]);
-	acpi_str_to_uuid(UUID_VOLATILE_VIRTUAL_DISK, nfit_uuid[NFIT_SPA_VDISK]);
-	acpi_str_to_uuid(UUID_VOLATILE_VIRTUAL_CD, nfit_uuid[NFIT_SPA_VCD]);
-	acpi_str_to_uuid(UUID_PERSISTENT_VIRTUAL_DISK, nfit_uuid[NFIT_SPA_PDISK]);
-	acpi_str_to_uuid(UUID_PERSISTENT_VIRTUAL_CD, nfit_uuid[NFIT_SPA_PCD]);
-	acpi_str_to_uuid(UUID_NFIT_BUS, nfit_uuid[NFIT_DEV_BUS]);
-	acpi_str_to_uuid(UUID_NFIT_DIMM, nfit_uuid[NFIT_DEV_DIMM]);
-	acpi_str_to_uuid(UUID_NFIT_DIMM_N_HPE1, nfit_uuid[NFIT_DEV_DIMM_N_HPE1]);
-	acpi_str_to_uuid(UUID_NFIT_DIMM_N_HPE2, nfit_uuid[NFIT_DEV_DIMM_N_HPE2]);
-	acpi_str_to_uuid(UUID_NFIT_DIMM_N_MSFT, nfit_uuid[NFIT_DEV_DIMM_N_MSFT]);
+	guid_parse(UUID_VOLATILE_MEMORY, &nfit_uuid[NFIT_SPA_VOLATILE]);
+	guid_parse(UUID_PERSISTENT_MEMORY, &nfit_uuid[NFIT_SPA_PM]);
+	guid_parse(UUID_CONTROL_REGION, &nfit_uuid[NFIT_SPA_DCR]);
+	guid_parse(UUID_DATA_REGION, &nfit_uuid[NFIT_SPA_BDW]);
+	guid_parse(UUID_VOLATILE_VIRTUAL_DISK, &nfit_uuid[NFIT_SPA_VDISK]);
+	guid_parse(UUID_VOLATILE_VIRTUAL_CD, &nfit_uuid[NFIT_SPA_VCD]);
+	guid_parse(UUID_PERSISTENT_VIRTUAL_DISK, &nfit_uuid[NFIT_SPA_PDISK]);
+	guid_parse(UUID_PERSISTENT_VIRTUAL_CD, &nfit_uuid[NFIT_SPA_PCD]);
+	guid_parse(UUID_NFIT_BUS, &nfit_uuid[NFIT_DEV_BUS]);
+	guid_parse(UUID_NFIT_DIMM, &nfit_uuid[NFIT_DEV_DIMM]);
+	guid_parse(UUID_NFIT_DIMM_N_HPE1, &nfit_uuid[NFIT_DEV_DIMM_N_HPE1]);
+	guid_parse(UUID_NFIT_DIMM_N_HPE2, &nfit_uuid[NFIT_DEV_DIMM_N_HPE2]);
+	guid_parse(UUID_NFIT_DIMM_N_MSFT, &nfit_uuid[NFIT_DEV_DIMM_N_MSFT]);
 
 	nfit_wq = create_singlethread_workqueue("nfit");
 	if (!nfit_wq)
diff --git a/drivers/acpi/nfit/nfit.h b/drivers/acpi/nfit/nfit.h
index 58fb7d68e04a..29bdd959517f 100644
--- a/drivers/acpi/nfit/nfit.h
+++ b/drivers/acpi/nfit/nfit.h
@@ -18,7 +18,6 @@
 #include <linux/libnvdimm.h>
 #include <linux/ndctl.h>
 #include <linux/types.h>
-#include <linux/uuid.h>
 #include <linux/acpi.h>
 #include <acpi/acuuid.h>
 
@@ -237,7 +236,7 @@ static inline struct acpi_nfit_desc *to_acpi_desc(
 	return container_of(nd_desc, struct acpi_nfit_desc, nd_desc);
 }
 
-const u8 *to_nfit_uuid(enum nfit_uuids id);
+const guid_t *to_nfit_uuid(enum nfit_uuids id);
 int acpi_nfit_init(struct acpi_nfit_desc *acpi_desc, void *nfit, acpi_size sz);
 void acpi_nfit_shutdown(void *data);
 void __acpi_nfit_notify(struct device *dev, acpi_handle handle, u32 event);
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 137e4a3d89c5..b0e1636ca5c3 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -39,6 +39,7 @@
 #include <linux/dynamic_debug.h>
 #include <linux/module.h>
 #include <linux/mutex.h>
+#include <linux/uuid.h>
 
 #include <acpi/acpi_bus.h>
 #include <acpi/acpi_drivers.h>
-- 
2.11.0

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

* [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
  2017-05-31 19:41 ` Andy Shevchenko
@ 2017-05-31 19:41   ` Andy Shevchenko
  -1 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-05-31 19:41 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx
  Cc: Andy Shevchenko

There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/acpi/apei/ghes.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index d0855c09f32f..084414a4c5b8 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -431,12 +431,13 @@ static void ghes_do_proc(struct ghes *ghes,
 {
 	int sev, sec_sev;
 	struct acpi_hest_generic_data *gdata;
+	guid_t *sec_type;
 
 	sev = ghes_severity(estatus->error_severity);
 	apei_estatus_for_each_section(estatus, gdata) {
+		sec_type = (guid_t *)gdata->section_type;
 		sec_sev = ghes_severity(gdata->error_severity);
-		if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
-				 CPER_SEC_PLATFORM_MEM)) {
+		if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
 			struct cper_sec_mem_err *mem_err;
 			mem_err = (struct cper_sec_mem_err *)(gdata+1);
 			ghes_edac_report_mem_error(ghes, sev, mem_err);
@@ -445,8 +446,7 @@ static void ghes_do_proc(struct ghes *ghes,
 			ghes_handle_memory_failure(gdata, sev);
 		}
 #ifdef CONFIG_ACPI_APEI_PCIEAER
-		else if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
-				      CPER_SEC_PCIE)) {
+		else if (!guid_equal(sec_type, &CPER_SEC_PCIE)) {
 			struct cper_sec_pcie *pcie_err;
 			pcie_err = (struct cper_sec_pcie *)(gdata+1);
 			if (sev == GHES_SEV_RECOVERABLE &&
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
@ 2017-05-31 19:41   ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-05-31 19:41 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx
  Cc: Andy Shevchenko

There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/acpi/apei/ghes.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index d0855c09f32f..084414a4c5b8 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -431,12 +431,13 @@ static void ghes_do_proc(struct ghes *ghes,
 {
 	int sev, sec_sev;
 	struct acpi_hest_generic_data *gdata;
+	guid_t *sec_type;
 
 	sev = ghes_severity(estatus->error_severity);
 	apei_estatus_for_each_section(estatus, gdata) {
+		sec_type = (guid_t *)gdata->section_type;
 		sec_sev = ghes_severity(gdata->error_severity);
-		if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
-				 CPER_SEC_PLATFORM_MEM)) {
+		if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
 			struct cper_sec_mem_err *mem_err;
 			mem_err = (struct cper_sec_mem_err *)(gdata+1);
 			ghes_edac_report_mem_error(ghes, sev, mem_err);
@@ -445,8 +446,7 @@ static void ghes_do_proc(struct ghes *ghes,
 			ghes_handle_memory_failure(gdata, sev);
 		}
 #ifdef CONFIG_ACPI_APEI_PCIEAER
-		else if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
-				      CPER_SEC_PCIE)) {
+		else if (!guid_equal(sec_type, &CPER_SEC_PCIE)) {
 			struct cper_sec_pcie *pcie_err;
 			pcie_err = (struct cper_sec_pcie *)(gdata+1);
 			if (sev == GHES_SEV_RECOVERABLE &&
-- 
2.11.0

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

* [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
  2017-05-31 19:41 ` Andy Shevchenko
                   ` (2 preceding siblings ...)
  (?)
@ 2017-05-31 19:41 ` Andy Shevchenko
  2017-05-31 22:42   ` Rafael J. Wysocki
                     ` (3 more replies)
  -1 siblings, 4 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-05-31 19:41 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx
  Cc: Andy Shevchenko

There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

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

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 784bda663d16..042cd16265b3 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -225,13 +225,13 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
 	struct acpi_object_list input;
 	union acpi_object in_params[4];
 	union acpi_object *out_obj;
-	u8 uuid[16];
+	guid_t guid;
 	u32 errors;
 	struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
 
 	if (!context)
 		return AE_ERROR;
-	if (ACPI_FAILURE(acpi_str_to_uuid(context->uuid_str, uuid)))
+	if (guid_parse(context->uuid_str, &guid))
 		return AE_ERROR;
 	context->ret.length = ACPI_ALLOCATE_BUFFER;
 	context->ret.pointer = NULL;
@@ -241,7 +241,7 @@ acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
 	input.pointer = in_params;
 	in_params[0].type 		= ACPI_TYPE_BUFFER;
 	in_params[0].buffer.length 	= 16;
-	in_params[0].buffer.pointer	= uuid;
+	in_params[0].buffer.pointer	= (u8 *)&guid;
 	in_params[1].type 		= ACPI_TYPE_INTEGER;
 	in_params[1].integer.value 	= context->rev;
 	in_params[2].type 		= ACPI_TYPE_INTEGER;
-- 
2.11.0


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

* [PATCH v2 4/5] ACPI / extlog: Switch to use new generic UUID API
  2017-05-31 19:41 ` Andy Shevchenko
@ 2017-05-31 19:41   ` Andy Shevchenko
  -1 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-05-31 19:41 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx
  Cc: Andy Shevchenko

There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/acpi/acpi_extlog.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index 502ea4dc2080..6b101d595ccc 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -141,9 +141,9 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
 	int	cpu = mce->extcpu;
 	struct acpi_hest_generic_status *estatus, *tmp;
 	struct acpi_hest_generic_data *gdata;
-	const uuid_le *fru_id = &NULL_UUID_LE;
+	const guid_t *fru_id = &guid_null;
 	char *fru_text = "";
-	uuid_le *sec_type;
+	guid_t *sec_type;
 	static u32 err_seq;
 
 	estatus = extlog_elog_entry_check(cpu, bank);
@@ -165,11 +165,11 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
 	err_seq++;
 	gdata = (struct acpi_hest_generic_data *)(tmp + 1);
 	if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID)
-		fru_id = (uuid_le *)gdata->fru_id;
+		fru_id = (guid_t *)gdata->fru_id;
 	if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT)
 		fru_text = gdata->fru_text;
-	sec_type = (uuid_le *)gdata->section_type;
-	if (!uuid_le_cmp(*sec_type, CPER_SEC_PLATFORM_MEM)) {
+	sec_type = (guid_t *)gdata->section_type;
+	if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
 		struct cper_sec_mem_err *mem = (void *)(gdata + 1);
 		if (gdata->error_data_length >= sizeof(*mem))
 			trace_extlog_mem_event(mem, err_seq, fru_id, fru_text,
@@ -182,17 +182,17 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
 
 static bool __init extlog_get_l1addr(void)
 {
-	u8 uuid[16];
+	guid_t guid;
 	acpi_handle handle;
 	union acpi_object *obj;
 
-	acpi_str_to_uuid(extlog_dsm_uuid, uuid);
-
+	if (guid_parse(extlog_dsm_uuid, &guid))
+		return false;
 	if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
 		return false;
-	if (!acpi_check_dsm(handle, uuid, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR))
+	if (!acpi_check_dsm(handle, guid.b, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR))
 		return false;
-	obj = acpi_evaluate_dsm_typed(handle, uuid, EXTLOG_DSM_REV,
+	obj = acpi_evaluate_dsm_typed(handle, guid.b, EXTLOG_DSM_REV,
 				      EXTLOG_FN_ADDR, NULL, ACPI_TYPE_INTEGER);
 	if (!obj) {
 		return false;
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [PATCH v2 4/5] ACPI / extlog: Switch to use new generic UUID API
@ 2017-05-31 19:41   ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-05-31 19:41 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx
  Cc: Andy Shevchenko

There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

Cc: Borislav Petkov <bp@suse.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/acpi/acpi_extlog.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index 502ea4dc2080..6b101d595ccc 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -141,9 +141,9 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
 	int	cpu = mce->extcpu;
 	struct acpi_hest_generic_status *estatus, *tmp;
 	struct acpi_hest_generic_data *gdata;
-	const uuid_le *fru_id = &NULL_UUID_LE;
+	const guid_t *fru_id = &guid_null;
 	char *fru_text = "";
-	uuid_le *sec_type;
+	guid_t *sec_type;
 	static u32 err_seq;
 
 	estatus = extlog_elog_entry_check(cpu, bank);
@@ -165,11 +165,11 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
 	err_seq++;
 	gdata = (struct acpi_hest_generic_data *)(tmp + 1);
 	if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID)
-		fru_id = (uuid_le *)gdata->fru_id;
+		fru_id = (guid_t *)gdata->fru_id;
 	if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT)
 		fru_text = gdata->fru_text;
-	sec_type = (uuid_le *)gdata->section_type;
-	if (!uuid_le_cmp(*sec_type, CPER_SEC_PLATFORM_MEM)) {
+	sec_type = (guid_t *)gdata->section_type;
+	if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
 		struct cper_sec_mem_err *mem = (void *)(gdata + 1);
 		if (gdata->error_data_length >= sizeof(*mem))
 			trace_extlog_mem_event(mem, err_seq, fru_id, fru_text,
@@ -182,17 +182,17 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
 
 static bool __init extlog_get_l1addr(void)
 {
-	u8 uuid[16];
+	guid_t guid;
 	acpi_handle handle;
 	union acpi_object *obj;
 
-	acpi_str_to_uuid(extlog_dsm_uuid, uuid);
-
+	if (guid_parse(extlog_dsm_uuid, &guid))
+		return false;
 	if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
 		return false;
-	if (!acpi_check_dsm(handle, uuid, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR))
+	if (!acpi_check_dsm(handle, guid.b, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR))
 		return false;
-	obj = acpi_evaluate_dsm_typed(handle, uuid, EXTLOG_DSM_REV,
+	obj = acpi_evaluate_dsm_typed(handle, guid.b, EXTLOG_DSM_REV,
 				      EXTLOG_FN_ADDR, NULL, ACPI_TYPE_INTEGER);
 	if (!obj) {
 		return false;
-- 
2.11.0

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

* [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
  2017-05-31 19:41 ` Andy Shevchenko
                   ` (4 preceding siblings ...)
  (?)
@ 2017-05-31 19:41 ` Andy Shevchenko
  2017-05-31 20:21   ` Mark Brown
                     ` (6 more replies)
  -1 siblings, 7 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-05-31 19:41 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx
  Cc: Andy Shevchenko, Amir Goldstein, Jarkko Sakkinen, Ben Skeggs,
	Adrian Hunter, Yisen Zhuang, Liam Girdwood, Mark Brown

acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
bytes. Instead we convert them to use guid_t type. At the same time we
convert current users.

acpi_str_to_uuid() becomes useless after the conversion and it's safe to
get rid of it.

Cc: Borislav Petkov <bp@suse.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Amir Goldstein <amir73il@gmail.com>
Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Acked-by: Jani Nikula <jani.nikula@intel.com>
Cc: Ben Skeggs <bskeggs@redhat.com>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Joerg Roedel <jroedel@suse.de>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/acpi/acpi_extlog.c                         |  4 ++--
 drivers/acpi/bus.c                                 | 23 ----------------------
 drivers/acpi/nfit/core.c                           |  6 +++---
 drivers/acpi/utils.c                               | 16 +++++++--------
 drivers/char/tpm/tpm_crb.c                         |  9 ++++-----
 drivers/char/tpm/tpm_ppi.c                         | 20 ++++++++-----------
 drivers/gpu/drm/i915/intel_acpi.c                  | 14 +++++--------
 drivers/gpu/drm/nouveau/nouveau_acpi.c             | 20 +++++++++----------
 drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c     |  9 ++++-----
 drivers/hid/i2c-hid/i2c-hid.c                      |  9 ++++-----
 drivers/iommu/dmar.c                               | 11 +++++------
 drivers/mmc/host/sdhci-pci-core.c                  |  9 ++++-----
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 15 +++++++-------
 drivers/pci/pci-acpi.c                             | 13 ++++++------
 drivers/pci/pci-label.c                            |  4 ++--
 drivers/usb/dwc3/dwc3-pci.c                        | 10 +++++-----
 drivers/usb/host/xhci-pci.c                        |  9 ++++-----
 drivers/usb/misc/ucsi.c                            |  6 +++---
 drivers/usb/typec/typec_wcove.c                    |  8 ++++----
 include/acpi/acpi_bus.h                            | 11 ++++++-----
 include/linux/acpi.h                               |  3 +--
 include/linux/pci-acpi.h                           |  2 +-
 sound/soc/intel/skylake/skl-nhlt.c                 |  7 ++++---
 tools/testing/nvdimm/test/iomap.c                  |  6 +++---
 tools/testing/nvdimm/test/nfit.c                   |  2 +-
 25 files changed, 103 insertions(+), 143 deletions(-)

diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index 6b101d595ccc..c9c1d2af9a13 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -190,9 +190,9 @@ static bool __init extlog_get_l1addr(void)
 		return false;
 	if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
 		return false;
-	if (!acpi_check_dsm(handle, guid.b, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR))
+	if (!acpi_check_dsm(handle, &guid, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR))
 		return false;
-	obj = acpi_evaluate_dsm_typed(handle, guid.b, EXTLOG_DSM_REV,
+	obj = acpi_evaluate_dsm_typed(handle, &guid, EXTLOG_DSM_REV,
 				      EXTLOG_FN_ADDR, NULL, ACPI_TYPE_INTEGER);
 	if (!obj) {
 		return false;
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 042cd16265b3..5a6fbe0fcaf2 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -196,29 +196,6 @@ static void acpi_print_osc_error(acpi_handle handle,
 	pr_debug("\n");
 }
 
-acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
-{
-	int i;
-	static int opc_map_to_uuid[16] = {6, 4, 2, 0, 11, 9, 16, 14, 19, 21,
-		24, 26, 28, 30, 32, 34};
-
-	if (strlen(str) != 36)
-		return AE_BAD_PARAMETER;
-	for (i = 0; i < 36; i++) {
-		if (i == 8 || i == 13 || i == 18 || i == 23) {
-			if (str[i] != '-')
-				return AE_BAD_PARAMETER;
-		} else if (!isxdigit(str[i]))
-			return AE_BAD_PARAMETER;
-	}
-	for (i = 0; i < 16; i++) {
-		uuid[i] = hex_to_bin(str[opc_map_to_uuid[i]]) << 4;
-		uuid[i] |= hex_to_bin(str[opc_map_to_uuid[i] + 1]);
-	}
-	return AE_OK;
-}
-EXPORT_SYMBOL_GPL(acpi_str_to_uuid);
-
 acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
 {
 	acpi_status status;
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index 50753582a0b1..56a5b2ca927a 100644
--- a/drivers/acpi/nfit/core.c
+++ b/drivers/acpi/nfit/core.c
@@ -289,7 +289,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
 			in_buf.buffer.pointer,
 			min_t(u32, 256, in_buf.buffer.length), true);
 
-	out_obj = acpi_evaluate_dsm(handle, guid.b, 1, func, &in_obj);
+	out_obj = acpi_evaluate_dsm(handle, guid, 1, func, &in_obj);
 	if (!out_obj) {
 		dev_dbg(dev, "%s:%s _DSM failed cmd: %s\n", __func__, dimm_name,
 				cmd_name);
@@ -1476,7 +1476,7 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
 
 	guid = to_nfit_uuid(nfit_mem->family);
 	for_each_set_bit(i, &dsm_mask, BITS_PER_LONG)
-		if (acpi_check_dsm(adev_dimm->handle, guid.b, 1, 1ULL << i))
+		if (acpi_check_dsm(adev_dimm->handle, guid, 1, 1ULL << i))
 			set_bit(i, &nfit_mem->dsm_mask);
 
 	return 0;
@@ -1621,7 +1621,7 @@ static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc)
 		return;
 
 	for (i = ND_CMD_ARS_CAP; i <= ND_CMD_CLEAR_ERROR; i++)
-		if (acpi_check_dsm(adev->handle, guid.b, 1, 1ULL << i))
+		if (acpi_check_dsm(adev->handle, guid, 1, 1ULL << i))
 			set_bit(i, &nd_desc->cmd_mask);
 }
 
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 27d0dcfcf47d..52dec7a20d3f 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -613,19 +613,19 @@ acpi_status acpi_evaluate_lck(acpi_handle handle, int lock)
 /**
  * acpi_evaluate_dsm - evaluate device's _DSM method
  * @handle: ACPI device handle
- * @uuid: UUID of requested functions, should be 16 bytes
+ * @guid: GUID of requested functions, should be 16 bytes
  * @rev: revision number of requested function
  * @func: requested function number
  * @argv4: the function specific parameter
  *
- * Evaluate device's _DSM method with specified UUID, revision id and
+ * Evaluate device's _DSM method with specified GUID, revision id and
  * function number. Caller needs to free the returned object.
  *
  * Though ACPI defines the fourth parameter for _DSM should be a package,
  * some old BIOSes do expect a buffer or an integer etc.
  */
 union acpi_object *
-acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
+acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func,
 		  union acpi_object *argv4)
 {
 	acpi_status ret;
@@ -638,7 +638,7 @@ acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
 
 	params[0].type = ACPI_TYPE_BUFFER;
 	params[0].buffer.length = 16;
-	params[0].buffer.pointer = (char *)uuid;
+	params[0].buffer.pointer = (u8 *)&guid;
 	params[1].type = ACPI_TYPE_INTEGER;
 	params[1].integer.value = rev;
 	params[2].type = ACPI_TYPE_INTEGER;
@@ -666,7 +666,7 @@ EXPORT_SYMBOL(acpi_evaluate_dsm);
 /**
  * acpi_check_dsm - check if _DSM method supports requested functions.
  * @handle: ACPI device handle
- * @uuid: UUID of requested functions, should be 16 bytes at least
+ * @guid: GUID of requested functions, should be 16 bytes at least
  * @rev: revision number of requested functions
  * @funcs: bitmap of requested functions
  *
@@ -674,7 +674,7 @@ EXPORT_SYMBOL(acpi_evaluate_dsm);
  * functions. Currently only support 64 functions at maximum, should be
  * enough for now.
  */
-bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
+bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs)
 {
 	int i;
 	u64 mask = 0;
@@ -683,7 +683,7 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
 	if (funcs == 0)
 		return false;
 
-	obj = acpi_evaluate_dsm(handle, uuid, rev, 0, NULL);
+	obj = acpi_evaluate_dsm(handle, guid, rev, 0, NULL);
 	if (!obj)
 		return false;
 
@@ -697,7 +697,7 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
 
 	/*
 	 * Bit 0 indicates whether there's support for any functions other than
-	 * function 0 for the specified UUID and revision.
+	 * function 0 for the specified GUID and revision.
 	 */
 	if ((mask & 0x1) && (mask & funcs) == funcs)
 		return true;
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index b917b9d5f710..245d82f0bdbc 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_crb.c
@@ -27,10 +27,9 @@
 
 #define ACPI_SIG_TPM2 "TPM2"
 
-static const u8 CRB_ACPI_START_UUID[] = {
-	/* 0000 */ 0xAB, 0x6C, 0xBF, 0x6B, 0x63, 0x54, 0x14, 0x47,
-	/* 0008 */ 0xB7, 0xCD, 0xF0, 0x20, 0x3C, 0x03, 0x68, 0xD4
-};
+static const guid_t crb_acpi_start_guid =
+	GUID(0x6BBF6CAB, 0x5463, 0x4714,
+	     0xB7, 0xCD, 0xF0, 0x20, 0x3C, 0x03, 0x68, 0xD4);
 
 enum crb_defaults {
 	CRB_ACPI_START_REVISION_ID = 1,
@@ -266,7 +265,7 @@ static int crb_do_acpi_start(struct tpm_chip *chip)
 	int rc;
 
 	obj = acpi_evaluate_dsm(chip->acpi_dev_handle,
-				CRB_ACPI_START_UUID,
+				&crb_acpi_start_guid,
 				CRB_ACPI_START_REVISION_ID,
 				CRB_ACPI_START_INDEX,
 				NULL);
diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c
index 692a2c6ae036..c3b70431c06b 100644
--- a/drivers/char/tpm/tpm_ppi.c
+++ b/drivers/char/tpm/tpm_ppi.c
@@ -32,20 +32,16 @@
 #define PPI_VS_REQ_START	128
 #define PPI_VS_REQ_END		255
 
-static const u8 tpm_ppi_uuid[] = {
-	0xA6, 0xFA, 0xDD, 0x3D,
-	0x1B, 0x36,
-	0xB4, 0x4E,
-	0xA4, 0x24,
-	0x8D, 0x10, 0x08, 0x9D, 0x16, 0x53
-};
+static const guid_t tpm_ppi_guid =
+	GUID(0x3DDDFAA6, 0x361B, 0x4EB4,
+	     0xA4, 0x24, 0x8D, 0x10, 0x08, 0x9D, 0x16, 0x53);
 
 static inline union acpi_object *
 tpm_eval_dsm(acpi_handle ppi_handle, int func, acpi_object_type type,
 	     union acpi_object *argv4)
 {
 	BUG_ON(!ppi_handle);
-	return acpi_evaluate_dsm_typed(ppi_handle, tpm_ppi_uuid,
+	return acpi_evaluate_dsm_typed(ppi_handle, &tpm_ppi_guid,
 				       TPM_PPI_REVISION_ID,
 				       func, argv4, type);
 }
@@ -107,7 +103,7 @@ static ssize_t tpm_store_ppi_request(struct device *dev,
 	 * is updated with function index from SUBREQ to SUBREQ2 since PPI
 	 * version 1.1
 	 */
-	if (acpi_check_dsm(chip->acpi_dev_handle, tpm_ppi_uuid,
+	if (acpi_check_dsm(chip->acpi_dev_handle, &tpm_ppi_guid,
 			   TPM_PPI_REVISION_ID, 1 << TPM_PPI_FN_SUBREQ2))
 		func = TPM_PPI_FN_SUBREQ2;
 
@@ -268,7 +264,7 @@ static ssize_t show_ppi_operations(acpi_handle dev_handle, char *buf, u32 start,
 		"User not required",
 	};
 
-	if (!acpi_check_dsm(dev_handle, tpm_ppi_uuid, TPM_PPI_REVISION_ID,
+	if (!acpi_check_dsm(dev_handle, &tpm_ppi_guid, TPM_PPI_REVISION_ID,
 			    1 << TPM_PPI_FN_GETOPR))
 		return -EPERM;
 
@@ -341,12 +337,12 @@ void tpm_add_ppi(struct tpm_chip *chip)
 	if (!chip->acpi_dev_handle)
 		return;
 
-	if (!acpi_check_dsm(chip->acpi_dev_handle, tpm_ppi_uuid,
+	if (!acpi_check_dsm(chip->acpi_dev_handle, &tpm_ppi_guid,
 			    TPM_PPI_REVISION_ID, 1 << TPM_PPI_FN_VERSION))
 		return;
 
 	/* Cache PPI version string. */
-	obj = acpi_evaluate_dsm_typed(chip->acpi_dev_handle, tpm_ppi_uuid,
+	obj = acpi_evaluate_dsm_typed(chip->acpi_dev_handle, &tpm_ppi_guid,
 				      TPM_PPI_REVISION_ID, TPM_PPI_FN_VERSION,
 				      NULL, ACPI_TYPE_STRING);
 	if (obj) {
diff --git a/drivers/gpu/drm/i915/intel_acpi.c b/drivers/gpu/drm/i915/intel_acpi.c
index eb638a1e69d2..c888ea55b61f 100644
--- a/drivers/gpu/drm/i915/intel_acpi.c
+++ b/drivers/gpu/drm/i915/intel_acpi.c
@@ -15,13 +15,9 @@ static struct intel_dsm_priv {
 	acpi_handle dhandle;
 } intel_dsm_priv;
 
-static const u8 intel_dsm_guid[] = {
-	0xd3, 0x73, 0xd8, 0x7e,
-	0xd0, 0xc2,
-	0x4f, 0x4e,
-	0xa8, 0x54,
-	0x0f, 0x13, 0x17, 0xb0, 0x1c, 0x2c
-};
+static const guid_t intel_dsm_guid =
+	GUID(0x7ed873d3, 0xc2d0, 0x4e4f,
+	     0xa8, 0x54, 0x0f, 0x13, 0x17, 0xb0, 0x1c, 0x2c);
 
 static char *intel_dsm_port_name(u8 id)
 {
@@ -80,7 +76,7 @@ static void intel_dsm_platform_mux_info(void)
 	int i;
 	union acpi_object *pkg, *connector_count;
 
-	pkg = acpi_evaluate_dsm_typed(intel_dsm_priv.dhandle, intel_dsm_guid,
+	pkg = acpi_evaluate_dsm_typed(intel_dsm_priv.dhandle, &intel_dsm_guid,
 			INTEL_DSM_REVISION_ID, INTEL_DSM_FN_PLATFORM_MUX_INFO,
 			NULL, ACPI_TYPE_PACKAGE);
 	if (!pkg) {
@@ -118,7 +114,7 @@ static bool intel_dsm_pci_probe(struct pci_dev *pdev)
 	if (!dhandle)
 		return false;
 
-	if (!acpi_check_dsm(dhandle, intel_dsm_guid, INTEL_DSM_REVISION_ID,
+	if (!acpi_check_dsm(dhandle, &intel_dsm_guid, INTEL_DSM_REVISION_ID,
 			    1 << INTEL_DSM_FN_PLATFORM_MUX_INFO)) {
 		DRM_DEBUG_KMS("no _DSM method for intel device\n");
 		return false;
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
index 39468c218027..0c04ab229cdb 100644
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -60,15 +60,13 @@ bool nouveau_is_v1_dsm(void) {
 }
 
 #ifdef CONFIG_VGA_SWITCHEROO
-static const char nouveau_dsm_muid[] = {
-	0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D,
-	0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4,
-};
+static const guid_t nouveau_dsm_muid =
+	GUID(0x9D95A0A0, 0x0060, 0x4D48,
+	     0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4);
 
-static const char nouveau_op_dsm_muid[] = {
-	0xF8, 0xD8, 0x86, 0xA4, 0xDA, 0x0B, 0x1B, 0x47,
-	0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0,
-};
+static const guid_t nouveau_op_dsm_muid =
+	GUID(0xA486D8F8, 0x0BDA, 0x471B,
+	     0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0);
 
 static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result)
 {
@@ -86,7 +84,7 @@ static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *
 		args_buff[i] = (arg >> i * 8) & 0xFF;
 
 	*result = 0;
-	obj = acpi_evaluate_dsm_typed(handle, nouveau_op_dsm_muid, 0x00000100,
+	obj = acpi_evaluate_dsm_typed(handle, &nouveau_op_dsm_muid, 0x00000100,
 				      func, &argv4, ACPI_TYPE_BUFFER);
 	if (!obj) {
 		acpi_handle_info(handle, "failed to evaluate _DSM\n");
@@ -138,7 +136,7 @@ static int nouveau_dsm(acpi_handle handle, int func, int arg)
 		.integer.value = arg,
 	};
 
-	obj = acpi_evaluate_dsm_typed(handle, nouveau_dsm_muid, 0x00000102,
+	obj = acpi_evaluate_dsm_typed(handle, &nouveau_dsm_muid, 0x00000102,
 				      func, &argv4, ACPI_TYPE_INTEGER);
 	if (!obj) {
 		acpi_handle_info(handle, "failed to evaluate _DSM\n");
@@ -259,7 +257,7 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out
 	if (!acpi_has_method(dhandle, "_DSM"))
 		return;
 
-	supports_mux = acpi_check_dsm(dhandle, nouveau_dsm_muid, 0x00000102,
+	supports_mux = acpi_check_dsm(dhandle, &nouveau_dsm_muid, 0x00000102,
 				      1 << NOUVEAU_DSM_POWER);
 	optimus_funcs = nouveau_dsm_get_optimus_functions(dhandle);
 
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
index e3e2f5e83815..d65b2804e905 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
@@ -81,10 +81,9 @@ mxm_shadow_dsm(struct nvkm_mxm *mxm, u8 version)
 {
 	struct nvkm_subdev *subdev = &mxm->subdev;
 	struct nvkm_device *device = subdev->device;
-	static char muid[] = {
-		0x00, 0xA4, 0x04, 0x40, 0x7D, 0x91, 0xF2, 0x4C,
-		0xB8, 0x9C, 0x79, 0xB6, 0x2F, 0xD5, 0x56, 0x65
-	};
+	static guid_t muid =
+		GUID(0x4004A400, 0x917D, 0x4CF2,
+		     0xB8, 0x9C, 0x79, 0xB6, 0x2F, 0xD5, 0x56, 0x65);
 	u32 mxms_args[] = { 0x00000000 };
 	union acpi_object argv4 = {
 		.buffer.type = ACPI_TYPE_BUFFER,
@@ -105,7 +104,7 @@ mxm_shadow_dsm(struct nvkm_mxm *mxm, u8 version)
 	 * unless you pass in exactly the version it supports..
 	 */
 	rev = (version & 0xf0) << 4 | (version & 0x0f);
-	obj = acpi_evaluate_dsm(handle, muid, rev, 0x00000010, &argv4);
+	obj = acpi_evaluate_dsm(handle, &muid, rev, 0x00000010, &argv4);
 	if (!obj) {
 		nvkm_debug(subdev, "DSM MXMS failed\n");
 		return false;
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index 8daa8ce64ebb..d10ff48e613a 100644
--- a/drivers/hid/i2c-hid/i2c-hid.c
+++ b/drivers/hid/i2c-hid/i2c-hid.c
@@ -872,10 +872,9 @@ static int i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid)
 static int i2c_hid_acpi_pdata(struct i2c_client *client,
 		struct i2c_hid_platform_data *pdata)
 {
-	static u8 i2c_hid_guid[] = {
-		0xF7, 0xF6, 0xDF, 0x3C, 0x67, 0x42, 0x55, 0x45,
-		0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE,
-	};
+	static guid_t i2c_hid_guid =
+		GUID(0x3CDFF6F7, 0x4267, 0x4555,
+		     0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE);
 	union acpi_object *obj;
 	struct acpi_device *adev;
 	acpi_handle handle;
@@ -884,7 +883,7 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
 	if (!handle || acpi_bus_get_device(handle, &adev))
 		return -ENODEV;
 
-	obj = acpi_evaluate_dsm_typed(handle, i2c_hid_guid, 1, 1, NULL,
+	obj = acpi_evaluate_dsm_typed(handle, &i2c_hid_guid, 1, 1, NULL,
 				      ACPI_TYPE_INTEGER);
 	if (!obj) {
 		dev_err(&client->dev, "device _DSM execution failed\n");
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index cbf7763d8091..1b8af4fad78b 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -1808,10 +1808,9 @@ IOMMU_INIT_POST(detect_intel_iommu);
  * for Directed-IO Architecture Specifiction, Rev 2.2, Section 8.8
  * "Remapping Hardware Unit Hot Plug".
  */
-static u8 dmar_hp_uuid[] = {
-	/* 0000 */    0xA6, 0xA3, 0xC1, 0xD8, 0x9B, 0xBE, 0x9B, 0x4C,
-	/* 0008 */    0x91, 0xBF, 0xC3, 0xCB, 0x81, 0xFC, 0x5D, 0xAF
-};
+static guid_t dmar_hp_guid =
+	GUID(0xD8C1A3A6, 0xBE9B, 0x4C9B,
+	     0x91, 0xBF, 0xC3, 0xCB, 0x81, 0xFC, 0x5D, 0xAF);
 
 /*
  * Currently there's only one revision and BIOS will not check the revision id,
@@ -1824,7 +1823,7 @@ static u8 dmar_hp_uuid[] = {
 
 static inline bool dmar_detect_dsm(acpi_handle handle, int func)
 {
-	return acpi_check_dsm(handle, dmar_hp_uuid, DMAR_DSM_REV_ID, 1 << func);
+	return acpi_check_dsm(handle, &dmar_hp_guid, DMAR_DSM_REV_ID, 1 << func);
 }
 
 static int dmar_walk_dsm_resource(acpi_handle handle, int func,
@@ -1843,7 +1842,7 @@ static int dmar_walk_dsm_resource(acpi_handle handle, int func,
 	if (!dmar_detect_dsm(handle, func))
 		return 0;
 
-	obj = acpi_evaluate_dsm_typed(handle, dmar_hp_uuid, DMAR_DSM_REV_ID,
+	obj = acpi_evaluate_dsm_typed(handle, &dmar_hp_guid, DMAR_DSM_REV_ID,
 				      func, NULL, ACPI_TYPE_BUFFER);
 	if (!obj)
 		return -ENODEV;
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 92fc3f7c538d..c942ec102c6a 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -404,10 +404,9 @@ struct intel_host {
 	bool	d3_retune;
 };
 
-const u8 intel_dsm_uuid[] = {
-	0xA5, 0x3E, 0xC1, 0xF6, 0xCD, 0x65, 0x1F, 0x46,
-	0xAB, 0x7A, 0x29, 0xF7, 0xE8, 0xD5, 0xBD, 0x61,
-};
+const guid_t intel_dsm_guid =
+	GUID(0xF6C13EA5, 0x65CD, 0x461F,
+	     0xAB, 0x7A, 0x29, 0xF7, 0xE8, 0xD5, 0xBD, 0x61);
 
 static int __intel_dsm(struct intel_host *intel_host, struct device *dev,
 		       unsigned int fn, u32 *result)
@@ -416,7 +415,7 @@ static int __intel_dsm(struct intel_host *intel_host, struct device *dev,
 	int err = 0;
 	size_t len;
 
-	obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), intel_dsm_uuid, 0, fn, NULL);
+	obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), &intel_dsm_guid, 0, fn, NULL);
 	if (!obj)
 		return -EOPNOTSUPP;
 
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
index e13aa064a8e9..fb51877c4de2 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
@@ -29,10 +29,9 @@ enum _dsm_rst_type {
 	HNS_ROCE_RESET_FUNC     = 0x7,
 };
 
-const u8 hns_dsaf_acpi_dsm_uuid[] = {
-	0x1A, 0xAA, 0x85, 0x1A, 0x93, 0xE2, 0x5E, 0x41,
-	0x8E, 0x28, 0x8D, 0x69, 0x0A, 0x0F, 0x82, 0x0A
-};
+const guid_t hns_dsaf_acpi_dsm_guid =
+	GUID(0x1A85AA1A, 0xE293, 0x415E,
+	     0x8E, 0x28, 0x8D, 0x69, 0x0A, 0x0F, 0x82, 0x0A);
 
 static void dsaf_write_sub(struct dsaf_device *dsaf_dev, u32 reg, u32 val)
 {
@@ -151,7 +150,7 @@ static void hns_dsaf_acpi_srst_by_port(struct dsaf_device *dsaf_dev, u8 op_type,
 	argv4.package.elements = obj_args;
 
 	obj = acpi_evaluate_dsm(ACPI_HANDLE(dsaf_dev->dev),
-				hns_dsaf_acpi_dsm_uuid, 0, op_type, &argv4);
+				&hns_dsaf_acpi_dsm_guid, 0, op_type, &argv4);
 	if (!obj) {
 		dev_warn(dsaf_dev->dev, "reset port_type%d port%d fail!",
 			 port_type, port);
@@ -434,7 +433,7 @@ static phy_interface_t hns_mac_get_phy_if_acpi(struct hns_mac_cb *mac_cb)
 	argv4.package.elements = &obj_args,
 
 	obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev),
-				hns_dsaf_acpi_dsm_uuid, 0,
+				&hns_dsaf_acpi_dsm_guid, 0,
 				HNS_OP_GET_PORT_TYPE_FUNC, &argv4);
 
 	if (!obj || obj->type != ACPI_TYPE_INTEGER)
@@ -474,7 +473,7 @@ int hns_mac_get_sfp_prsnt_acpi(struct hns_mac_cb *mac_cb, int *sfp_prsnt)
 	argv4.package.elements = &obj_args,
 
 	obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev),
-				hns_dsaf_acpi_dsm_uuid, 0,
+				&hns_dsaf_acpi_dsm_guid, 0,
 				HNS_OP_GET_SFP_STAT_FUNC, &argv4);
 
 	if (!obj || obj->type != ACPI_TYPE_INTEGER)
@@ -565,7 +564,7 @@ hns_mac_config_sds_loopback_acpi(struct hns_mac_cb *mac_cb, bool en)
 	argv4.package.elements = obj_args;
 
 	obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dsaf_dev->dev),
-				hns_dsaf_acpi_dsm_uuid, 0,
+				&hns_dsaf_acpi_dsm_guid, 0,
 				HNS_OP_SERDES_LP_FUNC, &argv4);
 	if (!obj) {
 		dev_warn(mac_cb->dsaf_dev->dev, "set port%d serdes lp fail!",
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 001860361434..0fafb71dc8ce 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -21,13 +21,12 @@
 #include "pci.h"
 
 /*
- * The UUID is defined in the PCI Firmware Specification available here:
+ * The GUID is defined in the PCI Firmware Specification available here:
  * https://www.pcisig.com/members/downloads/pcifw_r3_1_13Dec10.pdf
  */
-const u8 pci_acpi_dsm_uuid[] = {
-	0xd0, 0x37, 0xc9, 0xe5, 0x53, 0x35, 0x7a, 0x4d,
-	0x91, 0x17, 0xea, 0x4d, 0x19, 0xc3, 0x43, 0x4d
-};
+const guid_t pci_acpi_dsm_guid =
+	GUID(0xe5c937d0, 0x3553, 0x4d7a,
+	     0x91, 0x17, 0xea, 0x4d, 0x19, 0xc3, 0x43, 0x4d);
 
 #if defined(CONFIG_PCI_QUIRKS) && defined(CONFIG_ARM64)
 static int acpi_get_rc_addr(struct acpi_device *adev, struct resource *res)
@@ -680,7 +679,7 @@ void acpi_pci_add_bus(struct pci_bus *bus)
 	if (!pci_is_root_bus(bus))
 		return;
 
-	obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), pci_acpi_dsm_uuid, 3,
+	obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 3,
 				RESET_DELAY_DSM, NULL);
 	if (!obj)
 		return;
@@ -745,7 +744,7 @@ static void pci_acpi_optimize_delay(struct pci_dev *pdev,
 	if (bridge->ignore_reset_delay)
 		pdev->d3cold_delay = 0;
 
-	obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 3,
+	obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 3,
 				FUNCTION_DELAY_DSM, NULL);
 	if (!obj)
 		return;
diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c
index 51357377efbc..2d8db3ead6e8 100644
--- a/drivers/pci/pci-label.c
+++ b/drivers/pci/pci-label.c
@@ -172,7 +172,7 @@ static int dsm_get_label(struct device *dev, char *buf,
 	if (!handle)
 		return -1;
 
-	obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 0x2,
+	obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2,
 				DEVICE_LABEL_DSM, NULL);
 	if (!obj)
 		return -1;
@@ -212,7 +212,7 @@ static bool device_has_dsm(struct device *dev)
 	if (!handle)
 		return false;
 
-	return !!acpi_check_dsm(handle, pci_acpi_dsm_uuid, 0x2,
+	return !!acpi_check_dsm(handle, &pci_acpi_dsm_guid, 0x2,
 				1 << DEVICE_LABEL_DSM);
 }
 
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 84a2cebfc712..fe851544d7fb 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -42,7 +42,7 @@
 #define PCI_DEVICE_ID_INTEL_CNPLP		0x9dee
 #define PCI_DEVICE_ID_INTEL_CNPH		0xa36e
 
-#define PCI_INTEL_BXT_DSM_UUID		"732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511"
+#define PCI_INTEL_BXT_DSM_GUID		"732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511"
 #define PCI_INTEL_BXT_FUNC_PMU_PWR	4
 #define PCI_INTEL_BXT_STATE_D0		0
 #define PCI_INTEL_BXT_STATE_D3		3
@@ -51,14 +51,14 @@
  * struct dwc3_pci - Driver private structure
  * @dwc3: child dwc3 platform_device
  * @pci: our link to PCI bus
- * @uuid: _DSM UUID
+ * @guid: _DSM GUID
  * @has_dsm_for_pm: true for devices which need to run _DSM on runtime PM
  */
 struct dwc3_pci {
 	struct platform_device *dwc3;
 	struct pci_dev *pci;
 
-	u8 uuid[16];
+	guid_t guid;
 
 	unsigned int has_dsm_for_pm:1;
 };
@@ -120,7 +120,7 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)
 
 		if (pdev->device == PCI_DEVICE_ID_INTEL_BXT ||
 				pdev->device == PCI_DEVICE_ID_INTEL_BXT_M) {
-			acpi_str_to_uuid(PCI_INTEL_BXT_DSM_UUID, dwc->uuid);
+			guid_parse(PCI_INTEL_BXT_DSM_GUID, &dwc->guid);
 			dwc->has_dsm_for_pm = true;
 		}
 
@@ -292,7 +292,7 @@ static int dwc3_pci_dsm(struct dwc3_pci *dwc, int param)
 	tmp.type = ACPI_TYPE_INTEGER;
 	tmp.integer.value = param;
 
-	obj = acpi_evaluate_dsm(ACPI_HANDLE(&dwc->pci->dev), dwc->uuid,
+	obj = acpi_evaluate_dsm(ACPI_HANDLE(&dwc->pci->dev), &dwc->guid,
 			1, PCI_INTEL_BXT_FUNC_PMU_PWR, &argv4);
 	if (!obj) {
 		dev_err(&dwc->pci->dev, "failed to evaluate _DSM\n");
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index fcf1f3f63e7a..954db866aff5 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -213,13 +213,12 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 #ifdef CONFIG_ACPI
 static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev)
 {
-	static const u8 intel_dsm_uuid[] = {
-		0xb7, 0x0c, 0x34, 0xac,	0x01, 0xe9, 0xbf, 0x45,
-		0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23,
-	};
+	static const guid_t intel_dsm_guid =
+		GUID(0xac340cb7, 0xe901, 0x45bf,
+		     0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23);
 	union acpi_object *obj;
 
-	obj = acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), intel_dsm_uuid, 3, 1,
+	obj = acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), &intel_dsm_guid, 3, 1,
 				NULL);
 	ACPI_FREE(obj);
 }
diff --git a/drivers/usb/misc/ucsi.c b/drivers/usb/misc/ucsi.c
index 07397bddefa3..a9949fc60fc0 100644
--- a/drivers/usb/misc/ucsi.c
+++ b/drivers/usb/misc/ucsi.c
@@ -55,13 +55,13 @@ struct ucsi {
 
 static int ucsi_acpi_cmd(struct ucsi *ucsi, struct ucsi_control *ctrl)
 {
-	uuid_le uuid = UUID_LE(0x6f8398c2, 0x7ca4, 0x11e4,
-			       0xad, 0x36, 0x63, 0x10, 0x42, 0xb5, 0x00, 0x8f);
+	guid_t guid = GUID(0x6f8398c2, 0x7ca4, 0x11e4,
+			   0xad, 0x36, 0x63, 0x10, 0x42, 0xb5, 0x00, 0x8f);
 	union acpi_object *obj;
 
 	ucsi->data->ctrl.raw_cmd = ctrl->raw_cmd;
 
-	obj = acpi_evaluate_dsm(ACPI_HANDLE(ucsi->dev), uuid.b, 1, 1, NULL);
+	obj = acpi_evaluate_dsm(ACPI_HANDLE(ucsi->dev), &guid, 1, 1, NULL);
 	if (!obj) {
 		dev_err(ucsi->dev, "%s: failed to evaluate _DSM\n", __func__);
 		return -EIO;
diff --git a/drivers/usb/typec/typec_wcove.c b/drivers/usb/typec/typec_wcove.c
index d5a7b21fa3f1..62ce988fae21 100644
--- a/drivers/usb/typec/typec_wcove.c
+++ b/drivers/usb/typec/typec_wcove.c
@@ -105,8 +105,8 @@ enum wcove_typec_role {
 	WCOVE_ROLE_DEVICE,
 };
 
-static uuid_le uuid = UUID_LE(0x482383f0, 0x2876, 0x4e49,
-			      0x86, 0x85, 0xdb, 0x66, 0x21, 0x1a, 0xf0, 0x37);
+static guid_t guid = GUID(0x482383f0, 0x2876, 0x4e49,
+			  0x86, 0x85, 0xdb, 0x66, 0x21, 0x1a, 0xf0, 0x37);
 
 static int wcove_typec_func(struct wcove_typec *wcove,
 			    enum wcove_typec_func func, int param)
@@ -118,7 +118,7 @@ static int wcove_typec_func(struct wcove_typec *wcove,
 	tmp.type = ACPI_TYPE_INTEGER;
 	tmp.integer.value = param;
 
-	obj = acpi_evaluate_dsm(ACPI_HANDLE(wcove->dev), uuid.b, 1, func,
+	obj = acpi_evaluate_dsm(ACPI_HANDLE(wcove->dev), &guid, 1, func,
 				&argv4);
 	if (!obj) {
 		dev_err(wcove->dev, "%s: failed to evaluate _DSM\n", __func__);
@@ -314,7 +314,7 @@ static int wcove_typec_probe(struct platform_device *pdev)
 	if (ret)
 		return ret;
 
-	if (!acpi_check_dsm(ACPI_HANDLE(&pdev->dev), uuid.b, 0, 0x1f)) {
+	if (!acpi_check_dsm(ACPI_HANDLE(&pdev->dev), &guid, 0, 0x1f)) {
 		dev_err(&pdev->dev, "Missing _DSM functions\n");
 		return -ENODEV;
 	}
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 197f3fffc9a7..ea7df16e71a7 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -61,17 +61,18 @@ bool acpi_ata_match(acpi_handle handle);
 bool acpi_bay_match(acpi_handle handle);
 bool acpi_dock_match(acpi_handle handle);
 
-bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs);
-union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid,
+bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
+union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
 			u64 rev, u64 func, union acpi_object *argv4);
 
 static inline union acpi_object *
-acpi_evaluate_dsm_typed(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
-			union acpi_object *argv4, acpi_object_type type)
+acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
+			u64 func, union acpi_object *argv4,
+			acpi_object_type type)
 {
 	union acpi_object *obj;
 
-	obj = acpi_evaluate_dsm(handle, uuid, rev, func, argv4);
+	obj = acpi_evaluate_dsm(handle, guid, rev, func, argv4);
 	if (obj && obj->type != type) {
 		ACPI_FREE(obj);
 		obj = NULL;
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index b0e1636ca5c3..ab19365c905f 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -458,7 +458,6 @@ struct acpi_osc_context {
 	struct acpi_buffer ret;		/* free by caller if success */
 };
 
-acpi_status acpi_str_to_uuid(char *str, u8 *uuid);
 acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
 
 /* Indexes into _OSC Capabilities Buffer (DWORDs 2 & 3 are device-specific) */
@@ -742,7 +741,7 @@ static inline bool acpi_driver_match_device(struct device *dev,
 }
 
 static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle,
-						   const u8 *uuid,
+						   const guid_t *guid,
 						   int rev, int func,
 						   union acpi_object *argv4)
 {
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 7a4e83a8c89c..dd86c97f2454 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -105,7 +105,7 @@ static inline void acpiphp_remove_slots(struct pci_bus *bus) { }
 static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { }
 #endif
 
-extern const u8 pci_acpi_dsm_uuid[];
+extern const guid_t pci_acpi_dsm_guid;
 #define DEVICE_LABEL_DSM	0x07
 #define RESET_DELAY_DSM		0x08
 #define FUNCTION_DELAY_DSM	0x09
diff --git a/sound/soc/intel/skylake/skl-nhlt.c b/sound/soc/intel/skylake/skl-nhlt.c
index e3f06672fd6d..554065dd518c 100644
--- a/sound/soc/intel/skylake/skl-nhlt.c
+++ b/sound/soc/intel/skylake/skl-nhlt.c
@@ -21,8 +21,9 @@
 #include "skl.h"
 
 /* Unique identification for getting NHLT blobs */
-static u8 OSC_UUID[16] = {0x6E, 0x88, 0x9F, 0xA6, 0xEB, 0x6C, 0x94, 0x45,
-				0xA4, 0x1F, 0x7B, 0x5D, 0xCE, 0x24, 0xC5, 0x53};
+static guid_t osc_guid =
+	GUID(0xA69F886E, 0x6CEB, 0x4594,
+	     0xA4, 0x1F, 0x7B, 0x5D, 0xCE, 0x24, 0xC5, 0x53);
 
 struct nhlt_acpi_table *skl_nhlt_init(struct device *dev)
 {
@@ -37,7 +38,7 @@ struct nhlt_acpi_table *skl_nhlt_init(struct device *dev)
 		return NULL;
 	}
 
-	obj = acpi_evaluate_dsm(handle, OSC_UUID, 1, 1, NULL);
+	obj = acpi_evaluate_dsm(handle, &osc_guid, 1, 1, NULL);
 	if (obj && obj->type == ACPI_TYPE_BUFFER) {
 		nhlt_ptr = (struct nhlt_resource_desc  *)obj->buffer.pointer;
 		nhlt_table = (struct nhlt_acpi_table *)
diff --git a/tools/testing/nvdimm/test/iomap.c b/tools/testing/nvdimm/test/iomap.c
index 64cae1a5deff..e1f75a1914a1 100644
--- a/tools/testing/nvdimm/test/iomap.c
+++ b/tools/testing/nvdimm/test/iomap.c
@@ -370,7 +370,7 @@ acpi_status __wrap_acpi_evaluate_object(acpi_handle handle, acpi_string path,
 }
 EXPORT_SYMBOL(__wrap_acpi_evaluate_object);
 
-union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid,
+union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
 		u64 rev, u64 func, union acpi_object *argv4)
 {
 	union acpi_object *obj = ERR_PTR(-ENXIO);
@@ -379,11 +379,11 @@ union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid,
 	rcu_read_lock();
 	ops = list_first_or_null_rcu(&iomap_head, typeof(*ops), list);
 	if (ops)
-		obj = ops->evaluate_dsm(handle, uuid, rev, func, argv4);
+		obj = ops->evaluate_dsm(handle, guid, rev, func, argv4);
 	rcu_read_unlock();
 
 	if (IS_ERR(obj))
-		return acpi_evaluate_dsm(handle, uuid, rev, func, argv4);
+		return acpi_evaluate_dsm(handle, guid, rev, func, argv4);
 	return obj;
 }
 EXPORT_SYMBOL(__wrap_acpi_evaluate_dsm);
diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
index c2187178fb13..28859da78edf 100644
--- a/tools/testing/nvdimm/test/nfit.c
+++ b/tools/testing/nvdimm/test/nfit.c
@@ -1559,7 +1559,7 @@ static unsigned long nfit_ctl_handle;
 union acpi_object *result;
 
 static union acpi_object *nfit_test_evaluate_dsm(acpi_handle handle,
-		const u8 *uuid, u64 rev, u64 func, union acpi_object *argv4)
+		const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4)
 {
 	if (handle != &nfit_ctl_handle)
 		return ERR_PTR(-ENXIO);
-- 
2.11.0


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

* Re: [PATCH v2 0/5] ACPI et al: convert to use new UUID API
  2017-05-31 19:41 ` Andy Shevchenko
                   ` (5 preceding siblings ...)
  (?)
@ 2017-05-31 19:45 ` Christoph Hellwig
  -1 siblings, 0 replies; 57+ messages in thread
From: Christoph Hellwig @ 2017-05-31 19:45 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx

On Wed, May 31, 2017 at 10:41:47PM +0300, Andy Shevchenko wrote:
> This series converts ACPI and users of acpi_evaluate_dsm() to new UUID
> API which includes new types and methods.
> 
> Patches are based on uuid tree [1] from Christoph Hellwig and supposed to
> go through it.
> 
> (Christoph, I think it would be nice to attach them to your stuff)

I'd be fine with that in general, as long as we have enough reviewers.

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

* ✗ Fi.CI.BAT: failure for ACPI et al: convert to use new UUID API
  2017-05-31 19:41 ` Andy Shevchenko
                   ` (6 preceding siblings ...)
  (?)
@ 2017-05-31 19:45 ` Patchwork
  -1 siblings, 0 replies; 57+ messages in thread
From: Patchwork @ 2017-05-31 19:45 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: intel-gfx

== Series Details ==

Series: ACPI et al: convert to use new UUID API
URL   : https://patchwork.freedesktop.org/series/25121/
State : failure

== Summary ==

  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     scripts/mod/devicetable-offsets.h
  CC      init/main.o
In file included from ./include/linux/acpi.h:44:0,
                 from init/main.c:29:
./include/acpi/acpi_bus.h:64:47: error: unknown type name ‘guid_t’
 bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
                                               ^
./include/acpi/acpi_bus.h:65:64: error: unknown type name ‘guid_t’
 union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
                                                                ^
./include/acpi/acpi_bus.h:69:51: error: unknown type name ‘guid_t’
 acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
                                                   ^
scripts/Makefile.build:302: recipe for target 'init/main.o' failed
make[1]: *** [init/main.o] Error 1
Makefile:1016: recipe for target 'init' failed
make: *** [init] Error 2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 0/5] ACPI et al: convert to use new UUID API
  2017-05-31 19:41 ` Andy Shevchenko
@ 2017-05-31 20:07   ` Andy Shevchenko
  -1 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-05-31 20:07 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel, Rafael J . Wysocki, linux-acpi,
	Dan Williams, Mika Westerberg, Borislav Petkov, intel-gfx

On Wed, 2017-05-31 at 22:41 +0300, Andy Shevchenko wrote:

> [1]: git://git.infradead.org/users/hch/uuid.git
> 
> Changelog v2:
> - append tags I have got so far
> - split single patch to few (5)

> - rebased on top of latest version of uuid-types branch [1]

Fengguang, looking to the above I just got an idea to come up with some
formal syntax in cover letter that will allow your tools to parse the
tree and branch on top of which it should be tested. Do you have
anything like that in place?

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 0/5] ACPI et al: convert to use new UUID API
@ 2017-05-31 20:07   ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-05-31 20:07 UTC (permalink / raw)
  To: Christoph Hellwig, linux-kernel, Rafael J . Wysocki, linux-acpi,
	Dan Williams, Mika Westerberg, Borislav Petkov, intel-gfx
  Cc: Fengguang Wu

On Wed, 2017-05-31 at 22:41 +0300, Andy Shevchenko wrote:

> [1]: git://git.infradead.org/users/hch/uuid.git
> 
> Changelog v2:
> - append tags I have got so far
> - split single patch to few (5)

> - rebased on top of latest version of uuid-types branch [1]

Fengguang, looking to the above I just got an idea to come up with some
formal syntax in cover letter that will allow your tools to parse the
tree and branch on top of which it should be tested. Do you have
anything like that in place?

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
  2017-05-31 19:41 ` [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() Andy Shevchenko
@ 2017-05-31 20:21   ` Mark Brown
  2017-05-31 22:42   ` Rafael J. Wysocki
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 57+ messages in thread
From: Mark Brown @ 2017-05-31 20:21 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx, Amir Goldstein, Jarkko Sakkinen, Ben Skeggs,
	Adrian Hunter, Yisen Zhuang, Liam Girdwood

[-- Attachment #1: Type: text/plain, Size: 277 bytes --]

On Wed, May 31, 2017 at 10:41:52PM +0300, Andy Shevchenko wrote:
> acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
> bytes. Instead we convert them to use guid_t type. At the same time we
> convert current users.

Acked-by: Mark Brown <broonie@kernel.org>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
  2017-05-31 19:41 ` [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() Andy Shevchenko
  2017-05-31 20:21   ` Mark Brown
@ 2017-05-31 22:42   ` Rafael J. Wysocki
  2017-06-01  6:03     ` Christoph Hellwig
  2017-06-01  0:08     ` kbuild test robot
                     ` (4 subsequent siblings)
  6 siblings, 1 reply; 57+ messages in thread
From: Rafael J. Wysocki @ 2017-05-31 22:42 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, linux-acpi, Dan Williams,
	Mika Westerberg, Borislav Petkov, intel-gfx, Amir Goldstein,
	Jarkko Sakkinen, Ben Skeggs, Adrian Hunter, Yisen Zhuang,
	Liam Girdwood, Mark Brown

On Wednesday, May 31, 2017 10:41:52 PM Andy Shevchenko wrote:
> acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
> bytes. Instead we convert them to use guid_t type. At the same time we
> convert current users.
> 
> acpi_str_to_uuid() becomes useless after the conversion and it's safe to
> get rid of it.

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

with one caveat.

I have a pending patch that will use acpi_evaluate_dsm(), so I'd like this to
be made available in an immutable branch once applied.

Thanks,
Rafael


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

* Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
  2017-05-31 19:41 ` [PATCH v2 3/5] ACPI / bus: " Andy Shevchenko
@ 2017-05-31 22:42   ` Rafael J. Wysocki
  2017-05-31 23:56     ` kbuild test robot
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 57+ messages in thread
From: Rafael J. Wysocki @ 2017-05-31 22:42 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, linux-acpi, Dan Williams,
	Mika Westerberg, Borislav Petkov, intel-gfx

On Wednesday, May 31, 2017 10:41:50 PM Andy Shevchenko wrote:
> There are new types and helpers that are supposed to be used in new code.
> 
> As a preparation to get rid of legacy types and API functions do
> the conversion here.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Thanks,
Rafael


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

* Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
  2017-05-31 19:41 ` [PATCH v2 3/5] ACPI / bus: " Andy Shevchenko
@ 2017-05-31 23:56     ` kbuild test robot
  2017-05-31 23:56     ` kbuild test robot
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 57+ messages in thread
From: kbuild test robot @ 2017-05-31 23:56 UTC (permalink / raw)
  Cc: kbuild-all, Christoph Hellwig, linux-kernel, Rafael J . Wysocki,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx, Andy Shevchenko

[-- Attachment #1: Type: text/plain, Size: 2743 bytes --]

Hi Andy,

[auto build test WARNING on pm/linux-next]
[also build test WARNING on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-et-al-convert-to-use-new-UUID-API/20170601-072311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-x010-201722 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/acpi/bus.c: In function 'acpi_run_osc':
   drivers/acpi/bus.c:228:2: error: unknown type name 'guid_t'
     guid_t guid;
     ^~~~~~
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from drivers/acpi/bus.c:21:
   drivers/acpi/bus.c:234:6: error: implicit declaration of function 'guid_parse' [-Werror=implicit-function-declaration]
     if (guid_parse(context->uuid_str, &guid))
         ^
   include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/acpi/bus.c:234:2: note: in expansion of macro 'if'
     if (guid_parse(context->uuid_str, &guid))
     ^~
   cc1: some warnings being treated as errors

vim +/if +234 drivers/acpi/bus.c

   218		return AE_OK;
   219	}
   220	EXPORT_SYMBOL_GPL(acpi_str_to_uuid);
   221	
   222	acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
   223	{
   224		acpi_status status;
   225		struct acpi_object_list input;
   226		union acpi_object in_params[4];
   227		union acpi_object *out_obj;
   228		guid_t guid;
   229		u32 errors;
   230		struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
   231	
   232		if (!context)
   233			return AE_ERROR;
 > 234		if (guid_parse(context->uuid_str, &guid))
   235			return AE_ERROR;
   236		context->ret.length = ACPI_ALLOCATE_BUFFER;
   237		context->ret.pointer = NULL;
   238	
   239		/* Setting up input parameters */
   240		input.count = 4;
   241		input.pointer = in_params;
   242		in_params[0].type 		= ACPI_TYPE_BUFFER;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24102 bytes --]

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

* Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
@ 2017-05-31 23:56     ` kbuild test robot
  0 siblings, 0 replies; 57+ messages in thread
From: kbuild test robot @ 2017-05-31 23:56 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kbuild-all, Christoph Hellwig, linux-kernel, Rafael J . Wysocki,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx, Andy Shevchenko

[-- Attachment #1: Type: text/plain, Size: 2743 bytes --]

Hi Andy,

[auto build test WARNING on pm/linux-next]
[also build test WARNING on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-et-al-convert-to-use-new-UUID-API/20170601-072311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-x010-201722 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/acpi/bus.c: In function 'acpi_run_osc':
   drivers/acpi/bus.c:228:2: error: unknown type name 'guid_t'
     guid_t guid;
     ^~~~~~
   In file included from include/uapi/linux/stddef.h:1:0,
                    from include/linux/stddef.h:4,
                    from include/uapi/linux/posix_types.h:4,
                    from include/uapi/linux/types.h:13,
                    from include/linux/types.h:5,
                    from include/linux/list.h:4,
                    from include/linux/module.h:9,
                    from drivers/acpi/bus.c:21:
   drivers/acpi/bus.c:234:6: error: implicit declaration of function 'guid_parse' [-Werror=implicit-function-declaration]
     if (guid_parse(context->uuid_str, &guid))
         ^
   include/linux/compiler.h:160:30: note: in definition of macro '__trace_if'
     if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
                                 ^~~~
>> drivers/acpi/bus.c:234:2: note: in expansion of macro 'if'
     if (guid_parse(context->uuid_str, &guid))
     ^~
   cc1: some warnings being treated as errors

vim +/if +234 drivers/acpi/bus.c

   218		return AE_OK;
   219	}
   220	EXPORT_SYMBOL_GPL(acpi_str_to_uuid);
   221	
   222	acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
   223	{
   224		acpi_status status;
   225		struct acpi_object_list input;
   226		union acpi_object in_params[4];
   227		union acpi_object *out_obj;
   228		guid_t guid;
   229		u32 errors;
   230		struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
   231	
   232		if (!context)
   233			return AE_ERROR;
 > 234		if (guid_parse(context->uuid_str, &guid))
   235			return AE_ERROR;
   236		context->ret.length = ACPI_ALLOCATE_BUFFER;
   237		context->ret.pointer = NULL;
   238	
   239		/* Setting up input parameters */
   240		input.count = 4;
   241		input.pointer = in_params;
   242		in_params[0].type 		= ACPI_TYPE_BUFFER;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 24102 bytes --]

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

* Re: [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
  2017-05-31 19:41   ` Andy Shevchenko
@ 2017-05-31 23:56     ` kbuild test robot
  -1 siblings, 0 replies; 57+ messages in thread
From: kbuild test robot @ 2017-05-31 23:56 UTC (permalink / raw)
  Cc: Andy Shevchenko, intel-gfx, Rafael J . Wysocki, linux-kernel,
	linux-acpi, kbuild-all, Dan Williams, Borislav Petkov,
	Mika Westerberg, Christoph Hellwig

[-- Attachment #1: Type: text/plain, Size: 2389 bytes --]

Hi Andy,

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-et-al-convert-to-use-new-UUID-API/20170601-072311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-x013-201722 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/acpi/apei/ghes.c: In function 'ghes_do_proc':
>> drivers/acpi/apei/ghes.c:434:2: error: unknown type name 'guid_t'
     guid_t *sec_type;
     ^~~~~~
>> drivers/acpi/apei/ghes.c:438:15: error: 'guid_t' undeclared (first use in this function)
      sec_type = (guid_t *)gdata->section_type;
                  ^~~~~~
   drivers/acpi/apei/ghes.c:438:15: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/acpi/apei/ghes.c:438:23: error: expected expression before ')' token
      sec_type = (guid_t *)gdata->section_type;
                          ^
>> drivers/acpi/apei/ghes.c:440:8: error: implicit declaration of function 'guid_equal' [-Werror=implicit-function-declaration]
      if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
           ^~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/guid_t +434 drivers/acpi/apei/ghes.c

   428	
   429	static void ghes_do_proc(struct ghes *ghes,
   430				 const struct acpi_hest_generic_status *estatus)
   431	{
   432		int sev, sec_sev;
   433		struct acpi_hest_generic_data *gdata;
 > 434		guid_t *sec_type;
   435	
   436		sev = ghes_severity(estatus->error_severity);
   437		apei_estatus_for_each_section(estatus, gdata) {
 > 438			sec_type = (guid_t *)gdata->section_type;
   439			sec_sev = ghes_severity(gdata->error_severity);
 > 440			if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
   441				struct cper_sec_mem_err *mem_err;
   442				mem_err = (struct cper_sec_mem_err *)(gdata+1);
   443				ghes_edac_report_mem_error(ghes, sev, mem_err);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29763 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
@ 2017-05-31 23:56     ` kbuild test robot
  0 siblings, 0 replies; 57+ messages in thread
From: kbuild test robot @ 2017-05-31 23:56 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kbuild-all, Christoph Hellwig, linux-kernel, Rafael J . Wysocki,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx, Andy Shevchenko

[-- Attachment #1: Type: text/plain, Size: 2389 bytes --]

Hi Andy,

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-et-al-convert-to-use-new-UUID-API/20170601-072311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-x013-201722 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/acpi/apei/ghes.c: In function 'ghes_do_proc':
>> drivers/acpi/apei/ghes.c:434:2: error: unknown type name 'guid_t'
     guid_t *sec_type;
     ^~~~~~
>> drivers/acpi/apei/ghes.c:438:15: error: 'guid_t' undeclared (first use in this function)
      sec_type = (guid_t *)gdata->section_type;
                  ^~~~~~
   drivers/acpi/apei/ghes.c:438:15: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/acpi/apei/ghes.c:438:23: error: expected expression before ')' token
      sec_type = (guid_t *)gdata->section_type;
                          ^
>> drivers/acpi/apei/ghes.c:440:8: error: implicit declaration of function 'guid_equal' [-Werror=implicit-function-declaration]
      if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
           ^~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/guid_t +434 drivers/acpi/apei/ghes.c

   428	
   429	static void ghes_do_proc(struct ghes *ghes,
   430				 const struct acpi_hest_generic_status *estatus)
   431	{
   432		int sev, sec_sev;
   433		struct acpi_hest_generic_data *gdata;
 > 434		guid_t *sec_type;
   435	
   436		sev = ghes_severity(estatus->error_severity);
   437		apei_estatus_for_each_section(estatus, gdata) {
 > 438			sec_type = (guid_t *)gdata->section_type;
   439			sec_sev = ghes_severity(gdata->error_severity);
 > 440			if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
   441				struct cper_sec_mem_err *mem_err;
   442				mem_err = (struct cper_sec_mem_err *)(gdata+1);
   443				ghes_edac_report_mem_error(ghes, sev, mem_err);

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29763 bytes --]

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

* Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
  2017-05-31 19:41 ` [PATCH v2 3/5] ACPI / bus: " Andy Shevchenko
@ 2017-06-01  0:05     ` kbuild test robot
  2017-05-31 23:56     ` kbuild test robot
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 57+ messages in thread
From: kbuild test robot @ 2017-06-01  0:05 UTC (permalink / raw)
  Cc: kbuild-all, Christoph Hellwig, linux-kernel, Rafael J . Wysocki,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx, Andy Shevchenko

[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]

Hi Andy,

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-et-al-convert-to-use-new-UUID-API/20170601-072311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-x019-201722 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/acpi/bus.c: In function 'acpi_run_osc':
>> drivers/acpi/bus.c:228:2: error: unknown type name 'guid_t'
     guid_t guid;
     ^~~~~~
>> drivers/acpi/bus.c:234:6: error: implicit declaration of function 'guid_parse' [-Werror=implicit-function-declaration]
     if (guid_parse(context->uuid_str, &guid))
         ^~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/guid_t +228 drivers/acpi/bus.c

   222	acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
   223	{
   224		acpi_status status;
   225		struct acpi_object_list input;
   226		union acpi_object in_params[4];
   227		union acpi_object *out_obj;
 > 228		guid_t guid;
   229		u32 errors;
   230		struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
   231	
   232		if (!context)
   233			return AE_ERROR;
 > 234		if (guid_parse(context->uuid_str, &guid))
   235			return AE_ERROR;
   236		context->ret.length = ACPI_ALLOCATE_BUFFER;
   237		context->ret.pointer = NULL;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23456 bytes --]

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

* Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
@ 2017-06-01  0:05     ` kbuild test robot
  0 siblings, 0 replies; 57+ messages in thread
From: kbuild test robot @ 2017-06-01  0:05 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kbuild-all, Christoph Hellwig, linux-kernel, Rafael J . Wysocki,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx, Andy Shevchenko

[-- Attachment #1: Type: text/plain, Size: 1795 bytes --]

Hi Andy,

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-et-al-convert-to-use-new-UUID-API/20170601-072311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-x019-201722 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/acpi/bus.c: In function 'acpi_run_osc':
>> drivers/acpi/bus.c:228:2: error: unknown type name 'guid_t'
     guid_t guid;
     ^~~~~~
>> drivers/acpi/bus.c:234:6: error: implicit declaration of function 'guid_parse' [-Werror=implicit-function-declaration]
     if (guid_parse(context->uuid_str, &guid))
         ^~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/guid_t +228 drivers/acpi/bus.c

   222	acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
   223	{
   224		acpi_status status;
   225		struct acpi_object_list input;
   226		union acpi_object in_params[4];
   227		union acpi_object *out_obj;
 > 228		guid_t guid;
   229		u32 errors;
   230		struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER, NULL};
   231	
   232		if (!context)
   233			return AE_ERROR;
 > 234		if (guid_parse(context->uuid_str, &guid))
   235			return AE_ERROR;
   236		context->ret.length = ACPI_ALLOCATE_BUFFER;
   237		context->ret.pointer = NULL;

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23456 bytes --]

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

* Re: [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
  2017-05-31 19:41 ` [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() Andy Shevchenko
@ 2017-06-01  0:08     ` kbuild test robot
  2017-05-31 22:42   ` Rafael J. Wysocki
                       ` (5 subsequent siblings)
  6 siblings, 0 replies; 57+ messages in thread
From: kbuild test robot @ 2017-06-01  0:08 UTC (permalink / raw)
  Cc: kbuild-all, Christoph Hellwig, linux-kernel, Rafael J . Wysocki,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx, Andy Shevchenko, Amir Goldstein, Jarkko Sakkinen,
	Ben Skeggs, Adrian Hunter, Yisen Zhuang, Liam Girdwood,
	Mark Brown

[-- Attachment #1: Type: text/plain, Size: 2353 bytes --]

Hi Andy,

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-et-al-convert-to-use-new-UUID-API/20170601-072311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-randconfig-x072-05301437 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from include/linux/acpi.h:44:0,
                    from drivers/usb/misc/ucsi.c:15:
   include/acpi/acpi_bus.h:64:47: error: unknown type name 'guid_t'
    bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
                                                  ^~~~~~
   include/acpi/acpi_bus.h:65:64: error: unknown type name 'guid_t'
    union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
                                                                   ^~~~~~
   include/acpi/acpi_bus.h:69:51: error: unknown type name 'guid_t'
    acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
                                                      ^~~~~~
   drivers/usb/misc/ucsi.c: In function 'ucsi_acpi_cmd':
>> drivers/usb/misc/ucsi.c:58:2: error: unknown type name 'guid_t'
     guid_t guid = GUID(0x6f8398c2, 0x7ca4, 0x11e4,
     ^~~~~~
>> drivers/usb/misc/ucsi.c:58:16: error: implicit declaration of function 'GUID' [-Werror=implicit-function-declaration]
     guid_t guid = GUID(0x6f8398c2, 0x7ca4, 0x11e4,
                   ^~~~
   cc1: some warnings being treated as errors

vim +/guid_t +58 drivers/usb/misc/ucsi.c

    52	#define EVENT_PENDING	0
    53	#define COMMAND_PENDING	1
    54	};
    55	
    56	static int ucsi_acpi_cmd(struct ucsi *ucsi, struct ucsi_control *ctrl)
    57	{
  > 58		guid_t guid = GUID(0x6f8398c2, 0x7ca4, 0x11e4,
    59				   0xad, 0x36, 0x63, 0x10, 0x42, 0xb5, 0x00, 0x8f);
    60		union acpi_object *obj;
    61	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29296 bytes --]

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

* Re: [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
@ 2017-06-01  0:08     ` kbuild test robot
  0 siblings, 0 replies; 57+ messages in thread
From: kbuild test robot @ 2017-06-01  0:08 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kbuild-all, Christoph Hellwig, linux-kernel, Rafael J . Wysocki,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx, Andy Shevchenko, Amir Goldstein, Jarkko Sakkinen,
	Ben Skeggs, Adrian Hunter, Yisen Zhuang, Liam Girdwood,
	Mark Brown

[-- Attachment #1: Type: text/plain, Size: 2353 bytes --]

Hi Andy,

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-et-al-convert-to-use-new-UUID-API/20170601-072311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-randconfig-x072-05301437 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from include/linux/acpi.h:44:0,
                    from drivers/usb/misc/ucsi.c:15:
   include/acpi/acpi_bus.h:64:47: error: unknown type name 'guid_t'
    bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
                                                  ^~~~~~
   include/acpi/acpi_bus.h:65:64: error: unknown type name 'guid_t'
    union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
                                                                   ^~~~~~
   include/acpi/acpi_bus.h:69:51: error: unknown type name 'guid_t'
    acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
                                                      ^~~~~~
   drivers/usb/misc/ucsi.c: In function 'ucsi_acpi_cmd':
>> drivers/usb/misc/ucsi.c:58:2: error: unknown type name 'guid_t'
     guid_t guid = GUID(0x6f8398c2, 0x7ca4, 0x11e4,
     ^~~~~~
>> drivers/usb/misc/ucsi.c:58:16: error: implicit declaration of function 'GUID' [-Werror=implicit-function-declaration]
     guid_t guid = GUID(0x6f8398c2, 0x7ca4, 0x11e4,
                   ^~~~
   cc1: some warnings being treated as errors

vim +/guid_t +58 drivers/usb/misc/ucsi.c

    52	#define EVENT_PENDING	0
    53	#define COMMAND_PENDING	1
    54	};
    55	
    56	static int ucsi_acpi_cmd(struct ucsi *ucsi, struct ucsi_control *ctrl)
    57	{
  > 58		guid_t guid = GUID(0x6f8398c2, 0x7ca4, 0x11e4,
    59				   0xad, 0x36, 0x63, 0x10, 0x42, 0xb5, 0x00, 0x8f);
    60		union acpi_object *obj;
    61	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 29296 bytes --]

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

* Re: [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
  2017-05-31 19:41 ` [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() Andy Shevchenko
@ 2017-06-01  0:11     ` kbuild test robot
  2017-05-31 22:42   ` Rafael J. Wysocki
                       ` (5 subsequent siblings)
  6 siblings, 0 replies; 57+ messages in thread
From: kbuild test robot @ 2017-06-01  0:11 UTC (permalink / raw)
  Cc: kbuild-all, Christoph Hellwig, linux-kernel, Rafael J . Wysocki,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx, Andy Shevchenko, Amir Goldstein, Jarkko Sakkinen,
	Ben Skeggs, Adrian Hunter, Yisen Zhuang, Liam Girdwood,
	Mark Brown

[-- Attachment #1: Type: text/plain, Size: 2472 bytes --]

Hi Andy,

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-et-al-convert-to-use-new-UUID-API/20170601-072311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-x018-201722 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from include/linux/acpi.h:44:0,
                    from drivers/usb/host/xhci-pci.c:26:
   include/acpi/acpi_bus.h:64:47: error: unknown type name 'guid_t'
    bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
                                                  ^~~~~~
   include/acpi/acpi_bus.h:65:64: error: unknown type name 'guid_t'
    union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
                                                                   ^~~~~~
   include/acpi/acpi_bus.h:69:51: error: unknown type name 'guid_t'
    acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
                                                      ^~~~~~
   drivers/usb/host/xhci-pci.c: In function 'xhci_pme_acpi_rtd3_enable':
>> drivers/usb/host/xhci-pci.c:216:15: error: unknown type name 'guid_t'
     static const guid_t intel_dsm_guid =
                  ^~~~~~
>> drivers/usb/host/xhci-pci.c:217:3: error: implicit declaration of function 'GUID' [-Werror=implicit-function-declaration]
      GUID(0xac340cb7, 0xe901, 0x45bf,
      ^~~~
>> drivers/usb/host/xhci-pci.c:217:3: error: initializer element is not constant
   cc1: some warnings being treated as errors

vim +/guid_t +216 drivers/usb/host/xhci-pci.c

   210					"QUIRK: Resetting on resume");
   211	}
   212	
   213	#ifdef CONFIG_ACPI
   214	static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev)
   215	{
 > 216		static const guid_t intel_dsm_guid =
 > 217			GUID(0xac340cb7, 0xe901, 0x45bf,
   218			     0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23);
   219		union acpi_object *obj;
   220	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23354 bytes --]

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

* Re: [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
@ 2017-06-01  0:11     ` kbuild test robot
  0 siblings, 0 replies; 57+ messages in thread
From: kbuild test robot @ 2017-06-01  0:11 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kbuild-all, Christoph Hellwig, linux-kernel, Rafael J . Wysocki,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx, Andy Shevchenko, Amir Goldstein, Jarkko Sakkinen,
	Ben Skeggs, Adrian Hunter, Yisen Zhuang, Liam Girdwood,
	Mark Brown

[-- Attachment #1: Type: text/plain, Size: 2472 bytes --]

Hi Andy,

[auto build test ERROR on pm/linux-next]
[also build test ERROR on v4.12-rc3 next-20170531]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andy-Shevchenko/ACPI-et-al-convert-to-use-new-UUID-API/20170601-072311
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: x86_64-randconfig-x018-201722 (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from include/linux/acpi.h:44:0,
                    from drivers/usb/host/xhci-pci.c:26:
   include/acpi/acpi_bus.h:64:47: error: unknown type name 'guid_t'
    bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
                                                  ^~~~~~
   include/acpi/acpi_bus.h:65:64: error: unknown type name 'guid_t'
    union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
                                                                   ^~~~~~
   include/acpi/acpi_bus.h:69:51: error: unknown type name 'guid_t'
    acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
                                                      ^~~~~~
   drivers/usb/host/xhci-pci.c: In function 'xhci_pme_acpi_rtd3_enable':
>> drivers/usb/host/xhci-pci.c:216:15: error: unknown type name 'guid_t'
     static const guid_t intel_dsm_guid =
                  ^~~~~~
>> drivers/usb/host/xhci-pci.c:217:3: error: implicit declaration of function 'GUID' [-Werror=implicit-function-declaration]
      GUID(0xac340cb7, 0xe901, 0x45bf,
      ^~~~
>> drivers/usb/host/xhci-pci.c:217:3: error: initializer element is not constant
   cc1: some warnings being treated as errors

vim +/guid_t +216 drivers/usb/host/xhci-pci.c

   210					"QUIRK: Resetting on resume");
   211	}
   212	
   213	#ifdef CONFIG_ACPI
   214	static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev)
   215	{
 > 216		static const guid_t intel_dsm_guid =
 > 217			GUID(0xac340cb7, 0xe901, 0x45bf,
   218			     0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23);
   219		union acpi_object *obj;
   220	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23354 bytes --]

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

* Re: [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
  2017-05-31 22:42   ` Rafael J. Wysocki
@ 2017-06-01  6:03     ` Christoph Hellwig
  0 siblings, 0 replies; 57+ messages in thread
From: Christoph Hellwig @ 2017-06-01  6:03 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Andy Shevchenko, Christoph Hellwig, linux-kernel, linux-acpi,
	Dan Williams, Mika Westerberg, Borislav Petkov, intel-gfx,
	Amir Goldstein, Jarkko Sakkinen, Ben Skeggs, Adrian Hunter,
	Yisen Zhuang, Liam Girdwood, Mark Brown

On Thu, Jun 01, 2017 at 12:42:30AM +0200, Rafael J. Wysocki wrote:
> On Wednesday, May 31, 2017 10:41:52 PM Andy Shevchenko wrote:
> > acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
> > bytes. Instead we convert them to use guid_t type. At the same time we
> > convert current users.
> > 
> > acpi_str_to_uuid() becomes useless after the conversion and it's safe to
> > get rid of it.
> 
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> with one caveat.
> 
> I have a pending patch that will use acpi_evaluate_dsm(), so I'd like this to
> be made available in an immutable branch once applied.

I hope to make the current uuid-types branch immutable soon, I just
want to collect a few more reviews.

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

* Re: [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
  2017-05-31 23:56     ` [Intel-gfx] " kbuild test robot
@ 2017-06-01  9:50       ` Andy Shevchenko
  -1 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-06-01  9:50 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Borislav Petkov, intel-gfx, Rafael J . Wysocki, linux-kernel,
	linux-acpi, kbuild-all, Dan Williams, Andy Shevchenko,
	Mika Westerberg, Christoph Hellwig

On Thu, Jun 1, 2017 at 2:56 AM, kbuild test robot <lkp@intel.com> wrote:
> Hi Andy,
>
> [auto build test ERROR on pm/linux-next]
> [also build test ERROR on v4.12-rc3 next-20170531]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

Dropped ahead. As cover letter says it is based on top of uuid tree.

-- 
With Best Regards,
Andy Shevchenko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [Intel-gfx] [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
@ 2017-06-01  9:50       ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-06-01  9:50 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Andy Shevchenko, kbuild-all, Christoph Hellwig, linux-kernel,
	Rafael J . Wysocki, linux-acpi, Dan Williams, Mika Westerberg,
	Borislav Petkov, intel-gfx

On Thu, Jun 1, 2017 at 2:56 AM, kbuild test robot <lkp@intel.com> wrote:
> Hi Andy,
>
> [auto build test ERROR on pm/linux-next]
> [also build test ERROR on v4.12-rc3 next-20170531]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

Dropped ahead. As cover letter says it is based on top of uuid tree.

-- 
With Best Regards,
Andy Shevchenko

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

* Re: [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
  2017-05-31 19:41 ` [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() Andy Shevchenko
@ 2017-06-01 14:12     ` Jarkko Sakkinen
  2017-05-31 22:42   ` Rafael J. Wysocki
                       ` (5 subsequent siblings)
  6 siblings, 0 replies; 57+ messages in thread
From: Jarkko Sakkinen @ 2017-06-01 14:12 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Liam Girdwood, Yisen Zhuang, intel-gfx, Amir Goldstein,
	Rafael J . Wysocki ,
	linux-kernel, Adrian Hunter, linux-acpi, Mark Brown, Ben Skeggs,
	Dan Williams, Borislav Petkov, Mika Westerberg,
	Christoph Hellwig

On Wed, May 31, 2017 at 10:41:52PM +0300, Andy Shevchenko wrote:
> acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
> bytes. Instead we convert them to use guid_t type. At the same time we
> convert current users.
> 
> acpi_str_to_uuid() becomes useless after the conversion and it's safe to
> get rid of it.
> 
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Amir Goldstein <amir73il@gmail.com>
> Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> Acked-by: Jani Nikula <jani.nikula@intel.com>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Acked-by: Joerg Roedel <jroedel@suse.de>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
> Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

/Jarkko

> ---
>  drivers/acpi/acpi_extlog.c                         |  4 ++--
>  drivers/acpi/bus.c                                 | 23 ----------------------
>  drivers/acpi/nfit/core.c                           |  6 +++---
>  drivers/acpi/utils.c                               | 16 +++++++--------
>  drivers/char/tpm/tpm_crb.c                         |  9 ++++-----
>  drivers/char/tpm/tpm_ppi.c                         | 20 ++++++++-----------
>  drivers/gpu/drm/i915/intel_acpi.c                  | 14 +++++--------
>  drivers/gpu/drm/nouveau/nouveau_acpi.c             | 20 +++++++++----------
>  drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c     |  9 ++++-----
>  drivers/hid/i2c-hid/i2c-hid.c                      |  9 ++++-----
>  drivers/iommu/dmar.c                               | 11 +++++------
>  drivers/mmc/host/sdhci-pci-core.c                  |  9 ++++-----
>  drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 15 +++++++-------
>  drivers/pci/pci-acpi.c                             | 13 ++++++------
>  drivers/pci/pci-label.c                            |  4 ++--
>  drivers/usb/dwc3/dwc3-pci.c                        | 10 +++++-----
>  drivers/usb/host/xhci-pci.c                        |  9 ++++-----
>  drivers/usb/misc/ucsi.c                            |  6 +++---
>  drivers/usb/typec/typec_wcove.c                    |  8 ++++----
>  include/acpi/acpi_bus.h                            | 11 ++++++-----
>  include/linux/acpi.h                               |  3 +--
>  include/linux/pci-acpi.h                           |  2 +-
>  sound/soc/intel/skylake/skl-nhlt.c                 |  7 ++++---
>  tools/testing/nvdimm/test/iomap.c                  |  6 +++---
>  tools/testing/nvdimm/test/nfit.c                   |  2 +-
>  25 files changed, 103 insertions(+), 143 deletions(-)
> 
> diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
> index 6b101d595ccc..c9c1d2af9a13 100644
> --- a/drivers/acpi/acpi_extlog.c
> +++ b/drivers/acpi/acpi_extlog.c
> @@ -190,9 +190,9 @@ static bool __init extlog_get_l1addr(void)
>  		return false;
>  	if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
>  		return false;
> -	if (!acpi_check_dsm(handle, guid.b, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR))
> +	if (!acpi_check_dsm(handle, &guid, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR))
>  		return false;
> -	obj = acpi_evaluate_dsm_typed(handle, guid.b, EXTLOG_DSM_REV,
> +	obj = acpi_evaluate_dsm_typed(handle, &guid, EXTLOG_DSM_REV,
>  				      EXTLOG_FN_ADDR, NULL, ACPI_TYPE_INTEGER);
>  	if (!obj) {
>  		return false;
> diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> index 042cd16265b3..5a6fbe0fcaf2 100644
> --- a/drivers/acpi/bus.c
> +++ b/drivers/acpi/bus.c
> @@ -196,29 +196,6 @@ static void acpi_print_osc_error(acpi_handle handle,
>  	pr_debug("\n");
>  }
>  
> -acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
> -{
> -	int i;
> -	static int opc_map_to_uuid[16] = {6, 4, 2, 0, 11, 9, 16, 14, 19, 21,
> -		24, 26, 28, 30, 32, 34};
> -
> -	if (strlen(str) != 36)
> -		return AE_BAD_PARAMETER;
> -	for (i = 0; i < 36; i++) {
> -		if (i == 8 || i == 13 || i == 18 || i == 23) {
> -			if (str[i] != '-')
> -				return AE_BAD_PARAMETER;
> -		} else if (!isxdigit(str[i]))
> -			return AE_BAD_PARAMETER;
> -	}
> -	for (i = 0; i < 16; i++) {
> -		uuid[i] = hex_to_bin(str[opc_map_to_uuid[i]]) << 4;
> -		uuid[i] |= hex_to_bin(str[opc_map_to_uuid[i] + 1]);
> -	}
> -	return AE_OK;
> -}
> -EXPORT_SYMBOL_GPL(acpi_str_to_uuid);
> -
>  acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
>  {
>  	acpi_status status;
> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> index 50753582a0b1..56a5b2ca927a 100644
> --- a/drivers/acpi/nfit/core.c
> +++ b/drivers/acpi/nfit/core.c
> @@ -289,7 +289,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
>  			in_buf.buffer.pointer,
>  			min_t(u32, 256, in_buf.buffer.length), true);
>  
> -	out_obj = acpi_evaluate_dsm(handle, guid.b, 1, func, &in_obj);
> +	out_obj = acpi_evaluate_dsm(handle, guid, 1, func, &in_obj);
>  	if (!out_obj) {
>  		dev_dbg(dev, "%s:%s _DSM failed cmd: %s\n", __func__, dimm_name,
>  				cmd_name);
> @@ -1476,7 +1476,7 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
>  
>  	guid = to_nfit_uuid(nfit_mem->family);
>  	for_each_set_bit(i, &dsm_mask, BITS_PER_LONG)
> -		if (acpi_check_dsm(adev_dimm->handle, guid.b, 1, 1ULL << i))
> +		if (acpi_check_dsm(adev_dimm->handle, guid, 1, 1ULL << i))
>  			set_bit(i, &nfit_mem->dsm_mask);
>  
>  	return 0;
> @@ -1621,7 +1621,7 @@ static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc)
>  		return;
>  
>  	for (i = ND_CMD_ARS_CAP; i <= ND_CMD_CLEAR_ERROR; i++)
> -		if (acpi_check_dsm(adev->handle, guid.b, 1, 1ULL << i))
> +		if (acpi_check_dsm(adev->handle, guid, 1, 1ULL << i))
>  			set_bit(i, &nd_desc->cmd_mask);
>  }
>  
> diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
> index 27d0dcfcf47d..52dec7a20d3f 100644
> --- a/drivers/acpi/utils.c
> +++ b/drivers/acpi/utils.c
> @@ -613,19 +613,19 @@ acpi_status acpi_evaluate_lck(acpi_handle handle, int lock)
>  /**
>   * acpi_evaluate_dsm - evaluate device's _DSM method
>   * @handle: ACPI device handle
> - * @uuid: UUID of requested functions, should be 16 bytes
> + * @guid: GUID of requested functions, should be 16 bytes
>   * @rev: revision number of requested function
>   * @func: requested function number
>   * @argv4: the function specific parameter
>   *
> - * Evaluate device's _DSM method with specified UUID, revision id and
> + * Evaluate device's _DSM method with specified GUID, revision id and
>   * function number. Caller needs to free the returned object.
>   *
>   * Though ACPI defines the fourth parameter for _DSM should be a package,
>   * some old BIOSes do expect a buffer or an integer etc.
>   */
>  union acpi_object *
> -acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
> +acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func,
>  		  union acpi_object *argv4)
>  {
>  	acpi_status ret;
> @@ -638,7 +638,7 @@ acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
>  
>  	params[0].type = ACPI_TYPE_BUFFER;
>  	params[0].buffer.length = 16;
> -	params[0].buffer.pointer = (char *)uuid;
> +	params[0].buffer.pointer = (u8 *)&guid;
>  	params[1].type = ACPI_TYPE_INTEGER;
>  	params[1].integer.value = rev;
>  	params[2].type = ACPI_TYPE_INTEGER;
> @@ -666,7 +666,7 @@ EXPORT_SYMBOL(acpi_evaluate_dsm);
>  /**
>   * acpi_check_dsm - check if _DSM method supports requested functions.
>   * @handle: ACPI device handle
> - * @uuid: UUID of requested functions, should be 16 bytes at least
> + * @guid: GUID of requested functions, should be 16 bytes at least
>   * @rev: revision number of requested functions
>   * @funcs: bitmap of requested functions
>   *
> @@ -674,7 +674,7 @@ EXPORT_SYMBOL(acpi_evaluate_dsm);
>   * functions. Currently only support 64 functions at maximum, should be
>   * enough for now.
>   */
> -bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
> +bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs)
>  {
>  	int i;
>  	u64 mask = 0;
> @@ -683,7 +683,7 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
>  	if (funcs == 0)
>  		return false;
>  
> -	obj = acpi_evaluate_dsm(handle, uuid, rev, 0, NULL);
> +	obj = acpi_evaluate_dsm(handle, guid, rev, 0, NULL);
>  	if (!obj)
>  		return false;
>  
> @@ -697,7 +697,7 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
>  
>  	/*
>  	 * Bit 0 indicates whether there's support for any functions other than
> -	 * function 0 for the specified UUID and revision.
> +	 * function 0 for the specified GUID and revision.
>  	 */
>  	if ((mask & 0x1) && (mask & funcs) == funcs)
>  		return true;
> diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
> index b917b9d5f710..245d82f0bdbc 100644
> --- a/drivers/char/tpm/tpm_crb.c
> +++ b/drivers/char/tpm/tpm_crb.c
> @@ -27,10 +27,9 @@
>  
>  #define ACPI_SIG_TPM2 "TPM2"
>  
> -static const u8 CRB_ACPI_START_UUID[] = {
> -	/* 0000 */ 0xAB, 0x6C, 0xBF, 0x6B, 0x63, 0x54, 0x14, 0x47,
> -	/* 0008 */ 0xB7, 0xCD, 0xF0, 0x20, 0x3C, 0x03, 0x68, 0xD4
> -};
> +static const guid_t crb_acpi_start_guid =
> +	GUID(0x6BBF6CAB, 0x5463, 0x4714,
> +	     0xB7, 0xCD, 0xF0, 0x20, 0x3C, 0x03, 0x68, 0xD4);
>  
>  enum crb_defaults {
>  	CRB_ACPI_START_REVISION_ID = 1,
> @@ -266,7 +265,7 @@ static int crb_do_acpi_start(struct tpm_chip *chip)
>  	int rc;
>  
>  	obj = acpi_evaluate_dsm(chip->acpi_dev_handle,
> -				CRB_ACPI_START_UUID,
> +				&crb_acpi_start_guid,
>  				CRB_ACPI_START_REVISION_ID,
>  				CRB_ACPI_START_INDEX,
>  				NULL);
> diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c
> index 692a2c6ae036..c3b70431c06b 100644
> --- a/drivers/char/tpm/tpm_ppi.c
> +++ b/drivers/char/tpm/tpm_ppi.c
> @@ -32,20 +32,16 @@
>  #define PPI_VS_REQ_START	128
>  #define PPI_VS_REQ_END		255
>  
> -static const u8 tpm_ppi_uuid[] = {
> -	0xA6, 0xFA, 0xDD, 0x3D,
> -	0x1B, 0x36,
> -	0xB4, 0x4E,
> -	0xA4, 0x24,
> -	0x8D, 0x10, 0x08, 0x9D, 0x16, 0x53
> -};
> +static const guid_t tpm_ppi_guid =
> +	GUID(0x3DDDFAA6, 0x361B, 0x4EB4,
> +	     0xA4, 0x24, 0x8D, 0x10, 0x08, 0x9D, 0x16, 0x53);
>  
>  static inline union acpi_object *
>  tpm_eval_dsm(acpi_handle ppi_handle, int func, acpi_object_type type,
>  	     union acpi_object *argv4)
>  {
>  	BUG_ON(!ppi_handle);
> -	return acpi_evaluate_dsm_typed(ppi_handle, tpm_ppi_uuid,
> +	return acpi_evaluate_dsm_typed(ppi_handle, &tpm_ppi_guid,
>  				       TPM_PPI_REVISION_ID,
>  				       func, argv4, type);
>  }
> @@ -107,7 +103,7 @@ static ssize_t tpm_store_ppi_request(struct device *dev,
>  	 * is updated with function index from SUBREQ to SUBREQ2 since PPI
>  	 * version 1.1
>  	 */
> -	if (acpi_check_dsm(chip->acpi_dev_handle, tpm_ppi_uuid,
> +	if (acpi_check_dsm(chip->acpi_dev_handle, &tpm_ppi_guid,
>  			   TPM_PPI_REVISION_ID, 1 << TPM_PPI_FN_SUBREQ2))
>  		func = TPM_PPI_FN_SUBREQ2;
>  
> @@ -268,7 +264,7 @@ static ssize_t show_ppi_operations(acpi_handle dev_handle, char *buf, u32 start,
>  		"User not required",
>  	};
>  
> -	if (!acpi_check_dsm(dev_handle, tpm_ppi_uuid, TPM_PPI_REVISION_ID,
> +	if (!acpi_check_dsm(dev_handle, &tpm_ppi_guid, TPM_PPI_REVISION_ID,
>  			    1 << TPM_PPI_FN_GETOPR))
>  		return -EPERM;
>  
> @@ -341,12 +337,12 @@ void tpm_add_ppi(struct tpm_chip *chip)
>  	if (!chip->acpi_dev_handle)
>  		return;
>  
> -	if (!acpi_check_dsm(chip->acpi_dev_handle, tpm_ppi_uuid,
> +	if (!acpi_check_dsm(chip->acpi_dev_handle, &tpm_ppi_guid,
>  			    TPM_PPI_REVISION_ID, 1 << TPM_PPI_FN_VERSION))
>  		return;
>  
>  	/* Cache PPI version string. */
> -	obj = acpi_evaluate_dsm_typed(chip->acpi_dev_handle, tpm_ppi_uuid,
> +	obj = acpi_evaluate_dsm_typed(chip->acpi_dev_handle, &tpm_ppi_guid,
>  				      TPM_PPI_REVISION_ID, TPM_PPI_FN_VERSION,
>  				      NULL, ACPI_TYPE_STRING);
>  	if (obj) {
> diff --git a/drivers/gpu/drm/i915/intel_acpi.c b/drivers/gpu/drm/i915/intel_acpi.c
> index eb638a1e69d2..c888ea55b61f 100644
> --- a/drivers/gpu/drm/i915/intel_acpi.c
> +++ b/drivers/gpu/drm/i915/intel_acpi.c
> @@ -15,13 +15,9 @@ static struct intel_dsm_priv {
>  	acpi_handle dhandle;
>  } intel_dsm_priv;
>  
> -static const u8 intel_dsm_guid[] = {
> -	0xd3, 0x73, 0xd8, 0x7e,
> -	0xd0, 0xc2,
> -	0x4f, 0x4e,
> -	0xa8, 0x54,
> -	0x0f, 0x13, 0x17, 0xb0, 0x1c, 0x2c
> -};
> +static const guid_t intel_dsm_guid =
> +	GUID(0x7ed873d3, 0xc2d0, 0x4e4f,
> +	     0xa8, 0x54, 0x0f, 0x13, 0x17, 0xb0, 0x1c, 0x2c);
>  
>  static char *intel_dsm_port_name(u8 id)
>  {
> @@ -80,7 +76,7 @@ static void intel_dsm_platform_mux_info(void)
>  	int i;
>  	union acpi_object *pkg, *connector_count;
>  
> -	pkg = acpi_evaluate_dsm_typed(intel_dsm_priv.dhandle, intel_dsm_guid,
> +	pkg = acpi_evaluate_dsm_typed(intel_dsm_priv.dhandle, &intel_dsm_guid,
>  			INTEL_DSM_REVISION_ID, INTEL_DSM_FN_PLATFORM_MUX_INFO,
>  			NULL, ACPI_TYPE_PACKAGE);
>  	if (!pkg) {
> @@ -118,7 +114,7 @@ static bool intel_dsm_pci_probe(struct pci_dev *pdev)
>  	if (!dhandle)
>  		return false;
>  
> -	if (!acpi_check_dsm(dhandle, intel_dsm_guid, INTEL_DSM_REVISION_ID,
> +	if (!acpi_check_dsm(dhandle, &intel_dsm_guid, INTEL_DSM_REVISION_ID,
>  			    1 << INTEL_DSM_FN_PLATFORM_MUX_INFO)) {
>  		DRM_DEBUG_KMS("no _DSM method for intel device\n");
>  		return false;
> diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
> index 39468c218027..0c04ab229cdb 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
> @@ -60,15 +60,13 @@ bool nouveau_is_v1_dsm(void) {
>  }
>  
>  #ifdef CONFIG_VGA_SWITCHEROO
> -static const char nouveau_dsm_muid[] = {
> -	0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D,
> -	0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4,
> -};
> +static const guid_t nouveau_dsm_muid =
> +	GUID(0x9D95A0A0, 0x0060, 0x4D48,
> +	     0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4);
>  
> -static const char nouveau_op_dsm_muid[] = {
> -	0xF8, 0xD8, 0x86, 0xA4, 0xDA, 0x0B, 0x1B, 0x47,
> -	0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0,
> -};
> +static const guid_t nouveau_op_dsm_muid =
> +	GUID(0xA486D8F8, 0x0BDA, 0x471B,
> +	     0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0);
>  
>  static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result)
>  {
> @@ -86,7 +84,7 @@ static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *
>  		args_buff[i] = (arg >> i * 8) & 0xFF;
>  
>  	*result = 0;
> -	obj = acpi_evaluate_dsm_typed(handle, nouveau_op_dsm_muid, 0x00000100,
> +	obj = acpi_evaluate_dsm_typed(handle, &nouveau_op_dsm_muid, 0x00000100,
>  				      func, &argv4, ACPI_TYPE_BUFFER);
>  	if (!obj) {
>  		acpi_handle_info(handle, "failed to evaluate _DSM\n");
> @@ -138,7 +136,7 @@ static int nouveau_dsm(acpi_handle handle, int func, int arg)
>  		.integer.value = arg,
>  	};
>  
> -	obj = acpi_evaluate_dsm_typed(handle, nouveau_dsm_muid, 0x00000102,
> +	obj = acpi_evaluate_dsm_typed(handle, &nouveau_dsm_muid, 0x00000102,
>  				      func, &argv4, ACPI_TYPE_INTEGER);
>  	if (!obj) {
>  		acpi_handle_info(handle, "failed to evaluate _DSM\n");
> @@ -259,7 +257,7 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out
>  	if (!acpi_has_method(dhandle, "_DSM"))
>  		return;
>  
> -	supports_mux = acpi_check_dsm(dhandle, nouveau_dsm_muid, 0x00000102,
> +	supports_mux = acpi_check_dsm(dhandle, &nouveau_dsm_muid, 0x00000102,
>  				      1 << NOUVEAU_DSM_POWER);
>  	optimus_funcs = nouveau_dsm_get_optimus_functions(dhandle);
>  
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
> index e3e2f5e83815..d65b2804e905 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
> @@ -81,10 +81,9 @@ mxm_shadow_dsm(struct nvkm_mxm *mxm, u8 version)
>  {
>  	struct nvkm_subdev *subdev = &mxm->subdev;
>  	struct nvkm_device *device = subdev->device;
> -	static char muid[] = {
> -		0x00, 0xA4, 0x04, 0x40, 0x7D, 0x91, 0xF2, 0x4C,
> -		0xB8, 0x9C, 0x79, 0xB6, 0x2F, 0xD5, 0x56, 0x65
> -	};
> +	static guid_t muid =
> +		GUID(0x4004A400, 0x917D, 0x4CF2,
> +		     0xB8, 0x9C, 0x79, 0xB6, 0x2F, 0xD5, 0x56, 0x65);
>  	u32 mxms_args[] = { 0x00000000 };
>  	union acpi_object argv4 = {
>  		.buffer.type = ACPI_TYPE_BUFFER,
> @@ -105,7 +104,7 @@ mxm_shadow_dsm(struct nvkm_mxm *mxm, u8 version)
>  	 * unless you pass in exactly the version it supports..
>  	 */
>  	rev = (version & 0xf0) << 4 | (version & 0x0f);
> -	obj = acpi_evaluate_dsm(handle, muid, rev, 0x00000010, &argv4);
> +	obj = acpi_evaluate_dsm(handle, &muid, rev, 0x00000010, &argv4);
>  	if (!obj) {
>  		nvkm_debug(subdev, "DSM MXMS failed\n");
>  		return false;
> diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
> index 8daa8ce64ebb..d10ff48e613a 100644
> --- a/drivers/hid/i2c-hid/i2c-hid.c
> +++ b/drivers/hid/i2c-hid/i2c-hid.c
> @@ -872,10 +872,9 @@ static int i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid)
>  static int i2c_hid_acpi_pdata(struct i2c_client *client,
>  		struct i2c_hid_platform_data *pdata)
>  {
> -	static u8 i2c_hid_guid[] = {
> -		0xF7, 0xF6, 0xDF, 0x3C, 0x67, 0x42, 0x55, 0x45,
> -		0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE,
> -	};
> +	static guid_t i2c_hid_guid =
> +		GUID(0x3CDFF6F7, 0x4267, 0x4555,
> +		     0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE);
>  	union acpi_object *obj;
>  	struct acpi_device *adev;
>  	acpi_handle handle;
> @@ -884,7 +883,7 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
>  	if (!handle || acpi_bus_get_device(handle, &adev))
>  		return -ENODEV;
>  
> -	obj = acpi_evaluate_dsm_typed(handle, i2c_hid_guid, 1, 1, NULL,
> +	obj = acpi_evaluate_dsm_typed(handle, &i2c_hid_guid, 1, 1, NULL,
>  				      ACPI_TYPE_INTEGER);
>  	if (!obj) {
>  		dev_err(&client->dev, "device _DSM execution failed\n");
> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
> index cbf7763d8091..1b8af4fad78b 100644
> --- a/drivers/iommu/dmar.c
> +++ b/drivers/iommu/dmar.c
> @@ -1808,10 +1808,9 @@ IOMMU_INIT_POST(detect_intel_iommu);
>   * for Directed-IO Architecture Specifiction, Rev 2.2, Section 8.8
>   * "Remapping Hardware Unit Hot Plug".
>   */
> -static u8 dmar_hp_uuid[] = {
> -	/* 0000 */    0xA6, 0xA3, 0xC1, 0xD8, 0x9B, 0xBE, 0x9B, 0x4C,
> -	/* 0008 */    0x91, 0xBF, 0xC3, 0xCB, 0x81, 0xFC, 0x5D, 0xAF
> -};
> +static guid_t dmar_hp_guid =
> +	GUID(0xD8C1A3A6, 0xBE9B, 0x4C9B,
> +	     0x91, 0xBF, 0xC3, 0xCB, 0x81, 0xFC, 0x5D, 0xAF);
>  
>  /*
>   * Currently there's only one revision and BIOS will not check the revision id,
> @@ -1824,7 +1823,7 @@ static u8 dmar_hp_uuid[] = {
>  
>  static inline bool dmar_detect_dsm(acpi_handle handle, int func)
>  {
> -	return acpi_check_dsm(handle, dmar_hp_uuid, DMAR_DSM_REV_ID, 1 << func);
> +	return acpi_check_dsm(handle, &dmar_hp_guid, DMAR_DSM_REV_ID, 1 << func);
>  }
>  
>  static int dmar_walk_dsm_resource(acpi_handle handle, int func,
> @@ -1843,7 +1842,7 @@ static int dmar_walk_dsm_resource(acpi_handle handle, int func,
>  	if (!dmar_detect_dsm(handle, func))
>  		return 0;
>  
> -	obj = acpi_evaluate_dsm_typed(handle, dmar_hp_uuid, DMAR_DSM_REV_ID,
> +	obj = acpi_evaluate_dsm_typed(handle, &dmar_hp_guid, DMAR_DSM_REV_ID,
>  				      func, NULL, ACPI_TYPE_BUFFER);
>  	if (!obj)
>  		return -ENODEV;
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index 92fc3f7c538d..c942ec102c6a 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -404,10 +404,9 @@ struct intel_host {
>  	bool	d3_retune;
>  };
>  
> -const u8 intel_dsm_uuid[] = {
> -	0xA5, 0x3E, 0xC1, 0xF6, 0xCD, 0x65, 0x1F, 0x46,
> -	0xAB, 0x7A, 0x29, 0xF7, 0xE8, 0xD5, 0xBD, 0x61,
> -};
> +const guid_t intel_dsm_guid =
> +	GUID(0xF6C13EA5, 0x65CD, 0x461F,
> +	     0xAB, 0x7A, 0x29, 0xF7, 0xE8, 0xD5, 0xBD, 0x61);
>  
>  static int __intel_dsm(struct intel_host *intel_host, struct device *dev,
>  		       unsigned int fn, u32 *result)
> @@ -416,7 +415,7 @@ static int __intel_dsm(struct intel_host *intel_host, struct device *dev,
>  	int err = 0;
>  	size_t len;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), intel_dsm_uuid, 0, fn, NULL);
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), &intel_dsm_guid, 0, fn, NULL);
>  	if (!obj)
>  		return -EOPNOTSUPP;
>  
> diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
> index e13aa064a8e9..fb51877c4de2 100644
> --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
> +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
> @@ -29,10 +29,9 @@ enum _dsm_rst_type {
>  	HNS_ROCE_RESET_FUNC     = 0x7,
>  };
>  
> -const u8 hns_dsaf_acpi_dsm_uuid[] = {
> -	0x1A, 0xAA, 0x85, 0x1A, 0x93, 0xE2, 0x5E, 0x41,
> -	0x8E, 0x28, 0x8D, 0x69, 0x0A, 0x0F, 0x82, 0x0A
> -};
> +const guid_t hns_dsaf_acpi_dsm_guid =
> +	GUID(0x1A85AA1A, 0xE293, 0x415E,
> +	     0x8E, 0x28, 0x8D, 0x69, 0x0A, 0x0F, 0x82, 0x0A);
>  
>  static void dsaf_write_sub(struct dsaf_device *dsaf_dev, u32 reg, u32 val)
>  {
> @@ -151,7 +150,7 @@ static void hns_dsaf_acpi_srst_by_port(struct dsaf_device *dsaf_dev, u8 op_type,
>  	argv4.package.elements = obj_args;
>  
>  	obj = acpi_evaluate_dsm(ACPI_HANDLE(dsaf_dev->dev),
> -				hns_dsaf_acpi_dsm_uuid, 0, op_type, &argv4);
> +				&hns_dsaf_acpi_dsm_guid, 0, op_type, &argv4);
>  	if (!obj) {
>  		dev_warn(dsaf_dev->dev, "reset port_type%d port%d fail!",
>  			 port_type, port);
> @@ -434,7 +433,7 @@ static phy_interface_t hns_mac_get_phy_if_acpi(struct hns_mac_cb *mac_cb)
>  	argv4.package.elements = &obj_args,
>  
>  	obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev),
> -				hns_dsaf_acpi_dsm_uuid, 0,
> +				&hns_dsaf_acpi_dsm_guid, 0,
>  				HNS_OP_GET_PORT_TYPE_FUNC, &argv4);
>  
>  	if (!obj || obj->type != ACPI_TYPE_INTEGER)
> @@ -474,7 +473,7 @@ int hns_mac_get_sfp_prsnt_acpi(struct hns_mac_cb *mac_cb, int *sfp_prsnt)
>  	argv4.package.elements = &obj_args,
>  
>  	obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev),
> -				hns_dsaf_acpi_dsm_uuid, 0,
> +				&hns_dsaf_acpi_dsm_guid, 0,
>  				HNS_OP_GET_SFP_STAT_FUNC, &argv4);
>  
>  	if (!obj || obj->type != ACPI_TYPE_INTEGER)
> @@ -565,7 +564,7 @@ hns_mac_config_sds_loopback_acpi(struct hns_mac_cb *mac_cb, bool en)
>  	argv4.package.elements = obj_args;
>  
>  	obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dsaf_dev->dev),
> -				hns_dsaf_acpi_dsm_uuid, 0,
> +				&hns_dsaf_acpi_dsm_guid, 0,
>  				HNS_OP_SERDES_LP_FUNC, &argv4);
>  	if (!obj) {
>  		dev_warn(mac_cb->dsaf_dev->dev, "set port%d serdes lp fail!",
> diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
> index 001860361434..0fafb71dc8ce 100644
> --- a/drivers/pci/pci-acpi.c
> +++ b/drivers/pci/pci-acpi.c
> @@ -21,13 +21,12 @@
>  #include "pci.h"
>  
>  /*
> - * The UUID is defined in the PCI Firmware Specification available here:
> + * The GUID is defined in the PCI Firmware Specification available here:
>   * https://www.pcisig.com/members/downloads/pcifw_r3_1_13Dec10.pdf
>   */
> -const u8 pci_acpi_dsm_uuid[] = {
> -	0xd0, 0x37, 0xc9, 0xe5, 0x53, 0x35, 0x7a, 0x4d,
> -	0x91, 0x17, 0xea, 0x4d, 0x19, 0xc3, 0x43, 0x4d
> -};
> +const guid_t pci_acpi_dsm_guid =
> +	GUID(0xe5c937d0, 0x3553, 0x4d7a,
> +	     0x91, 0x17, 0xea, 0x4d, 0x19, 0xc3, 0x43, 0x4d);
>  
>  #if defined(CONFIG_PCI_QUIRKS) && defined(CONFIG_ARM64)
>  static int acpi_get_rc_addr(struct acpi_device *adev, struct resource *res)
> @@ -680,7 +679,7 @@ void acpi_pci_add_bus(struct pci_bus *bus)
>  	if (!pci_is_root_bus(bus))
>  		return;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), pci_acpi_dsm_uuid, 3,
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 3,
>  				RESET_DELAY_DSM, NULL);
>  	if (!obj)
>  		return;
> @@ -745,7 +744,7 @@ static void pci_acpi_optimize_delay(struct pci_dev *pdev,
>  	if (bridge->ignore_reset_delay)
>  		pdev->d3cold_delay = 0;
>  
> -	obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 3,
> +	obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 3,
>  				FUNCTION_DELAY_DSM, NULL);
>  	if (!obj)
>  		return;
> diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c
> index 51357377efbc..2d8db3ead6e8 100644
> --- a/drivers/pci/pci-label.c
> +++ b/drivers/pci/pci-label.c
> @@ -172,7 +172,7 @@ static int dsm_get_label(struct device *dev, char *buf,
>  	if (!handle)
>  		return -1;
>  
> -	obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 0x2,
> +	obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2,
>  				DEVICE_LABEL_DSM, NULL);
>  	if (!obj)
>  		return -1;
> @@ -212,7 +212,7 @@ static bool device_has_dsm(struct device *dev)
>  	if (!handle)
>  		return false;
>  
> -	return !!acpi_check_dsm(handle, pci_acpi_dsm_uuid, 0x2,
> +	return !!acpi_check_dsm(handle, &pci_acpi_dsm_guid, 0x2,
>  				1 << DEVICE_LABEL_DSM);
>  }
>  
> diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
> index 84a2cebfc712..fe851544d7fb 100644
> --- a/drivers/usb/dwc3/dwc3-pci.c
> +++ b/drivers/usb/dwc3/dwc3-pci.c
> @@ -42,7 +42,7 @@
>  #define PCI_DEVICE_ID_INTEL_CNPLP		0x9dee
>  #define PCI_DEVICE_ID_INTEL_CNPH		0xa36e
>  
> -#define PCI_INTEL_BXT_DSM_UUID		"732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511"
> +#define PCI_INTEL_BXT_DSM_GUID		"732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511"
>  #define PCI_INTEL_BXT_FUNC_PMU_PWR	4
>  #define PCI_INTEL_BXT_STATE_D0		0
>  #define PCI_INTEL_BXT_STATE_D3		3
> @@ -51,14 +51,14 @@
>   * struct dwc3_pci - Driver private structure
>   * @dwc3: child dwc3 platform_device
>   * @pci: our link to PCI bus
> - * @uuid: _DSM UUID
> + * @guid: _DSM GUID
>   * @has_dsm_for_pm: true for devices which need to run _DSM on runtime PM
>   */
>  struct dwc3_pci {
>  	struct platform_device *dwc3;
>  	struct pci_dev *pci;
>  
> -	u8 uuid[16];
> +	guid_t guid;
>  
>  	unsigned int has_dsm_for_pm:1;
>  };
> @@ -120,7 +120,7 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)
>  
>  		if (pdev->device == PCI_DEVICE_ID_INTEL_BXT ||
>  				pdev->device == PCI_DEVICE_ID_INTEL_BXT_M) {
> -			acpi_str_to_uuid(PCI_INTEL_BXT_DSM_UUID, dwc->uuid);
> +			guid_parse(PCI_INTEL_BXT_DSM_GUID, &dwc->guid);
>  			dwc->has_dsm_for_pm = true;
>  		}
>  
> @@ -292,7 +292,7 @@ static int dwc3_pci_dsm(struct dwc3_pci *dwc, int param)
>  	tmp.type = ACPI_TYPE_INTEGER;
>  	tmp.integer.value = param;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(&dwc->pci->dev), dwc->uuid,
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(&dwc->pci->dev), &dwc->guid,
>  			1, PCI_INTEL_BXT_FUNC_PMU_PWR, &argv4);
>  	if (!obj) {
>  		dev_err(&dwc->pci->dev, "failed to evaluate _DSM\n");
> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> index fcf1f3f63e7a..954db866aff5 100644
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -213,13 +213,12 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
>  #ifdef CONFIG_ACPI
>  static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev)
>  {
> -	static const u8 intel_dsm_uuid[] = {
> -		0xb7, 0x0c, 0x34, 0xac,	0x01, 0xe9, 0xbf, 0x45,
> -		0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23,
> -	};
> +	static const guid_t intel_dsm_guid =
> +		GUID(0xac340cb7, 0xe901, 0x45bf,
> +		     0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23);
>  	union acpi_object *obj;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), intel_dsm_uuid, 3, 1,
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), &intel_dsm_guid, 3, 1,
>  				NULL);
>  	ACPI_FREE(obj);
>  }
> diff --git a/drivers/usb/misc/ucsi.c b/drivers/usb/misc/ucsi.c
> index 07397bddefa3..a9949fc60fc0 100644
> --- a/drivers/usb/misc/ucsi.c
> +++ b/drivers/usb/misc/ucsi.c
> @@ -55,13 +55,13 @@ struct ucsi {
>  
>  static int ucsi_acpi_cmd(struct ucsi *ucsi, struct ucsi_control *ctrl)
>  {
> -	uuid_le uuid = UUID_LE(0x6f8398c2, 0x7ca4, 0x11e4,
> -			       0xad, 0x36, 0x63, 0x10, 0x42, 0xb5, 0x00, 0x8f);
> +	guid_t guid = GUID(0x6f8398c2, 0x7ca4, 0x11e4,
> +			   0xad, 0x36, 0x63, 0x10, 0x42, 0xb5, 0x00, 0x8f);
>  	union acpi_object *obj;
>  
>  	ucsi->data->ctrl.raw_cmd = ctrl->raw_cmd;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(ucsi->dev), uuid.b, 1, 1, NULL);
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(ucsi->dev), &guid, 1, 1, NULL);
>  	if (!obj) {
>  		dev_err(ucsi->dev, "%s: failed to evaluate _DSM\n", __func__);
>  		return -EIO;
> diff --git a/drivers/usb/typec/typec_wcove.c b/drivers/usb/typec/typec_wcove.c
> index d5a7b21fa3f1..62ce988fae21 100644
> --- a/drivers/usb/typec/typec_wcove.c
> +++ b/drivers/usb/typec/typec_wcove.c
> @@ -105,8 +105,8 @@ enum wcove_typec_role {
>  	WCOVE_ROLE_DEVICE,
>  };
>  
> -static uuid_le uuid = UUID_LE(0x482383f0, 0x2876, 0x4e49,
> -			      0x86, 0x85, 0xdb, 0x66, 0x21, 0x1a, 0xf0, 0x37);
> +static guid_t guid = GUID(0x482383f0, 0x2876, 0x4e49,
> +			  0x86, 0x85, 0xdb, 0x66, 0x21, 0x1a, 0xf0, 0x37);
>  
>  static int wcove_typec_func(struct wcove_typec *wcove,
>  			    enum wcove_typec_func func, int param)
> @@ -118,7 +118,7 @@ static int wcove_typec_func(struct wcove_typec *wcove,
>  	tmp.type = ACPI_TYPE_INTEGER;
>  	tmp.integer.value = param;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(wcove->dev), uuid.b, 1, func,
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(wcove->dev), &guid, 1, func,
>  				&argv4);
>  	if (!obj) {
>  		dev_err(wcove->dev, "%s: failed to evaluate _DSM\n", __func__);
> @@ -314,7 +314,7 @@ static int wcove_typec_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	if (!acpi_check_dsm(ACPI_HANDLE(&pdev->dev), uuid.b, 0, 0x1f)) {
> +	if (!acpi_check_dsm(ACPI_HANDLE(&pdev->dev), &guid, 0, 0x1f)) {
>  		dev_err(&pdev->dev, "Missing _DSM functions\n");
>  		return -ENODEV;
>  	}
> diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
> index 197f3fffc9a7..ea7df16e71a7 100644
> --- a/include/acpi/acpi_bus.h
> +++ b/include/acpi/acpi_bus.h
> @@ -61,17 +61,18 @@ bool acpi_ata_match(acpi_handle handle);
>  bool acpi_bay_match(acpi_handle handle);
>  bool acpi_dock_match(acpi_handle handle);
>  
> -bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs);
> -union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid,
> +bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
> +union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
>  			u64 rev, u64 func, union acpi_object *argv4);
>  
>  static inline union acpi_object *
> -acpi_evaluate_dsm_typed(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
> -			union acpi_object *argv4, acpi_object_type type)
> +acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
> +			u64 func, union acpi_object *argv4,
> +			acpi_object_type type)
>  {
>  	union acpi_object *obj;
>  
> -	obj = acpi_evaluate_dsm(handle, uuid, rev, func, argv4);
> +	obj = acpi_evaluate_dsm(handle, guid, rev, func, argv4);
>  	if (obj && obj->type != type) {
>  		ACPI_FREE(obj);
>  		obj = NULL;
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index b0e1636ca5c3..ab19365c905f 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -458,7 +458,6 @@ struct acpi_osc_context {
>  	struct acpi_buffer ret;		/* free by caller if success */
>  };
>  
> -acpi_status acpi_str_to_uuid(char *str, u8 *uuid);
>  acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
>  
>  /* Indexes into _OSC Capabilities Buffer (DWORDs 2 & 3 are device-specific) */
> @@ -742,7 +741,7 @@ static inline bool acpi_driver_match_device(struct device *dev,
>  }
>  
>  static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle,
> -						   const u8 *uuid,
> +						   const guid_t *guid,
>  						   int rev, int func,
>  						   union acpi_object *argv4)
>  {
> diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
> index 7a4e83a8c89c..dd86c97f2454 100644
> --- a/include/linux/pci-acpi.h
> +++ b/include/linux/pci-acpi.h
> @@ -105,7 +105,7 @@ static inline void acpiphp_remove_slots(struct pci_bus *bus) { }
>  static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { }
>  #endif
>  
> -extern const u8 pci_acpi_dsm_uuid[];
> +extern const guid_t pci_acpi_dsm_guid;
>  #define DEVICE_LABEL_DSM	0x07
>  #define RESET_DELAY_DSM		0x08
>  #define FUNCTION_DELAY_DSM	0x09
> diff --git a/sound/soc/intel/skylake/skl-nhlt.c b/sound/soc/intel/skylake/skl-nhlt.c
> index e3f06672fd6d..554065dd518c 100644
> --- a/sound/soc/intel/skylake/skl-nhlt.c
> +++ b/sound/soc/intel/skylake/skl-nhlt.c
> @@ -21,8 +21,9 @@
>  #include "skl.h"
>  
>  /* Unique identification for getting NHLT blobs */
> -static u8 OSC_UUID[16] = {0x6E, 0x88, 0x9F, 0xA6, 0xEB, 0x6C, 0x94, 0x45,
> -				0xA4, 0x1F, 0x7B, 0x5D, 0xCE, 0x24, 0xC5, 0x53};
> +static guid_t osc_guid =
> +	GUID(0xA69F886E, 0x6CEB, 0x4594,
> +	     0xA4, 0x1F, 0x7B, 0x5D, 0xCE, 0x24, 0xC5, 0x53);
>  
>  struct nhlt_acpi_table *skl_nhlt_init(struct device *dev)
>  {
> @@ -37,7 +38,7 @@ struct nhlt_acpi_table *skl_nhlt_init(struct device *dev)
>  		return NULL;
>  	}
>  
> -	obj = acpi_evaluate_dsm(handle, OSC_UUID, 1, 1, NULL);
> +	obj = acpi_evaluate_dsm(handle, &osc_guid, 1, 1, NULL);
>  	if (obj && obj->type == ACPI_TYPE_BUFFER) {
>  		nhlt_ptr = (struct nhlt_resource_desc  *)obj->buffer.pointer;
>  		nhlt_table = (struct nhlt_acpi_table *)
> diff --git a/tools/testing/nvdimm/test/iomap.c b/tools/testing/nvdimm/test/iomap.c
> index 64cae1a5deff..e1f75a1914a1 100644
> --- a/tools/testing/nvdimm/test/iomap.c
> +++ b/tools/testing/nvdimm/test/iomap.c
> @@ -370,7 +370,7 @@ acpi_status __wrap_acpi_evaluate_object(acpi_handle handle, acpi_string path,
>  }
>  EXPORT_SYMBOL(__wrap_acpi_evaluate_object);
>  
> -union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid,
> +union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
>  		u64 rev, u64 func, union acpi_object *argv4)
>  {
>  	union acpi_object *obj = ERR_PTR(-ENXIO);
> @@ -379,11 +379,11 @@ union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid,
>  	rcu_read_lock();
>  	ops = list_first_or_null_rcu(&iomap_head, typeof(*ops), list);
>  	if (ops)
> -		obj = ops->evaluate_dsm(handle, uuid, rev, func, argv4);
> +		obj = ops->evaluate_dsm(handle, guid, rev, func, argv4);
>  	rcu_read_unlock();
>  
>  	if (IS_ERR(obj))
> -		return acpi_evaluate_dsm(handle, uuid, rev, func, argv4);
> +		return acpi_evaluate_dsm(handle, guid, rev, func, argv4);
>  	return obj;
>  }
>  EXPORT_SYMBOL(__wrap_acpi_evaluate_dsm);
> diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
> index c2187178fb13..28859da78edf 100644
> --- a/tools/testing/nvdimm/test/nfit.c
> +++ b/tools/testing/nvdimm/test/nfit.c
> @@ -1559,7 +1559,7 @@ static unsigned long nfit_ctl_handle;
>  union acpi_object *result;
>  
>  static union acpi_object *nfit_test_evaluate_dsm(acpi_handle handle,
> -		const u8 *uuid, u64 rev, u64 func, union acpi_object *argv4)
> +		const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4)
>  {
>  	if (handle != &nfit_ctl_handle)
>  		return ERR_PTR(-ENXIO);
> -- 
> 2.11.0
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
@ 2017-06-01 14:12     ` Jarkko Sakkinen
  0 siblings, 0 replies; 57+ messages in thread
From: Jarkko Sakkinen @ 2017-06-01 14:12 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx, Amir Goldstein, Ben Skeggs, Adrian Hunter,
	Yisen Zhuang, Liam Girdwood, Mark Brown

On Wed, May 31, 2017 at 10:41:52PM +0300, Andy Shevchenko wrote:
> acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
> bytes. Instead we convert them to use guid_t type. At the same time we
> convert current users.
> 
> acpi_str_to_uuid() becomes useless after the conversion and it's safe to
> get rid of it.
> 
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Amir Goldstein <amir73il@gmail.com>
> Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> Acked-by: Jani Nikula <jani.nikula@intel.com>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Acked-by: Joerg Roedel <jroedel@suse.de>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
> Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>

/Jarkko

> ---
>  drivers/acpi/acpi_extlog.c                         |  4 ++--
>  drivers/acpi/bus.c                                 | 23 ----------------------
>  drivers/acpi/nfit/core.c                           |  6 +++---
>  drivers/acpi/utils.c                               | 16 +++++++--------
>  drivers/char/tpm/tpm_crb.c                         |  9 ++++-----
>  drivers/char/tpm/tpm_ppi.c                         | 20 ++++++++-----------
>  drivers/gpu/drm/i915/intel_acpi.c                  | 14 +++++--------
>  drivers/gpu/drm/nouveau/nouveau_acpi.c             | 20 +++++++++----------
>  drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c     |  9 ++++-----
>  drivers/hid/i2c-hid/i2c-hid.c                      |  9 ++++-----
>  drivers/iommu/dmar.c                               | 11 +++++------
>  drivers/mmc/host/sdhci-pci-core.c                  |  9 ++++-----
>  drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c | 15 +++++++-------
>  drivers/pci/pci-acpi.c                             | 13 ++++++------
>  drivers/pci/pci-label.c                            |  4 ++--
>  drivers/usb/dwc3/dwc3-pci.c                        | 10 +++++-----
>  drivers/usb/host/xhci-pci.c                        |  9 ++++-----
>  drivers/usb/misc/ucsi.c                            |  6 +++---
>  drivers/usb/typec/typec_wcove.c                    |  8 ++++----
>  include/acpi/acpi_bus.h                            | 11 ++++++-----
>  include/linux/acpi.h                               |  3 +--
>  include/linux/pci-acpi.h                           |  2 +-
>  sound/soc/intel/skylake/skl-nhlt.c                 |  7 ++++---
>  tools/testing/nvdimm/test/iomap.c                  |  6 +++---
>  tools/testing/nvdimm/test/nfit.c                   |  2 +-
>  25 files changed, 103 insertions(+), 143 deletions(-)
> 
> diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
> index 6b101d595ccc..c9c1d2af9a13 100644
> --- a/drivers/acpi/acpi_extlog.c
> +++ b/drivers/acpi/acpi_extlog.c
> @@ -190,9 +190,9 @@ static bool __init extlog_get_l1addr(void)
>  		return false;
>  	if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
>  		return false;
> -	if (!acpi_check_dsm(handle, guid.b, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR))
> +	if (!acpi_check_dsm(handle, &guid, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR))
>  		return false;
> -	obj = acpi_evaluate_dsm_typed(handle, guid.b, EXTLOG_DSM_REV,
> +	obj = acpi_evaluate_dsm_typed(handle, &guid, EXTLOG_DSM_REV,
>  				      EXTLOG_FN_ADDR, NULL, ACPI_TYPE_INTEGER);
>  	if (!obj) {
>  		return false;
> diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> index 042cd16265b3..5a6fbe0fcaf2 100644
> --- a/drivers/acpi/bus.c
> +++ b/drivers/acpi/bus.c
> @@ -196,29 +196,6 @@ static void acpi_print_osc_error(acpi_handle handle,
>  	pr_debug("\n");
>  }
>  
> -acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
> -{
> -	int i;
> -	static int opc_map_to_uuid[16] = {6, 4, 2, 0, 11, 9, 16, 14, 19, 21,
> -		24, 26, 28, 30, 32, 34};
> -
> -	if (strlen(str) != 36)
> -		return AE_BAD_PARAMETER;
> -	for (i = 0; i < 36; i++) {
> -		if (i == 8 || i == 13 || i == 18 || i == 23) {
> -			if (str[i] != '-')
> -				return AE_BAD_PARAMETER;
> -		} else if (!isxdigit(str[i]))
> -			return AE_BAD_PARAMETER;
> -	}
> -	for (i = 0; i < 16; i++) {
> -		uuid[i] = hex_to_bin(str[opc_map_to_uuid[i]]) << 4;
> -		uuid[i] |= hex_to_bin(str[opc_map_to_uuid[i] + 1]);
> -	}
> -	return AE_OK;
> -}
> -EXPORT_SYMBOL_GPL(acpi_str_to_uuid);
> -
>  acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
>  {
>  	acpi_status status;
> diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
> index 50753582a0b1..56a5b2ca927a 100644
> --- a/drivers/acpi/nfit/core.c
> +++ b/drivers/acpi/nfit/core.c
> @@ -289,7 +289,7 @@ int acpi_nfit_ctl(struct nvdimm_bus_descriptor *nd_desc, struct nvdimm *nvdimm,
>  			in_buf.buffer.pointer,
>  			min_t(u32, 256, in_buf.buffer.length), true);
>  
> -	out_obj = acpi_evaluate_dsm(handle, guid.b, 1, func, &in_obj);
> +	out_obj = acpi_evaluate_dsm(handle, guid, 1, func, &in_obj);
>  	if (!out_obj) {
>  		dev_dbg(dev, "%s:%s _DSM failed cmd: %s\n", __func__, dimm_name,
>  				cmd_name);
> @@ -1476,7 +1476,7 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
>  
>  	guid = to_nfit_uuid(nfit_mem->family);
>  	for_each_set_bit(i, &dsm_mask, BITS_PER_LONG)
> -		if (acpi_check_dsm(adev_dimm->handle, guid.b, 1, 1ULL << i))
> +		if (acpi_check_dsm(adev_dimm->handle, guid, 1, 1ULL << i))
>  			set_bit(i, &nfit_mem->dsm_mask);
>  
>  	return 0;
> @@ -1621,7 +1621,7 @@ static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc)
>  		return;
>  
>  	for (i = ND_CMD_ARS_CAP; i <= ND_CMD_CLEAR_ERROR; i++)
> -		if (acpi_check_dsm(adev->handle, guid.b, 1, 1ULL << i))
> +		if (acpi_check_dsm(adev->handle, guid, 1, 1ULL << i))
>  			set_bit(i, &nd_desc->cmd_mask);
>  }
>  
> diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
> index 27d0dcfcf47d..52dec7a20d3f 100644
> --- a/drivers/acpi/utils.c
> +++ b/drivers/acpi/utils.c
> @@ -613,19 +613,19 @@ acpi_status acpi_evaluate_lck(acpi_handle handle, int lock)
>  /**
>   * acpi_evaluate_dsm - evaluate device's _DSM method
>   * @handle: ACPI device handle
> - * @uuid: UUID of requested functions, should be 16 bytes
> + * @guid: GUID of requested functions, should be 16 bytes
>   * @rev: revision number of requested function
>   * @func: requested function number
>   * @argv4: the function specific parameter
>   *
> - * Evaluate device's _DSM method with specified UUID, revision id and
> + * Evaluate device's _DSM method with specified GUID, revision id and
>   * function number. Caller needs to free the returned object.
>   *
>   * Though ACPI defines the fourth parameter for _DSM should be a package,
>   * some old BIOSes do expect a buffer or an integer etc.
>   */
>  union acpi_object *
> -acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
> +acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func,
>  		  union acpi_object *argv4)
>  {
>  	acpi_status ret;
> @@ -638,7 +638,7 @@ acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
>  
>  	params[0].type = ACPI_TYPE_BUFFER;
>  	params[0].buffer.length = 16;
> -	params[0].buffer.pointer = (char *)uuid;
> +	params[0].buffer.pointer = (u8 *)&guid;
>  	params[1].type = ACPI_TYPE_INTEGER;
>  	params[1].integer.value = rev;
>  	params[2].type = ACPI_TYPE_INTEGER;
> @@ -666,7 +666,7 @@ EXPORT_SYMBOL(acpi_evaluate_dsm);
>  /**
>   * acpi_check_dsm - check if _DSM method supports requested functions.
>   * @handle: ACPI device handle
> - * @uuid: UUID of requested functions, should be 16 bytes at least
> + * @guid: GUID of requested functions, should be 16 bytes at least
>   * @rev: revision number of requested functions
>   * @funcs: bitmap of requested functions
>   *
> @@ -674,7 +674,7 @@ EXPORT_SYMBOL(acpi_evaluate_dsm);
>   * functions. Currently only support 64 functions at maximum, should be
>   * enough for now.
>   */
> -bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
> +bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs)
>  {
>  	int i;
>  	u64 mask = 0;
> @@ -683,7 +683,7 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
>  	if (funcs == 0)
>  		return false;
>  
> -	obj = acpi_evaluate_dsm(handle, uuid, rev, 0, NULL);
> +	obj = acpi_evaluate_dsm(handle, guid, rev, 0, NULL);
>  	if (!obj)
>  		return false;
>  
> @@ -697,7 +697,7 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
>  
>  	/*
>  	 * Bit 0 indicates whether there's support for any functions other than
> -	 * function 0 for the specified UUID and revision.
> +	 * function 0 for the specified GUID and revision.
>  	 */
>  	if ((mask & 0x1) && (mask & funcs) == funcs)
>  		return true;
> diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
> index b917b9d5f710..245d82f0bdbc 100644
> --- a/drivers/char/tpm/tpm_crb.c
> +++ b/drivers/char/tpm/tpm_crb.c
> @@ -27,10 +27,9 @@
>  
>  #define ACPI_SIG_TPM2 "TPM2"
>  
> -static const u8 CRB_ACPI_START_UUID[] = {
> -	/* 0000 */ 0xAB, 0x6C, 0xBF, 0x6B, 0x63, 0x54, 0x14, 0x47,
> -	/* 0008 */ 0xB7, 0xCD, 0xF0, 0x20, 0x3C, 0x03, 0x68, 0xD4
> -};
> +static const guid_t crb_acpi_start_guid =
> +	GUID(0x6BBF6CAB, 0x5463, 0x4714,
> +	     0xB7, 0xCD, 0xF0, 0x20, 0x3C, 0x03, 0x68, 0xD4);
>  
>  enum crb_defaults {
>  	CRB_ACPI_START_REVISION_ID = 1,
> @@ -266,7 +265,7 @@ static int crb_do_acpi_start(struct tpm_chip *chip)
>  	int rc;
>  
>  	obj = acpi_evaluate_dsm(chip->acpi_dev_handle,
> -				CRB_ACPI_START_UUID,
> +				&crb_acpi_start_guid,
>  				CRB_ACPI_START_REVISION_ID,
>  				CRB_ACPI_START_INDEX,
>  				NULL);
> diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c
> index 692a2c6ae036..c3b70431c06b 100644
> --- a/drivers/char/tpm/tpm_ppi.c
> +++ b/drivers/char/tpm/tpm_ppi.c
> @@ -32,20 +32,16 @@
>  #define PPI_VS_REQ_START	128
>  #define PPI_VS_REQ_END		255
>  
> -static const u8 tpm_ppi_uuid[] = {
> -	0xA6, 0xFA, 0xDD, 0x3D,
> -	0x1B, 0x36,
> -	0xB4, 0x4E,
> -	0xA4, 0x24,
> -	0x8D, 0x10, 0x08, 0x9D, 0x16, 0x53
> -};
> +static const guid_t tpm_ppi_guid =
> +	GUID(0x3DDDFAA6, 0x361B, 0x4EB4,
> +	     0xA4, 0x24, 0x8D, 0x10, 0x08, 0x9D, 0x16, 0x53);
>  
>  static inline union acpi_object *
>  tpm_eval_dsm(acpi_handle ppi_handle, int func, acpi_object_type type,
>  	     union acpi_object *argv4)
>  {
>  	BUG_ON(!ppi_handle);
> -	return acpi_evaluate_dsm_typed(ppi_handle, tpm_ppi_uuid,
> +	return acpi_evaluate_dsm_typed(ppi_handle, &tpm_ppi_guid,
>  				       TPM_PPI_REVISION_ID,
>  				       func, argv4, type);
>  }
> @@ -107,7 +103,7 @@ static ssize_t tpm_store_ppi_request(struct device *dev,
>  	 * is updated with function index from SUBREQ to SUBREQ2 since PPI
>  	 * version 1.1
>  	 */
> -	if (acpi_check_dsm(chip->acpi_dev_handle, tpm_ppi_uuid,
> +	if (acpi_check_dsm(chip->acpi_dev_handle, &tpm_ppi_guid,
>  			   TPM_PPI_REVISION_ID, 1 << TPM_PPI_FN_SUBREQ2))
>  		func = TPM_PPI_FN_SUBREQ2;
>  
> @@ -268,7 +264,7 @@ static ssize_t show_ppi_operations(acpi_handle dev_handle, char *buf, u32 start,
>  		"User not required",
>  	};
>  
> -	if (!acpi_check_dsm(dev_handle, tpm_ppi_uuid, TPM_PPI_REVISION_ID,
> +	if (!acpi_check_dsm(dev_handle, &tpm_ppi_guid, TPM_PPI_REVISION_ID,
>  			    1 << TPM_PPI_FN_GETOPR))
>  		return -EPERM;
>  
> @@ -341,12 +337,12 @@ void tpm_add_ppi(struct tpm_chip *chip)
>  	if (!chip->acpi_dev_handle)
>  		return;
>  
> -	if (!acpi_check_dsm(chip->acpi_dev_handle, tpm_ppi_uuid,
> +	if (!acpi_check_dsm(chip->acpi_dev_handle, &tpm_ppi_guid,
>  			    TPM_PPI_REVISION_ID, 1 << TPM_PPI_FN_VERSION))
>  		return;
>  
>  	/* Cache PPI version string. */
> -	obj = acpi_evaluate_dsm_typed(chip->acpi_dev_handle, tpm_ppi_uuid,
> +	obj = acpi_evaluate_dsm_typed(chip->acpi_dev_handle, &tpm_ppi_guid,
>  				      TPM_PPI_REVISION_ID, TPM_PPI_FN_VERSION,
>  				      NULL, ACPI_TYPE_STRING);
>  	if (obj) {
> diff --git a/drivers/gpu/drm/i915/intel_acpi.c b/drivers/gpu/drm/i915/intel_acpi.c
> index eb638a1e69d2..c888ea55b61f 100644
> --- a/drivers/gpu/drm/i915/intel_acpi.c
> +++ b/drivers/gpu/drm/i915/intel_acpi.c
> @@ -15,13 +15,9 @@ static struct intel_dsm_priv {
>  	acpi_handle dhandle;
>  } intel_dsm_priv;
>  
> -static const u8 intel_dsm_guid[] = {
> -	0xd3, 0x73, 0xd8, 0x7e,
> -	0xd0, 0xc2,
> -	0x4f, 0x4e,
> -	0xa8, 0x54,
> -	0x0f, 0x13, 0x17, 0xb0, 0x1c, 0x2c
> -};
> +static const guid_t intel_dsm_guid =
> +	GUID(0x7ed873d3, 0xc2d0, 0x4e4f,
> +	     0xa8, 0x54, 0x0f, 0x13, 0x17, 0xb0, 0x1c, 0x2c);
>  
>  static char *intel_dsm_port_name(u8 id)
>  {
> @@ -80,7 +76,7 @@ static void intel_dsm_platform_mux_info(void)
>  	int i;
>  	union acpi_object *pkg, *connector_count;
>  
> -	pkg = acpi_evaluate_dsm_typed(intel_dsm_priv.dhandle, intel_dsm_guid,
> +	pkg = acpi_evaluate_dsm_typed(intel_dsm_priv.dhandle, &intel_dsm_guid,
>  			INTEL_DSM_REVISION_ID, INTEL_DSM_FN_PLATFORM_MUX_INFO,
>  			NULL, ACPI_TYPE_PACKAGE);
>  	if (!pkg) {
> @@ -118,7 +114,7 @@ static bool intel_dsm_pci_probe(struct pci_dev *pdev)
>  	if (!dhandle)
>  		return false;
>  
> -	if (!acpi_check_dsm(dhandle, intel_dsm_guid, INTEL_DSM_REVISION_ID,
> +	if (!acpi_check_dsm(dhandle, &intel_dsm_guid, INTEL_DSM_REVISION_ID,
>  			    1 << INTEL_DSM_FN_PLATFORM_MUX_INFO)) {
>  		DRM_DEBUG_KMS("no _DSM method for intel device\n");
>  		return false;
> diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
> index 39468c218027..0c04ab229cdb 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
> @@ -60,15 +60,13 @@ bool nouveau_is_v1_dsm(void) {
>  }
>  
>  #ifdef CONFIG_VGA_SWITCHEROO
> -static const char nouveau_dsm_muid[] = {
> -	0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D,
> -	0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4,
> -};
> +static const guid_t nouveau_dsm_muid =
> +	GUID(0x9D95A0A0, 0x0060, 0x4D48,
> +	     0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4);
>  
> -static const char nouveau_op_dsm_muid[] = {
> -	0xF8, 0xD8, 0x86, 0xA4, 0xDA, 0x0B, 0x1B, 0x47,
> -	0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0,
> -};
> +static const guid_t nouveau_op_dsm_muid =
> +	GUID(0xA486D8F8, 0x0BDA, 0x471B,
> +	     0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0);
>  
>  static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result)
>  {
> @@ -86,7 +84,7 @@ static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *
>  		args_buff[i] = (arg >> i * 8) & 0xFF;
>  
>  	*result = 0;
> -	obj = acpi_evaluate_dsm_typed(handle, nouveau_op_dsm_muid, 0x00000100,
> +	obj = acpi_evaluate_dsm_typed(handle, &nouveau_op_dsm_muid, 0x00000100,
>  				      func, &argv4, ACPI_TYPE_BUFFER);
>  	if (!obj) {
>  		acpi_handle_info(handle, "failed to evaluate _DSM\n");
> @@ -138,7 +136,7 @@ static int nouveau_dsm(acpi_handle handle, int func, int arg)
>  		.integer.value = arg,
>  	};
>  
> -	obj = acpi_evaluate_dsm_typed(handle, nouveau_dsm_muid, 0x00000102,
> +	obj = acpi_evaluate_dsm_typed(handle, &nouveau_dsm_muid, 0x00000102,
>  				      func, &argv4, ACPI_TYPE_INTEGER);
>  	if (!obj) {
>  		acpi_handle_info(handle, "failed to evaluate _DSM\n");
> @@ -259,7 +257,7 @@ static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out
>  	if (!acpi_has_method(dhandle, "_DSM"))
>  		return;
>  
> -	supports_mux = acpi_check_dsm(dhandle, nouveau_dsm_muid, 0x00000102,
> +	supports_mux = acpi_check_dsm(dhandle, &nouveau_dsm_muid, 0x00000102,
>  				      1 << NOUVEAU_DSM_POWER);
>  	optimus_funcs = nouveau_dsm_get_optimus_functions(dhandle);
>  
> diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
> index e3e2f5e83815..d65b2804e905 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
> @@ -81,10 +81,9 @@ mxm_shadow_dsm(struct nvkm_mxm *mxm, u8 version)
>  {
>  	struct nvkm_subdev *subdev = &mxm->subdev;
>  	struct nvkm_device *device = subdev->device;
> -	static char muid[] = {
> -		0x00, 0xA4, 0x04, 0x40, 0x7D, 0x91, 0xF2, 0x4C,
> -		0xB8, 0x9C, 0x79, 0xB6, 0x2F, 0xD5, 0x56, 0x65
> -	};
> +	static guid_t muid =
> +		GUID(0x4004A400, 0x917D, 0x4CF2,
> +		     0xB8, 0x9C, 0x79, 0xB6, 0x2F, 0xD5, 0x56, 0x65);
>  	u32 mxms_args[] = { 0x00000000 };
>  	union acpi_object argv4 = {
>  		.buffer.type = ACPI_TYPE_BUFFER,
> @@ -105,7 +104,7 @@ mxm_shadow_dsm(struct nvkm_mxm *mxm, u8 version)
>  	 * unless you pass in exactly the version it supports..
>  	 */
>  	rev = (version & 0xf0) << 4 | (version & 0x0f);
> -	obj = acpi_evaluate_dsm(handle, muid, rev, 0x00000010, &argv4);
> +	obj = acpi_evaluate_dsm(handle, &muid, rev, 0x00000010, &argv4);
>  	if (!obj) {
>  		nvkm_debug(subdev, "DSM MXMS failed\n");
>  		return false;
> diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
> index 8daa8ce64ebb..d10ff48e613a 100644
> --- a/drivers/hid/i2c-hid/i2c-hid.c
> +++ b/drivers/hid/i2c-hid/i2c-hid.c
> @@ -872,10 +872,9 @@ static int i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid)
>  static int i2c_hid_acpi_pdata(struct i2c_client *client,
>  		struct i2c_hid_platform_data *pdata)
>  {
> -	static u8 i2c_hid_guid[] = {
> -		0xF7, 0xF6, 0xDF, 0x3C, 0x67, 0x42, 0x55, 0x45,
> -		0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE,
> -	};
> +	static guid_t i2c_hid_guid =
> +		GUID(0x3CDFF6F7, 0x4267, 0x4555,
> +		     0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE);
>  	union acpi_object *obj;
>  	struct acpi_device *adev;
>  	acpi_handle handle;
> @@ -884,7 +883,7 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
>  	if (!handle || acpi_bus_get_device(handle, &adev))
>  		return -ENODEV;
>  
> -	obj = acpi_evaluate_dsm_typed(handle, i2c_hid_guid, 1, 1, NULL,
> +	obj = acpi_evaluate_dsm_typed(handle, &i2c_hid_guid, 1, 1, NULL,
>  				      ACPI_TYPE_INTEGER);
>  	if (!obj) {
>  		dev_err(&client->dev, "device _DSM execution failed\n");
> diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
> index cbf7763d8091..1b8af4fad78b 100644
> --- a/drivers/iommu/dmar.c
> +++ b/drivers/iommu/dmar.c
> @@ -1808,10 +1808,9 @@ IOMMU_INIT_POST(detect_intel_iommu);
>   * for Directed-IO Architecture Specifiction, Rev 2.2, Section 8.8
>   * "Remapping Hardware Unit Hot Plug".
>   */
> -static u8 dmar_hp_uuid[] = {
> -	/* 0000 */    0xA6, 0xA3, 0xC1, 0xD8, 0x9B, 0xBE, 0x9B, 0x4C,
> -	/* 0008 */    0x91, 0xBF, 0xC3, 0xCB, 0x81, 0xFC, 0x5D, 0xAF
> -};
> +static guid_t dmar_hp_guid =
> +	GUID(0xD8C1A3A6, 0xBE9B, 0x4C9B,
> +	     0x91, 0xBF, 0xC3, 0xCB, 0x81, 0xFC, 0x5D, 0xAF);
>  
>  /*
>   * Currently there's only one revision and BIOS will not check the revision id,
> @@ -1824,7 +1823,7 @@ static u8 dmar_hp_uuid[] = {
>  
>  static inline bool dmar_detect_dsm(acpi_handle handle, int func)
>  {
> -	return acpi_check_dsm(handle, dmar_hp_uuid, DMAR_DSM_REV_ID, 1 << func);
> +	return acpi_check_dsm(handle, &dmar_hp_guid, DMAR_DSM_REV_ID, 1 << func);
>  }
>  
>  static int dmar_walk_dsm_resource(acpi_handle handle, int func,
> @@ -1843,7 +1842,7 @@ static int dmar_walk_dsm_resource(acpi_handle handle, int func,
>  	if (!dmar_detect_dsm(handle, func))
>  		return 0;
>  
> -	obj = acpi_evaluate_dsm_typed(handle, dmar_hp_uuid, DMAR_DSM_REV_ID,
> +	obj = acpi_evaluate_dsm_typed(handle, &dmar_hp_guid, DMAR_DSM_REV_ID,
>  				      func, NULL, ACPI_TYPE_BUFFER);
>  	if (!obj)
>  		return -ENODEV;
> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index 92fc3f7c538d..c942ec102c6a 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -404,10 +404,9 @@ struct intel_host {
>  	bool	d3_retune;
>  };
>  
> -const u8 intel_dsm_uuid[] = {
> -	0xA5, 0x3E, 0xC1, 0xF6, 0xCD, 0x65, 0x1F, 0x46,
> -	0xAB, 0x7A, 0x29, 0xF7, 0xE8, 0xD5, 0xBD, 0x61,
> -};
> +const guid_t intel_dsm_guid =
> +	GUID(0xF6C13EA5, 0x65CD, 0x461F,
> +	     0xAB, 0x7A, 0x29, 0xF7, 0xE8, 0xD5, 0xBD, 0x61);
>  
>  static int __intel_dsm(struct intel_host *intel_host, struct device *dev,
>  		       unsigned int fn, u32 *result)
> @@ -416,7 +415,7 @@ static int __intel_dsm(struct intel_host *intel_host, struct device *dev,
>  	int err = 0;
>  	size_t len;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), intel_dsm_uuid, 0, fn, NULL);
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), &intel_dsm_guid, 0, fn, NULL);
>  	if (!obj)
>  		return -EOPNOTSUPP;
>  
> diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
> index e13aa064a8e9..fb51877c4de2 100644
> --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
> +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
> @@ -29,10 +29,9 @@ enum _dsm_rst_type {
>  	HNS_ROCE_RESET_FUNC     = 0x7,
>  };
>  
> -const u8 hns_dsaf_acpi_dsm_uuid[] = {
> -	0x1A, 0xAA, 0x85, 0x1A, 0x93, 0xE2, 0x5E, 0x41,
> -	0x8E, 0x28, 0x8D, 0x69, 0x0A, 0x0F, 0x82, 0x0A
> -};
> +const guid_t hns_dsaf_acpi_dsm_guid =
> +	GUID(0x1A85AA1A, 0xE293, 0x415E,
> +	     0x8E, 0x28, 0x8D, 0x69, 0x0A, 0x0F, 0x82, 0x0A);
>  
>  static void dsaf_write_sub(struct dsaf_device *dsaf_dev, u32 reg, u32 val)
>  {
> @@ -151,7 +150,7 @@ static void hns_dsaf_acpi_srst_by_port(struct dsaf_device *dsaf_dev, u8 op_type,
>  	argv4.package.elements = obj_args;
>  
>  	obj = acpi_evaluate_dsm(ACPI_HANDLE(dsaf_dev->dev),
> -				hns_dsaf_acpi_dsm_uuid, 0, op_type, &argv4);
> +				&hns_dsaf_acpi_dsm_guid, 0, op_type, &argv4);
>  	if (!obj) {
>  		dev_warn(dsaf_dev->dev, "reset port_type%d port%d fail!",
>  			 port_type, port);
> @@ -434,7 +433,7 @@ static phy_interface_t hns_mac_get_phy_if_acpi(struct hns_mac_cb *mac_cb)
>  	argv4.package.elements = &obj_args,
>  
>  	obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev),
> -				hns_dsaf_acpi_dsm_uuid, 0,
> +				&hns_dsaf_acpi_dsm_guid, 0,
>  				HNS_OP_GET_PORT_TYPE_FUNC, &argv4);
>  
>  	if (!obj || obj->type != ACPI_TYPE_INTEGER)
> @@ -474,7 +473,7 @@ int hns_mac_get_sfp_prsnt_acpi(struct hns_mac_cb *mac_cb, int *sfp_prsnt)
>  	argv4.package.elements = &obj_args,
>  
>  	obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev),
> -				hns_dsaf_acpi_dsm_uuid, 0,
> +				&hns_dsaf_acpi_dsm_guid, 0,
>  				HNS_OP_GET_SFP_STAT_FUNC, &argv4);
>  
>  	if (!obj || obj->type != ACPI_TYPE_INTEGER)
> @@ -565,7 +564,7 @@ hns_mac_config_sds_loopback_acpi(struct hns_mac_cb *mac_cb, bool en)
>  	argv4.package.elements = obj_args;
>  
>  	obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dsaf_dev->dev),
> -				hns_dsaf_acpi_dsm_uuid, 0,
> +				&hns_dsaf_acpi_dsm_guid, 0,
>  				HNS_OP_SERDES_LP_FUNC, &argv4);
>  	if (!obj) {
>  		dev_warn(mac_cb->dsaf_dev->dev, "set port%d serdes lp fail!",
> diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
> index 001860361434..0fafb71dc8ce 100644
> --- a/drivers/pci/pci-acpi.c
> +++ b/drivers/pci/pci-acpi.c
> @@ -21,13 +21,12 @@
>  #include "pci.h"
>  
>  /*
> - * The UUID is defined in the PCI Firmware Specification available here:
> + * The GUID is defined in the PCI Firmware Specification available here:
>   * https://www.pcisig.com/members/downloads/pcifw_r3_1_13Dec10.pdf
>   */
> -const u8 pci_acpi_dsm_uuid[] = {
> -	0xd0, 0x37, 0xc9, 0xe5, 0x53, 0x35, 0x7a, 0x4d,
> -	0x91, 0x17, 0xea, 0x4d, 0x19, 0xc3, 0x43, 0x4d
> -};
> +const guid_t pci_acpi_dsm_guid =
> +	GUID(0xe5c937d0, 0x3553, 0x4d7a,
> +	     0x91, 0x17, 0xea, 0x4d, 0x19, 0xc3, 0x43, 0x4d);
>  
>  #if defined(CONFIG_PCI_QUIRKS) && defined(CONFIG_ARM64)
>  static int acpi_get_rc_addr(struct acpi_device *adev, struct resource *res)
> @@ -680,7 +679,7 @@ void acpi_pci_add_bus(struct pci_bus *bus)
>  	if (!pci_is_root_bus(bus))
>  		return;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), pci_acpi_dsm_uuid, 3,
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 3,
>  				RESET_DELAY_DSM, NULL);
>  	if (!obj)
>  		return;
> @@ -745,7 +744,7 @@ static void pci_acpi_optimize_delay(struct pci_dev *pdev,
>  	if (bridge->ignore_reset_delay)
>  		pdev->d3cold_delay = 0;
>  
> -	obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 3,
> +	obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 3,
>  				FUNCTION_DELAY_DSM, NULL);
>  	if (!obj)
>  		return;
> diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c
> index 51357377efbc..2d8db3ead6e8 100644
> --- a/drivers/pci/pci-label.c
> +++ b/drivers/pci/pci-label.c
> @@ -172,7 +172,7 @@ static int dsm_get_label(struct device *dev, char *buf,
>  	if (!handle)
>  		return -1;
>  
> -	obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 0x2,
> +	obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2,
>  				DEVICE_LABEL_DSM, NULL);
>  	if (!obj)
>  		return -1;
> @@ -212,7 +212,7 @@ static bool device_has_dsm(struct device *dev)
>  	if (!handle)
>  		return false;
>  
> -	return !!acpi_check_dsm(handle, pci_acpi_dsm_uuid, 0x2,
> +	return !!acpi_check_dsm(handle, &pci_acpi_dsm_guid, 0x2,
>  				1 << DEVICE_LABEL_DSM);
>  }
>  
> diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
> index 84a2cebfc712..fe851544d7fb 100644
> --- a/drivers/usb/dwc3/dwc3-pci.c
> +++ b/drivers/usb/dwc3/dwc3-pci.c
> @@ -42,7 +42,7 @@
>  #define PCI_DEVICE_ID_INTEL_CNPLP		0x9dee
>  #define PCI_DEVICE_ID_INTEL_CNPH		0xa36e
>  
> -#define PCI_INTEL_BXT_DSM_UUID		"732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511"
> +#define PCI_INTEL_BXT_DSM_GUID		"732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511"
>  #define PCI_INTEL_BXT_FUNC_PMU_PWR	4
>  #define PCI_INTEL_BXT_STATE_D0		0
>  #define PCI_INTEL_BXT_STATE_D3		3
> @@ -51,14 +51,14 @@
>   * struct dwc3_pci - Driver private structure
>   * @dwc3: child dwc3 platform_device
>   * @pci: our link to PCI bus
> - * @uuid: _DSM UUID
> + * @guid: _DSM GUID
>   * @has_dsm_for_pm: true for devices which need to run _DSM on runtime PM
>   */
>  struct dwc3_pci {
>  	struct platform_device *dwc3;
>  	struct pci_dev *pci;
>  
> -	u8 uuid[16];
> +	guid_t guid;
>  
>  	unsigned int has_dsm_for_pm:1;
>  };
> @@ -120,7 +120,7 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)
>  
>  		if (pdev->device == PCI_DEVICE_ID_INTEL_BXT ||
>  				pdev->device == PCI_DEVICE_ID_INTEL_BXT_M) {
> -			acpi_str_to_uuid(PCI_INTEL_BXT_DSM_UUID, dwc->uuid);
> +			guid_parse(PCI_INTEL_BXT_DSM_GUID, &dwc->guid);
>  			dwc->has_dsm_for_pm = true;
>  		}
>  
> @@ -292,7 +292,7 @@ static int dwc3_pci_dsm(struct dwc3_pci *dwc, int param)
>  	tmp.type = ACPI_TYPE_INTEGER;
>  	tmp.integer.value = param;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(&dwc->pci->dev), dwc->uuid,
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(&dwc->pci->dev), &dwc->guid,
>  			1, PCI_INTEL_BXT_FUNC_PMU_PWR, &argv4);
>  	if (!obj) {
>  		dev_err(&dwc->pci->dev, "failed to evaluate _DSM\n");
> diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
> index fcf1f3f63e7a..954db866aff5 100644
> --- a/drivers/usb/host/xhci-pci.c
> +++ b/drivers/usb/host/xhci-pci.c
> @@ -213,13 +213,12 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
>  #ifdef CONFIG_ACPI
>  static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev)
>  {
> -	static const u8 intel_dsm_uuid[] = {
> -		0xb7, 0x0c, 0x34, 0xac,	0x01, 0xe9, 0xbf, 0x45,
> -		0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23,
> -	};
> +	static const guid_t intel_dsm_guid =
> +		GUID(0xac340cb7, 0xe901, 0x45bf,
> +		     0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23);
>  	union acpi_object *obj;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), intel_dsm_uuid, 3, 1,
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), &intel_dsm_guid, 3, 1,
>  				NULL);
>  	ACPI_FREE(obj);
>  }
> diff --git a/drivers/usb/misc/ucsi.c b/drivers/usb/misc/ucsi.c
> index 07397bddefa3..a9949fc60fc0 100644
> --- a/drivers/usb/misc/ucsi.c
> +++ b/drivers/usb/misc/ucsi.c
> @@ -55,13 +55,13 @@ struct ucsi {
>  
>  static int ucsi_acpi_cmd(struct ucsi *ucsi, struct ucsi_control *ctrl)
>  {
> -	uuid_le uuid = UUID_LE(0x6f8398c2, 0x7ca4, 0x11e4,
> -			       0xad, 0x36, 0x63, 0x10, 0x42, 0xb5, 0x00, 0x8f);
> +	guid_t guid = GUID(0x6f8398c2, 0x7ca4, 0x11e4,
> +			   0xad, 0x36, 0x63, 0x10, 0x42, 0xb5, 0x00, 0x8f);
>  	union acpi_object *obj;
>  
>  	ucsi->data->ctrl.raw_cmd = ctrl->raw_cmd;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(ucsi->dev), uuid.b, 1, 1, NULL);
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(ucsi->dev), &guid, 1, 1, NULL);
>  	if (!obj) {
>  		dev_err(ucsi->dev, "%s: failed to evaluate _DSM\n", __func__);
>  		return -EIO;
> diff --git a/drivers/usb/typec/typec_wcove.c b/drivers/usb/typec/typec_wcove.c
> index d5a7b21fa3f1..62ce988fae21 100644
> --- a/drivers/usb/typec/typec_wcove.c
> +++ b/drivers/usb/typec/typec_wcove.c
> @@ -105,8 +105,8 @@ enum wcove_typec_role {
>  	WCOVE_ROLE_DEVICE,
>  };
>  
> -static uuid_le uuid = UUID_LE(0x482383f0, 0x2876, 0x4e49,
> -			      0x86, 0x85, 0xdb, 0x66, 0x21, 0x1a, 0xf0, 0x37);
> +static guid_t guid = GUID(0x482383f0, 0x2876, 0x4e49,
> +			  0x86, 0x85, 0xdb, 0x66, 0x21, 0x1a, 0xf0, 0x37);
>  
>  static int wcove_typec_func(struct wcove_typec *wcove,
>  			    enum wcove_typec_func func, int param)
> @@ -118,7 +118,7 @@ static int wcove_typec_func(struct wcove_typec *wcove,
>  	tmp.type = ACPI_TYPE_INTEGER;
>  	tmp.integer.value = param;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(wcove->dev), uuid.b, 1, func,
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(wcove->dev), &guid, 1, func,
>  				&argv4);
>  	if (!obj) {
>  		dev_err(wcove->dev, "%s: failed to evaluate _DSM\n", __func__);
> @@ -314,7 +314,7 @@ static int wcove_typec_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	if (!acpi_check_dsm(ACPI_HANDLE(&pdev->dev), uuid.b, 0, 0x1f)) {
> +	if (!acpi_check_dsm(ACPI_HANDLE(&pdev->dev), &guid, 0, 0x1f)) {
>  		dev_err(&pdev->dev, "Missing _DSM functions\n");
>  		return -ENODEV;
>  	}
> diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
> index 197f3fffc9a7..ea7df16e71a7 100644
> --- a/include/acpi/acpi_bus.h
> +++ b/include/acpi/acpi_bus.h
> @@ -61,17 +61,18 @@ bool acpi_ata_match(acpi_handle handle);
>  bool acpi_bay_match(acpi_handle handle);
>  bool acpi_dock_match(acpi_handle handle);
>  
> -bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs);
> -union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid,
> +bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
> +union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
>  			u64 rev, u64 func, union acpi_object *argv4);
>  
>  static inline union acpi_object *
> -acpi_evaluate_dsm_typed(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
> -			union acpi_object *argv4, acpi_object_type type)
> +acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
> +			u64 func, union acpi_object *argv4,
> +			acpi_object_type type)
>  {
>  	union acpi_object *obj;
>  
> -	obj = acpi_evaluate_dsm(handle, uuid, rev, func, argv4);
> +	obj = acpi_evaluate_dsm(handle, guid, rev, func, argv4);
>  	if (obj && obj->type != type) {
>  		ACPI_FREE(obj);
>  		obj = NULL;
> diff --git a/include/linux/acpi.h b/include/linux/acpi.h
> index b0e1636ca5c3..ab19365c905f 100644
> --- a/include/linux/acpi.h
> +++ b/include/linux/acpi.h
> @@ -458,7 +458,6 @@ struct acpi_osc_context {
>  	struct acpi_buffer ret;		/* free by caller if success */
>  };
>  
> -acpi_status acpi_str_to_uuid(char *str, u8 *uuid);
>  acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
>  
>  /* Indexes into _OSC Capabilities Buffer (DWORDs 2 & 3 are device-specific) */
> @@ -742,7 +741,7 @@ static inline bool acpi_driver_match_device(struct device *dev,
>  }
>  
>  static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle,
> -						   const u8 *uuid,
> +						   const guid_t *guid,
>  						   int rev, int func,
>  						   union acpi_object *argv4)
>  {
> diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
> index 7a4e83a8c89c..dd86c97f2454 100644
> --- a/include/linux/pci-acpi.h
> +++ b/include/linux/pci-acpi.h
> @@ -105,7 +105,7 @@ static inline void acpiphp_remove_slots(struct pci_bus *bus) { }
>  static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { }
>  #endif
>  
> -extern const u8 pci_acpi_dsm_uuid[];
> +extern const guid_t pci_acpi_dsm_guid;
>  #define DEVICE_LABEL_DSM	0x07
>  #define RESET_DELAY_DSM		0x08
>  #define FUNCTION_DELAY_DSM	0x09
> diff --git a/sound/soc/intel/skylake/skl-nhlt.c b/sound/soc/intel/skylake/skl-nhlt.c
> index e3f06672fd6d..554065dd518c 100644
> --- a/sound/soc/intel/skylake/skl-nhlt.c
> +++ b/sound/soc/intel/skylake/skl-nhlt.c
> @@ -21,8 +21,9 @@
>  #include "skl.h"
>  
>  /* Unique identification for getting NHLT blobs */
> -static u8 OSC_UUID[16] = {0x6E, 0x88, 0x9F, 0xA6, 0xEB, 0x6C, 0x94, 0x45,
> -				0xA4, 0x1F, 0x7B, 0x5D, 0xCE, 0x24, 0xC5, 0x53};
> +static guid_t osc_guid =
> +	GUID(0xA69F886E, 0x6CEB, 0x4594,
> +	     0xA4, 0x1F, 0x7B, 0x5D, 0xCE, 0x24, 0xC5, 0x53);
>  
>  struct nhlt_acpi_table *skl_nhlt_init(struct device *dev)
>  {
> @@ -37,7 +38,7 @@ struct nhlt_acpi_table *skl_nhlt_init(struct device *dev)
>  		return NULL;
>  	}
>  
> -	obj = acpi_evaluate_dsm(handle, OSC_UUID, 1, 1, NULL);
> +	obj = acpi_evaluate_dsm(handle, &osc_guid, 1, 1, NULL);
>  	if (obj && obj->type == ACPI_TYPE_BUFFER) {
>  		nhlt_ptr = (struct nhlt_resource_desc  *)obj->buffer.pointer;
>  		nhlt_table = (struct nhlt_acpi_table *)
> diff --git a/tools/testing/nvdimm/test/iomap.c b/tools/testing/nvdimm/test/iomap.c
> index 64cae1a5deff..e1f75a1914a1 100644
> --- a/tools/testing/nvdimm/test/iomap.c
> +++ b/tools/testing/nvdimm/test/iomap.c
> @@ -370,7 +370,7 @@ acpi_status __wrap_acpi_evaluate_object(acpi_handle handle, acpi_string path,
>  }
>  EXPORT_SYMBOL(__wrap_acpi_evaluate_object);
>  
> -union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid,
> +union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
>  		u64 rev, u64 func, union acpi_object *argv4)
>  {
>  	union acpi_object *obj = ERR_PTR(-ENXIO);
> @@ -379,11 +379,11 @@ union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid,
>  	rcu_read_lock();
>  	ops = list_first_or_null_rcu(&iomap_head, typeof(*ops), list);
>  	if (ops)
> -		obj = ops->evaluate_dsm(handle, uuid, rev, func, argv4);
> +		obj = ops->evaluate_dsm(handle, guid, rev, func, argv4);
>  	rcu_read_unlock();
>  
>  	if (IS_ERR(obj))
> -		return acpi_evaluate_dsm(handle, uuid, rev, func, argv4);
> +		return acpi_evaluate_dsm(handle, guid, rev, func, argv4);
>  	return obj;
>  }
>  EXPORT_SYMBOL(__wrap_acpi_evaluate_dsm);
> diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c
> index c2187178fb13..28859da78edf 100644
> --- a/tools/testing/nvdimm/test/nfit.c
> +++ b/tools/testing/nvdimm/test/nfit.c
> @@ -1559,7 +1559,7 @@ static unsigned long nfit_ctl_handle;
>  union acpi_object *result;
>  
>  static union acpi_object *nfit_test_evaluate_dsm(acpi_handle handle,
> -		const u8 *uuid, u64 rev, u64 func, union acpi_object *argv4)
> +		const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4)
>  {
>  	if (handle != &nfit_ctl_handle)
>  		return ERR_PTR(-ENXIO);
> -- 
> 2.11.0
> 

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

* Re: [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
  2017-05-31 19:41 ` [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() Andy Shevchenko
@ 2017-06-01 14:24     ` Dan Williams
  2017-05-31 22:42   ` Rafael J. Wysocki
                       ` (5 subsequent siblings)
  6 siblings, 0 replies; 57+ messages in thread
From: Dan Williams @ 2017-06-01 14:24 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Liam Girdwood, Yisen Zhuang, intel-gfx, Amir Goldstein,
	Rafael J . Wysocki, linux-kernel, Jarkko Sakkinen, Adrian Hunter,
	Linux ACPI, Mark Brown, Ben Skeggs, Borislav Petkov,
	Mika Westerberg, Christoph Hellwig

On Wed, May 31, 2017 at 12:41 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
> bytes. Instead we convert them to use guid_t type. At the same time we
> convert current users.
>
> acpi_str_to_uuid() becomes useless after the conversion and it's safe to
> get rid of it.
>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Amir Goldstein <amir73il@gmail.com>
> Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> Acked-by: Jani Nikula <jani.nikula@intel.com>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Acked-by: Joerg Roedel <jroedel@suse.de>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
> Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/acpi/acpi_extlog.c                         |  4 ++--
>  drivers/acpi/bus.c                                 | 23 ----------------------
>  drivers/acpi/nfit/core.c                           |  6 +++---

Acked-by: Dan Williams <dan.j.williams@intel.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
@ 2017-06-01 14:24     ` Dan Williams
  0 siblings, 0 replies; 57+ messages in thread
From: Dan Williams @ 2017-06-01 14:24 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, Rafael J . Wysocki, Linux ACPI,
	Mika Westerberg, Borislav Petkov, intel-gfx, Amir Goldstein,
	Jarkko Sakkinen, Ben Skeggs, Adrian Hunter, Yisen Zhuang,
	Liam Girdwood, Mark Brown

On Wed, May 31, 2017 at 12:41 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
> bytes. Instead we convert them to use guid_t type. At the same time we
> convert current users.
>
> acpi_str_to_uuid() becomes useless after the conversion and it's safe to
> get rid of it.
>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Amir Goldstein <amir73il@gmail.com>
> Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> Acked-by: Jani Nikula <jani.nikula@intel.com>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Acked-by: Joerg Roedel <jroedel@suse.de>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
> Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/acpi/acpi_extlog.c                         |  4 ++--
>  drivers/acpi/bus.c                                 | 23 ----------------------
>  drivers/acpi/nfit/core.c                           |  6 +++---

Acked-by: Dan Williams <dan.j.williams@intel.com>

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

* Re: [PATCH v2 1/5] acpi, nfit: Switch to use new generic UUID API
  2017-05-31 19:41   ` Andy Shevchenko
  (?)
@ 2017-06-01 14:26   ` Dan Williams
  -1 siblings, 0 replies; 57+ messages in thread
From: Dan Williams @ 2017-06-01 14:26 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, Rafael J . Wysocki, Linux ACPI,
	Mika Westerberg, Borislav Petkov, intel-gfx

On Wed, May 31, 2017 at 12:41 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> There are new types and helpers that are supposed to be used in new code.
>
> As a preparation to get rid of legacy types and API functions do
> the conversion here.
>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/acpi/nfit/core.c | 54 ++++++++++++++++++++++++------------------------
>  drivers/acpi/nfit/nfit.h |  3 +--
>  include/linux/acpi.h     |  1 +
>  3 files changed, 29 insertions(+), 29 deletions(-)
>

Looks good to me.

Reviewed-by: Dan Williams <dan.j.williams@intel.com>

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

* Re: [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
  2017-05-31 19:41 ` [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() Andy Shevchenko
                     ` (5 preceding siblings ...)
  2017-06-01 14:24     ` Dan Williams
@ 2017-06-02 12:25   ` Adrian Hunter
  6 siblings, 0 replies; 57+ messages in thread
From: Adrian Hunter @ 2017-06-02 12:25 UTC (permalink / raw)
  To: Andy Shevchenko, Christoph Hellwig, linux-kernel,
	Rafael J . Wysocki, linux-acpi, Dan Williams, Mika Westerberg,
	Borislav Petkov, intel-gfx
  Cc: Amir Goldstein, Jarkko Sakkinen, Ben Skeggs, Yisen Zhuang,
	Liam Girdwood, Mark Brown

On 31/05/17 22:41, Andy Shevchenko wrote:
> acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
> bytes. Instead we convert them to use guid_t type. At the same time we
> convert current users.
> 
> acpi_str_to_uuid() becomes useless after the conversion and it's safe to
> get rid of it.
> 
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Amir Goldstein <amir73il@gmail.com>
> Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> Acked-by: Jani Nikula <jani.nikula@intel.com>
> Cc: Ben Skeggs <bskeggs@redhat.com>
> Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Acked-by: Joerg Roedel <jroedel@suse.de>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Cc: Yisen Zhuang <yisen.zhuang@huawei.com>
> Acked-by: Bjorn Helgaas <bhelgaas@google.com>
> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
> Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> Cc: Liam Girdwood <lgirdwood@gmail.com>
> Cc: Mark Brown <broonie@kernel.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/acpi/acpi_extlog.c                         |  4 ++--
>  drivers/acpi/bus.c                                 | 23 ----------------------
>  drivers/acpi/nfit/core.c                           |  6 +++---
>  drivers/acpi/utils.c                               | 16 +++++++--------
>  drivers/char/tpm/tpm_crb.c                         |  9 ++++-----
>  drivers/char/tpm/tpm_ppi.c                         | 20 ++++++++-----------
>  drivers/gpu/drm/i915/intel_acpi.c                  | 14 +++++--------
>  drivers/gpu/drm/nouveau/nouveau_acpi.c             | 20 +++++++++----------
>  drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c     |  9 ++++-----
>  drivers/hid/i2c-hid/i2c-hid.c                      |  9 ++++-----
>  drivers/iommu/dmar.c                               | 11 +++++------
>  drivers/mmc/host/sdhci-pci-core.c                  |  9 ++++-----

<SNIP>

> diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
> index 92fc3f7c538d..c942ec102c6a 100644
> --- a/drivers/mmc/host/sdhci-pci-core.c
> +++ b/drivers/mmc/host/sdhci-pci-core.c
> @@ -404,10 +404,9 @@ struct intel_host {
>  	bool	d3_retune;
>  };
>  
> -const u8 intel_dsm_uuid[] = {
> -	0xA5, 0x3E, 0xC1, 0xF6, 0xCD, 0x65, 0x1F, 0x46,
> -	0xAB, 0x7A, 0x29, 0xF7, 0xE8, 0xD5, 0xBD, 0x61,
> -};
> +const guid_t intel_dsm_guid =
> +	GUID(0xF6C13EA5, 0x65CD, 0x461F,
> +	     0xAB, 0x7A, 0x29, 0xF7, 0xE8, 0xD5, 0xBD, 0x61);
>  
>  static int __intel_dsm(struct intel_host *intel_host, struct device *dev,
>  		       unsigned int fn, u32 *result)
> @@ -416,7 +415,7 @@ static int __intel_dsm(struct intel_host *intel_host, struct device *dev,
>  	int err = 0;
>  	size_t len;
>  
> -	obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), intel_dsm_uuid, 0, fn, NULL);
> +	obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), &intel_dsm_guid, 0, fn, NULL);
>  	if (!obj)
>  		return -EOPNOTSUPP;
>  

For sdhci:

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

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

* Re: [PATCH v2 1/5] acpi, nfit: Switch to use new generic UUID API
  2017-05-31 19:41   ` Andy Shevchenko
  (?)
  (?)
@ 2017-06-05 16:01   ` Christoph Hellwig
  2017-06-05 16:18       ` Andy Shevchenko
  -1 siblings, 1 reply; 57+ messages in thread
From: Christoph Hellwig @ 2017-06-05 16:01 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx

>  	for (i = 0; i < NFIT_UUID_MAX; i++)
> -		if (memcmp(to_nfit_uuid(i), spa->range_guid, 16) == 0)
> +		if (!guid_equal(to_nfit_uuid(i), (guid_t *)&spa->range_guid))
>  			return i;

I think this should be guid_equal without the "!"

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

* Re: [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
  2017-05-31 19:41   ` Andy Shevchenko
  (?)
  (?)
@ 2017-06-05 16:01   ` Christoph Hellwig
  2017-06-05 16:19       ` Andy Shevchenko
  -1 siblings, 1 reply; 57+ messages in thread
From: Christoph Hellwig @ 2017-06-05 16:01 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx

> -		if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
> -				 CPER_SEC_PLATFORM_MEM)) {
> +		if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {

The "!" here seems incorrect.

>  #ifdef CONFIG_ACPI_APEI_PCIEAER
> -		else if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
> -				      CPER_SEC_PCIE)) {
> +		else if (!guid_equal(sec_type, &CPER_SEC_PCIE)) {

Same here.

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

* Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
  2017-05-31 19:41 ` [PATCH v2 3/5] ACPI / bus: " Andy Shevchenko
@ 2017-06-05 16:03     ` Christoph Hellwig
  2017-05-31 23:56     ` kbuild test robot
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 57+ messages in thread
From: Christoph Hellwig @ 2017-06-05 16:03 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: intel-gfx, Rafael J . Wysocki ,
	linux-kernel, linux-acpi, Dan Williams, Borislav Petkov,
	Mika Westerberg, Christoph Hellwig

> +	in_params[0].buffer.pointer	= (u8 *)&guid;

Any idea why the pointer is defined as a u8 * in union acpi_object
instead of a void?
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
@ 2017-06-05 16:03     ` Christoph Hellwig
  0 siblings, 0 replies; 57+ messages in thread
From: Christoph Hellwig @ 2017-06-05 16:03 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx

> +	in_params[0].buffer.pointer	= (u8 *)&guid;

Any idea why the pointer is defined as a u8 * in union acpi_object
instead of a void?

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

* Re: [PATCH v2 4/5] ACPI / extlog: Switch to use new generic UUID API
  2017-05-31 19:41   ` Andy Shevchenko
  (?)
@ 2017-06-05 16:06   ` Christoph Hellwig
  2017-06-05 16:23       ` Andy Shevchenko
  -1 siblings, 1 reply; 57+ messages in thread
From: Christoph Hellwig @ 2017-06-05 16:06 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, Rafael J . Wysocki ,
	linux-acpi, Dan Williams, Mika Westerberg, Borislav Petkov,
	intel-gfx

> @@ -165,11 +165,11 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
>  	err_seq++;
>  	gdata = (struct acpi_hest_generic_data *)(tmp + 1);
>  	if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID)
> -		fru_id = (uuid_le *)gdata->fru_id;
> +		fru_id = (guid_t *)gdata->fru_id;
>  	if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT)
>  		fru_text = gdata->fru_text;
> -	sec_type = (uuid_le *)gdata->section_type;
> -	if (!uuid_le_cmp(*sec_type, CPER_SEC_PLATFORM_MEM)) {
> +	sec_type = (guid_t *)gdata->section_type;

>From a quick look over the tree it seems like both fru_id and
section_type should be declared as guid_t in
struct acpi_hest_generic_data.

> +	if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {

The "!" seems incorrect here.

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

* Re: [PATCH v2 1/5] acpi, nfit: Switch to use new generic UUID API
  2017-06-05 16:01   ` Christoph Hellwig
@ 2017-06-05 16:18       ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-06-05 16:18 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: intel-gfx, Rafael J . Wysocki, linux-kernel, linux-acpi,
	Dan Williams, Borislav Petkov, Mika Westerberg

On Mon, 2017-06-05 at 18:01 +0200, Christoph Hellwig wrote:
> >  	for (i = 0; i < NFIT_UUID_MAX; i++)
> > -		if (memcmp(to_nfit_uuid(i), spa->range_guid, 16) ==
> > 0)
> > +		if (!guid_equal(to_nfit_uuid(i), (guid_t *)&spa-
> > >range_guid))
> >  			return i;
> 
> I think this should be guid_equal without the "!"

Right.


-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 1/5] acpi, nfit: Switch to use new generic UUID API
@ 2017-06-05 16:18       ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-06-05 16:18 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-kernel, Rafael J . Wysocki, linux-acpi, Dan Williams,
	Mika Westerberg, Borislav Petkov, intel-gfx

On Mon, 2017-06-05 at 18:01 +0200, Christoph Hellwig wrote:
> >  	for (i = 0; i < NFIT_UUID_MAX; i++)
> > -		if (memcmp(to_nfit_uuid(i), spa->range_guid, 16) ==
> > 0)
> > +		if (!guid_equal(to_nfit_uuid(i), (guid_t *)&spa-
> > >range_guid))
> >  			return i;
> 
> I think this should be guid_equal without the "!"

Right.


-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
  2017-06-05 16:01   ` Christoph Hellwig
@ 2017-06-05 16:19       ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-06-05 16:19 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: intel-gfx, Rafael J . Wysocki, linux-kernel, linux-acpi,
	Dan Williams, Borislav Petkov, Mika Westerberg

On Mon, 2017-06-05 at 18:01 +0200, Christoph Hellwig wrote:
> > -		if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
> > -				 CPER_SEC_PLATFORM_MEM)) {
> > +		if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM))
> > {
> 
> The "!" here seems incorrect.
> 
> >  #ifdef CONFIG_ACPI_APEI_PCIEAER
> > -		else if (!uuid_le_cmp(*(uuid_le *)gdata-
> > >section_type,
> > -				      CPER_SEC_PCIE)) {
> > +		else if (!guid_equal(sec_type, &CPER_SEC_PCIE)) {
> 
> Same here.

Thanks!
Are you going to fixup when applying or better me to send an updated
version?

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
@ 2017-06-05 16:19       ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-06-05 16:19 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-kernel, Rafael J . Wysocki, linux-acpi, Dan Williams,
	Mika Westerberg, Borislav Petkov, intel-gfx

On Mon, 2017-06-05 at 18:01 +0200, Christoph Hellwig wrote:
> > -		if (!uuid_le_cmp(*(uuid_le *)gdata->section_type,
> > -				 CPER_SEC_PLATFORM_MEM)) {
> > +		if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM))
> > {
> 
> The "!" here seems incorrect.
> 
> >  #ifdef CONFIG_ACPI_APEI_PCIEAER
> > -		else if (!uuid_le_cmp(*(uuid_le *)gdata-
> > >section_type,
> > -				      CPER_SEC_PCIE)) {
> > +		else if (!guid_equal(sec_type, &CPER_SEC_PCIE)) {
> 
> Same here.

Thanks!
Are you going to fixup when applying or better me to send an updated
version?

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
  2017-06-05 16:03     ` Christoph Hellwig
@ 2017-06-05 16:20       ` Andy Shevchenko
  -1 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-06-05 16:20 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: intel-gfx, Rafael J . Wysocki, linux-kernel, linux-acpi,
	Dan Williams, Borislav Petkov, Mika Westerberg

On Mon, 2017-06-05 at 18:03 +0200, Christoph Hellwig wrote:
> > +	in_params[0].buffer.pointer	= (u8 *)&guid;
> 
> Any idea why the pointer is defined as a u8 * in union acpi_object
> instead of a void?

I guess this question to Rafael.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
@ 2017-06-05 16:20       ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-06-05 16:20 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-kernel, Rafael J . Wysocki, linux-acpi, Dan Williams,
	Mika Westerberg, Borislav Petkov, intel-gfx

On Mon, 2017-06-05 at 18:03 +0200, Christoph Hellwig wrote:
> > +	in_params[0].buffer.pointer	= (u8 *)&guid;
> 
> Any idea why the pointer is defined as a u8 * in union acpi_object
> instead of a void?

I guess this question to Rafael.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
  2017-06-05 16:19       ` Andy Shevchenko
@ 2017-06-05 16:22         ` Christoph Hellwig
  -1 siblings, 0 replies; 57+ messages in thread
From: Christoph Hellwig @ 2017-06-05 16:22 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: intel-gfx, Rafael J . Wysocki, linux-kernel, linux-acpi,
	Dan Williams, Borislav Petkov, Mika Westerberg,
	Christoph Hellwig

On Mon, Jun 05, 2017 at 07:19:43PM +0300, Andy Shevchenko wrote:
> Thanks!
> Are you going to fixup when applying or better me to send an updated
> version?

I'd prefer a resend so that all the maintainers can carefully re-review
the patches.
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
@ 2017-06-05 16:22         ` Christoph Hellwig
  0 siblings, 0 replies; 57+ messages in thread
From: Christoph Hellwig @ 2017-06-05 16:22 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, Rafael J . Wysocki, linux-acpi,
	Dan Williams, Mika Westerberg, Borislav Petkov, intel-gfx

On Mon, Jun 05, 2017 at 07:19:43PM +0300, Andy Shevchenko wrote:
> Thanks!
> Are you going to fixup when applying or better me to send an updated
> version?

I'd prefer a resend so that all the maintainers can carefully re-review
the patches.

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

* Re: [PATCH v2 4/5] ACPI / extlog: Switch to use new generic UUID API
  2017-06-05 16:06   ` Christoph Hellwig
@ 2017-06-05 16:23       ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-06-05 16:23 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: intel-gfx, Rafael J . Wysocki, linux-kernel, linux-acpi,
	Dan Williams, Borislav Petkov, Mika Westerberg

On Mon, 2017-06-05 at 18:06 +0200, Christoph Hellwig wrote:
> > @@ -165,11 +165,11 @@ static int extlog_print(struct notifier_block
> > *nb, unsigned long val,
> >  	err_seq++;
> >  	gdata = (struct acpi_hest_generic_data *)(tmp + 1);
> >  	if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID)
> > -		fru_id = (uuid_le *)gdata->fru_id;
> > +		fru_id = (guid_t *)gdata->fru_id;
> >  	if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT)
> >  		fru_text = gdata->fru_text;
> > -	sec_type = (uuid_le *)gdata->section_type;
> > -	if (!uuid_le_cmp(*sec_type, CPER_SEC_PLATFORM_MEM)) {
> > +	sec_type = (guid_t *)gdata->section_type;
> 
> From a quick look over the tree it seems like both fru_id and
> section_type should be declared as guid_t in
> struct acpi_hest_generic_data.


They are arrays of 16 u8:s.
And since it's defined in ACPI table definition I'm not sure we can
change it.

> 
> > +	if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
> 
> The "!" seems incorrect here.

Right.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 4/5] ACPI / extlog: Switch to use new generic UUID API
@ 2017-06-05 16:23       ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-06-05 16:23 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-kernel, Rafael J . Wysocki, linux-acpi, Dan Williams,
	Mika Westerberg, Borislav Petkov, intel-gfx

On Mon, 2017-06-05 at 18:06 +0200, Christoph Hellwig wrote:
> > @@ -165,11 +165,11 @@ static int extlog_print(struct notifier_block
> > *nb, unsigned long val,
> >  	err_seq++;
> >  	gdata = (struct acpi_hest_generic_data *)(tmp + 1);
> >  	if (gdata->validation_bits & CPER_SEC_VALID_FRU_ID)
> > -		fru_id = (uuid_le *)gdata->fru_id;
> > +		fru_id = (guid_t *)gdata->fru_id;
> >  	if (gdata->validation_bits & CPER_SEC_VALID_FRU_TEXT)
> >  		fru_text = gdata->fru_text;
> > -	sec_type = (uuid_le *)gdata->section_type;
> > -	if (!uuid_le_cmp(*sec_type, CPER_SEC_PLATFORM_MEM)) {
> > +	sec_type = (guid_t *)gdata->section_type;
> 
> From a quick look over the tree it seems like both fru_id and
> section_type should be declared as guid_t in
> struct acpi_hest_generic_data.


They are arrays of 16 u8:s.
And since it's defined in ACPI table definition I'm not sure we can
change it.

> 
> > +	if (!guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
> 
> The "!" seems incorrect here.

Right.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
  2017-06-05 16:22         ` Christoph Hellwig
@ 2017-06-05 16:28           ` Andy Shevchenko
  -1 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-06-05 16:28 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: intel-gfx, Rafael J . Wysocki, linux-kernel, linux-acpi,
	Dan Williams, Borislav Petkov, Mika Westerberg

On Mon, 2017-06-05 at 18:22 +0200, Christoph Hellwig wrote:
> On Mon, Jun 05, 2017 at 07:19:43PM +0300, Andy Shevchenko wrote:
> > Thanks!
> > Are you going to fixup when applying or better me to send an updated
> > version?
> 
> I'd prefer a resend so that all the maintainers can carefully re-
> review
> the patches.

I'm on it.
Thanks for review.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 2/5] ACPI / APEI: Switch to use new generic UUID API
@ 2017-06-05 16:28           ` Andy Shevchenko
  0 siblings, 0 replies; 57+ messages in thread
From: Andy Shevchenko @ 2017-06-05 16:28 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: linux-kernel, Rafael J . Wysocki, linux-acpi, Dan Williams,
	Mika Westerberg, Borislav Petkov, intel-gfx

On Mon, 2017-06-05 at 18:22 +0200, Christoph Hellwig wrote:
> On Mon, Jun 05, 2017 at 07:19:43PM +0300, Andy Shevchenko wrote:
> > Thanks!
> > Are you going to fixup when applying or better me to send an updated
> > version?
> 
> I'd prefer a resend so that all the maintainers can carefully re-
> review
> the patches.

I'm on it.
Thanks for review.

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

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

* Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
  2017-06-05 16:20       ` Andy Shevchenko
@ 2017-06-05 20:37         ` Rafael J. Wysocki
  -1 siblings, 0 replies; 57+ messages in thread
From: Rafael J. Wysocki @ 2017-06-05 20:37 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: intel-gfx, Rafael J . Wysocki, Linux Kernel Mailing List,
	ACPI Devel Maling List, Dan Williams, Borislav Petkov,
	Mika Westerberg, Christoph Hellwig

On Mon, Jun 5, 2017 at 6:20 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> On Mon, 2017-06-05 at 18:03 +0200, Christoph Hellwig wrote:
>> > +   in_params[0].buffer.pointer     = (u8 *)&guid;
>>
>> Any idea why the pointer is defined as a u8 * in union acpi_object
>> instead of a void?
>
> I guess this question to Rafael.

That data type is defined in upstream ACPICA and the reason why it is
defined the way it is has something to do with history I suppose.

Thanks,
Rafael
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
@ 2017-06-05 20:37         ` Rafael J. Wysocki
  0 siblings, 0 replies; 57+ messages in thread
From: Rafael J. Wysocki @ 2017-06-05 20:37 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, Linux Kernel Mailing List, Rafael J . Wysocki,
	ACPI Devel Maling List, Dan Williams, Mika Westerberg,
	Borislav Petkov, intel-gfx

On Mon, Jun 5, 2017 at 6:20 PM, Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
> On Mon, 2017-06-05 at 18:03 +0200, Christoph Hellwig wrote:
>> > +   in_params[0].buffer.pointer     = (u8 *)&guid;
>>
>> Any idea why the pointer is defined as a u8 * in union acpi_object
>> instead of a void?
>
> I guess this question to Rafael.

That data type is defined in upstream ACPICA and the reason why it is
defined the way it is has something to do with history I suppose.

Thanks,
Rafael

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

* Re: [PATCH v2 4/5] ACPI / extlog: Switch to use new generic UUID API
  2017-06-05 16:23       ` Andy Shevchenko
  (?)
@ 2017-06-05 21:23       ` Christoph Hellwig
  -1 siblings, 0 replies; 57+ messages in thread
From: Christoph Hellwig @ 2017-06-05 21:23 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Christoph Hellwig, linux-kernel, Rafael J . Wysocki, linux-acpi,
	Dan Williams, Mika Westerberg, Borislav Petkov, intel-gfx

On Mon, Jun 05, 2017 at 07:23:05PM +0300, Andy Shevchenko wrote:
> > From a quick look over the tree it seems like both fru_id and
> > section_type should be declared as guid_t in
> > struct acpi_hest_generic_data.
> 
> 
> They are arrays of 16 u8:s.

As is the guid_t.

> And since it's defined in ACPI table definition I'm not sure we can
> change it.

If we always use 16 u8s as guid_t we might as well define the structure
as such, instead of all the casts that remove type safety.

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

* Re: [PATCH v2 3/5] ACPI / bus: Switch to use new generic UUID API
  2017-06-05 20:37         ` Rafael J. Wysocki
  (?)
@ 2017-06-06  9:58         ` Christoph Hellwig
  -1 siblings, 0 replies; 57+ messages in thread
From: Christoph Hellwig @ 2017-06-06  9:58 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Andy Shevchenko, Christoph Hellwig, Linux Kernel Mailing List,
	Rafael J . Wysocki, ACPI Devel Maling List, Dan Williams,
	Mika Westerberg, Borislav Petkov, intel-gfx

On Mon, Jun 05, 2017 at 10:37:41PM +0200, Rafael J. Wysocki wrote:
> On Mon, Jun 5, 2017 at 6:20 PM, Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> wrote:
> > On Mon, 2017-06-05 at 18:03 +0200, Christoph Hellwig wrote:
> >> > +   in_params[0].buffer.pointer     = (u8 *)&guid;
> >>
> >> Any idea why the pointer is defined as a u8 * in union acpi_object
> >> instead of a void?
> >
> > I guess this question to Rafael.
> 
> That data type is defined in upstream ACPICA and the reason why it is
> defined the way it is has something to do with history I suppose.

Ok, I'll send a patch to fix it - just about every user of the field
currently requires a cast, which is not a good thing.

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

end of thread, other threads:[~2017-06-06  9:58 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-31 19:41 [PATCH v2 0/5] ACPI et al: convert to use new UUID API Andy Shevchenko
2017-05-31 19:41 ` Andy Shevchenko
2017-05-31 19:41 ` [PATCH v2 1/5] acpi, nfit: Switch to use new generic " Andy Shevchenko
2017-05-31 19:41   ` Andy Shevchenko
2017-06-01 14:26   ` Dan Williams
2017-06-05 16:01   ` Christoph Hellwig
2017-06-05 16:18     ` Andy Shevchenko
2017-06-05 16:18       ` Andy Shevchenko
2017-05-31 19:41 ` [PATCH v2 2/5] ACPI / APEI: " Andy Shevchenko
2017-05-31 19:41   ` Andy Shevchenko
2017-05-31 23:56   ` kbuild test robot
2017-05-31 23:56     ` [Intel-gfx] " kbuild test robot
2017-06-01  9:50     ` Andy Shevchenko
2017-06-01  9:50       ` [Intel-gfx] " Andy Shevchenko
2017-06-05 16:01   ` Christoph Hellwig
2017-06-05 16:19     ` Andy Shevchenko
2017-06-05 16:19       ` Andy Shevchenko
2017-06-05 16:22       ` Christoph Hellwig
2017-06-05 16:22         ` Christoph Hellwig
2017-06-05 16:28         ` Andy Shevchenko
2017-06-05 16:28           ` Andy Shevchenko
2017-05-31 19:41 ` [PATCH v2 3/5] ACPI / bus: " Andy Shevchenko
2017-05-31 22:42   ` Rafael J. Wysocki
2017-05-31 23:56   ` kbuild test robot
2017-05-31 23:56     ` kbuild test robot
2017-06-01  0:05   ` kbuild test robot
2017-06-01  0:05     ` kbuild test robot
2017-06-05 16:03   ` Christoph Hellwig
2017-06-05 16:03     ` Christoph Hellwig
2017-06-05 16:20     ` Andy Shevchenko
2017-06-05 16:20       ` Andy Shevchenko
2017-06-05 20:37       ` Rafael J. Wysocki
2017-06-05 20:37         ` Rafael J. Wysocki
2017-06-06  9:58         ` Christoph Hellwig
2017-05-31 19:41 ` [PATCH v2 4/5] ACPI / extlog: " Andy Shevchenko
2017-05-31 19:41   ` Andy Shevchenko
2017-06-05 16:06   ` Christoph Hellwig
2017-06-05 16:23     ` Andy Shevchenko
2017-06-05 16:23       ` Andy Shevchenko
2017-06-05 21:23       ` Christoph Hellwig
2017-05-31 19:41 ` [PATCH v2 5/5] ACPI: Switch to use generic guid_t in acpi_evaluate_dsm() Andy Shevchenko
2017-05-31 20:21   ` Mark Brown
2017-05-31 22:42   ` Rafael J. Wysocki
2017-06-01  6:03     ` Christoph Hellwig
2017-06-01  0:08   ` kbuild test robot
2017-06-01  0:08     ` kbuild test robot
2017-06-01  0:11   ` kbuild test robot
2017-06-01  0:11     ` kbuild test robot
2017-06-01 14:12   ` Jarkko Sakkinen
2017-06-01 14:12     ` Jarkko Sakkinen
2017-06-01 14:24   ` Dan Williams
2017-06-01 14:24     ` Dan Williams
2017-06-02 12:25   ` Adrian Hunter
2017-05-31 19:45 ` [PATCH v2 0/5] ACPI et al: convert to use new UUID API Christoph Hellwig
2017-05-31 19:45 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-05-31 20:07 ` [PATCH v2 0/5] " Andy Shevchenko
2017-05-31 20:07   ` Andy Shevchenko

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.