<div dir="auto">I can send one in tomorrow if you like </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 6 Dec 2024, 22:55 Jeffrey Hugo, <<a href="mailto:quic_jhugo@quicinc.com">quic_jhugo@quicinc.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 12/6/2024 11:47 AM, Lizhi Hou wrote:<br>
> <br>
> On 12/6/24 09:01, Mike Lothian wrote:<br>
>> On Fri, 6 Dec 2024 at 16:41, Mike Lothian <<a href="mailto:mike@fireburn.co.uk" target="_blank" rel="noreferrer">mike@fireburn.co.uk</a>> wrote:<br>
>>> On Fri, 6 Dec 2024 at 16:26, Jeffrey Hugo <<a href="mailto:quic_jhugo@quicinc.com" target="_blank" rel="noreferrer">quic_jhugo@quicinc.com</a>> <br>
>>> wrote:<br>
>>>> On 12/5/2024 8:44 AM, Mike Lothian wrote:<br>
>>>>> Hi<br>
>>>>><br>
>>>>> I needed to add the following to get things compiling for me<br>
>>>>><br>
>>>>><br>
>>>>> diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c<br>
>>>>> b/drivers/accel/amdxdna/amdxdna_mailbox.c<br>
>>>>> index fe684f463b945..79b9801935e71 100644<br>
>>>>> --- a/drivers/accel/amdxdna/amdxdna_mailbox.c<br>
>>>>> +++ b/drivers/accel/amdxdna/amdxdna_mailbox.c<br>
>>>>> @@ -6,6 +6,7 @@<br>
>>>>> #include <drm/drm_device.h><br>
>>>>> #include <drm/drm_managed.h><br>
>>>>> #include <linux/bitfield.h><br>
>>>>> +#include <linux/interrupt.h><br>
>>>>> #include <linux/iopoll.h><br>
>>>> Looking at the code, this is valid. However, I'm not sure why this is<br>
>>>> broken for you and not others. Do you have any ideas? How are you<br>
>>>> building this? Is the tree and/or defconfig unique in some way?<br>
>>>><br>
>>>>> #define CREATE_TRACE_POINTS<br>
>>>>><br>
>>>>><br>
>>>>> I also had to rename the firmware in /lib/firmware/amdnpu/1502_00/<br>
>>>>> from npu.sbin.1.5.2.380 to npu.sbin<br>
>>>>><br>
>>>>> Cheers<br>
>>>>><br>
>>>>> Mike<br>
>>>>><br>
>>> I'm building with clang 19.1.5, this is on linus's tree 6.13-rc1<br>
>>><br>
>>> I've applied AMD-XDNA-driver and AMD-NPU-driver-improvements series<br>
>>><br>
>>> These are the errors I see without the above patch:<br>
>>><br>
>>> drivers/accel/amdxdna/amdxdna_mailbox.c:342:8: error: unknown type<br>
>>> name 'irqreturn_t'<br>
>>> 342 | static irqreturn_t mailbox_irq_handler(int irq, void *p)<br>
>>> | ^<br>
>>> drivers/accel/amdxdna/amdxdna_mailbox.c:352:9: error: use of<br>
>>> undeclared identifier 'IRQ_HANDLED'<br>
>>> 352 | return IRQ_HANDLED;<br>
>>> | ^<br>
>>> drivers/accel/amdxdna/amdxdna_mailbox.c:380:4: error: call to<br>
>>> undeclared function 'disable_irq'; ISO C99 and later do not support<br>
>>> implicit function declarations [-Wimplicit-function-declaration]<br>
>>> 380 | disable_irq(mb_chann->msix_irq);<br>
>>> | ^<br>
>>> drivers/accel/amdxdna/amdxdna_mailbox.c:497:8: error: call to<br>
>>> undeclared function 'request_irq'; ISO C99 and later do not support<br>
>>> implicit function declarations [-Wimplicit-function-declaration]<br>
>>> 497 | ret = request_irq(mb_irq, mailbox_irq_handler, 0,<br>
>>> MAILBOX_NAME, mb_chann);<br>
>>> | ^<br>
>>> drivers/accel/amdxdna/amdxdna_mailbox.c:521:2: error: call to<br>
>>> undeclared function 'free_irq'; ISO C99 and later do not support<br>
>>> implicit function declarations [-Wimplicit-function-declaration]<br>
>>> 521 | free_irq(mb_chann->msix_irq, mb_chann);<br>
>>> | ^<br>
>>> drivers/accel/amdxdna/amdxdna_mailbox.c:538:2: error: call to<br>
>>> undeclared function 'disable_irq'; ISO C99 and later do not support<br>
>>> implicit function declarations [-Wimplicit-function-declaration]<br>
>>> 538 | disable_irq(mb_chann->msix_irq);<br>
>>> | ^<br>
>>> 6 errors generated.<br>
>>><br>
>>> With the patch applied I then got firmware issues so I had to rename<br>
>>> the newly upstreamed firmware, I'm not sure of the code needs to load<br>
>>> the versioned file or if the file needs renamed in linux-firmware<br>
>>><br>
>>> I'm attaching my .config<br>
>>><br>
>>> Cheers<br>
>>><br>
>>> Mike<br>
>> The attachment bounced so heres a link to the .config on github<br>
>> <a href="https://github.com/FireBurn/KernelStuff/blob/quark/dot_config_tip" rel="noreferrer noreferrer" target="_blank">https://github.com/FireBurn/KernelStuff/blob/quark/dot_config_tip</a><br>
> <br>
> I am able to reproduce with your .config. I believe it is because <br>
> CONFIG_TRACING is disabled.<br>
> <br>
> If you are ok, I can include your fix to <br>
> <a href="https://lore.kernel.org/dri-devel/20241204213729.3113941-1-lizhi.hou@amd.com/T/#t" rel="noreferrer noreferrer" target="_blank">https://lore.kernel.org/dri-devel/20241204213729.3113941-1-lizhi.hou@amd.com/T/#t</a> <br>
<br>
It should be a separate patch, with a reported-by and a fixes tag.<br>
<br>
-Jeff<br>
</blockquote></div>