From patchwork Mon Nov 25 09:34:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huisong Li X-Patchwork-Id: 13884701 Received: from szxga05-in.huawei.com (szxga05-in.huawei.com [45.249.212.191]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F036618C03F; Mon, 25 Nov 2024 09:45:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.191 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527939; cv=none; b=CoqxS+B8u+qqqhN4aUGN8rFk8sWQjPI5dAosPylFuZuhlqqzD/jgpVZXN6KIsgypIeeE2aNFYvM/LuVwzF+hJ8Qva62AFO93f8gzAqz6KW4o/IPq+vaCoeVvDafmMos7m8CFUXdPeMI8XVYg/qYYbKtbeu46Tixhbcgj3hYPPLk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527939; c=relaxed/simple; bh=GmBeP+FVpvt08+uBd4UcADx9KPChCc6lrKoEKJiy9Ls=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bVbVrqH4iMihAXfZo+ixWgc1hbunkDRUoluwlFkEFjiJiC2l+K9+1U+ibbLxNCGi3tUb9/W+Yp+pfSdLt1GX/T6w1LsC9SXyjvV4qobQoc4jqzYu4gZ/RXrBYYQp/swOTq7QVjrQjUEEYg7JrSjbiL/H01y7nyznqlBhYpW3yZQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.191 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.214]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4XxgkS1gLGz1k0BK; Mon, 25 Nov 2024 17:43:28 +0800 (CST) Received: from dggemv703-chm.china.huawei.com (unknown [10.3.19.46]) by mail.maildlp.com (Postfix) with ESMTPS id 60B951A016C; Mon, 25 Nov 2024 17:45:33 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 25 Nov 2024 17:45:33 +0800 Received: from localhost.localdomain (10.28.79.22) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 25 Nov 2024 17:45:32 +0800 From: Huisong Li To: , CC: , , , , , Subject: [PATCH v1 1/4] hwmon: (acpi_power_meter) Fix using uninitialized variables Date: Mon, 25 Nov 2024 17:34:12 +0800 Message-ID: <20241125093415.21719-2-lihuisong@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20241125093415.21719-1-lihuisong@huawei.com> References: <20241125093415.21719-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemn100009.china.huawei.com (7.202.194.112) The 'power1_alarm' attribute uses the 'power' and 'cap' in the acpi_power_meter_resource structure. However, these two fields are just updated when user query 'power' and 'cap' attribute, or hardware enforced limit. If user directly query the 'power1_alarm' attribute without queryng above two attributes, driver will use the uninitialized variables to judge. In addition, the 'power1_alarm' attribute needs to update power and cap to show the real state. Signed-off-by: Huisong Li --- drivers/hwmon/acpi_power_meter.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c index 2f1c9d97ad21..4c3314e35d30 100644 --- a/drivers/hwmon/acpi_power_meter.c +++ b/drivers/hwmon/acpi_power_meter.c @@ -396,6 +396,9 @@ static ssize_t show_val(struct device *dev, struct acpi_device *acpi_dev = to_acpi_device(dev); struct acpi_power_meter_resource *resource = acpi_dev->driver_data; u64 val = 0; + int ret; + + guard(mutex)(&resource->lock); switch (attr->index) { case 0: @@ -423,6 +426,13 @@ static ssize_t show_val(struct device *dev, val = 0; break; case 6: + ret = update_meter(resource); + if (ret) + return ret; + ret = update_cap(resource); + if (ret) + return ret; + if (resource->power > resource->cap) val = 1; else From patchwork Mon Nov 25 09:34:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huisong Li X-Patchwork-Id: 13884700 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3A141190067; Mon, 25 Nov 2024 09:45:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.189 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527939; cv=none; b=fj+jJ8Ee4/WF+HLTITPKNbABe2KryiDJ6igDNKM8YOM4mOUnQcmvtsuZ6hoLcxuIxTp9naXvz1tbQAiAXs2crB1OQmFfqSiIAbXRXQBKVxFNaPAyZG2nVJBhI7JZWGaaknEYueb5sGkW3eF6J7CCXfMdsOFAS5WXMaFBbEYypPw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527939; c=relaxed/simple; bh=ECpuQOq5aCnq3HC1tu2bZ5lPTloU6TfNh8V1/IDwyhg=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=b3Bx8jg7I9jBb+q1kbpstNUutNRUqwm2pvzNBv71hXdI62D9B0FGAc9mTMJEtf2VxG4BzJ5HI6QzZ7wDqvpXbdUxep8iS09CDMpyhvjDYu2enURJX1iC5+9jiWS54cwbT4twoJ8ar2zE5o+3eVJ9sOrPSqFIeW2aRaCXSpJm/e4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.189 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.105]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4XxglB0XPLzRhmY; Mon, 25 Nov 2024 17:44:06 +0800 (CST) Received: from dggemv711-chm.china.huawei.com (unknown [10.1.198.66]) by mail.maildlp.com (Postfix) with ESMTPS id CA4AD140393; Mon, 25 Nov 2024 17:45:33 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 25 Nov 2024 17:45:33 +0800 Received: from localhost.localdomain (10.28.79.22) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 25 Nov 2024 17:45:32 +0800 From: Huisong Li To: , CC: , , , , , Subject: [PATCH v1 2/4] hwmon: (acpi_power_meter) Fix update the power trip points on failure Date: Mon, 25 Nov 2024 17:34:13 +0800 Message-ID: <20241125093415.21719-3-lihuisong@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20241125093415.21719-1-lihuisong@huawei.com> References: <20241125093415.21719-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemn100009.china.huawei.com (7.202.194.112) The power trip points maintained in local should not be updated when '_PTP' method fails to evaluate. Signed-off-by: Huisong Li --- drivers/hwmon/acpi_power_meter.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c index 4c3314e35d30..95da73858a0b 100644 --- a/drivers/hwmon/acpi_power_meter.c +++ b/drivers/hwmon/acpi_power_meter.c @@ -292,8 +292,8 @@ static ssize_t set_trip(struct device *dev, struct device_attribute *devattr, struct sensor_device_attribute *attr = to_sensor_dev_attr(devattr); struct acpi_device *acpi_dev = to_acpi_device(dev); struct acpi_power_meter_resource *resource = acpi_dev->driver_data; + unsigned long temp, trip_bk; int res; - unsigned long temp; res = kstrtoul(buf, 10, &temp); if (res) @@ -302,8 +302,11 @@ static ssize_t set_trip(struct device *dev, struct device_attribute *devattr, temp = DIV_ROUND_CLOSEST(temp, 1000); mutex_lock(&resource->lock); + trip_bk = resource->trip[attr->index - 7]; resource->trip[attr->index - 7] = temp; res = set_acpi_trip(resource); + if (!res) + resource->trip[attr->index - 7] = trip_bk; mutex_unlock(&resource->lock); if (res) From patchwork Mon Nov 25 09:34:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huisong Li X-Patchwork-Id: 13884702 Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E106E191F7E; Mon, 25 Nov 2024 09:45:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527944; cv=none; b=DS+QNourDExRaM5JKTLbMAPcBb5Scvai/OlLV181Ndj7jXujtn0u5McLcCELX8bxXx/LyCMfPaeNhv5ph/+OXhLezNYR3Kwn192CsonFtiLAtPZgoExOMZuw5W89NsaDtoaLyw2R7zSS5J7nT06ak3L99pvW+yMnOEQECUI7arc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527944; c=relaxed/simple; bh=OueQ8T1Get/NkPFc17S5qekxUTbUZiC2H/WWHnKWs2c=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ltB3jBbQMV0JWnw6gj25invoi5L6Hz+E5+oGwynmrlNnrPmrgHN1HmgGrPCGiAMheQDB4OMRxsSUpEOyP2pN9eL/+hVV8KklTzc2f+OLfrMhvj9D3lqmWFlVCjpuF8qkYepovTMjQLSA/yVTwqLDeS2Iii67RYcWTqsINM1rRzc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.88.234]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4Xxgn76WYdz1yqxG; Mon, 25 Nov 2024 17:45:47 +0800 (CST) Received: from dggemv711-chm.china.huawei.com (unknown [10.1.198.66]) by mail.maildlp.com (Postfix) with ESMTPS id 09535140138; Mon, 25 Nov 2024 17:45:34 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 25 Nov 2024 17:45:33 +0800 Received: from localhost.localdomain (10.28.79.22) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 25 Nov 2024 17:45:33 +0800 From: Huisong Li To: , CC: , , , , , Subject: [PATCH v1 3/4] hwmon: (acpi_power_meter) Remove redundant 'sensors_valid' variable Date: Mon, 25 Nov 2024 17:34:14 +0800 Message-ID: <20241125093415.21719-4-lihuisong@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20241125093415.21719-1-lihuisong@huawei.com> References: <20241125093415.21719-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemn100009.china.huawei.com (7.202.194.112) The 'sensors_valid' in acpi_power_meter_resource structure is always one after querying power once. The default value of this variable is zero which just ensure user can query power successfully without any time requirement at first time. We can get power and fill the 'sensors_last_updated' field at probing phase to make sure that a valid value is returned to user at first query within the sampling interval. Then this redundant variable can be safely removed. Signed-off-by: Huisong Li --- drivers/hwmon/acpi_power_meter.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c index 95da73858a0b..3500859ff0bf 100644 --- a/drivers/hwmon/acpi_power_meter.c +++ b/drivers/hwmon/acpi_power_meter.c @@ -84,7 +84,6 @@ struct acpi_power_meter_resource { u64 power; u64 cap; u64 avg_interval; - int sensors_valid; unsigned long sensors_last_updated; struct sensor_device_attribute sensors[NUM_SENSORS]; int num_sensors; @@ -316,15 +315,14 @@ static ssize_t set_trip(struct device *dev, struct device_attribute *devattr, } /* Power meter */ -static int update_meter(struct acpi_power_meter_resource *resource) +static int update_meter(struct acpi_power_meter_resource *resource, bool check) { unsigned long long data; acpi_status status; unsigned long local_jiffies = jiffies; - if (time_before(local_jiffies, resource->sensors_last_updated + - msecs_to_jiffies(resource->caps.sampling_time)) && - resource->sensors_valid) + if (check && time_before(local_jiffies, resource->sensors_last_updated + + msecs_to_jiffies(resource->caps.sampling_time))) return 0; status = acpi_evaluate_integer(resource->acpi_dev->handle, "_PMM", @@ -336,7 +334,6 @@ static int update_meter(struct acpi_power_meter_resource *resource) } resource->power = data; - resource->sensors_valid = 1; resource->sensors_last_updated = jiffies; return 0; } @@ -349,7 +346,7 @@ static ssize_t show_power(struct device *dev, struct acpi_power_meter_resource *resource = acpi_dev->driver_data; mutex_lock(&resource->lock); - update_meter(resource); + update_meter(resource, true); mutex_unlock(&resource->lock); if (resource->power == UNKNOWN_POWER) @@ -429,7 +426,7 @@ static ssize_t show_val(struct device *dev, val = 0; break; case 6: - ret = update_meter(resource); + ret = update_meter(resource, true); if (ret) return ret; ret = update_cap(resource); @@ -699,6 +696,10 @@ static int setup_attrs(struct acpi_power_meter_resource *resource) return res; if (resource->caps.flags & POWER_METER_CAN_MEASURE) { + res = update_meter(resource, false); + if (res) + goto error; + res = register_attrs(resource, meter_attrs); if (res) goto error; @@ -890,7 +891,6 @@ static int acpi_power_meter_add(struct acpi_device *device) if (!resource) return -ENOMEM; - resource->sensors_valid = 0; resource->acpi_dev = device; mutex_init(&resource->lock); strcpy(acpi_device_name(device), ACPI_POWER_METER_DEVICE_NAME); From patchwork Mon Nov 25 09:34:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Huisong Li X-Patchwork-Id: 13884703 Received: from szxga06-in.huawei.com (szxga06-in.huawei.com [45.249.212.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D32818FDCC; Mon, 25 Nov 2024 09:45:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.32 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527945; cv=none; b=ZtWQxqnigXNEoGMtAtnEaARmfjHR7ONiSXMB8Fbmg7cd2sUVpPa0+KVoHnj9uj1ka/rhfNwNOT7KxrYYe+8Mf52ecVAXow64a/BzL2zt1ebXSJfCT4MfZekJgU0eFgVgA16OkWUaRyLOIATfMES7VzpFWGrRZCnnld6nbIY4UN8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732527945; c=relaxed/simple; bh=7vH7tYyL6BlYXxoUVeJHgaS5gYbRQQP4StN4V2vcqP8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PiWCt4zDvEHXYsezsm952QmRRlCukY+v6+DlubTYdlwcjyjjVstMw3vaaznJtVTYZa58MtnH77Ztn1t3439aMkiUC5peXJAgqYYMhb0Juojb3DrQNY/lsf1W62uJfwqmXbNCrLPwpUMrQwtpGDyUWUI3xUCM53V2JeHsdLe/QU8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.162.112]) by szxga06-in.huawei.com (SkyGuard) with ESMTP id 4Xxgn83QMGz1yqxY; Mon, 25 Nov 2024 17:45:48 +0800 (CST) Received: from dggemv704-chm.china.huawei.com (unknown [10.3.19.47]) by mail.maildlp.com (Postfix) with ESMTPS id 96671140202; Mon, 25 Nov 2024 17:45:34 +0800 (CST) Received: from kwepemn100009.china.huawei.com (7.202.194.112) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 25 Nov 2024 17:45:34 +0800 Received: from localhost.localdomain (10.28.79.22) by kwepemn100009.china.huawei.com (7.202.194.112) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Mon, 25 Nov 2024 17:45:33 +0800 From: Huisong Li To: , CC: , , , , , Subject: [PATCH v1 4/4] hwmon: (acpi_power_meter) Add the print of no notification that hardware limit is enforced Date: Mon, 25 Nov 2024 17:34:15 +0800 Message-ID: <20241125093415.21719-5-lihuisong@huawei.com> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20241125093415.21719-1-lihuisong@huawei.com> References: <20241125093415.21719-1-lihuisong@huawei.com> Precedence: bulk X-Mailing-List: linux-hwmon@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemn100009.china.huawei.com (7.202.194.112) As ACPI spec said, the bit3 of the supported capabilities in _PMC indicates that the power meter supports notifications when the hardware limit is enforced. If one platform doesn't report this bit, but support hardware forced limit through some out-of-band mechanism. Driver wouldn't receive the related notifications to notify the OSPM to re-read the hardware limit. So add the print of no notifcation that hardware limit is enforced. Signed-off-by: Huisong Li --- drivers/hwmon/acpi_power_meter.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/hwmon/acpi_power_meter.c b/drivers/hwmon/acpi_power_meter.c index 3500859ff0bf..d3f144986fae 100644 --- a/drivers/hwmon/acpi_power_meter.c +++ b/drivers/hwmon/acpi_power_meter.c @@ -712,6 +712,10 @@ static int setup_attrs(struct acpi_power_meter_resource *resource) goto skip_unsafe_cap; } + if (resource->caps.flags & POWER_METER_CAN_NOTIFY == 0) + dev_info(&resource->acpi_dev->dev, + "no notifcation when the hardware limit is enforced.\n"); + if (resource->caps.configurable_cap) res = register_attrs(resource, rw_cap_attrs); else