]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ARM: 9409/1: mmu: Do not use magic number for TTBCR settings
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 2 Jul 2024 08:56:54 +0000 (09:56 +0100)
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Tue, 20 Aug 2024 10:18:44 +0000 (11:18 +0100)
commit727ac9ec6addca3afdac62bf265fe2c6f37c12b7
treefe2a1b901ae9b1c4bb10a5e50df5727a19e3c8f3
parentde9c2c66ad8e787abec7c9d7eff4f8c3cdd28aed
ARM: 9409/1: mmu: Do not use magic number for TTBCR settings

The code in early_paging_init is directly masking off bits
8, 9, 10 and 11 to temporarily disable caching of the translation
tables. There is some exlanations in the comment, but use some
defines instead of magic numbers so ut becomes more evident
what is going on.

Change the type of the register to u32 since these are indeed
unsigned 32bit registers, and use a temporary variable instead
of baking too much into the inline assembly call to increase
readability.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
arch/arm/include/asm/pgtable-3level-hwdef.h
arch/arm/mm/mmu.c