<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 20/07/2024 17:50, Sivaprasad Tummala
wrote:<br>
</div>
<blockquote type="cite" cite="mid:20240720165030.246294-3-sivaprasad.tummala@amd.com">
<pre class="moz-quote-pre" wrap="">This patch refactors the power management library, addressing uncore
power management. The primary changes involve the creation of dedicated
directories for each driver within 'drivers/power/uncore/*'. The
adjustment of meson.build files enables the selective activation
of individual drivers.
This refactor significantly improves code organization, enhances
clarity and boosts maintainability. It lays the foundation for more
focused development on individual drivers and facilitates seamless
integration of future enhancements, particularly the AMD uncore driver.
Signed-off-by: Sivaprasad Tummala <a class="moz-txt-link-rfc2396E" href="mailto:sivaprasad.tummala@amd.com"><sivaprasad.tummala@amd.com></a>
---
.../power/intel_uncore/intel_uncore.c | 18 +-
.../power/intel_uncore/intel_uncore.h | 8 +-
drivers/power/intel_uncore/meson.build | 7 +
drivers/power/meson.build | 3 +-
lib/power/meson.build | 2 +-
lib/power/rte_power_uncore.c | 206 ++++++---------
lib/power/rte_power_uncore.h | 91 ++++---
lib/power/rte_power_uncore_ops.h | 239 ++++++++++++++++++
lib/power/version.map | 1 +
9 files changed, 406 insertions(+), 169 deletions(-)
rename lib/power/power_intel_uncore.c => drivers/power/intel_uncore/intel_uncore.c (95%)
rename lib/power/power_intel_uncore.h => drivers/power/intel_uncore/intel_uncore.h (97%)
create mode 100644 drivers/power/intel_uncore/meson.build
create mode 100644 lib/power/rte_power_uncore_ops.h
</pre>
</blockquote>
<p><br>
</p>
<p>--snip--<br>
</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:20240720165030.246294-3-sivaprasad.tummala@amd.com">
<pre class="moz-quote-pre" wrap="">
diff --git a/lib/power/rte_power_uncore.c b/lib/power/rte_power_uncore.c
index 48c75a5da0..127f6ed212 100644
--- a/lib/power/rte_power_uncore.c
+++ b/lib/power/rte_power_uncore.c
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2010-2014 Intel Corporation
- * Copyright(c) 2023 AMD Corporation
+ * Copyright(c) 2024 Advanced Micro Devices, Inc.
*/
</pre>
</blockquote>
<p><br>
</p>
<p>--snip--<br>
</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:20240720165030.246294-3-sivaprasad.tummala@amd.com">
<pre class="moz-quote-pre" wrap="">
+struct rte_power_uncore_ops *
+rte_power_get_uncore_ops(void)
+{
+ RTE_ASSERT(global_uncore_ops != NULL);</pre>
</blockquote>
<p><br>
</p>
<p>I'm only seeing this now after sending the email for the first
patch. This would be a good solution for the global_core_ops check
in rte_power_get_core_ops() in rte_power.c, and would be the
smaller change, rather than checking everywhere
rte_power_get_env() is called. <br>
</p>
<p><br>
</p>
<blockquote type="cite" cite="mid:20240720165030.246294-3-sivaprasad.tummala@amd.com">
<pre class="moz-quote-pre" wrap="">
+
+ return global_uncore_ops;
}
</pre>
</blockquote>
<p><br>
</p>
<p>--snip--</p>
<p><br>
</p>
<p><br>
</p>
<span style="white-space: pre-wrap">
</span>
</body>
</html>