[RFC] arch/powerpc: Turn off irqs in switch_mm()

Michael Ellerman patch-notifications at ellerman.id.au
Tue Apr 25 08:47:35 AEST 2017


On Wed, 2017-04-19 at 06:38:26 UTC, David Gibson wrote:
> There seems to be a mismatch in expectations between the powerpc arch code
> and the generic (and x86) code in terms of the irq state when switch_mm()
> is called.
> 
> powerpc expects irqs to already be (soft) disabled when switch_mm() is
> called, as made clear in the commit message of 9c1e105 "powerpc: Allow
> perf_counters to access user memory at interrupt time".
> 
> That seems to be true when it's called from the schedule, but not for
> use_mm().  This becomes clear when looking at the x86 code paths for
> switch_mm().  There, switch_mm() itself disable irqs, with a
> switch_mm_irqs_off() variant which expects that to be already done.
> 
> This patch addresses the problem, making the powerpc code mirror the x86
> code.
> 
> Signed-off-by: David Gibson <david at gibson.dropbear.id.au>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/9765ad134a00a01cbcc69c78ff6def

cheers


More information about the Linuxppc-dev mailing list