]> www.infradead.org Git - users/jedix/linux-maple.git/commit
powerpc/603: Inconditionally use task PGDIR in DTLB misses
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 20 Aug 2024 17:23:58 +0000 (19:23 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 30 Aug 2024 11:29:55 +0000 (21:29 +1000)
commit062e825a336017c0334c7497690826c95aa1a84f
tree8c7aa6af104b1705f4ec46606fa339fe49141da8
parent3f57d90c231d3329aaed7079dd05b5a2f7692a58
powerpc/603: Inconditionally use task PGDIR in DTLB misses

At the time being, DATA TLB miss handlers use task PGDIR for user
addresses and swapper_pg_dir for kernel addresses.

Now that kernel part of swapper_pg_dir is copied into task PGDIR
at PGD allocation, it is possible to avoid the above logic and
always use task PGDIR.

But new kernel PGD entries can still be created after init, in
which case those PGD entries may miss in task PGDIR. This can be
handled in DATA TLB error handler.

However, it needs to be done in real mode because the missing
entry might be related to the stack.

So implement copy of missing PGD entry in DATA TLB miss handler
just after detection of invalid PGD entry.

Also replace comparison by same calculation as in previous patch
to know if an address belongs to a kernel or user segment.

Note that as mentioned in platforms/Kconfig.cputype, SMP is not
supported on 603 processors so there is no risk of the PGD entry
be populated during the fault.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/a2ba8eeb1c845eeb9e46b6fe3a5e9f841df9a033.1724173828.git.christophe.leroy@csgroup.eu
arch/powerpc/kernel/head_book3s_32.S