Re: [PATCH v3] MIPS: sgi-ip32: Fence PIO reads on CRIME 1.1
From: Thomas Bogendoerfer
Date: Sat Dec 05 2026 - 06:36:08 EST
On Wed, Nov 11, 2026 at 10:56:50AM +0100, Imre Kaloz wrote:
> On CRIME 1.1, the next MACE or PCI load after a read of the aic7880
> HCNTRL, INTSTAT or ERROR register can return that register's data
> instead of its own; a gap of about 2us avoids it. Under audio and SCSI
> DMA, repeating aic7xxx's ahc_pause(), register read, ahc_unpause() can
> hang; fenced, it runs clean. The next load can be an interrupt
> handler's, so the fence follows the trigger.
>
> Add a read hook to the MIPS accessors that, on CRIME 1.1, follows each
> MMIO and port read by 5us with interrupts off. Other platforms compile
> it out.
>
> Signed-off-by: Imre Kaloz <kaloz@xxxxxxxxxx>
> ---
> Changes in v3:
> - Interrupts are restored in read-fence.h next to the save; only the
> delay is out of line.
>
> Changes in v2:
> - Reworded the first paragraph of the commit message.
>
> v2: https://lore.kernel.org/r/20261107005245.20299-1-kaloz@xxxxxxxxxx
> v1: https://lore.kernel.org/r/20261021192418.7246-5-kaloz@xxxxxxxxxx
>
> arch/mips/include/asm/io.h | 11 +++++++
> .../include/asm/mach-generic/read-fence.h | 20 +++++++++++++
> arch/mips/include/asm/mach-ip32/read-fence.h | 30 +++++++++++++++++++
> arch/mips/sgi-ip32/crime.c | 11 +++++++
> 4 files changed, 72 insertions(+)
> create mode 100644 arch/mips/include/asm/mach-generic/read-fence.h
> create mode 100644 arch/mips/include/asm/mach-ip32/read-fence.h
applied to mips-next
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]