Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Imre Kaloz <kaloz@kernel.org>
Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Maciej W. Rozycki" <macro@orcam.me.uk>
Subject: Re: [PATCH v3] MIPS: sgi-ip32: Fence PIO reads on CRIME 1.1
Date: Sat, 5 Dec 2026 12:28:03 +0100	[thread overview]
Message-ID: <axP1Q6KUdBG4zoqM@alpha.franken.de> (raw)
In-Reply-To: <20261111095650.14954-1-kaloz@kernel.org>

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@kernel.org>
> ---
> 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@kernel.org
> v1: https://lore.kernel.org/r/20261021192418.7246-5-kaloz@kernel.org
> 
>  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 ]

      reply	other threads:[~2026-12-05 11:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-11  9:56 [PATCH v3] MIPS: sgi-ip32: Fence PIO reads on CRIME 1.1 Imre Kaloz
2026-12-05 11:28 ` Thomas Bogendoerfer [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=axP1Q6KUdBG4zoqM@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=kaloz@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox