[bug report] soc: xilinx: Fix for call trace due to the usage of smp_processor_id()
Buddhabhatti, Jay
jay.buddhabhatti at amd.com
Tue Feb 27 01:55:15 PST 2024
+ at Jain, Ronak
> -----Original Message-----
> From: Dan Carpenter <dan.carpenter at linaro.org>
> Sent: Thursday, February 1, 2024 5:50 PM
> To: haribabu.gattem at xilinx.com
> Cc: Buddhabhatti, Jay <jay.buddhabhatti at amd.com>; Simek, Michal
> <michal.simek at amd.com>; linux-arm-kernel at lists.infradead.org
> Subject: [bug report] soc: xilinx: Fix for call trace due to the usage of
> smp_processor_id()
>
> Hello HariBabu Gattem,
>
> The patch daed80ed0758: "soc: xilinx: Fix for call trace due to the usage of
> smp_processor_id()" from Oct 26, 2023 (linux-next), leads to the following
> Smatch static checker warning:
>
> kernel/irq/manage.c:2614 __request_percpu_irq()
> warn: sleeping in atomic context
>
> drivers/soc/xilinx/xlnx_event_manager.c
> 610 cpu = get_cpu();
> ^^^^^^^^^^^^^^^
> The patch adds get_cpu() which disables preemption.
>
> 611 per_cpu(cpu_number1, cpu) = cpu;
> 612 ret = request_percpu_irq(virq_sgi, xlnx_event_handler,
> "xlnx_event_mgmt",
> ^^^^^^^^^^^^^^^^^^
> request_percpu_irq() does a sleeping allocation so it's a sleeping in atomic bug.
>
> 613 &cpu_number1);
> 614 put_cpu();
>
> regards,
> dan carpenter
More information about the linux-arm-kernel
mailing list