From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=193.175.24.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796470557; b=HPwIW57GdrNNAOerZt6hSKocpZAwmBzqdIILtDDmYPyVYVwULlx62shDTs+MT2/OaxWD EOe3v9Ovv0dcwgrVxg+LV/6CLhIk4lFl+W5Kvmq16nSUHbjJrRyw461rXfDgVrCHzQyWF Tf+9DJBh/qx3Z+v+HP5GyjZnQ4iAyr+jqyJZQot0ntzSjSl5CY8BXxt3kNI++EUpLeFbo WXEefFfFR8CF4F18hvd2uJxKYjvSy+xfLfPk9TbbNscj6H0k/OVD6ghetAsQjAV9CFt5g /XmlUYtfzGuapfT3kBfshqwmLm+Jg6fcIDSCC2maPBvT+IPUx7QZzAKN48jW6t8ajvQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796470557; h=DMARC-Filter:Received:Received:Date:From:To:Cc:Subject:Message-ID: References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=TzixaPGqTpbDeuYut4HNw/+PT7C5X/m2SIYcy2jrrwA=; b=pnVNtJHtn1lEPDrulZlNjUt0sO4/f2sH8sxRLxvKSCsN5n0Vd7i1t5CpTlmD2TdN8q8+ GE0ul7n4EYBfMoCIY2Vwue2+SjohbRvkmUTObXsI30lwr3pKi9VMJgo4y2tBVuJO6TtYp ZdGVveSn6Jwccn+zijnuPofhhaBeeVaG5MREGOqbYlpsswYZnSTg5DLSWTAb10alDqfqZ fLydf1fMmEEwGDVBPadtgR1T3GSzkWX053CcasTiJNV2PUT6+jmCS0Bd7Fm8Lv/4CwLUI YSFS2tk/Erj5qLwKlzQnCOmPTQv3sS97a8El9cNXUXceW1hJ7+HaRTak4daRgbE1f+g== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none header.from=alpha.franken.de; spf=pass smtp.mailfrom=alpha.franken.de; arc=none smtp.remote-ip=193.175.24.41 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EF4EA606A68B; Sat, 5 Dec 2026 11:35:55 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EF4EA606A68B Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=alpha.franken.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=alpha.franken.de Received: by elvis.franken.de (Postfix, from userid 10) id 2EF1810045C; Sat, 5 Dec 2026 12:35:51 +0100 (CET) Received: by alpha.franken.de (Postfix, from userid 1000) id 4ACACC0193; Sat, 5 Dec 2026 12:28:03 +0100 (CET) Date: Sat, 5 Dec 2026 12:28:03 +0100 From: Thomas Bogendoerfer To: Imre Kaloz Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, "Maciej W. Rozycki" Subject: Re: [PATCH v3] MIPS: sgi-ip32: Fence PIO reads on CRIME 1.1 Message-ID: References: <20261111095650.14954-1-kaloz@kernel.org> X-Mailing-List: linux-mips@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 > --- > 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 ]