drivers/accel/amdxdna/amdxdna_mailbox.c | 1 + 1 file changed, 1 insertion(+)
When compiling without CONFIG_IA32_EMULATION, there can be some errors:
drivers/accel/amdxdna/amdxdna_mailbox.c: In function ‘mailbox_release_msg’:
drivers/accel/amdxdna/amdxdna_mailbox.c:197:2: error: implicit declaration
of function ‘kfree’.
197 | kfree(mb_msg);
| ^~~~~
drivers/accel/amdxdna/amdxdna_mailbox.c: In function ‘xdna_mailbox_send_msg’:
drivers/accel/amdxdna/amdxdna_mailbox.c:418:11: error:implicit declaration
of function ‘kzalloc’.
418 | mb_msg = kzalloc(sizeof(*mb_msg) + pkg_size, GFP_KERNEL);
| ^~~~~~~
Add the missing include.
Fixes: b87f920b9344 ("accel/amdxdna: Support hardware mailbox")
Signed-off-by: Su Hui <suhui@nfschina.com>
Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
---
v2:
- move the header to the include block above and keep it sorted(Jacek Lawrynowicz).
drivers/accel/amdxdna/amdxdna_mailbox.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c b/drivers/accel/amdxdna/amdxdna_mailbox.c
index 814b16bb1953..e5301fac1397 100644
--- a/drivers/accel/amdxdna/amdxdna_mailbox.c
+++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
@@ -8,6 +8,7 @@
#include <linux/bitfield.h>
#include <linux/interrupt.h>
#include <linux/iopoll.h>
+#include <linux/slab.h>
#include <linux/xarray.h>
#define CREATE_TRACE_POINTS
--
2.30.2
Reviewed-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
On 2/11/2025 2:53 AM, Su Hui wrote:
> When compiling without CONFIG_IA32_EMULATION, there can be some errors:
>
> drivers/accel/amdxdna/amdxdna_mailbox.c: In function ‘mailbox_release_msg’:
> drivers/accel/amdxdna/amdxdna_mailbox.c:197:2: error: implicit declaration
> of function ‘kfree’.
> 197 | kfree(mb_msg);
> | ^~~~~
> drivers/accel/amdxdna/amdxdna_mailbox.c: In function ‘xdna_mailbox_send_msg’:
> drivers/accel/amdxdna/amdxdna_mailbox.c:418:11: error:implicit declaration
> of function ‘kzalloc’.
> 418 | mb_msg = kzalloc(sizeof(*mb_msg) + pkg_size, GFP_KERNEL);
> | ^~~~~~~
>
> Add the missing include.
>
> Fixes: b87f920b9344 ("accel/amdxdna: Support hardware mailbox")
> Signed-off-by: Su Hui <suhui@nfschina.com>
> Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
> ---
> v2:
> - move the header to the include block above and keep it sorted(Jacek Lawrynowicz).
>
> drivers/accel/amdxdna/amdxdna_mailbox.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/accel/amdxdna/amdxdna_mailbox.c b/drivers/accel/amdxdna/amdxdna_mailbox.c
> index 814b16bb1953..e5301fac1397 100644
> --- a/drivers/accel/amdxdna/amdxdna_mailbox.c
> +++ b/drivers/accel/amdxdna/amdxdna_mailbox.c
> @@ -8,6 +8,7 @@
> #include <linux/bitfield.h>
> #include <linux/interrupt.h>
> #include <linux/iopoll.h>
> +#include <linux/slab.h>
> #include <linux/xarray.h>
>
> #define CREATE_TRACE_POINTS
On 2/10/2025 6:53 PM, Su Hui wrote:
> When compiling without CONFIG_IA32_EMULATION, there can be some errors:
>
> drivers/accel/amdxdna/amdxdna_mailbox.c: In function ‘mailbox_release_msg’:
> drivers/accel/amdxdna/amdxdna_mailbox.c:197:2: error: implicit declaration
> of function ‘kfree’.
> 197 | kfree(mb_msg);
> | ^~~~~
> drivers/accel/amdxdna/amdxdna_mailbox.c: In function ‘xdna_mailbox_send_msg’:
> drivers/accel/amdxdna/amdxdna_mailbox.c:418:11: error:implicit declaration
> of function ‘kzalloc’.
> 418 | mb_msg = kzalloc(sizeof(*mb_msg) + pkg_size, GFP_KERNEL);
> | ^~~~~~~
>
> Add the missing include.
>
> Fixes: b87f920b9344 ("accel/amdxdna: Support hardware mailbox")
> Signed-off-by: Su Hui <suhui@nfschina.com>
> Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
On 2/11/25 07:36, Jeffrey Hugo wrote:
> On 2/10/2025 6:53 PM, Su Hui wrote:
>> When compiling without CONFIG_IA32_EMULATION, there can be some errors:
>>
>> drivers/accel/amdxdna/amdxdna_mailbox.c: In function
>> ‘mailbox_release_msg’:
>> drivers/accel/amdxdna/amdxdna_mailbox.c:197:2: error: implicit
>> declaration
>> of function ‘kfree’.
>> 197 | kfree(mb_msg);
>> | ^~~~~
>> drivers/accel/amdxdna/amdxdna_mailbox.c: In function
>> ‘xdna_mailbox_send_msg’:
>> drivers/accel/amdxdna/amdxdna_mailbox.c:418:11: error:implicit
>> declaration
>> of function ‘kzalloc’.
>> 418 | mb_msg = kzalloc(sizeof(*mb_msg) + pkg_size, GFP_KERNEL);
>> | ^~~~~~~
>>
>> Add the missing include.
>>
>> Fixes: b87f920b9344 ("accel/amdxdna: Support hardware mailbox")
>> Signed-off-by: Su Hui <suhui@nfschina.com>
>> Reviewed-by: Lizhi Hou <lizhi.hou@amd.com>
>
> Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Pushed to drm-misc-fixes
Thanks,
Lizhi
© 2016 - 2026 Red Hat, Inc.