]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64: Optimise set/clear of CTRL[RUN] (runlatch)
authorNicholas Piggin <npiggin@gmail.com>
Fri, 11 Aug 2017 16:39:07 +0000 (02:39 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 23 Aug 2017 13:48:38 +0000 (23:48 +1000)
commit14ab12be7a9a3b8b9be9af9d7f4000e093dee888
treecfb1d7cec1dc0e7e3382efc64a2beb54f041799d
parentec2ea1b3860ec8a0846762277123b7065204a064
powerpc/64: Optimise set/clear of CTRL[RUN] (runlatch)

On modern CPUs the CTRL register is read-only except bit 63 which is
the run latch control. This means it can be updated with a mtspr
rather than mfspr/mtspr.

To accomodate older CPUs (Cell at least), where there are other bits
in the register, we still do a read/modify/write on pre 2.06 CPUs.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Update change log to mention 2.06 workaround]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/process.c