FAILED: patch "[PATCH] ACPI: TAD: Add locking around AML evaluations" failed to apply to 6.18-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x a3df8bbe0a704fa5c1609b9666b594f350558fe0
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026090331-quartered-robe-d833@gregkh' --subject-prefix 'PATCH 6.18.y' 'HEAD^..'
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From a3df8bbe0a704fa5c1609b9666b594f350558fe0 Mon Sep 17 00:00:00 2001
From: "Rafael J. Wysocki" <[email protected]>
Date: Wed, 5 Aug 2026 20:53:32 +0200
Subject: [PATCH] ACPI: TAD: Add locking around AML evaluations
In the ACPI TAD driver, there are hidden assumptions that the ACPI control methods used by it will not be evaluated concurrently due to ACPICA namespace and interpreter locking.
However, that may not be the case since ACPICA may drop and re-acquire the namespace and interpreter locks during the evaluation of a given object in a few cases, including the one in which the AML in question sleeps causing acpi_ex_system_do_sleep() to be called. In that case, the evaluation of one control method may be started while the evaluation of another one is still in progress.
For this reason, add a global lock to the ACPI TAD driver and acquire it every time before evaluating an ACPI control method, except for the initial evaluation of _GCP in acpi_tad_probe().
drivers/acpi/acpi_tad.c +28 -18
@@ -27,6 +27,7 @@#include <linux/kernel.h> #include <linux/ktime.h> #include <linux/module.h> +#include <linux/mutex.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> #include <linux/rtc.h>
@@ -86,6 +87,8 @@ static bool acpi_tad_rt_is_invalid(struct acpi_tad_rt *rt) rt->daylight >3 ; } +static DEFINE_MUTEX (acpi_tad_aml_lock); +static int acpi_tad_set_real_time (struct device *dev,struct acpi_tad_rt *rt) {acpi_handle handle =ACPI_HANDLE (dev);
@@ -113,6 +116,8 @@ static int acpi_tad_set_real_time(struct device *dev, struct acpi_tad_rt *rt)if (PM_RUNTIME_ACQUIRE_ERR (&pm))return -ENXIO ; +guard (mutex)(&acpi_tad_aml_lock); + status =acpi_evaluate_integer (handle,"_SRT" , &arg_list, &retval);if (ACPI_FAILURE (status) || retval)return -EIO ;
@@ -124,30 +129,27 @@ static int acpi_tad_evaluate_grt(struct device *dev, struct acpi_tad_rt *rt) {acpi_handle handle =ACPI_HANDLE (dev);struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER }; -union acpi_object *out_obj; -struct acpi_tad_rt *data;acpi_status status;int ret = -EIO ; +guard (mutex)(&acpi_tad_aml_lock); + status =acpi_evaluate_object (handle,"_GRT" ,NULL , &output); -if (ACPI_FAILURE (status)) - goto out_free; +if (ACPI_SUCCESS (status)) { +union acpi_object *out_obj; - out_obj = output.pointer; -if (out_obj->type !=ACPI_TYPE_BUFFER ) - goto out_free; + out_obj = output.pointer; +if (out_obj->type ==ACPI_TYPE_BUFFER && + out_obj->buffer.length ==sizeof (*rt)) { +struct acpi_tad_rt *data; -if (out_obj->buffer.length !=sizeof (*rt)) - goto out_free; - - data = (struct acpi_tad_rt *)(out_obj->buffer.pointer); -if (!data->valid) - goto out_free; - -memcpy (rt, data,sizeof (*rt)); - ret =0 ; - -out_free: + data = (struct acpi_tad_rt *)(out_obj->buffer.pointer); +if (data->valid) { +memcpy (rt, data,sizeof (*rt)); + ret =0 ; + } + } + }ACPI_FREE (output.pointer);return ret; }
@@ -193,6 +195,8 @@ static int __acpi_tad_wake_set(struct device *dev, char *method, u32 timer_id, args[0 ].integer.value = timer_id; args[1 ].integer.value = value; +guard (mutex)(&acpi_tad_aml_lock); + status =acpi_evaluate_integer (handle, method, &arg_list, &retval);if (ACPI_FAILURE (status) || retval)return -EIO ;
@@ -215,6 +219,8 @@ static int __acpi_tad_wake_read(struct device *dev, char *method, u32 timer_id, args[0 ].integer.value = timer_id; +guard (mutex)(&acpi_tad_aml_lock); + status =acpi_evaluate_integer (handle, method, &arg_list, retval);if (ACPI_FAILURE (status))return -EIO ;
@@ -416,6 +422,8 @@ static int acpi_tad_clear_status(struct device *dev, u32 timer_id)if (PM_RUNTIME_ACQUIRE_ERR (&pm))return -ENXIO ; +guard (mutex)(&acpi_tad_aml_lock); + status =acpi_evaluate_integer (handle,"_CWS" , &arg_list, &retval);if (ACPI_FAILURE (status) || retval)return -EIO ;
@@ -456,6 +464,8 @@ static ssize_t acpi_tad_status_read(struct device *dev, char *buf, u32 timer_id)if (PM_RUNTIME_ACQUIRE_ERR (&pm))return -ENXIO ; +guard (mutex)(&acpi_tad_aml_lock); + status =acpi_evaluate_integer (handle,"_GWS" , &arg_list, &retval);if (ACPI_FAILURE (status))return -EIO ;
Sasha Levin
maintainerPATCH 1/4 ACPI: x86: cmos_rtc: Create a CMOS RTC platform device
From: "Rafael J. Wysocki" <[email protected]>
[ Upstream commit 1ae2f435350ec05224a39995c3a680aa6fdae5a5 ]
Make the CMOS RTC ACPI scan handler create a platform device that will be used subsequently by rtc-cmos for driver binding on x86 systems with ACPI and update add_rtc_cmos() to skip registering a fallback platform device for the CMOS RTC when the above one has been registered.
Stable-dep-of: a3df8bbe0a70 ("ACPI: TAD: Add locking around AML evaluations")
--- arch/x86/kernel/rtc.c | 4 ++++ drivers/acpi/x86/cmos_rtc.c | 8 ++++++++ include/linux/acpi.h | 4 ++++ 3 files changed, 16 insertions(+)
arch/x86/kernel/rtc.c +4 -0
@@ -2,6 +2,7 @@/* * RTC related functions */ +#include <linux/acpi.h> #include <linux/platform_device.h> #include <linux/mc146818rtc.h> #include <linux/export.h>
@@ -146,6 +147,9 @@ static __init int add_rtc_cmos(void) } }#endif +if (cmos_rtc_platform_device_present) +return 0 ; +if (!x86_platform.legacy.rtc)return -ENODEV ;
drivers/acpi/x86/cmos_rtc.c +8 -0
@@ -24,6 +24,8 @@ static const struct acpi_device_id acpi_cmos_rtc_ids[] = { {} }; +bool cmos_rtc_platform_device_present; +static bool cmos_rtc_space_handler_present__read_mostly ; static acpi_status acpi_cmos_rtc_space_handler(u32 function,
@@ -103,6 +105,12 @@ static int acpi_cmos_rtc_attach(struct acpi_device *adev,if (ret <0 )return ret; +if (IS_ERR_OR_NULL (acpi_create_platform_device (adev,NULL ))) { +pr_err ("Failed to create CMOS-RTC platform device\n" ); +return 0 ; + }else { + cmos_rtc_platform_device_present = true; + }return 1 ; }
include/linux/acpi.h +4 -0
@@ -779,6 +779,8 @@ const char *acpi_get_subsystem_id(acpi_handle handle);int acpi_mrrm_max_mem_region (void );#endif +extern bool cmos_rtc_platform_device_present; +#else /* !CONFIG_ACPI */ #define acpi_disabled 1
@@ -1104,6 +1106,8 @@ static inline int acpi_mrrm_max_mem_region(void) return 1; } +#define cmos_rtc_platform_device_present false +#endif /* !CONFIG_ACPI */ #ifdef CONFIG_ACPI_HMAT
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 2/4 ACPI: x86/rtc-cmos: Use platform device for driver binding
From: "Rafael J. Wysocki" <[email protected]>
[ Upstream commit 2a78e42104444f948698f1225deaf515e9b7224d ]
Modify the rtc-cmos driver to bind to a platform device on systems with ACPI via acpi_match_table and advertise the CMOST RTC ACPI device IDs for driver auto-loading. Note that adding the requisite device IDs to it and exposing them via MODULE_DEVICE_TABLE() is sufficient for this purpose.
Since the ACPI device IDs in question are the same as for the CMOS RTC ACPI scan handler, put them into a common header file and use the definition from there in both places.
Additionally, to prevent a PNP device from being created for the CMOS RTC if a platform one is present already, make is_cmos_rtc_device() check cmos_rtc_platform_device_present introduced previously.
Stable-dep-of: a3df8bbe0a70 ("ACPI: TAD: Add locking around AML evaluations")
--- drivers/acpi/acpi_pnp.c | 2 +- drivers/acpi/x86/cmos_rtc.c | 5 +---- drivers/rtc/rtc-cmos.c | 10 ++++++++++ include/linux/acpi.h | 6 ++++++ 4 files changed, 18 insertions(+), 5 deletions(-)
drivers/acpi/acpi_pnp.c +1 -1
@@ -385,7 +385,7 @@ static int is_cmos_rtc_device(struct acpi_device *adev) { "PNP0B02" }, {""}, }; -return !acpi_match_device_ids (adev, ids); +return !cmos_rtc_platform_device_present && !acpi_match_device_ids (adev, ids); }bool acpi_is_pnp_device (struct acpi_device *adev)
drivers/acpi/x86/cmos_rtc.c +1 -4
@@ -18,10 +18,7 @@#include "../internal.h" static const struct acpi_device_id acpi_cmos_rtc_ids[] = { - {"PNP0B00" }, - {"PNP0B01" }, - {"PNP0B02" }, - {} +ACPI_CMOS_RTC_IDS };bool cmos_rtc_platform_device_present;
drivers/rtc/rtc-cmos.c +10 -0
@@ -27,6 +27,7 @@#define pr_fmt (fmt) KBUILD_MODNAME ": " fmt +#include <linux/acpi.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h>
@@ -1482,6 +1483,14 @@ static __init void cmos_of_init(struct platform_device *pdev)#else static inline void cmos_of_init (struct platform_device *pdev) {}#endif + +#ifdef CONFIG_ACPI +static const struct acpi_device_id acpi_cmos_rtc_ids[] = { +ACPI_CMOS_RTC_IDS +}; +MODULE_DEVICE_TABLE (acpi, acpi_cmos_rtc_ids); +#endif +/*----------------------------------------------------------------*/ /* Platform setup should have set up an RTC device, when PNP is
@@ -1536,6 +1545,7 @@ static struct platform_driver cmos_platform_driver = { .name = driver_name, .pm = &cmos_pm_ops, .of_match_table = of_match_ptr(of_cmos_match), + .acpi_match_table = ACPI_PTR(acpi_cmos_rtc_ids), } };
include/linux/acpi.h +6 -0
@@ -779,6 +779,12 @@ const char *acpi_get_subsystem_id(acpi_handle handle);int acpi_mrrm_max_mem_region (void );#endif +#define ACPI_CMOS_RTC_IDS \ + { "PNP0B00", }, \ + { "PNP0B01", }, \ + { "PNP0B02", }, \ + { "", } +extern bool cmos_rtc_platform_device_present;#else /* !CONFIG_ACPI */
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 3/4 ACPI: TAD: Rearrange RT data validation checking
In reply to Sasha LevinFrom: "Rafael J. Wysocki" <[email protected]>
[ Upstream commit 3329a1416c3350449081ca5daaa94802a65b2992 ]
Move RT data validation checks from acpi_tad_set_real_time() to a separate function called acpi_tad_rt_is_invalid() and use it also in acpi_tad_get_real_time() to validate data coming from the platform firmware.
Also make acpi_tad_set_real_time() return -EINVAL when the RT data passed to it is invalid (instead of -ERANGE which is somewhat confusing) and introduce ACPI_TAD_TZ_UNSPEC to represent the "unspecified timezone" value.
Stable-dep-of: a3df8bbe0a70 ("ACPI: TAD: Add locking around AML evaluations")
--- drivers/acpi/acpi_tad.c | 142 +++++++++++++++++++++++++++------------- include/linux/acpi.h | 4 ++ 2 files changed, 101 insertions(+), 45 deletions(-)
drivers/acpi/acpi_tad.c +97 -45
@@ -49,6 +49,9 @@ MODULE_AUTHOR("Rafael J. Wysocki");/* Special value for disabled timer or expired timer wake policy. */ #define ACPI_TAD_WAKE_DISABLED (~(u32)0) +/* ACPI TAD RTC */ +#define ACPI_TAD_TZ_UNSPEC 2047 +struct acpi_tad_driver_data {u32 capabilities; };
@@ -67,6 +70,16 @@ struct acpi_tad_rt {u8 padding[3 ];/* must be 0 */ } __packed; +static bool acpi_tad_rt_is_invalid (struct acpi_tad_rt *rt) +{ +return rt->year <1900 || rt->year >9999 || + rt->month <1 || rt->month >12 || + rt->hour >23 || rt->minute >59 || rt->second >59 || + rt->tz <-1440 || + (rt->tz >1440 && rt->tz !=ACPI_TAD_TZ_UNSPEC ) || + rt->daylight >3 ; +} +static int acpi_tad_set_real_time (struct device *dev,struct acpi_tad_rt *rt) {acpi_handle handle =ACPI_HANDLE (dev);
@@ -80,12 +93,8 @@ static int acpi_tad_set_real_time(struct device *dev, struct acpi_tad_rt *rt)unsigned long long retval;acpi_status status; -if (rt->year <1900 || rt->year >9999 || - rt->month <1 || rt->month >12 || - rt->hour >23 || rt->minute >59 || rt->second >59 || - rt->tz <-1440 || (rt->tz >1440 && rt->tz !=2047 ) || - rt->daylight >3 ) -return -ERANGE ; +if (acpi_tad_rt_is_invalid (rt)) +return -EINVAL ; args[0 ].buffer.pointer = (u8 *)rt; args[0 ].buffer.length =sizeof (*rt);
@@ -102,7 +111,7 @@ static int acpi_tad_set_real_time(struct device *dev, struct acpi_tad_rt *rt)return 0 ; } -static int acpi_tad_get_real_time (struct device *dev,struct acpi_tad_rt *rt) +static int acpi_tad_evaluate_grt (struct device *dev,struct acpi_tad_rt *rt) {acpi_handle handle =ACPI_HANDLE (dev);struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER };
@@ -111,12 +120,7 @@ static int acpi_tad_get_real_time(struct device *dev, struct acpi_tad_rt *rt)acpi_status status;int ret = -EIO ; -pm_runtime_get_sync (dev); - status =acpi_evaluate_object (handle,"_GRT" ,NULL , &output); - -pm_runtime_put_sync (dev); -if (ACPI_FAILURE (status)) goto out_free;
@@ -139,6 +143,80 @@ static int acpi_tad_get_real_time(struct device *dev, struct acpi_tad_rt *rt)return ret; } +static int __acpi_tad_get_real_time (struct device *dev,struct acpi_tad_rt *rt) +{ +int ret; + + ret =acpi_tad_evaluate_grt (dev, rt); +if (ret) +return ret; + +if (acpi_tad_rt_is_invalid (rt)) +return -ENODATA ; + +return 0 ; +} + +static int acpi_tad_get_real_time (struct device *dev,struct acpi_tad_rt *rt) +{ +int ret; + +pm_runtime_get_sync (dev); + + ret =__acpi_tad_get_real_time (dev, rt); + +pm_runtime_put_sync (dev); + +return ret; +} + +static int __acpi_tad_wake_set (struct device *dev,char *method,u32 timer_id, +u32 value) +{ +acpi_handle handle =ACPI_HANDLE (dev); +union acpi_object args[] = { + { .type =ACPI_TYPE_INTEGER , }, + { .type =ACPI_TYPE_INTEGER , }, + }; +struct acpi_object_list arg_list = { + .pointer = args, + .count =ARRAY_SIZE (args), + }; +unsigned long long retval; +acpi_status status; + + args[0 ].integer.value = timer_id; + args[1 ].integer.value = value; + + status =acpi_evaluate_integer (handle, method, &arg_list, &retval); +if (ACPI_FAILURE (status) || retval) +return -EIO ; + +return 0 ; +} + +static int __acpi_tad_wake_read (struct device *dev,char *method,u32 timer_id, +unsigned long long *retval) +{ +acpi_handle handle =ACPI_HANDLE (dev); +union acpi_object args[] = { + { .type =ACPI_TYPE_INTEGER , }, + }; +struct acpi_object_list arg_list = { + .pointer = args, + .count =ARRAY_SIZE (args), + }; +acpi_status status; + + args[0 ].integer.value = timer_id; + + status =acpi_evaluate_integer (handle, method, &arg_list, retval); +if (ACPI_FAILURE (status)) +return -EIO ; + +return 0 ; +} +static char *acpi_tad_rt_next_field (char *s,int *val) {char *p;
@@ -251,31 +329,15 @@ static const struct attribute_group acpi_tad_time_attr_group = {static int acpi_tad_wake_set (struct device *dev,char *method,u32 timer_id,u32 value) { -acpi_handle handle =ACPI_HANDLE (dev); -union acpi_object args[] = { - { .type =ACPI_TYPE_INTEGER , }, - { .type =ACPI_TYPE_INTEGER , }, - }; -struct acpi_object_list arg_list = { - .pointer = args, - .count =ARRAY_SIZE (args), - }; -unsigned long long retval; -acpi_status status; - - args[0 ].integer.value = timer_id; - args[1 ].integer.value = value; +int ret;pm_runtime_get_sync (dev); - status =acpi_evaluate_integer (handle, method, &arg_list, &retval); + ret =__acpi_tad_wake_set (dev, method, timer_id, value);pm_runtime_put_sync (dev); -if (ACPI_FAILURE (status) || retval) -return -EIO ; - -return 0 ; +return ret; } static int acpi_tad_wake_write(struct device *dev, const char *buf, char *method,
@@ -301,27 +363,17 @@ static int acpi_tad_wake_write(struct device *dev, const char *buf, char *methodstatic ssize_t acpi_tad_wake_read (struct device *dev,char *buf,char *method,u32 timer_id,const char *specval) { -acpi_handle handle =ACPI_HANDLE (dev); -union acpi_object args[] = { - { .type =ACPI_TYPE_INTEGER , }, - }; -struct acpi_object_list arg_list = { - .pointer = args, - .count =ARRAY_SIZE (args), - };unsigned long long retval; -acpi_status status; - - args[0 ].integer.value = timer_id; +int ret;pm_runtime_get_sync (dev); - status =acpi_evaluate_integer (handle, method, &arg_list, &retval); + ret =__acpi_tad_wake_read (dev, method, timer_id, &retval);pm_runtime_put_sync (dev); -if (ACPI_FAILURE (status)) -return -EIO ; +if (ret) +return ret;if ((u32 )retval ==ACPI_TAD_WAKE_DISABLED )return sprintf (buf,"%s\n" , specval);
include/linux/acpi.h +4 -0
@@ -785,7 +785,11 @@ int acpi_mrrm_max_mem_region(void); { "PNP0B02", }, \ { "", } +#ifdef CONFIG_X86 extern bool cmos_rtc_platform_device_present; +#else +#define cmos_rtc_platform_device_present false +#endif #else /* !CONFIG_ACPI */
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 4/4 ACPI: TAD: Add locking around AML evaluations
In reply to Sasha LevinFrom: "Rafael J. Wysocki" <[email protected]>
[ Upstream commit a3df8bbe0a704fa5c1609b9666b594f350558fe0 ]
In the ACPI TAD driver, there are hidden assumptions that the ACPI control methods used by it will not be evaluated concurrently due to ACPICA namespace and interpreter locking.
However, that may not be the case since ACPICA may drop and re-acquire the namespace and interpreter locks during the evaluation of a given object in a few cases, including the one in which the AML in question sleeps causing acpi_ex_system_do_sleep() to be called. In that case, the evaluation of one control method may be started while the evaluation of another one is still in progress.
For this reason, add a global lock to the ACPI TAD driver and acquire it every time before evaluating an ACPI control method, except for the initial evaluation of _GCP in acpi_tad_probe().
--- drivers/acpi/acpi_tad.c | 50 ++++++++++++++++++++++++----------------- 1 file changed, 30 insertions(+), 20 deletions(-)
drivers/acpi/acpi_tad.c +30 -20
@@ -23,6 +23,7 @@#include <linux/acpi.h> #include <linux/kernel.h> #include <linux/module.h> +#include <linux/mutex.h> #include <linux/platform_device.h> #include <linux/pm_runtime.h> #include <linux/suspend.h>
@@ -80,6 +81,8 @@ static bool acpi_tad_rt_is_invalid(struct acpi_tad_rt *rt) rt->daylight >3 ; } +static DEFINE_MUTEX (acpi_tad_aml_lock); +static int acpi_tad_set_real_time (struct device *dev,struct acpi_tad_rt *rt) {acpi_handle handle =ACPI_HANDLE (dev);
@@ -101,6 +104,8 @@ static int acpi_tad_set_real_time(struct device *dev, struct acpi_tad_rt *rt)pm_runtime_get_sync (dev); +guard (mutex)(&acpi_tad_aml_lock); + status =acpi_evaluate_integer (handle,"_SRT" , &arg_list, &retval);pm_runtime_put_sync (dev);
@@ -115,30 +120,27 @@ static int acpi_tad_evaluate_grt(struct device *dev, struct acpi_tad_rt *rt) {acpi_handle handle =ACPI_HANDLE (dev);struct acpi_buffer output = {ACPI_ALLOCATE_BUFFER }; -union acpi_object *out_obj; -struct acpi_tad_rt *data;acpi_status status;int ret = -EIO ; - status =acpi_evaluate_object (handle,"_GRT" ,NULL , &output); -if (ACPI_FAILURE (status)) - goto out_free; - - out_obj = output.pointer; -if (out_obj->type !=ACPI_TYPE_BUFFER ) - goto out_free; +guard (mutex)(&acpi_tad_aml_lock); -if (out_obj->buffer.length !=sizeof (*rt)) - goto out_free; - - data = (struct acpi_tad_rt *)(out_obj->buffer.pointer); -if (!data->valid) - goto out_free; - -memcpy (rt, data,sizeof (*rt)); - ret =0 ; - -out_free: + status =acpi_evaluate_object (handle,"_GRT" ,NULL , &output); +if (ACPI_SUCCESS (status)) { +union acpi_object *out_obj; + + out_obj = output.pointer; +if (out_obj->type ==ACPI_TYPE_BUFFER && + out_obj->buffer.length ==sizeof (*rt)) { +struct acpi_tad_rt *data; + + data = (struct acpi_tad_rt *)(out_obj->buffer.pointer); +if (data->valid) { +memcpy (rt, data,sizeof (*rt)); + ret =0 ; + } + } + }ACPI_FREE (output.pointer);return ret; }
@@ -188,6 +190,8 @@ static int __acpi_tad_wake_set(struct device *dev, char *method, u32 timer_id, args[0 ].integer.value = timer_id; args[1 ].integer.value = value; +guard (mutex)(&acpi_tad_aml_lock); + status =acpi_evaluate_integer (handle, method, &arg_list, &retval);if (ACPI_FAILURE (status) || retval)return -EIO ;
@@ -210,6 +214,8 @@ static int __acpi_tad_wake_read(struct device *dev, char *method, u32 timer_id, args[0 ].integer.value = timer_id; +guard (mutex)(&acpi_tad_aml_lock); + status =acpi_evaluate_integer (handle, method, &arg_list, retval);if (ACPI_FAILURE (status))return -EIO ;
@@ -424,6 +430,8 @@ static int acpi_tad_clear_status(struct device *dev, u32 timer_id)pm_runtime_get_sync (dev); +guard (mutex)(&acpi_tad_aml_lock); + status =acpi_evaluate_integer (handle,"_CWS" , &arg_list, &retval);pm_runtime_put_sync (dev);
@@ -465,6 +473,8 @@ static ssize_t acpi_tad_status_read(struct device *dev, char *buf, u32 timer_id)pm_runtime_get_sync (dev); +guard (mutex)(&acpi_tad_aml_lock); + status =acpi_evaluate_integer (handle,"_GWS" , &arg_list, &retval);pm_runtime_put_sync (dev);
Signature · 1 line
2.53.0