aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-06-05 12:40:46 -0400
committerChristoph Hellwig <hch@lst.de>2017-06-07 06:20:49 -0400
commit94116f8126de9762751fd92731581b73b56292e5 (patch)
tree1e3ed03c2b8f164077b7f3b6484118523d0c8ae0
parentb7fe92999a98a9aab3c292bd44942f3bdbe04765 (diff)
ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()
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> Cc: Borislav Petkov <bp@suse.de> Acked-by: Dan Williams <dan.j.williams@intel.com> Cc: Amir Goldstein <amir73il@gmail.com> Reviewed-by: 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> Acked-by: 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> Acked-by: Mark Brown <broonie@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/acpi/acpi_extlog.c4
-rw-r--r--drivers/acpi/bus.c23
-rw-r--r--drivers/acpi/nfit/core.c6
-rw-r--r--drivers/acpi/utils.c16
-rw-r--r--drivers/char/tpm/tpm_crb.c9
-rw-r--r--drivers/char/tpm/tpm_ppi.c20
-rw-r--r--drivers/gpu/drm/i915/intel_acpi.c14
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_acpi.c20
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c9
-rw-r--r--drivers/hid/i2c-hid/i2c-hid.c9
-rw-r--r--drivers/iommu/dmar.c11
-rw-r--r--drivers/mmc/host/sdhci-pci-core.c9
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c15
-rw-r--r--drivers/pci/pci-acpi.c13
-rw-r--r--drivers/pci/pci-label.c4
-rw-r--r--drivers/usb/dwc3/dwc3-pci.c10
-rw-r--r--drivers/usb/host/xhci-pci.c9
-rw-r--r--drivers/usb/misc/ucsi.c6
-rw-r--r--drivers/usb/typec/typec_wcove.c8
-rw-r--r--include/acpi/acpi_bus.h11
-rw-r--r--include/linux/acpi.h3
-rw-r--r--include/linux/pci-acpi.h2
-rw-r--r--sound/soc/intel/skylake/skl-nhlt.c7
-rw-r--r--tools/testing/nvdimm/test/iomap.c6
-rw-r--r--tools/testing/nvdimm/test/nfit.c2
-rw-r--r--tools/testing/nvdimm/test/nfit_test.h4
26 files changed, 106 insertions, 144 deletions
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index 193529417cc3..560fdae8cc59 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -190,9 +190,9 @@ static bool __init extlog_get_l1addr(void)
190 return false; 190 return false;
191 if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle))) 191 if (ACPI_FAILURE(acpi_get_handle(NULL, "\\_SB", &handle)))
192 return false; 192 return false;
193 if (!acpi_check_dsm(handle, guid.b, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR)) 193 if (!acpi_check_dsm(handle, &guid, EXTLOG_DSM_REV, 1 << EXTLOG_FN_ADDR))
194 return false; 194 return false;
195 obj = acpi_evaluate_dsm_typed(handle, guid.b, EXTLOG_DSM_REV, 195 obj = acpi_evaluate_dsm_typed(handle, &guid, EXTLOG_DSM_REV,
196 EXTLOG_FN_ADDR, NULL, ACPI_TYPE_INTEGER); 196 EXTLOG_FN_ADDR, NULL, ACPI_TYPE_INTEGER);
197 if (!obj) { 197 if (!obj) {
198 return false; 198 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,
196 pr_debug("\n"); 196 pr_debug("\n");
197} 197}
198 198
199acpi_status acpi_str_to_uuid(char *str, u8 *uuid)
200{
201 int i;
202 static int opc_map_to_uuid[16] = {6, 4, 2, 0, 11, 9, 16, 14, 19, 21,
203 24, 26, 28, 30, 32, 34};
204
205 if (strlen(str) != 36)
206 return AE_BAD_PARAMETER;
207 for (i = 0; i < 36; i++) {
208 if (i == 8 || i == 13 || i == 18 || i == 23) {
209 if (str[i] != '-')
210 return AE_BAD_PARAMETER;
211 } else if (!isxdigit(str[i]))
212 return AE_BAD_PARAMETER;
213 }
214 for (i = 0; i < 16; i++) {
215 uuid[i] = hex_to_bin(str[opc_map_to_uuid[i]]) << 4;
216 uuid[i] |= hex_to_bin(str[opc_map_to_uuid[i] + 1]);
217 }
218 return AE_OK;
219}
220EXPORT_SYMBOL_GPL(acpi_str_to_uuid);
221
222acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context) 199acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context)
223{ 200{
224 acpi_status status; 201 acpi_status status;
diff --git a/drivers/acpi/nfit/core.c b/drivers/acpi/nfit/core.c
index d9b39d0e9d6a..097eff0b963d 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,
289 in_buf.buffer.pointer, 289 in_buf.buffer.pointer,
290 min_t(u32, 256, in_buf.buffer.length), true); 290 min_t(u32, 256, in_buf.buffer.length), true);
291 291
292 out_obj = acpi_evaluate_dsm(handle, guid.b, 1, func, &in_obj); 292 out_obj = acpi_evaluate_dsm(handle, guid, 1, func, &in_obj);
293 if (!out_obj) { 293 if (!out_obj) {
294 dev_dbg(dev, "%s:%s _DSM failed cmd: %s\n", __func__, dimm_name, 294 dev_dbg(dev, "%s:%s _DSM failed cmd: %s\n", __func__, dimm_name,
295 cmd_name); 295 cmd_name);
@@ -1476,7 +1476,7 @@ static int acpi_nfit_add_dimm(struct acpi_nfit_desc *acpi_desc,
1476 1476
1477 guid = to_nfit_uuid(nfit_mem->family); 1477 guid = to_nfit_uuid(nfit_mem->family);
1478 for_each_set_bit(i, &dsm_mask, BITS_PER_LONG) 1478 for_each_set_bit(i, &dsm_mask, BITS_PER_LONG)
1479 if (acpi_check_dsm(adev_dimm->handle, guid.b, 1, 1ULL << i)) 1479 if (acpi_check_dsm(adev_dimm->handle, guid, 1, 1ULL << i))
1480 set_bit(i, &nfit_mem->dsm_mask); 1480 set_bit(i, &nfit_mem->dsm_mask);
1481 1481
1482 return 0; 1482 return 0;
@@ -1621,7 +1621,7 @@ static void acpi_nfit_init_dsms(struct acpi_nfit_desc *acpi_desc)
1621 return; 1621 return;
1622 1622
1623 for (i = ND_CMD_ARS_CAP; i <= ND_CMD_CLEAR_ERROR; i++) 1623 for (i = ND_CMD_ARS_CAP; i <= ND_CMD_CLEAR_ERROR; i++)
1624 if (acpi_check_dsm(adev->handle, guid.b, 1, 1ULL << i)) 1624 if (acpi_check_dsm(adev->handle, guid, 1, 1ULL << i))
1625 set_bit(i, &nd_desc->cmd_mask); 1625 set_bit(i, &nd_desc->cmd_mask);
1626} 1626}
1627 1627
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 27d0dcfcf47d..b9d956c916f5 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)
613/** 613/**
614 * acpi_evaluate_dsm - evaluate device's _DSM method 614 * acpi_evaluate_dsm - evaluate device's _DSM method
615 * @handle: ACPI device handle 615 * @handle: ACPI device handle
616 * @uuid: UUID of requested functions, should be 16 bytes 616 * @guid: GUID of requested functions, should be 16 bytes
617 * @rev: revision number of requested function 617 * @rev: revision number of requested function
618 * @func: requested function number 618 * @func: requested function number
619 * @argv4: the function specific parameter 619 * @argv4: the function specific parameter
620 * 620 *
621 * Evaluate device's _DSM method with specified UUID, revision id and 621 * Evaluate device's _DSM method with specified GUID, revision id and
622 * function number. Caller needs to free the returned object. 622 * function number. Caller needs to free the returned object.
623 * 623 *
624 * Though ACPI defines the fourth parameter for _DSM should be a package, 624 * Though ACPI defines the fourth parameter for _DSM should be a package,
625 * some old BIOSes do expect a buffer or an integer etc. 625 * some old BIOSes do expect a buffer or an integer etc.
626 */ 626 */
627union acpi_object * 627union acpi_object *
628acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 func, 628acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func,
629 union acpi_object *argv4) 629 union acpi_object *argv4)
630{ 630{
631 acpi_status ret; 631 acpi_status ret;
@@ -638,7 +638,7 @@ acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
638 638
639 params[0].type = ACPI_TYPE_BUFFER; 639 params[0].type = ACPI_TYPE_BUFFER;
640 params[0].buffer.length = 16; 640 params[0].buffer.length = 16;
641 params[0].buffer.pointer = (char *)uuid; 641 params[0].buffer.pointer = (u8 *)guid;
642 params[1].type = ACPI_TYPE_INTEGER; 642 params[1].type = ACPI_TYPE_INTEGER;
643 params[1].integer.value = rev; 643 params[1].integer.value = rev;
644 params[2].type = ACPI_TYPE_INTEGER; 644 params[2].type = ACPI_TYPE_INTEGER;
@@ -666,7 +666,7 @@ EXPORT_SYMBOL(acpi_evaluate_dsm);
666/** 666/**
667 * acpi_check_dsm - check if _DSM method supports requested functions. 667 * acpi_check_dsm - check if _DSM method supports requested functions.
668 * @handle: ACPI device handle 668 * @handle: ACPI device handle
669 * @uuid: UUID of requested functions, should be 16 bytes at least 669 * @guid: GUID of requested functions, should be 16 bytes at least
670 * @rev: revision number of requested functions 670 * @rev: revision number of requested functions
671 * @funcs: bitmap of requested functions 671 * @funcs: bitmap of requested functions
672 * 672 *
@@ -674,7 +674,7 @@ EXPORT_SYMBOL(acpi_evaluate_dsm);
674 * functions. Currently only support 64 functions at maximum, should be 674 * functions. Currently only support 64 functions at maximum, should be
675 * enough for now. 675 * enough for now.
676 */ 676 */
677bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs) 677bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs)
678{ 678{
679 int i; 679 int i;
680 u64 mask = 0; 680 u64 mask = 0;
@@ -683,7 +683,7 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
683 if (funcs == 0) 683 if (funcs == 0)
684 return false; 684 return false;
685 685
686 obj = acpi_evaluate_dsm(handle, uuid, rev, 0, NULL); 686 obj = acpi_evaluate_dsm(handle, guid, rev, 0, NULL);
687 if (!obj) 687 if (!obj)
688 return false; 688 return false;
689 689
@@ -697,7 +697,7 @@ bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
697 697
698 /* 698 /*
699 * Bit 0 indicates whether there's support for any functions other than 699 * Bit 0 indicates whether there's support for any functions other than
700 * function 0 for the specified UUID and revision. 700 * function 0 for the specified GUID and revision.
701 */ 701 */
702 if ((mask & 0x1) && (mask & funcs) == funcs) 702 if ((mask & 0x1) && (mask & funcs) == funcs)
703 return true; 703 return true;
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index b917b9d5f710..c378c7b15d49 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_crb.c
@@ -27,10 +27,9 @@
27 27
28#define ACPI_SIG_TPM2 "TPM2" 28#define ACPI_SIG_TPM2 "TPM2"
29 29
30static const u8 CRB_ACPI_START_UUID[] = { 30static const guid_t crb_acpi_start_guid =
31 /* 0000 */ 0xAB, 0x6C, 0xBF, 0x6B, 0x63, 0x54, 0x14, 0x47, 31 GUID_INIT(0x6BBF6CAB, 0x5463, 0x4714,
32 /* 0008 */ 0xB7, 0xCD, 0xF0, 0x20, 0x3C, 0x03, 0x68, 0xD4 32 0xB7, 0xCD, 0xF0, 0x20, 0x3C, 0x03, 0x68, 0xD4);
33};
34 33
35enum crb_defaults { 34enum crb_defaults {
36 CRB_ACPI_START_REVISION_ID = 1, 35 CRB_ACPI_START_REVISION_ID = 1,
@@ -266,7 +265,7 @@ static int crb_do_acpi_start(struct tpm_chip *chip)
266 int rc; 265 int rc;
267 266
268 obj = acpi_evaluate_dsm(chip->acpi_dev_handle, 267 obj = acpi_evaluate_dsm(chip->acpi_dev_handle,
269 CRB_ACPI_START_UUID, 268 &crb_acpi_start_guid,
270 CRB_ACPI_START_REVISION_ID, 269 CRB_ACPI_START_REVISION_ID,
271 CRB_ACPI_START_INDEX, 270 CRB_ACPI_START_INDEX,
272 NULL); 271 NULL);
diff --git a/drivers/char/tpm/tpm_ppi.c b/drivers/char/tpm/tpm_ppi.c
index 692a2c6ae036..86dd8521feef 100644
--- a/drivers/char/tpm/tpm_ppi.c
+++ b/drivers/char/tpm/tpm_ppi.c
@@ -32,20 +32,16 @@
32#define PPI_VS_REQ_START 128 32#define PPI_VS_REQ_START 128
33#define PPI_VS_REQ_END 255 33#define PPI_VS_REQ_END 255
34 34
35static const u8 tpm_ppi_uuid[] = { 35static const guid_t tpm_ppi_guid =
36 0xA6, 0xFA, 0xDD, 0x3D, 36 GUID_INIT(0x3DDDFAA6, 0x361B, 0x4EB4,
37 0x1B, 0x36, 37 0xA4, 0x24, 0x8D, 0x10, 0x08, 0x9D, 0x16, 0x53);
38 0xB4, 0x4E,
39 0xA4, 0x24,
40 0x8D, 0x10, 0x08, 0x9D, 0x16, 0x53
41};
42 38
43static inline union acpi_object * 39static inline union acpi_object *
44tpm_eval_dsm(acpi_handle ppi_handle, int func, acpi_object_type type, 40tpm_eval_dsm(acpi_handle ppi_handle, int func, acpi_object_type type,
45 union acpi_object *argv4) 41 union acpi_object *argv4)
46{ 42{
47 BUG_ON(!ppi_handle); 43 BUG_ON(!ppi_handle);
48 return acpi_evaluate_dsm_typed(ppi_handle, tpm_ppi_uuid, 44 return acpi_evaluate_dsm_typed(ppi_handle, &tpm_ppi_guid,
49 TPM_PPI_REVISION_ID, 45 TPM_PPI_REVISION_ID,
50 func, argv4, type); 46 func, argv4, type);
51} 47}
@@ -107,7 +103,7 @@ static ssize_t tpm_store_ppi_request(struct device *dev,
107 * is updated with function index from SUBREQ to SUBREQ2 since PPI 103 * is updated with function index from SUBREQ to SUBREQ2 since PPI
108 * version 1.1 104 * version 1.1
109 */ 105 */
110 if (acpi_check_dsm(chip->acpi_dev_handle, tpm_ppi_uuid, 106 if (acpi_check_dsm(chip->acpi_dev_handle, &tpm_ppi_guid,
111 TPM_PPI_REVISION_ID, 1 << TPM_PPI_FN_SUBREQ2)) 107 TPM_PPI_REVISION_ID, 1 << TPM_PPI_FN_SUBREQ2))
112 func = TPM_PPI_FN_SUBREQ2; 108 func = TPM_PPI_FN_SUBREQ2;
113 109
@@ -268,7 +264,7 @@ static ssize_t show_ppi_operations(acpi_handle dev_handle, char *buf, u32 start,
268 "User not required", 264 "User not required",
269 }; 265 };
270 266
271 if (!acpi_check_dsm(dev_handle, tpm_ppi_uuid, TPM_PPI_REVISION_ID, 267 if (!acpi_check_dsm(dev_handle, &tpm_ppi_guid, TPM_PPI_REVISION_ID,
272 1 << TPM_PPI_FN_GETOPR)) 268 1 << TPM_PPI_FN_GETOPR))
273 return -EPERM; 269 return -EPERM;
274 270
@@ -341,12 +337,12 @@ void tpm_add_ppi(struct tpm_chip *chip)
341 if (!chip->acpi_dev_handle) 337 if (!chip->acpi_dev_handle)
342 return; 338 return;
343 339
344 if (!acpi_check_dsm(chip->acpi_dev_handle, tpm_ppi_uuid, 340 if (!acpi_check_dsm(chip->acpi_dev_handle, &tpm_ppi_guid,
345 TPM_PPI_REVISION_ID, 1 << TPM_PPI_FN_VERSION)) 341 TPM_PPI_REVISION_ID, 1 << TPM_PPI_FN_VERSION))
346 return; 342 return;
347 343
348 /* Cache PPI version string. */ 344 /* Cache PPI version string. */
349 obj = acpi_evaluate_dsm_typed(chip->acpi_dev_handle, tpm_ppi_uuid, 345 obj = acpi_evaluate_dsm_typed(chip->acpi_dev_handle, &tpm_ppi_guid,
350 TPM_PPI_REVISION_ID, TPM_PPI_FN_VERSION, 346 TPM_PPI_REVISION_ID, TPM_PPI_FN_VERSION,
351 NULL, ACPI_TYPE_STRING); 347 NULL, ACPI_TYPE_STRING);
352 if (obj) { 348 if (obj) {
diff --git a/drivers/gpu/drm/i915/intel_acpi.c b/drivers/gpu/drm/i915/intel_acpi.c
index eb638a1e69d2..42fb436f6cdc 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 {
15 acpi_handle dhandle; 15 acpi_handle dhandle;
16} intel_dsm_priv; 16} intel_dsm_priv;
17 17
18static const u8 intel_dsm_guid[] = { 18static const guid_t intel_dsm_guid =
19 0xd3, 0x73, 0xd8, 0x7e, 19 GUID_INIT(0x7ed873d3, 0xc2d0, 0x4e4f,
20 0xd0, 0xc2, 20 0xa8, 0x54, 0x0f, 0x13, 0x17, 0xb0, 0x1c, 0x2c);
21 0x4f, 0x4e,
22 0xa8, 0x54,
23 0x0f, 0x13, 0x17, 0xb0, 0x1c, 0x2c
24};
25 21
26static char *intel_dsm_port_name(u8 id) 22static char *intel_dsm_port_name(u8 id)
27{ 23{
@@ -80,7 +76,7 @@ static void intel_dsm_platform_mux_info(void)
80 int i; 76 int i;
81 union acpi_object *pkg, *connector_count; 77 union acpi_object *pkg, *connector_count;
82 78
83 pkg = acpi_evaluate_dsm_typed(intel_dsm_priv.dhandle, intel_dsm_guid, 79 pkg = acpi_evaluate_dsm_typed(intel_dsm_priv.dhandle, &intel_dsm_guid,
84 INTEL_DSM_REVISION_ID, INTEL_DSM_FN_PLATFORM_MUX_INFO, 80 INTEL_DSM_REVISION_ID, INTEL_DSM_FN_PLATFORM_MUX_INFO,
85 NULL, ACPI_TYPE_PACKAGE); 81 NULL, ACPI_TYPE_PACKAGE);
86 if (!pkg) { 82 if (!pkg) {
@@ -118,7 +114,7 @@ static bool intel_dsm_pci_probe(struct pci_dev *pdev)
118 if (!dhandle) 114 if (!dhandle)
119 return false; 115 return false;
120 116
121 if (!acpi_check_dsm(dhandle, intel_dsm_guid, INTEL_DSM_REVISION_ID, 117 if (!acpi_check_dsm(dhandle, &intel_dsm_guid, INTEL_DSM_REVISION_ID,
122 1 << INTEL_DSM_FN_PLATFORM_MUX_INFO)) { 118 1 << INTEL_DSM_FN_PLATFORM_MUX_INFO)) {
123 DRM_DEBUG_KMS("no _DSM method for intel device\n"); 119 DRM_DEBUG_KMS("no _DSM method for intel device\n");
124 return false; 120 return false;
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
index 39468c218027..7459ef9943ec 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) {
60} 60}
61 61
62#ifdef CONFIG_VGA_SWITCHEROO 62#ifdef CONFIG_VGA_SWITCHEROO
63static const char nouveau_dsm_muid[] = { 63static const guid_t nouveau_dsm_muid =
64 0xA0, 0xA0, 0x95, 0x9D, 0x60, 0x00, 0x48, 0x4D, 64 GUID_INIT(0x9D95A0A0, 0x0060, 0x4D48,
65 0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4, 65 0xB3, 0x4D, 0x7E, 0x5F, 0xEA, 0x12, 0x9F, 0xD4);
66};
67 66
68static const char nouveau_op_dsm_muid[] = { 67static const guid_t nouveau_op_dsm_muid =
69 0xF8, 0xD8, 0x86, 0xA4, 0xDA, 0x0B, 0x1B, 0x47, 68 GUID_INIT(0xA486D8F8, 0x0BDA, 0x471B,
70 0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0, 69 0xA7, 0x2B, 0x60, 0x42, 0xA6, 0xB5, 0xBE, 0xE0);
71};
72 70
73static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result) 71static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *result)
74{ 72{
@@ -86,7 +84,7 @@ static int nouveau_optimus_dsm(acpi_handle handle, int func, int arg, uint32_t *
86 args_buff[i] = (arg >> i * 8) & 0xFF; 84 args_buff[i] = (arg >> i * 8) & 0xFF;
87 85
88 *result = 0; 86 *result = 0;
89 obj = acpi_evaluate_dsm_typed(handle, nouveau_op_dsm_muid, 0x00000100, 87 obj = acpi_evaluate_dsm_typed(handle, &nouveau_op_dsm_muid, 0x00000100,
90 func, &argv4, ACPI_TYPE_BUFFER); 88 func, &argv4, ACPI_TYPE_BUFFER);
91 if (!obj) { 89 if (!obj) {
92 acpi_handle_info(handle, "failed to evaluate _DSM\n"); 90 acpi_handle_info(handle, "failed to evaluate _DSM\n");
@@ -138,7 +136,7 @@ static int nouveau_dsm(acpi_handle handle, int func, int arg)
138 .integer.value = arg, 136 .integer.value = arg,
139 }; 137 };
140 138
141 obj = acpi_evaluate_dsm_typed(handle, nouveau_dsm_muid, 0x00000102, 139 obj = acpi_evaluate_dsm_typed(handle, &nouveau_dsm_muid, 0x00000102,
142 func, &argv4, ACPI_TYPE_INTEGER); 140 func, &argv4, ACPI_TYPE_INTEGER);
143 if (!obj) { 141 if (!obj) {
144 acpi_handle_info(handle, "failed to evaluate _DSM\n"); 142 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
259 if (!acpi_has_method(dhandle, "_DSM")) 257 if (!acpi_has_method(dhandle, "_DSM"))
260 return; 258 return;
261 259
262 supports_mux = acpi_check_dsm(dhandle, nouveau_dsm_muid, 0x00000102, 260 supports_mux = acpi_check_dsm(dhandle, &nouveau_dsm_muid, 0x00000102,
263 1 << NOUVEAU_DSM_POWER); 261 1 << NOUVEAU_DSM_POWER);
264 optimus_funcs = nouveau_dsm_get_optimus_functions(dhandle); 262 optimus_funcs = nouveau_dsm_get_optimus_functions(dhandle);
265 263
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/base.c
index e3e2f5e83815..f44682d62f75 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)
81{ 81{
82 struct nvkm_subdev *subdev = &mxm->subdev; 82 struct nvkm_subdev *subdev = &mxm->subdev;
83 struct nvkm_device *device = subdev->device; 83 struct nvkm_device *device = subdev->device;
84 static char muid[] = { 84 static guid_t muid =
85 0x00, 0xA4, 0x04, 0x40, 0x7D, 0x91, 0xF2, 0x4C, 85 GUID_INIT(0x4004A400, 0x917D, 0x4CF2,
86 0xB8, 0x9C, 0x79, 0xB6, 0x2F, 0xD5, 0x56, 0x65 86 0xB8, 0x9C, 0x79, 0xB6, 0x2F, 0xD5, 0x56, 0x65);
87 };
88 u32 mxms_args[] = { 0x00000000 }; 87 u32 mxms_args[] = { 0x00000000 };
89 union acpi_object argv4 = { 88 union acpi_object argv4 = {
90 .buffer.type = ACPI_TYPE_BUFFER, 89 .buffer.type = ACPI_TYPE_BUFFER,
@@ -105,7 +104,7 @@ mxm_shadow_dsm(struct nvkm_mxm *mxm, u8 version)
105 * unless you pass in exactly the version it supports.. 104 * unless you pass in exactly the version it supports..
106 */ 105 */
107 rev = (version & 0xf0) << 4 | (version & 0x0f); 106 rev = (version & 0xf0) << 4 | (version & 0x0f);
108 obj = acpi_evaluate_dsm(handle, muid, rev, 0x00000010, &argv4); 107 obj = acpi_evaluate_dsm(handle, &muid, rev, 0x00000010, &argv4);
109 if (!obj) { 108 if (!obj) {
110 nvkm_debug(subdev, "DSM MXMS failed\n"); 109 nvkm_debug(subdev, "DSM MXMS failed\n");
111 return false; 110 return false;
diff --git a/drivers/hid/i2c-hid/i2c-hid.c b/drivers/hid/i2c-hid/i2c-hid.c
index fb55fb4c39fc..04015032a35a 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)
872static int i2c_hid_acpi_pdata(struct i2c_client *client, 872static int i2c_hid_acpi_pdata(struct i2c_client *client,
873 struct i2c_hid_platform_data *pdata) 873 struct i2c_hid_platform_data *pdata)
874{ 874{
875 static u8 i2c_hid_guid[] = { 875 static guid_t i2c_hid_guid =
876 0xF7, 0xF6, 0xDF, 0x3C, 0x67, 0x42, 0x55, 0x45, 876 GUID_INIT(0x3CDFF6F7, 0x4267, 0x4555,
877 0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE, 877 0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE);
878 };
879 union acpi_object *obj; 878 union acpi_object *obj;
880 struct acpi_device *adev; 879 struct acpi_device *adev;
881 acpi_handle handle; 880 acpi_handle handle;
@@ -884,7 +883,7 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
884 if (!handle || acpi_bus_get_device(handle, &adev)) 883 if (!handle || acpi_bus_get_device(handle, &adev))
885 return -ENODEV; 884 return -ENODEV;
886 885
887 obj = acpi_evaluate_dsm_typed(handle, i2c_hid_guid, 1, 1, NULL, 886 obj = acpi_evaluate_dsm_typed(handle, &i2c_hid_guid, 1, 1, NULL,
888 ACPI_TYPE_INTEGER); 887 ACPI_TYPE_INTEGER);
889 if (!obj) { 888 if (!obj) {
890 dev_err(&client->dev, "device _DSM execution failed\n"); 889 dev_err(&client->dev, "device _DSM execution failed\n");
diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index cbf7763d8091..c8b0329c85d2 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -1808,10 +1808,9 @@ IOMMU_INIT_POST(detect_intel_iommu);
1808 * for Directed-IO Architecture Specifiction, Rev 2.2, Section 8.8 1808 * for Directed-IO Architecture Specifiction, Rev 2.2, Section 8.8
1809 * "Remapping Hardware Unit Hot Plug". 1809 * "Remapping Hardware Unit Hot Plug".
1810 */ 1810 */
1811static u8 dmar_hp_uuid[] = { 1811static guid_t dmar_hp_guid =
1812 /* 0000 */ 0xA6, 0xA3, 0xC1, 0xD8, 0x9B, 0xBE, 0x9B, 0x4C, 1812 GUID_INIT(0xD8C1A3A6, 0xBE9B, 0x4C9B,
1813 /* 0008 */ 0x91, 0xBF, 0xC3, 0xCB, 0x81, 0xFC, 0x5D, 0xAF 1813 0x91, 0xBF, 0xC3, 0xCB, 0x81, 0xFC, 0x5D, 0xAF);
1814};
1815 1814
1816/* 1815/*
1817 * Currently there's only one revision and BIOS will not check the revision id, 1816 * Currently there's only one revision and BIOS will not check the revision id,
@@ -1824,7 +1823,7 @@ static u8 dmar_hp_uuid[] = {
1824 1823
1825static inline bool dmar_detect_dsm(acpi_handle handle, int func) 1824static inline bool dmar_detect_dsm(acpi_handle handle, int func)
1826{ 1825{
1827 return acpi_check_dsm(handle, dmar_hp_uuid, DMAR_DSM_REV_ID, 1 << func); 1826 return acpi_check_dsm(handle, &dmar_hp_guid, DMAR_DSM_REV_ID, 1 << func);
1828} 1827}
1829 1828
1830static int dmar_walk_dsm_resource(acpi_handle handle, int func, 1829static 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,
1843 if (!dmar_detect_dsm(handle, func)) 1842 if (!dmar_detect_dsm(handle, func))
1844 return 0; 1843 return 0;
1845 1844
1846 obj = acpi_evaluate_dsm_typed(handle, dmar_hp_uuid, DMAR_DSM_REV_ID, 1845 obj = acpi_evaluate_dsm_typed(handle, &dmar_hp_guid, DMAR_DSM_REV_ID,
1847 func, NULL, ACPI_TYPE_BUFFER); 1846 func, NULL, ACPI_TYPE_BUFFER);
1848 if (!obj) 1847 if (!obj)
1849 return -ENODEV; 1848 return -ENODEV;
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index 92fc3f7c538d..9577beb278e7 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -404,10 +404,9 @@ struct intel_host {
404 bool d3_retune; 404 bool d3_retune;
405}; 405};
406 406
407const u8 intel_dsm_uuid[] = { 407const guid_t intel_dsm_guid =
408 0xA5, 0x3E, 0xC1, 0xF6, 0xCD, 0x65, 0x1F, 0x46, 408 GUID_INIT(0xF6C13EA5, 0x65CD, 0x461F,
409 0xAB, 0x7A, 0x29, 0xF7, 0xE8, 0xD5, 0xBD, 0x61, 409 0xAB, 0x7A, 0x29, 0xF7, 0xE8, 0xD5, 0xBD, 0x61);
410};
411 410
412static int __intel_dsm(struct intel_host *intel_host, struct device *dev, 411static int __intel_dsm(struct intel_host *intel_host, struct device *dev,
413 unsigned int fn, u32 *result) 412 unsigned int fn, u32 *result)
@@ -416,7 +415,7 @@ static int __intel_dsm(struct intel_host *intel_host, struct device *dev,
416 int err = 0; 415 int err = 0;
417 size_t len; 416 size_t len;
418 417
419 obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), intel_dsm_uuid, 0, fn, NULL); 418 obj = acpi_evaluate_dsm(ACPI_HANDLE(dev), &intel_dsm_guid, 0, fn, NULL);
420 if (!obj) 419 if (!obj)
421 return -EOPNOTSUPP; 420 return -EOPNOTSUPP;
422 421
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_misc.c
index e13aa064a8e9..6b15a507999c 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 {
29 HNS_ROCE_RESET_FUNC = 0x7, 29 HNS_ROCE_RESET_FUNC = 0x7,
30}; 30};
31 31
32const u8 hns_dsaf_acpi_dsm_uuid[] = { 32const guid_t hns_dsaf_acpi_dsm_guid =
33 0x1A, 0xAA, 0x85, 0x1A, 0x93, 0xE2, 0x5E, 0x41, 33 GUID_INIT(0x1A85AA1A, 0xE293, 0x415E,
34 0x8E, 0x28, 0x8D, 0x69, 0x0A, 0x0F, 0x82, 0x0A 34 0x8E, 0x28, 0x8D, 0x69, 0x0A, 0x0F, 0x82, 0x0A);
35};
36 35
37static void dsaf_write_sub(struct dsaf_device *dsaf_dev, u32 reg, u32 val) 36static void dsaf_write_sub(struct dsaf_device *dsaf_dev, u32 reg, u32 val)
38{ 37{
@@ -151,7 +150,7 @@ static void hns_dsaf_acpi_srst_by_port(struct dsaf_device *dsaf_dev, u8 op_type,
151 argv4.package.elements = obj_args; 150 argv4.package.elements = obj_args;
152 151
153 obj = acpi_evaluate_dsm(ACPI_HANDLE(dsaf_dev->dev), 152 obj = acpi_evaluate_dsm(ACPI_HANDLE(dsaf_dev->dev),
154 hns_dsaf_acpi_dsm_uuid, 0, op_type, &argv4); 153 &hns_dsaf_acpi_dsm_guid, 0, op_type, &argv4);
155 if (!obj) { 154 if (!obj) {
156 dev_warn(dsaf_dev->dev, "reset port_type%d port%d fail!", 155 dev_warn(dsaf_dev->dev, "reset port_type%d port%d fail!",
157 port_type, port); 156 port_type, port);
@@ -434,7 +433,7 @@ static phy_interface_t hns_mac_get_phy_if_acpi(struct hns_mac_cb *mac_cb)
434 argv4.package.elements = &obj_args, 433 argv4.package.elements = &obj_args,
435 434
436 obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev), 435 obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev),
437 hns_dsaf_acpi_dsm_uuid, 0, 436 &hns_dsaf_acpi_dsm_guid, 0,
438 HNS_OP_GET_PORT_TYPE_FUNC, &argv4); 437 HNS_OP_GET_PORT_TYPE_FUNC, &argv4);
439 438
440 if (!obj || obj->type != ACPI_TYPE_INTEGER) 439 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)
474 argv4.package.elements = &obj_args, 473 argv4.package.elements = &obj_args,
475 474
476 obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev), 475 obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dev),
477 hns_dsaf_acpi_dsm_uuid, 0, 476 &hns_dsaf_acpi_dsm_guid, 0,
478 HNS_OP_GET_SFP_STAT_FUNC, &argv4); 477 HNS_OP_GET_SFP_STAT_FUNC, &argv4);
479 478
480 if (!obj || obj->type != ACPI_TYPE_INTEGER) 479 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)
565 argv4.package.elements = obj_args; 564 argv4.package.elements = obj_args;
566 565
567 obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dsaf_dev->dev), 566 obj = acpi_evaluate_dsm(ACPI_HANDLE(mac_cb->dsaf_dev->dev),
568 hns_dsaf_acpi_dsm_uuid, 0, 567 &hns_dsaf_acpi_dsm_guid, 0,
569 HNS_OP_SERDES_LP_FUNC, &argv4); 568 HNS_OP_SERDES_LP_FUNC, &argv4);
570 if (!obj) { 569 if (!obj) {
571 dev_warn(mac_cb->dsaf_dev->dev, "set port%d serdes lp fail!", 570 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..47070cff508c 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -21,13 +21,12 @@
21#include "pci.h" 21#include "pci.h"
22 22
23/* 23/*
24 * The UUID is defined in the PCI Firmware Specification available here: 24 * The GUID is defined in the PCI Firmware Specification available here:
25 * https://www.pcisig.com/members/downloads/pcifw_r3_1_13Dec10.pdf 25 * https://www.pcisig.com/members/downloads/pcifw_r3_1_13Dec10.pdf
26 */ 26 */
27const u8 pci_acpi_dsm_uuid[] = { 27const guid_t pci_acpi_dsm_guid =
28 0xd0, 0x37, 0xc9, 0xe5, 0x53, 0x35, 0x7a, 0x4d, 28 GUID_INIT(0xe5c937d0, 0x3553, 0x4d7a,
29 0x91, 0x17, 0xea, 0x4d, 0x19, 0xc3, 0x43, 0x4d 29 0x91, 0x17, 0xea, 0x4d, 0x19, 0xc3, 0x43, 0x4d);
30};
31 30
32#if defined(CONFIG_PCI_QUIRKS) && defined(CONFIG_ARM64) 31#if defined(CONFIG_PCI_QUIRKS) && defined(CONFIG_ARM64)
33static int acpi_get_rc_addr(struct acpi_device *adev, struct resource *res) 32static 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)
680 if (!pci_is_root_bus(bus)) 679 if (!pci_is_root_bus(bus))
681 return; 680 return;
682 681
683 obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), pci_acpi_dsm_uuid, 3, 682 obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 3,
684 RESET_DELAY_DSM, NULL); 683 RESET_DELAY_DSM, NULL);
685 if (!obj) 684 if (!obj)
686 return; 685 return;
@@ -745,7 +744,7 @@ static void pci_acpi_optimize_delay(struct pci_dev *pdev,
745 if (bridge->ignore_reset_delay) 744 if (bridge->ignore_reset_delay)
746 pdev->d3cold_delay = 0; 745 pdev->d3cold_delay = 0;
747 746
748 obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 3, 747 obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 3,
749 FUNCTION_DELAY_DSM, NULL); 748 FUNCTION_DELAY_DSM, NULL);
750 if (!obj) 749 if (!obj)
751 return; 750 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,
172 if (!handle) 172 if (!handle)
173 return -1; 173 return -1;
174 174
175 obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 0x2, 175 obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2,
176 DEVICE_LABEL_DSM, NULL); 176 DEVICE_LABEL_DSM, NULL);
177 if (!obj) 177 if (!obj)
178 return -1; 178 return -1;
@@ -212,7 +212,7 @@ static bool device_has_dsm(struct device *dev)
212 if (!handle) 212 if (!handle)
213 return false; 213 return false;
214 214
215 return !!acpi_check_dsm(handle, pci_acpi_dsm_uuid, 0x2, 215 return !!acpi_check_dsm(handle, &pci_acpi_dsm_guid, 0x2,
216 1 << DEVICE_LABEL_DSM); 216 1 << DEVICE_LABEL_DSM);
217} 217}
218 218
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 @@
42#define PCI_DEVICE_ID_INTEL_CNPLP 0x9dee 42#define PCI_DEVICE_ID_INTEL_CNPLP 0x9dee
43#define PCI_DEVICE_ID_INTEL_CNPH 0xa36e 43#define PCI_DEVICE_ID_INTEL_CNPH 0xa36e
44 44
45#define PCI_INTEL_BXT_DSM_UUID "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511" 45#define PCI_INTEL_BXT_DSM_GUID "732b85d5-b7a7-4a1b-9ba0-4bbd00ffd511"
46#define PCI_INTEL_BXT_FUNC_PMU_PWR 4 46#define PCI_INTEL_BXT_FUNC_PMU_PWR 4
47#define PCI_INTEL_BXT_STATE_D0 0 47#define PCI_INTEL_BXT_STATE_D0 0
48#define PCI_INTEL_BXT_STATE_D3 3 48#define PCI_INTEL_BXT_STATE_D3 3
@@ -51,14 +51,14 @@
51 * struct dwc3_pci - Driver private structure 51 * struct dwc3_pci - Driver private structure
52 * @dwc3: child dwc3 platform_device 52 * @dwc3: child dwc3 platform_device
53 * @pci: our link to PCI bus 53 * @pci: our link to PCI bus
54 * @uuid: _DSM UUID 54 * @guid: _DSM GUID
55 * @has_dsm_for_pm: true for devices which need to run _DSM on runtime PM 55 * @has_dsm_for_pm: true for devices which need to run _DSM on runtime PM
56 */ 56 */
57struct dwc3_pci { 57struct dwc3_pci {
58 struct platform_device *dwc3; 58 struct platform_device *dwc3;
59 struct pci_dev *pci; 59 struct pci_dev *pci;
60 60
61 u8 uuid[16]; 61 guid_t guid;
62 62
63 unsigned int has_dsm_for_pm:1; 63 unsigned int has_dsm_for_pm:1;
64}; 64};
@@ -120,7 +120,7 @@ static int dwc3_pci_quirks(struct dwc3_pci *dwc)
120 120
121 if (pdev->device == PCI_DEVICE_ID_INTEL_BXT || 121 if (pdev->device == PCI_DEVICE_ID_INTEL_BXT ||
122 pdev->device == PCI_DEVICE_ID_INTEL_BXT_M) { 122 pdev->device == PCI_DEVICE_ID_INTEL_BXT_M) {
123 acpi_str_to_uuid(PCI_INTEL_BXT_DSM_UUID, dwc->uuid); 123 guid_parse(PCI_INTEL_BXT_DSM_GUID, &dwc->guid);
124 dwc->has_dsm_for_pm = true; 124 dwc->has_dsm_for_pm = true;
125 } 125 }
126 126
@@ -292,7 +292,7 @@ static int dwc3_pci_dsm(struct dwc3_pci *dwc, int param)
292 tmp.type = ACPI_TYPE_INTEGER; 292 tmp.type = ACPI_TYPE_INTEGER;
293 tmp.integer.value = param; 293 tmp.integer.value = param;
294 294
295 obj = acpi_evaluate_dsm(ACPI_HANDLE(&dwc->pci->dev), dwc->uuid, 295 obj = acpi_evaluate_dsm(ACPI_HANDLE(&dwc->pci->dev), &dwc->guid,
296 1, PCI_INTEL_BXT_FUNC_PMU_PWR, &argv4); 296 1, PCI_INTEL_BXT_FUNC_PMU_PWR, &argv4);
297 if (!obj) { 297 if (!obj) {
298 dev_err(&dwc->pci->dev, "failed to evaluate _DSM\n"); 298 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..4842be5687a7 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)
213#ifdef CONFIG_ACPI 213#ifdef CONFIG_ACPI
214static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev) 214static void xhci_pme_acpi_rtd3_enable(struct pci_dev *dev)
215{ 215{
216 static const u8 intel_dsm_uuid[] = { 216 static const guid_t intel_dsm_guid =
217 0xb7, 0x0c, 0x34, 0xac, 0x01, 0xe9, 0xbf, 0x45, 217 GUID_INIT(0xac340cb7, 0xe901, 0x45bf,
218 0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23, 218 0xb7, 0xe6, 0x2b, 0x34, 0xec, 0x93, 0x1e, 0x23);
219 };
220 union acpi_object *obj; 219 union acpi_object *obj;
221 220
222 obj = acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), intel_dsm_uuid, 3, 1, 221 obj = acpi_evaluate_dsm(ACPI_HANDLE(&dev->dev), &intel_dsm_guid, 3, 1,
223 NULL); 222 NULL);
224 ACPI_FREE(obj); 223 ACPI_FREE(obj);
225} 224}
diff --git a/drivers/usb/misc/ucsi.c b/drivers/usb/misc/ucsi.c
index 07397bddefa3..81251aaa20f9 100644
--- a/drivers/usb/misc/ucsi.c
+++ b/drivers/usb/misc/ucsi.c
@@ -55,13 +55,13 @@ struct ucsi {
55 55
56static int ucsi_acpi_cmd(struct ucsi *ucsi, struct ucsi_control *ctrl) 56static int ucsi_acpi_cmd(struct ucsi *ucsi, struct ucsi_control *ctrl)
57{ 57{
58 uuid_le uuid = UUID_LE(0x6f8398c2, 0x7ca4, 0x11e4, 58 guid_t guid = GUID_INIT(0x6f8398c2, 0x7ca4, 0x11e4,
59 0xad, 0x36, 0x63, 0x10, 0x42, 0xb5, 0x00, 0x8f); 59 0xad, 0x36, 0x63, 0x10, 0x42, 0xb5, 0x00, 0x8f);
60 union acpi_object *obj; 60 union acpi_object *obj;
61 61
62 ucsi->data->ctrl.raw_cmd = ctrl->raw_cmd; 62 ucsi->data->ctrl.raw_cmd = ctrl->raw_cmd;
63 63
64 obj = acpi_evaluate_dsm(ACPI_HANDLE(ucsi->dev), uuid.b, 1, 1, NULL); 64 obj = acpi_evaluate_dsm(ACPI_HANDLE(ucsi->dev), &guid, 1, 1, NULL);
65 if (!obj) { 65 if (!obj) {
66 dev_err(ucsi->dev, "%s: failed to evaluate _DSM\n", __func__); 66 dev_err(ucsi->dev, "%s: failed to evaluate _DSM\n", __func__);
67 return -EIO; 67 return -EIO;
diff --git a/drivers/usb/typec/typec_wcove.c b/drivers/usb/typec/typec_wcove.c
index d5a7b21fa3f1..c2ce25289027 100644
--- a/drivers/usb/typec/typec_wcove.c
+++ b/drivers/usb/typec/typec_wcove.c
@@ -105,8 +105,8 @@ enum wcove_typec_role {
105 WCOVE_ROLE_DEVICE, 105 WCOVE_ROLE_DEVICE,
106}; 106};
107 107
108static uuid_le uuid = UUID_LE(0x482383f0, 0x2876, 0x4e49, 108static guid_t guid = GUID_INIT(0x482383f0, 0x2876, 0x4e49,
109 0x86, 0x85, 0xdb, 0x66, 0x21, 0x1a, 0xf0, 0x37); 109 0x86, 0x85, 0xdb, 0x66, 0x21, 0x1a, 0xf0, 0x37);
110 110
111static int wcove_typec_func(struct wcove_typec *wcove, 111static int wcove_typec_func(struct wcove_typec *wcove,
112 enum wcove_typec_func func, int param) 112 enum wcove_typec_func func, int param)
@@ -118,7 +118,7 @@ static int wcove_typec_func(struct wcove_typec *wcove,
118 tmp.type = ACPI_TYPE_INTEGER; 118 tmp.type = ACPI_TYPE_INTEGER;
119 tmp.integer.value = param; 119 tmp.integer.value = param;
120 120
121 obj = acpi_evaluate_dsm(ACPI_HANDLE(wcove->dev), uuid.b, 1, func, 121 obj = acpi_evaluate_dsm(ACPI_HANDLE(wcove->dev), &guid, 1, func,
122 &argv4); 122 &argv4);
123 if (!obj) { 123 if (!obj) {
124 dev_err(wcove->dev, "%s: failed to evaluate _DSM\n", __func__); 124 dev_err(wcove->dev, "%s: failed to evaluate _DSM\n", __func__);
@@ -314,7 +314,7 @@ static int wcove_typec_probe(struct platform_device *pdev)
314 if (ret) 314 if (ret)
315 return ret; 315 return ret;
316 316
317 if (!acpi_check_dsm(ACPI_HANDLE(&pdev->dev), uuid.b, 0, 0x1f)) { 317 if (!acpi_check_dsm(ACPI_HANDLE(&pdev->dev), &guid, 0, 0x1f)) {
318 dev_err(&pdev->dev, "Missing _DSM functions\n"); 318 dev_err(&pdev->dev, "Missing _DSM functions\n");
319 return -ENODEV; 319 return -ENODEV;
320 } 320 }
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);
61bool acpi_bay_match(acpi_handle handle); 61bool acpi_bay_match(acpi_handle handle);
62bool acpi_dock_match(acpi_handle handle); 62bool acpi_dock_match(acpi_handle handle);
63 63
64bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs); 64bool acpi_check_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 funcs);
65union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, 65union acpi_object *acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
66 u64 rev, u64 func, union acpi_object *argv4); 66 u64 rev, u64 func, union acpi_object *argv4);
67 67
68static inline union acpi_object * 68static inline union acpi_object *
69acpi_evaluate_dsm_typed(acpi_handle handle, const u8 *uuid, u64 rev, u64 func, 69acpi_evaluate_dsm_typed(acpi_handle handle, const guid_t *guid, u64 rev,
70 union acpi_object *argv4, acpi_object_type type) 70 u64 func, union acpi_object *argv4,
71 acpi_object_type type)
71{ 72{
72 union acpi_object *obj; 73 union acpi_object *obj;
73 74
74 obj = acpi_evaluate_dsm(handle, uuid, rev, func, argv4); 75 obj = acpi_evaluate_dsm(handle, guid, rev, func, argv4);
75 if (obj && obj->type != type) { 76 if (obj && obj->type != type) {
76 ACPI_FREE(obj); 77 ACPI_FREE(obj);
77 obj = NULL; 78 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 {
458 struct acpi_buffer ret; /* free by caller if success */ 458 struct acpi_buffer ret; /* free by caller if success */
459}; 459};
460 460
461acpi_status acpi_str_to_uuid(char *str, u8 *uuid);
462acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context); 461acpi_status acpi_run_osc(acpi_handle handle, struct acpi_osc_context *context);
463 462
464/* Indexes into _OSC Capabilities Buffer (DWORDs 2 & 3 are device-specific) */ 463/* 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,
742} 741}
743 742
744static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle, 743static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle,
745 const u8 *uuid, 744 const guid_t *guid,
746 int rev, int func, 745 int rev, int func,
747 union acpi_object *argv4) 746 union acpi_object *argv4)
748{ 747{
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) { }
105static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { } 105static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { }
106#endif 106#endif
107 107
108extern const u8 pci_acpi_dsm_uuid[]; 108extern const guid_t pci_acpi_dsm_guid;
109#define DEVICE_LABEL_DSM 0x07 109#define DEVICE_LABEL_DSM 0x07
110#define RESET_DELAY_DSM 0x08 110#define RESET_DELAY_DSM 0x08
111#define FUNCTION_DELAY_DSM 0x09 111#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..e7d766d56c8e 100644
--- a/sound/soc/intel/skylake/skl-nhlt.c
+++ b/sound/soc/intel/skylake/skl-nhlt.c
@@ -21,8 +21,9 @@
21#include "skl.h" 21#include "skl.h"
22 22
23/* Unique identification for getting NHLT blobs */ 23/* Unique identification for getting NHLT blobs */
24static u8 OSC_UUID[16] = {0x6E, 0x88, 0x9F, 0xA6, 0xEB, 0x6C, 0x94, 0x45, 24static guid_t osc_guid =
25 0xA4, 0x1F, 0x7B, 0x5D, 0xCE, 0x24, 0xC5, 0x53}; 25 GUID_INIT(0xA69F886E, 0x6CEB, 0x4594,
26 0xA4, 0x1F, 0x7B, 0x5D, 0xCE, 0x24, 0xC5, 0x53);
26 27
27struct nhlt_acpi_table *skl_nhlt_init(struct device *dev) 28struct nhlt_acpi_table *skl_nhlt_init(struct device *dev)
28{ 29{
@@ -37,7 +38,7 @@ struct nhlt_acpi_table *skl_nhlt_init(struct device *dev)
37 return NULL; 38 return NULL;
38 } 39 }
39 40
40 obj = acpi_evaluate_dsm(handle, OSC_UUID, 1, 1, NULL); 41 obj = acpi_evaluate_dsm(handle, &osc_guid, 1, 1, NULL);
41 if (obj && obj->type == ACPI_TYPE_BUFFER) { 42 if (obj && obj->type == ACPI_TYPE_BUFFER) {
42 nhlt_ptr = (struct nhlt_resource_desc *)obj->buffer.pointer; 43 nhlt_ptr = (struct nhlt_resource_desc *)obj->buffer.pointer;
43 nhlt_table = (struct nhlt_acpi_table *) 44 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,
370} 370}
371EXPORT_SYMBOL(__wrap_acpi_evaluate_object); 371EXPORT_SYMBOL(__wrap_acpi_evaluate_object);
372 372
373union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, 373union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid,
374 u64 rev, u64 func, union acpi_object *argv4) 374 u64 rev, u64 func, union acpi_object *argv4)
375{ 375{
376 union acpi_object *obj = ERR_PTR(-ENXIO); 376 union acpi_object *obj = ERR_PTR(-ENXIO);
@@ -379,11 +379,11 @@ union acpi_object * __wrap_acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid,
379 rcu_read_lock(); 379 rcu_read_lock();
380 ops = list_first_or_null_rcu(&iomap_head, typeof(*ops), list); 380 ops = list_first_or_null_rcu(&iomap_head, typeof(*ops), list);
381 if (ops) 381 if (ops)
382 obj = ops->evaluate_dsm(handle, uuid, rev, func, argv4); 382 obj = ops->evaluate_dsm(handle, guid, rev, func, argv4);
383 rcu_read_unlock(); 383 rcu_read_unlock();
384 384
385 if (IS_ERR(obj)) 385 if (IS_ERR(obj))
386 return acpi_evaluate_dsm(handle, uuid, rev, func, argv4); 386 return acpi_evaluate_dsm(handle, guid, rev, func, argv4);
387 return obj; 387 return obj;
388} 388}
389EXPORT_SYMBOL(__wrap_acpi_evaluate_dsm); 389EXPORT_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;
1559union acpi_object *result; 1559union acpi_object *result;
1560 1560
1561static union acpi_object *nfit_test_evaluate_dsm(acpi_handle handle, 1561static union acpi_object *nfit_test_evaluate_dsm(acpi_handle handle,
1562 const u8 *uuid, u64 rev, u64 func, union acpi_object *argv4) 1562 const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4)
1563{ 1563{
1564 if (handle != &nfit_ctl_handle) 1564 if (handle != &nfit_ctl_handle)
1565 return ERR_PTR(-ENXIO); 1565 return ERR_PTR(-ENXIO);
diff --git a/tools/testing/nvdimm/test/nfit_test.h b/tools/testing/nvdimm/test/nfit_test.h
index f54c0032c6ff..d3d63dd5ed38 100644
--- a/tools/testing/nvdimm/test/nfit_test.h
+++ b/tools/testing/nvdimm/test/nfit_test.h
@@ -13,6 +13,7 @@
13#ifndef __NFIT_TEST_H__ 13#ifndef __NFIT_TEST_H__
14#define __NFIT_TEST_H__ 14#define __NFIT_TEST_H__
15#include <linux/list.h> 15#include <linux/list.h>
16#include <linux/uuid.h>
16#include <linux/ioport.h> 17#include <linux/ioport.h>
17#include <linux/spinlock_types.h> 18#include <linux/spinlock_types.h>
18 19
@@ -36,7 +37,8 @@ typedef void *acpi_handle;
36 37
37typedef struct nfit_test_resource *(*nfit_test_lookup_fn)(resource_size_t); 38typedef struct nfit_test_resource *(*nfit_test_lookup_fn)(resource_size_t);
38typedef union acpi_object *(*nfit_test_evaluate_dsm_fn)(acpi_handle handle, 39typedef union acpi_object *(*nfit_test_evaluate_dsm_fn)(acpi_handle handle,
39 const u8 *uuid, u64 rev, u64 func, union acpi_object *argv4); 40 const guid_t *guid, u64 rev, u64 func,
41 union acpi_object *argv4);
40void __iomem *__wrap_ioremap_nocache(resource_size_t offset, 42void __iomem *__wrap_ioremap_nocache(resource_size_t offset,
41 unsigned long size); 43 unsigned long size);
42void __wrap_iounmap(volatile void __iomem *addr); 44void __wrap_iounmap(volatile void __iomem *addr);