OSDN Git Service

powerpc/32s: Cleanup the mess in __set_pte_at()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 15 Aug 2023 17:42:40 +0000 (19:42 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 18 Aug 2023 07:03:14 +0000 (17:03 +1000)
commit7cb0094be4a5dfb3c91d285977f489d334455e19
tree2412ea21b4e33b549ed098fef301b04e357d6448
parent4531f128eac356144545b833908b6ffbc0292e16
powerpc/32s: Cleanup the mess in __set_pte_at()

__set_pte_at() handles 3 main cases with #ifdefs plus the 'percpu'
subcase which leads to code duplication.

Rewrite the function using IS_ENABLED() to minimise the total number
of cases and remove duplicated code.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/2322dd08217bccab25456fe8b189edf0e6a8b6dd.1692121353.git.christophe.leroy@csgroup.eu
arch/powerpc/include/asm/book3s/32/pgtable.h