Re: [PATCH 09/19] rcu/context-tracking: Remove rcu_irq_enter/exit()
From: Peter Zijlstra
Date: Sat Mar 05 2022 - 09:16:28 EST
On Wed, Mar 02, 2022 at 04:48:00PM +0100, Frederic Weisbecker wrote:
> void ct_irq_enter_irqson(void)
> {
> - rcu_irq_enter_irqson();
> + unsigned long flags;
> +
> + local_irq_save(flags);
> + ct_irq_enter();
> + local_irq_restore(flags);
> }
>
> void ct_irq_exit_irqson(void)
> {
> - rcu_irq_exit_irqson();
> + unsigned long flags;
> +
> + local_irq_save(flags);
> + ct_irq_exit();
> + local_irq_restore(flags);
> }
I know you're just copying code around, but this is broken per
construction :/
On the irq_enter site, local_irq_save() will hit a tracepoint, which
requires RCU, which will only be made available by the ct_irq_enter().
Same in reverse for the exit case.