parisc: Add nop instructions after TLB inserts
authorJohn David Anglin <dave@parisc-linux.org>
Fri, 20 Oct 2023 20:49:07 +0000 (20:49 +0000)
committerHelge Deller <deller@gmx.de>
Mon, 30 Oct 2023 13:54:41 +0000 (14:54 +0100)
commitad4aa06e1d92b06ed56c7240252927bd60632efe
tree66f35e99f6d7a1760d0fd0be81a9ac38f90e5143
parent1c7431b39a9ca14f7d3d57fce80838c8550b7db3
parisc: Add nop instructions after TLB inserts

An excerpt from the PA8800 ERS states:

* The PA8800 violates the seven instruction pipeline rule when performing
  TLB inserts or PxTLBE instructions with the PSW C bit on. The instruction
  will take effect by the 12th instruction after the insert or purge.

I believe we have a problem with handling TLB misses. We don't fill
the pipeline following TLB inserts. As a result, we likely fault again
after returning from the interruption.

The above statement indicates that we need at least seven instructions
after the insert on pre PA8800 processors and we need 12 instructions
on PA8800/PA8900 processors.

Here we add macros and code to provide the required number instructions
after a TLB insert.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Suggested-by: Helge Deller <deller@gmx.de>
Cc: stable@vger.kernel.org
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/entry.S