powerpc: merge 32-bit and 64-bit _switch implementation
authorNicholas Piggin <npiggin@gmail.com>
Tue, 6 Jun 2023 13:24:46 +0000 (23:24 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 15 Jun 2023 04:03:55 +0000 (14:03 +1000)
commitafc6386815a88d067d9f567dcc6266800286f626
treedff37d6419b4bc2dc70bb2ad3ce04742ca9500e8
parent6958ad05d5789a303afe4fa4495df43993d9b7cb
powerpc: merge 32-bit and 64-bit _switch implementation

The _switch stack frame setup are substantially the same, so are the
comments. The difference in how the stack and current are switched,
and other hardware and software housekeeping is done is moved into
macros.

Generated code should be unchanged.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
[mpe: Tweak include orer to fix compile errors on some configs]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20230606132447.315714-6-npiggin@gmail.com
arch/powerpc/include/asm/ppc_asm.h
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/entry_32.S
arch/powerpc/kernel/entry_64.S
arch/powerpc/kernel/switch.S [new file with mode: 0644]