arm64: Fake the IminLine size on systems affected by Neoverse-N1 #1542419
authorJames Morse <james.morse@arm.com>
Fri, 24 Apr 2020 16:38:43 +0000 (17:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:31:09 +0000 (16:31 +0200)
commit0cfa7fbc564e1d4fe3fadf0179ab99b3bf0b32bb
tree9160c7bab4a6faea031f53586ee65a4acdb6f08c
parent1b568dfec3124e03e1d6000d5d311b11492682ed
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