arm64: Fake the IminLine size on systems affected by Neoverse-N1 #1542419
authorJames Morse <james.morse@arm.com>
Fri, 24 Apr 2020 16:38:03 +0000 (17:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:32:56 +0000 (16:32 +0200)
commit6de0c621191a42c3574d261a06a35841fc9b777a
treec2781d249dca418b97f7e5697617be8058302cd0
parentf2791551cedb5c295528b00c74d0a02d62c4bd92
arm64: Fake the IminLine size on systems affected by Neoverse-N1 #1542419

[ Upstream commit ee9d90be9ddace01b7fb126567e4b539fbe1f82f ]

Systems affected by Neoverse-N1 #1542419 support DIC so do not need to
perform icache maintenance once new instructions are cleaned to the PoU.
For the errata workaround, the kernel hides DIC from user-space, so that
the unnecessary cache maintenance can be trapped by firmware.

To reduce the number of traps, produce a fake IminLine value based on
PAGE_SIZE.

Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: James Morse <james.morse@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/include/asm/cache.h
arch/arm64/kernel/traps.c