aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerry Hoemann <jerry.hoemann@hpe.com>2016-04-11 18:02:26 -0400
committerDan Williams <dan.j.williams@intel.com>2016-04-11 18:02:26 -0400
commitc7e16e5257ec46530e3e874af38191746c137c83 (patch)
tree63f2cfd89ef5d4f6c4f5008854cbd0849f235870
parentbf16200689118d19de1b8d2a3c314fc21f5dc7bb (diff)
acpi: widen acpi_evaluate_dsm() revision and function-index arguments
The ACPI specification states that arguments "Revision ID" and "Function Index" to a _DSM are type "Integer." Type Integers are 64 bit quantities. The function evaluate_dsm specifies these types as simple "int" which are 32 bits. Widen type passed to acpi_evaluate_dsm and its callers and derived callers to pass correct type. acpi_check_dsm and acpi_evaluate_dsm_typed had similar issue and were corrected as well. This is in preparation for libnvdimm implementing a generic _DSM passthrough facility to have the capacity to pass 64-bit values as the ACPI specification allows. [djbw: clarify the changelog, add rationale] Signed-off-by: Jerry Hoemann <jerry.hoemann@hpe.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
-rw-r--r--drivers/acpi/utils.c4
-rw-r--r--include/acpi/acpi_bus.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 050673f0c0b3..e854dea7d5fe 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -625,7 +625,7 @@ acpi_status acpi_evaluate_lck(acpi_handle handle, int lock)
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, int rev, int func, 628acpi_evaluate_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
629 union acpi_object *argv4) 629 union acpi_object *argv4)
630{ 630{
631 acpi_status ret; 631 acpi_status ret;
@@ -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, int rev, u64 funcs) 677bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, u64 rev, u64 funcs)
678{ 678{
679 int i; 679 int i;
680 u64 mask = 0; 680 u64 mask = 0;
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 14362a84c78e..f092cc6eb1fb 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -61,12 +61,12 @@ 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, int rev, u64 funcs); 64bool acpi_check_dsm(acpi_handle handle, const u8 *uuid, 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 u8 *uuid,
66 int rev, int 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, int rev, int func, 69acpi_evaluate_dsm_typed(acpi_handle handle, const u8 *uuid, u64 rev, u64 func,
70 union acpi_object *argv4, acpi_object_type type) 70 union acpi_object *argv4, acpi_object_type type)
71{ 71{
72 union acpi_object *obj; 72 union acpi_object *obj;