Open abrodkin opened 2 years ago
Suggested fix located here: http://lists.infradead.org/pipermail/linux-snps-arc/2022-May/005952.html
@kokas-a could you please rebase your proposed fix on top of the current Linus' master
branch and re-send it to the mailing list. We need to make sure it gets accepted in the upstream project. And in the meantime also create a pull-request here against arc64
branch with that same fix, so we have it in our tree as well.
New link to the fix: http://lists.infradead.org/pipermail/linux-snps-arc/2023-April/007106.html
I've added this patch to the arc64 branch. https://github.com/foss-for-synopsys-dwc-arc-processors/linux/commit/563ea97809a9efeae3df80616b2bcef604a47992
With enabled
CONFIG_DEBUG_PREEMPT
the following stack-trace gets printed on SMP ARC platforms with performance counters interrupts:That happens because of use of
this_cpu_ptr()
in https://elixir.bootlin.com/linux/v5.17/source/arch/arc/kernel/perf_event.c#L811 without explicitly disabled preemption, see https://www.kernel.org/doc/html/latest/core-api/this_cpu_ops.html#special-operations.We need either to re-work that code so that it uses preemption-agnostic functions or explicitly disable preemption around that code.