Re: [PATCH v2] MIPS: sgi-ip32: Fence PIO reads on CRIME 1.1

From: Imre Kaloz

Date: Wed Nov 11 2026 - 05:13:26 EST


On Sun, Nov 8, 2026, at 10:28, Maciej W. Rozycki wrote:
> On Sat, 7 Nov 2026, Imre Kaloz wrote:

<snip>

>> +static inline void plat_read_fence_end(unsigned long flags)
>> +{
>> + crime_read_fence_end(flags);
>> +}
>
> This seems hackish to me with the call to local_irq_restore() buried in
> crime_read_fence_end(). Why is is out of line?

Good point, thanks. Only the 5us udelay() needs to be out of line,
so that asm/io.h does not have to pull in linux/delay.h, the irq
restore had no business being buried in there with it.

v3 keeps local_irq_save() and local_irq_restore() together in
read-fence.h and makes only crime_read_fence_delay() out of line.

It has been retested on a CRIME 1.1 O2 with audio and SCSI DMA
running: 0 stale reads in 50M read pairs with the fence on, 15 in 10M
with it off.


Thanks,
Imre

P.S:
v3: https://lore.kernel.org/r/20261111095650.14954-1-kaloz@xxxxxxxxxx/