* [PATCH 1/2] accel/amdxdna: use modern PM helpers
@ 2024-12-13 9:02 Arnd Bergmann
2024-12-13 9:02 ` [PATCH 2/2] accel/amdxdna: add missing includes Arnd Bergmann
2024-12-13 17:07 ` [PATCH 1/2] accel/amdxdna: use modern PM helpers Jeffrey Hugo
0 siblings, 2 replies; 8+ messages in thread
From: Arnd Bergmann @ 2024-12-13 9:02 UTC (permalink / raw)
To: Min Ma, Lizhi Hou, Oded Gabbay
Cc: Arnd Bergmann, Jeffrey Hugo, Narendra Gutta, dri-devel,
linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
The old SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS macros cause a build
warning when CONFIG_PM is disabled:
drivers/accel/amdxdna/amdxdna_pci_drv.c:343:12: error: 'amdxdna_pmops_resume' defined but not used [-Werror=unused-function]
343 | static int amdxdna_pmops_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~
drivers/accel/amdxdna/amdxdna_pci_drv.c:328:12: error: 'amdxdna_pmops_suspend' defined but not used [-Werror=unused-function]
328 | static int amdxdna_pmops_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~~~
Change these to the modern replacements.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/accel/amdxdna/amdxdna_pci_drv.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/accel/amdxdna/amdxdna_pci_drv.c b/drivers/accel/amdxdna/amdxdna_pci_drv.c
index 02533732d4ca..b2342abdddc6 100644
--- a/drivers/accel/amdxdna/amdxdna_pci_drv.c
+++ b/drivers/accel/amdxdna/amdxdna_pci_drv.c
@@ -390,8 +390,8 @@ static int amdxdna_rpmops_resume(struct device *dev)
}
static const struct dev_pm_ops amdxdna_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(amdxdna_pmops_suspend, amdxdna_pmops_resume)
- SET_RUNTIME_PM_OPS(amdxdna_rpmops_suspend, amdxdna_rpmops_resume, NULL)
+ SYSTEM_SLEEP_PM_OPS(amdxdna_pmops_suspend, amdxdna_pmops_resume)
+ RUNTIME_PM_OPS(amdxdna_rpmops_suspend, amdxdna_rpmops_resume, NULL)
};
static struct pci_driver amdxdna_pci_driver = {
--
2.39.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* [PATCH 2/2] accel/amdxdna: add missing includes
2024-12-13 9:02 [PATCH 1/2] accel/amdxdna: use modern PM helpers Arnd Bergmann
@ 2024-12-13 9:02 ` Arnd Bergmann
2024-12-13 17:10 ` Jeffrey Hugo
2024-12-13 17:07 ` [PATCH 1/2] accel/amdxdna: use modern PM helpers Jeffrey Hugo
1 sibling, 1 reply; 8+ messages in thread
From: Arnd Bergmann @ 2024-12-13 9:02 UTC (permalink / raw)
To: Min Ma, Lizhi Hou, Oded Gabbay, Jeffrey Hugo
Cc: Arnd Bergmann, George Yang, dri-devel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
This driver fails to build in random configurations:
drivers/accel/amdxdna/amdxdna_mailbox.c:357:8: error: unknown type name 'irqreturn_t'
357 | static irqreturn_t mailbox_irq_handler(int irq, void *p)
| ^~~~~~~~~~~
drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'mailbox_irq_handler':
drivers/accel/amdxdna/amdxdna_mailbox.c:367:16: error: 'IRQ_HANDLED' undeclared (first use in this function)
367 | return IRQ_HANDLED;
| ^~~~~~~~~~~
drivers/accel/amdxdna/amdxdna_mailbox.c:367:16: note: each undeclared identifier is reported only once for each function it appears in
drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'mailbox_rx_worker':
drivers/accel/amdxdna/amdxdna_mailbox.c:395:25: error: implicit declaration of function 'disable_irq'; did you mean 'disable_work'? [-Wimplicit-function-declaration]
395 | disable_irq(mb_chann->msix_irq);
| ^~~~~~~~~~~
drivers/accel/amdxdna/aie2_solver.c: In function 'remove_partition_node':
drivers/accel/amdxdna/aie2_solver.c:121:9: error: implicit declaration of function 'kfree' [-Wimplicit-function-declaration]
121 | kfree(pt_node);
| ^~~~~
drivers/accel/amdxdna/aie2_solver.c: In function 'get_free_partition':
drivers/accel/amdxdna/aie2_solver.c:153:19: error: implicit declaration of function 'kzalloc' [-Wimplicit-function-declaration]
153 | pt_node = kzalloc(sizeof(*pt_node), GFP_KERNEL);
Include the headers that have the necessary declarations.
Fixes: c88d3325ae69 ("accel/amdxdna: Add hardware resource solver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
amdxdna: includ linux/interrupt.h
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/accel/amdxdna/aie2_solver.c | 1 +
drivers/accel/amdxdna/amdxdna_mailbox.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/accel/amdxdna/aie2_solver.c b/drivers/accel/amdxdna/aie2_solver.c
index a537c66589a4..0bbf91cad334 100644
--- a/drivers/accel/amdxdna/aie2_solver.c
+++ b/drivers/accel/amdxdna/aie2_solver.c
@@ -8,6 +8,7 @@
#include <drm/drm_print.h>
#include <linux/bitops.h>
#include <linux/bitmap.h>
+#include <linux/slab.h>
#include "aie2_solver.h"
diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c b/drivers/accel/amdxdna/amdxdna_mailbox.c
index 415d99abaaa3..41bbc5796e11 100644
--- a/drivers/accel/amdxdna/amdxdna_mailbox.c
+++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
@@ -7,6 +7,7 @@
#include <drm/drm_managed.h>
#include <linux/bitfield.h>
#include <linux/iopoll.h>
+#include <linux/interrupt.h>
#define CREATE_TRACE_POINTS
#include <trace/events/amdxdna.h>
--
2.39.5
^ permalink raw reply related [flat|nested] 8+ messages in thread* Re: [PATCH 2/2] accel/amdxdna: add missing includes
2024-12-13 9:02 ` [PATCH 2/2] accel/amdxdna: add missing includes Arnd Bergmann
@ 2024-12-13 17:10 ` Jeffrey Hugo
0 siblings, 0 replies; 8+ messages in thread
From: Jeffrey Hugo @ 2024-12-13 17:10 UTC (permalink / raw)
To: Arnd Bergmann, Min Ma, Lizhi Hou, Oded Gabbay
Cc: Arnd Bergmann, George Yang, dri-devel, linux-kernel
On 12/13/2024 2:02 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> This driver fails to build in random configurations:
>
> drivers/accel/amdxdna/amdxdna_mailbox.c:357:8: error: unknown type name 'irqreturn_t'
> 357 | static irqreturn_t mailbox_irq_handler(int irq, void *p)
> | ^~~~~~~~~~~
> drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'mailbox_irq_handler':
> drivers/accel/amdxdna/amdxdna_mailbox.c:367:16: error: 'IRQ_HANDLED' undeclared (first use in this function)
> 367 | return IRQ_HANDLED;
> | ^~~~~~~~~~~
> drivers/accel/amdxdna/amdxdna_mailbox.c:367:16: note: each undeclared identifier is reported only once for each function it appears in
> drivers/accel/amdxdna/amdxdna_mailbox.c: In function 'mailbox_rx_worker':
> drivers/accel/amdxdna/amdxdna_mailbox.c:395:25: error: implicit declaration of function 'disable_irq'; did you mean 'disable_work'? [-Wimplicit-function-declaration]
> 395 | disable_irq(mb_chann->msix_irq);
> | ^~~~~~~~~~~
> drivers/accel/amdxdna/aie2_solver.c: In function 'remove_partition_node':
> drivers/accel/amdxdna/aie2_solver.c:121:9: error: implicit declaration of function 'kfree' [-Wimplicit-function-declaration]
> 121 | kfree(pt_node);
> | ^~~~~
> drivers/accel/amdxdna/aie2_solver.c: In function 'get_free_partition':
> drivers/accel/amdxdna/aie2_solver.c:153:19: error: implicit declaration of function 'kzalloc' [-Wimplicit-function-declaration]
> 153 | pt_node = kzalloc(sizeof(*pt_node), GFP_KERNEL);
>
> Include the headers that have the necessary declarations.
>
> Fixes: c88d3325ae69 ("accel/amdxdna: Add hardware resource solver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> amdxdna: includ linux/interrupt.h
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
The interrupt part of this is now fixed, see "accel/amdxdna: Add include
interrupt.h to amdxdna_mailbox.c".
The slab portion looks sane. I'll trim the patch when applying unless
you'd prefer something else.
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] accel/amdxdna: use modern PM helpers
2024-12-13 9:02 [PATCH 1/2] accel/amdxdna: use modern PM helpers Arnd Bergmann
2024-12-13 9:02 ` [PATCH 2/2] accel/amdxdna: add missing includes Arnd Bergmann
@ 2024-12-13 17:07 ` Jeffrey Hugo
2024-12-13 17:41 ` Lizhi Hou
1 sibling, 1 reply; 8+ messages in thread
From: Jeffrey Hugo @ 2024-12-13 17:07 UTC (permalink / raw)
To: Arnd Bergmann, Min Ma, Lizhi Hou, Oded Gabbay
Cc: Arnd Bergmann, Narendra Gutta, dri-devel, linux-kernel
On 12/13/2024 2:02 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> The old SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS macros cause a build
> warning when CONFIG_PM is disabled:
>
> drivers/accel/amdxdna/amdxdna_pci_drv.c:343:12: error: 'amdxdna_pmops_resume' defined but not used [-Werror=unused-function]
> 343 | static int amdxdna_pmops_resume(struct device *dev)
> | ^~~~~~~~~~~~~~~~~~~~
> drivers/accel/amdxdna/amdxdna_pci_drv.c:328:12: error: 'amdxdna_pmops_suspend' defined but not used [-Werror=unused-function]
> 328 | static int amdxdna_pmops_suspend(struct device *dev)
> | ^~~~~~~~~~~~~~~~~~~~~
>
> Change these to the modern replacements.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Looks sane to me.
Lizhi, can you verify that this works as expected for you? I'd hate to
accidentally break something.
-Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] accel/amdxdna: use modern PM helpers
2024-12-13 17:07 ` [PATCH 1/2] accel/amdxdna: use modern PM helpers Jeffrey Hugo
@ 2024-12-13 17:41 ` Lizhi Hou
2024-12-13 17:49 ` Jeffrey Hugo
0 siblings, 1 reply; 8+ messages in thread
From: Lizhi Hou @ 2024-12-13 17:41 UTC (permalink / raw)
To: Jeffrey Hugo, Arnd Bergmann, Min Ma, Oded Gabbay
Cc: Arnd Bergmann, Narendra Gutta, dri-devel, linux-kernel
On 12/13/24 09:07, Jeffrey Hugo wrote:
> On 12/13/2024 2:02 AM, Arnd Bergmann wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> The old SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS macros cause a
>> build
>> warning when CONFIG_PM is disabled:
>>
>> drivers/accel/amdxdna/amdxdna_pci_drv.c:343:12: error:
>> 'amdxdna_pmops_resume' defined but not used [-Werror=unused-function]
>> 343 | static int amdxdna_pmops_resume(struct device *dev)
>> | ^~~~~~~~~~~~~~~~~~~~
>> drivers/accel/amdxdna/amdxdna_pci_drv.c:328:12: error:
>> 'amdxdna_pmops_suspend' defined but not used [-Werror=unused-function]
>> 328 | static int amdxdna_pmops_suspend(struct device *dev)
>> | ^~~~~~~~~~~~~~~~~~~~~
>>
>> Change these to the modern replacements.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Looks sane to me.
>
> Lizhi, can you verify that this works as expected for you? I'd hate
> to accidentally break something.
Verified suspend/resume. It works fine.
Lizhi
>
> -Jeff
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] accel/amdxdna: use modern PM helpers
2024-12-13 17:41 ` Lizhi Hou
@ 2024-12-13 17:49 ` Jeffrey Hugo
2024-12-13 17:57 ` Lizhi Hou
0 siblings, 1 reply; 8+ messages in thread
From: Jeffrey Hugo @ 2024-12-13 17:49 UTC (permalink / raw)
To: Lizhi Hou, Arnd Bergmann, Min Ma, Oded Gabbay
Cc: Arnd Bergmann, Narendra Gutta, dri-devel, linux-kernel
On 12/13/2024 10:41 AM, Lizhi Hou wrote:
>
> On 12/13/24 09:07, Jeffrey Hugo wrote:
>> On 12/13/2024 2:02 AM, Arnd Bergmann wrote:
>>> From: Arnd Bergmann <arnd@arndb.de>
>>>
>>> The old SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS macros cause a
>>> build
>>> warning when CONFIG_PM is disabled:
>>>
>>> drivers/accel/amdxdna/amdxdna_pci_drv.c:343:12: error:
>>> 'amdxdna_pmops_resume' defined but not used [-Werror=unused-function]
>>> 343 | static int amdxdna_pmops_resume(struct device *dev)
>>> | ^~~~~~~~~~~~~~~~~~~~
>>> drivers/accel/amdxdna/amdxdna_pci_drv.c:328:12: error:
>>> 'amdxdna_pmops_suspend' defined but not used [-Werror=unused-function]
>>> 328 | static int amdxdna_pmops_suspend(struct device *dev)
>>> | ^~~~~~~~~~~~~~~~~~~~~
>>>
>>> Change these to the modern replacements.
>>>
>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>
>> Looks sane to me.
>>
>> Lizhi, can you verify that this works as expected for you? I'd hate
>> to accidentally break something.
>
> Verified suspend/resume. It works fine.
Excellent. Would you like to give a reviewed-by and/or a tested-by?
-Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] accel/amdxdna: use modern PM helpers
2024-12-13 17:49 ` Jeffrey Hugo
@ 2024-12-13 17:57 ` Lizhi Hou
2024-12-13 18:11 ` Jeffrey Hugo
0 siblings, 1 reply; 8+ messages in thread
From: Lizhi Hou @ 2024-12-13 17:57 UTC (permalink / raw)
To: Jeffrey Hugo, Arnd Bergmann, Min Ma, Oded Gabbay
Cc: Arnd Bergmann, Narendra Gutta, dri-devel, linux-kernel
On 12/13/24 09:49, Jeffrey Hugo wrote:
> On 12/13/2024 10:41 AM, Lizhi Hou wrote:
>>
>> On 12/13/24 09:07, Jeffrey Hugo wrote:
>>> On 12/13/2024 2:02 AM, Arnd Bergmann wrote:
>>>> From: Arnd Bergmann <arnd@arndb.de>
>>>>
>>>> The old SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS macros cause
>>>> a build
>>>> warning when CONFIG_PM is disabled:
>>>>
>>>> drivers/accel/amdxdna/amdxdna_pci_drv.c:343:12: error:
>>>> 'amdxdna_pmops_resume' defined but not used [-Werror=unused-function]
>>>> 343 | static int amdxdna_pmops_resume(struct device *dev)
>>>> | ^~~~~~~~~~~~~~~~~~~~
>>>> drivers/accel/amdxdna/amdxdna_pci_drv.c:328:12: error:
>>>> 'amdxdna_pmops_suspend' defined but not used [-Werror=unused-function]
>>>> 328 | static int amdxdna_pmops_suspend(struct device *dev)
>>>> | ^~~~~~~~~~~~~~~~~~~~~
>>>>
>>>> Change these to the modern replacements.
>>>>
>>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>>
>>> Looks sane to me.
>>>
>>> Lizhi, can you verify that this works as expected for you? I'd hate
>>> to accidentally break something.
>>
>> Verified suspend/resume. It works fine.
>
> Excellent. Would you like to give a reviewed-by and/or a tested-by?
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Tested-by: Lizhi Hou <lizhi.hou@amd.com>
>
> -Jeff
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] accel/amdxdna: use modern PM helpers
2024-12-13 17:57 ` Lizhi Hou
@ 2024-12-13 18:11 ` Jeffrey Hugo
0 siblings, 0 replies; 8+ messages in thread
From: Jeffrey Hugo @ 2024-12-13 18:11 UTC (permalink / raw)
To: Lizhi Hou, Arnd Bergmann, Min Ma, Oded Gabbay
Cc: Arnd Bergmann, Narendra Gutta, dri-devel, linux-kernel
On 12/13/2024 10:57 AM, Lizhi Hou wrote:
>
> On 12/13/24 09:49, Jeffrey Hugo wrote:
>> On 12/13/2024 10:41 AM, Lizhi Hou wrote:
>>>
>>> On 12/13/24 09:07, Jeffrey Hugo wrote:
>>>> On 12/13/2024 2:02 AM, Arnd Bergmann wrote:
>>>>> From: Arnd Bergmann <arnd@arndb.de>
>>>>>
>>>>> The old SET_SYSTEM_SLEEP_PM_OPS and SET_RUNTIME_PM_OPS macros cause
>>>>> a build
>>>>> warning when CONFIG_PM is disabled:
>>>>>
>>>>> drivers/accel/amdxdna/amdxdna_pci_drv.c:343:12: error:
>>>>> 'amdxdna_pmops_resume' defined but not used [-Werror=unused-function]
>>>>> 343 | static int amdxdna_pmops_resume(struct device *dev)
>>>>> | ^~~~~~~~~~~~~~~~~~~~
>>>>> drivers/accel/amdxdna/amdxdna_pci_drv.c:328:12: error:
>>>>> 'amdxdna_pmops_suspend' defined but not used [-Werror=unused-function]
>>>>> 328 | static int amdxdna_pmops_suspend(struct device *dev)
>>>>> | ^~~~~~~~~~~~~~~~~~~~~
>>>>>
>>>>> Change these to the modern replacements.
>>>>>
>>>>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>>>>
>>>> Looks sane to me.
>>>>
>>>> Lizhi, can you verify that this works as expected for you? I'd hate
>>>> to accidentally break something.
>>>
>>> Verified suspend/resume. It works fine.
>>
>> Excellent. Would you like to give a reviewed-by and/or a tested-by?
>
> Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
>
> Tested-by: Lizhi Hou <lizhi.hou@amd.com>
Thanks!
Pushed to drm-misc-next
-Jeff
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-12-13 18:11 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-13 9:02 [PATCH 1/2] accel/amdxdna: use modern PM helpers Arnd Bergmann
2024-12-13 9:02 ` [PATCH 2/2] accel/amdxdna: add missing includes Arnd Bergmann
2024-12-13 17:10 ` Jeffrey Hugo
2024-12-13 17:07 ` [PATCH 1/2] accel/amdxdna: use modern PM helpers Jeffrey Hugo
2024-12-13 17:41 ` Lizhi Hou
2024-12-13 17:49 ` Jeffrey Hugo
2024-12-13 17:57 ` Lizhi Hou
2024-12-13 18:11 ` Jeffrey Hugo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.