summaryrefslogtreecommitdiff
path: root/tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
diff options
context:
space:
mode:
authorShyam Sundar S K <Shyam-sundar.S-k@amd.com>2025-12-02 09:52:19 +0530
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2025-12-23 11:44:58 +0200
commit2a2c085de1f3f54a6222fbef5b45f1d3c40e98e3 (patch)
tree731a179567c01042066fb50db5d4448f376cc620 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git
parentdd0a2d47cfc4c5ffb3e866c94a80c03ff5ecdd70 (diff)
platform/x86/amd/pmf: Use ring buffer to store custom BIOS input values
Custom BIOS input values can be updated by multiple sources, such as power mode changes and sensor events, each triggering a custom BIOS input event. When these events occur in rapid succession, new data may overwrite previous values before they are processed, resulting in lost updates. To address this, introduce a fixed-size, power-of-two ring buffer to capture every custom BIOS input event, storing both the pending request and its associated input values. Access to the ring buffer is synchronized using a mutex. The previous use of memset() to clear the pending request structure after each event is removed, as each BIOS input value is now copied into the buffer as a snapshot. Consumers now process entries directly from the ring buffer, making explicit clearing of the pending request structure unnecessary. Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org> Tested-by: Yijun Shen <Yijun.Shen@Dell.com> Co-developed-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Signed-off-by: Patil Rajesh Reddy <Patil.Reddy@amd.com> Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://patch.msgid.link/20251202042219.245173-1-Shyam-sundar.S-k@amd.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions