powerpc: add ISA v3.0 / v3.1 wait opcode macro
authorNicholas Piggin <npiggin@gmail.com>
Tue, 20 Sep 2022 12:22:58 +0000 (22:22 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 28 Sep 2022 09:22:10 +0000 (19:22 +1000)
commitdabeb572adf24bbd7cb21d1cc4d118bdf2c2ab74
tree8c1f893639c1a2accaeaa955f187d04b43acef6d
parentc84550203b3173511e8cdbe94bc2e33175ba1d72
powerpc: add ISA v3.0 / v3.1 wait opcode macro

The wait instruction encoding changed between ISA v2.07 and ISA v3.0.
In v3.1 the instruction gained a new field.

Update the PPC_WAIT macro to the current encoding. Rename the older
incompatible one with a _v203 suffix as it was introduced in v2.03
(the WC field was introduced in v2.07 but the kernel only uses WC=0).

Reviewed-by: Segher Boessenkool <segher@kernel.crashing.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20220920122259.363092-1-npiggin@gmail.com
arch/powerpc/include/asm/ppc-opcode.h
arch/powerpc/kernel/idle_64e.S