]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/64s: syscall real mode entry use mtmsrd rather than rfid
authorNicholas Piggin <npiggin@gmail.com>
Mon, 8 Feb 2021 06:33:26 +0000 (16:33 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 11 Feb 2021 12:35:05 +0000 (23:35 +1100)
commiteaa2415e6f8efaee6ef18e0f99716a6f55fd4dcd
tree4aaad2027fef12ad5ce7dc04c765a8365e6134bf
parentd9fc122195fdeb65bf289e357e9bf6ce0387f87e
powerpc/64s: syscall real mode entry use mtmsrd rather than rfid

Have the real mode system call entry handler branch to the kernel
0xc000... address and then use mtmsrd to enable the MMU, rather than use
SRRs and rfid.

Commit 59df2796689d ("powerpc/64s/exception: Move real to virt switch
into the common handler") implemented this style of real mode entry for
other interrupt handlers, so this brings system calls into line with
them, which is the main motivcation for the change.

This tends to be slightly faster due to avoiding the mtsprs, and it also
does not clobber the SRR registers, which becomes important in a
subsequent change. The real mode entry points don't tend to be too
important for performance these days, but it is possible for a
hypervisor to run guests in AIL=0 mode for certian reasons.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210208063326.331502-1-npiggin@gmail.com
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/exceptions-64s.S