generic: MIPS: Add barriers between dcache & icache flushes
authorDavid Bauer <mail@david-bauer.net>
Thu, 2 Mar 2023 15:53:59 +0000 (16:53 +0100)
committerDavid Bauer <mail@david-bauer.net>
Sun, 5 Mar 2023 19:22:10 +0000 (20:22 +0100)
commitea6fb9c16dfb9763ea681803db65644b68bae873
tree547892a52a3b0a50a8c2d942db68b715217e06e9
parent7b05a8d05d1e007ef5ed7b2c51eb196fabbe192c
generic: MIPS: Add barriers between dcache & icache flushes

This fixes spurious boot-errors with some ath79 MIPS 74Kc boards such
as the AC Lite as well as Archer C7 v2.

The missing barrier leads to the icache flush being executed before the
dcache writeback, which results in the CPU executing the dummy infinite
loop in tlbmiss_handler_setup_pgd.

Applying this patch from upstream ensures the dcache is written back
before flushing the icache.

Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 26bc8f68767e1ec6e33a84ef397e4c38d5968462)
target/linux/generic/pending-5.10/301-MIPS-Add-barriers-between-dcache-icache-flushes.patch [new file with mode: 0644]