* [PATCH] accel/amdxdna: Import AMD_PMF namespace
@ 2026-03-01 0:50 Mario Limonciello (AMD)
2026-03-02 18:00 ` Lizhi Hou
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Mario Limonciello (AMD) @ 2026-03-01 0:50 UTC (permalink / raw)
To: mario.limonciello, mamin506, lizhi.hou, ogabbay
Cc: Mario Limonciello (AMD), dri-devel
The amdxdna driver uses amd_pmf_get_npu_data() which is exported in the
AMD_PMF namespace. Import the AMD_PMF namespace.
Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
---
drivers/accel/amdxdna/amdxdna_pci_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/accel/amdxdna/amdxdna_pci_drv.c b/drivers/accel/amdxdna/amdxdna_pci_drv.c
index 98720ddc9818e..d6d12355bd2b7 100644
--- a/drivers/accel/amdxdna/amdxdna_pci_drv.c
+++ b/drivers/accel/amdxdna/amdxdna_pci_drv.c
@@ -359,5 +359,6 @@ static struct pci_driver amdxdna_pci_driver = {
module_pci_driver(amdxdna_pci_driver);
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("AMD_PMF");
MODULE_AUTHOR("XRT Team <runtimeca39d@amd.com>");
MODULE_DESCRIPTION("amdxdna driver");
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] accel/amdxdna: Import AMD_PMF namespace
2026-03-01 0:50 [PATCH] accel/amdxdna: Import AMD_PMF namespace Mario Limonciello (AMD)
@ 2026-03-02 18:00 ` Lizhi Hou
2026-03-03 4:05 ` Claude review: " Claude Code Review Bot
2026-03-03 4:05 ` Claude Code Review Bot
2 siblings, 0 replies; 4+ messages in thread
From: Lizhi Hou @ 2026-03-02 18:00 UTC (permalink / raw)
To: Mario Limonciello (AMD), mario.limonciello, mamin506, ogabbay; +Cc: dri-devel
On 2/28/26 16:50, Mario Limonciello (AMD) wrote:
> The amdxdna driver uses amd_pmf_get_npu_data() which is exported in the
> AMD_PMF namespace. Import the AMD_PMF namespace.
>
> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org>
> ---
> drivers/accel/amdxdna/amdxdna_pci_drv.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/accel/amdxdna/amdxdna_pci_drv.c b/drivers/accel/amdxdna/amdxdna_pci_drv.c
> index 98720ddc9818e..d6d12355bd2b7 100644
> --- a/drivers/accel/amdxdna/amdxdna_pci_drv.c
> +++ b/drivers/accel/amdxdna/amdxdna_pci_drv.c
> @@ -359,5 +359,6 @@ static struct pci_driver amdxdna_pci_driver = {
> module_pci_driver(amdxdna_pci_driver);
>
> MODULE_LICENSE("GPL");
> +MODULE_IMPORT_NS("AMD_PMF");
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
> MODULE_AUTHOR("XRT Team <runtimeca39d@amd.com>");
> MODULE_DESCRIPTION("amdxdna driver");
^ permalink raw reply [flat|nested] 4+ messages in thread* Claude review: accel/amdxdna: Import AMD_PMF namespace
2026-03-01 0:50 [PATCH] accel/amdxdna: Import AMD_PMF namespace Mario Limonciello (AMD)
2026-03-02 18:00 ` Lizhi Hou
@ 2026-03-03 4:05 ` Claude Code Review Bot
2026-03-03 4:05 ` Claude Code Review Bot
2 siblings, 0 replies; 4+ messages in thread
From: Claude Code Review Bot @ 2026-03-03 4:05 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Correctness of the change itself:** The `MODULE_IMPORT_NS("AMD_PMF")` line is syntactically correct and placed in the right file alongside the other `MODULE_*` macros. The target symbol `amd_pmf_get_npu_data()` does exist and is exported in the `AMD_PMF` namespace:
```c
// drivers/platform/x86/amd/pmf/core.c:390
EXPORT_SYMBOL_NS_GPL(amd_pmf_get_npu_data, "AMD_PMF");
```
**Ordering nit:** The new line is inserted between `MODULE_LICENSE` and `MODULE_AUTHOR`:
```c
MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS("AMD_PMF");
MODULE_AUTHOR("XRT Team <runtimeca39d@amd.com>");
```
The conventional ordering groups `MODULE_IMPORT_NS` either at the very end (after `MODULE_DESCRIPTION`) or before `MODULE_LICENSE`. Placing it between `LICENSE` and `AUTHOR` is unconventional but not a hard rule violation.
**Missing dependency / no current user:** As noted above, there is currently no call to `amd_pmf_get_npu_data()` or any `amd_pmf` API anywhere in `drivers/accel/amdxdna/`. The commit message says "The amdxdna driver uses amd_pmf_get_npu_data()" but this is not true on the current tree. The commit message should clarify that this is a prerequisite for another patch or series that adds the actual usage.
**Suggestion:** If this patch is meant to land alongside or after another series that introduces the call, the commit message should reference that dependency (e.g., "This is needed for the upcoming NPU power management integration" or include a `Depends-on:` tag). If the consuming code has already landed on a different branch, a `Fixes:` tag referencing the commit that introduced the call would be appropriate to explain the build breakage this resolves.
**Verdict:** Straightforward namespace import. No functional concerns with the change itself, but the commit message needs to explain the dependency on the patch that actually calls `amd_pmf_get_npu_data()`.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 4+ messages in thread* Claude review: accel/amdxdna: Import AMD_PMF namespace
2026-03-01 0:50 [PATCH] accel/amdxdna: Import AMD_PMF namespace Mario Limonciello (AMD)
2026-03-02 18:00 ` Lizhi Hou
2026-03-03 4:05 ` Claude review: " Claude Code Review Bot
@ 2026-03-03 4:05 ` Claude Code Review Bot
2 siblings, 0 replies; 4+ messages in thread
From: Claude Code Review Bot @ 2026-03-03 4:05 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: accel/amdxdna: Import AMD_PMF namespace
Author: "Mario Limonciello (AMD)" <superm1@kernel.org>
Patches: 2
Reviewed: 2026-03-03T14:05:57.418611
---
This is a single, trivially small patch that adds `MODULE_IMPORT_NS("AMD_PMF")` to the amdxdna accelerator driver. The stated purpose is to allow the driver to call `amd_pmf_get_npu_data()`, which is exported in the `AMD_PMF` namespace from `drivers/platform/x86/amd/pmf/core.c`.
The patch is **correct in form** — adding a `MODULE_IMPORT_NS()` is the right way to consume a symbol exported with `EXPORT_SYMBOL_NS_GPL()`. However, there is a significant concern: **the current amdxdna driver on drm-next has no reference to `amd_pmf_get_npu_data()` or any `amd_pmf` API at all**. This means the namespace import is being added ahead of the code that actually uses it, or depends on another patch (or series) that hasn't landed yet.
This is fine if this patch is intended to be applied on top of another series that adds the actual `amd_pmf_get_npu_data()` call, but the commit message should state this dependency explicitly (e.g., referencing the other series or commit). Without that context, the patch appears to add a namespace import for a symbol that is never used, which would be dead code.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-03 4:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-01 0:50 [PATCH] accel/amdxdna: Import AMD_PMF namespace Mario Limonciello (AMD)
2026-03-02 18:00 ` Lizhi Hou
2026-03-03 4:05 ` Claude review: " Claude Code Review Bot
2026-03-03 4:05 ` Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox