MIPS: pm-cps: Use GPR number macros
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Fri, 9 Feb 2024 18:07:54 +0000 (18:07 +0000)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Tue, 20 Feb 2024 11:41:52 +0000 (12:41 +0100)
commit6d74e0fc0a34ef72365f88a249e351a353f8dc03
tree8a190ee4b8c2a6029a0cb335140e75df258f74b2
parent881c8e055dc827861e44dcd04857b3f756a569f5
MIPS: pm-cps: Use GPR number macros

Use GPR number macros in uasm code generation parts to
reduce code duplication.

There are functional change due to difference in register
symbolic names between OABI and NABI, while existing code
is only using definitions from OABI.

Code pieces are carefully inspected to ensure register
usages are safe on NABI as well.

We changed register allocation of r_pcohctl from T7 to T8
as T7 is not available on NABI and we just want a caller
saved scratch register here.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/kernel/pm-cps.c