From nobody Tue Apr 7 10:45:58 2026 Received: from relay14.grserver.gr (relay14.grserver.gr [157.180.73.62]) (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 B9BB533C18B; Sat, 7 Mar 2026 11:55:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=157.180.73.62 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772884535; cv=none; b=CMUknOqpxtUnapMA63ulWVsZHsjyjOp0q6E8o3Apb0n0vxrcTTnHSjj4cl3WvZ1HCJFJ0Iw7mFjfZSLyhulx/QdVoT7VM2ZdmXAtxgPmrhitkdCobx9fzbfOA348Ogf3zNKf8I3fGrO4U3HmL7iICLLG6/5VyLJuLiMuyr515EI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772884535; c=relaxed/simple; bh=j/2gqBgx9RYbaR8BrQe7tCgW/Et6QpCg722X4ShPrjE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G4BuGwMwk18+NpQmZHlatI6F3xj728i/JyMJw1rCSkB7vRixEEDvnLSSmg8LlGrS+EGx7Q02YzZb0Hs6Hu2eY/7/ZBqCv1wqs4oBpcO8jJe/9Sc49TtrOgosdak72orMnwffaN1xbxUGZFhLVyRjlK+QvF8nyA3q/0AZE/l5VQE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=antheas.dev; spf=pass smtp.mailfrom=antheas.dev; dkim=pass (2048-bit key) header.d=antheas.dev header.i=@antheas.dev header.b=R8BHRZH2; arc=none smtp.client-ip=157.180.73.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=antheas.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=antheas.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=antheas.dev header.i=@antheas.dev header.b="R8BHRZH2" Received: from relay14 (localhost [127.0.0.1]) by relay14.grserver.gr (Proxmox) with ESMTP id EDF9F409D5; Sat, 7 Mar 2026 11:55:31 +0000 (UTC) Received: from linux3247.grserver.gr (linux3247.grserver.gr [213.158.90.240]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by relay14.grserver.gr (Proxmox) with ESMTPS id D91E1409DC; Sat, 7 Mar 2026 11:55:30 +0000 (UTC) Received: from antheas-z13 (unknown [IPv6:2a05:f6c5:43c3:0:ba48:cea4:a8c2:d901]) by linux3247.grserver.gr (Postfix) with ESMTPSA id DFF1A1FECCF; Sat, 7 Mar 2026 13:55:29 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=antheas.dev; s=default; t=1772884530; bh=KdugWhgApbpYkp5ulPSM4iY1f+pLRyIvHEfY0i5KqC8=; h=From:To:Subject; b=R8BHRZH2BcTQoynort/3vVVnAHkT8NJ3ThLYOZZKvI5v1A/RKircDDWtQSSY1VjTJ pwjnmOEC+crNYLhJc9ipQeDdr+8LPNGErzpJJVBMEOL6kJeOtbx5BmwTVzKffKu7Kp 3sFsyNfoj7E5oIOk5I1RVQweBj0vmrzZJv/WiaNk4Z3tJu1WEyNoPkIwOdDGnTbDQm AXCYOgzI1Si9rd9mHRFTG0ECtWjv5NMPqVrNchJlBBhL7ZPpsq+irv2+4ObkBtxKuT ISh0YK1UwUBTN7Um/RWRn0wKeqYc+wSaef7ETz4PkkNcsEGmKqiTsRuSblV0v3IX3V FJSYBKArCmIUA== Authentication-Results: linux3247.grserver.gr; spf=pass (sender IP is 2a05:f6c5:43c3:0:ba48:cea4:a8c2:d901) smtp.mailfrom=lkml@antheas.dev smtp.helo=antheas-z13 Received-SPF: pass (linux3247.grserver.gr: connection is authenticated) From: Antheas Kapenekakis To: Mario.Limonciello@amd.com Cc: W_Armin@gmx.de, sashal@kernel.org, Shyam-Sundar.S-k@amd.com, derekjohn.clark@gmail.com, denis.benato@linux.dev, linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, Antheas Kapenekakis Subject: [RFC v3 1/4] Documentation: firmware-attributes: generalize save_settings entry Date: Sat, 7 Mar 2026 12:55:13 +0100 Message-ID: <20260307115516.26892-2-lkml@antheas.dev> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260307115516.26892-1-lkml@antheas.dev> References: <20260307115516.26892-1-lkml@antheas.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-PPP-Message-ID: <177288453041.1270865.12008553927786162334@linux3247.grserver.gr> X-PPP-Vhost: antheas.dev X-Virus-Scanned: clamav-milter 1.4.3 at linux3247.grserver.gr X-Virus-Status: Clean Content-Type: text/plain; charset="utf-8" The save_settings interface is also implemented by amd_dptc, which has the same bulk/single/save semantics but no save-count limitation. Generalize the description to cover both drivers: move the Lenovo 48-save architectural constraint into a driver-specific notes section and add the amd_dptc behavior alongside it. Signed-off-by: Antheas Kapenekakis --- .../testing/sysfs-class-firmware-attributes | 41 ++++++++++++------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-class-firmware-attributes b/Do= cumentation/ABI/testing/sysfs-class-firmware-attributes index 2713efa509b4..c762bed50de8 100644 --- a/Documentation/ABI/testing/sysfs-class-firmware-attributes +++ b/Documentation/ABI/testing/sysfs-class-firmware-attributes @@ -388,31 +388,42 @@ What: /sys/class/firmware-attributes/*/attributes/sa= ve_settings Date: August 2023 KernelVersion: 6.6 Contact: Mark Pearson + Antheas Kapenekakis Description: - On Lenovo platforms there is a limitation in the number of times an attr= ibute can be - saved. This is an architectural limitation and it limits the number of a= ttributes - that can be modified to 48. - A solution for this is instead of the attribute being saved after every = modification, - to allow a user to bulk set the attributes, and then trigger a final sav= e. This allows - unlimited attributes. + Controls how writes to current_value are applied to the hardware. =20 Read the attribute to check what save mode is enabled (single or bulk). E.g: - # cat /sys/class/firmware-attributes/thinklmi/attributes/save_settings + # cat /sys/class/firmware-attributes/*/attributes/save_settings single =20 Write the attribute with 'bulk' to enable bulk save mode. - Write the attribute with 'single' to enable saving, after every attribut= e set. - The default setting is single mode. + Write the attribute with 'single' to enable saving, after every + attribute set. The default setting is single mode. E.g: - # echo bulk > /sys/class/firmware-attributes/thinklmi/attributes/save_se= ttings + # echo bulk > /sys/class/firmware-attributes/*/attributes/save_settings =20 - When in bulk mode write 'save' to trigger a save of all currently modifi= ed attributes. - Note, once a save has been triggered, in bulk mode, attributes can no lo= nger be set and - will return a permissions error. This is to prevent users hitting the 48= + save limitation - (which requires entering the BIOS to clear the error condition) + When in bulk mode write 'save' to trigger an apply of all + currently staged attributes. E.g: - # echo save > /sys/class/firmware-attributes/thinklmi/attributes/save_se= ttings + # echo save > /sys/class/firmware-attributes/*/attributes/save_settings + + Driver-specific notes: + + thinklmi (Lenovo): On Lenovo platforms there is a limitation in + the number of times an attribute can be saved. This is an + architectural limitation and it limits the number of attributes + that can be modified to 48. + + Once a save has been triggered in bulk mode, attributes can no + longer be set and will return a permissions error. This is to + prevent users hitting the 48+ save limitation (which requires + entering the BIOS to clear the error condition). + + amd_dptc (AMD DPTC): No save-count limitation. 'save' can be + called any number of times. Returns -EINVAL if no values have + been staged. In addition, when in 'single' mode, the driver + uses pm ops to trigger a save of staged attributes on resume. =20 What: /sys/class/firmware-attributes/*/attributes/debug_cmd Date: July 2021 --=20 2.52.0