From nobody Sat Apr 4 01:35:09 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D67917A2F6; Sun, 22 Mar 2026 07:47:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774165623; cv=none; b=uqo7+xH/L+y9fTz3YUT1ZuHwVGONcBF53laJf77AgD2hZiyi8npo/We8aoGKPCOhx5P9Qgaa4d4gGq+49GtBhzCxLIKkLtlhym2dmC5CoZ5gQGCYZ33pxov8QYe/RGdJZ5cL3ypbLr+oY1oXFq7/SABL0oqF7+jlPre4l6I6TBA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774165623; c=relaxed/simple; bh=sDKRM9nNM1NCJ6xCnV13mjVE5cyVcu7UNk9YP0f+abU=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=ZlQh2weOadmnLb5gcTgWoiajzUN0KnS1uocipqCzVpdhKRB2ymnERp75jjHbWlUCzr8tItkbf+wfNt0TSyIM0ID1NDs4A9FRl0jl+3R+7/GJC8yvcFqvaC0a6r7XgSAF19SXAJTZOEYxsQ/LkwKBhwPuALqPeiQbvF1jgu6hwXA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=jgJ8/njy; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=1MZ0lAbR; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="jgJ8/njy"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="1MZ0lAbR" Date: Sun, 22 Mar 2026 07:46:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1774165619; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yxHin89Xj9yX0lVg8/ElC7xRszf9zWxFj3s37fRZEM0=; b=jgJ8/njy0k87W6dAF6nGtmiL+P/70SNXWZstjWJCi5nSYReli95eWnT/g3UMM9uxgYRnLB 8Mocye+zj6VFnbwuttVv8nSw2FlHOVzsFtstqolwPbeZkh/3aUnj/FPWnMPVgs8xrUty31 KEkGbd+mP5z+P+SDmtHYiS0xPWYqu6tNWg2kG/C8m9lnvuq2xOFxdjpzbFCpTo5h+kIyRX BFBSulhirXFIpBeVWpcgH3P3/gyaktfSs4eaNlr5UfGRiaEN8AM/+cUihLRmvx9oAHVL4M lzVq9iBNz1RoztoMHACaaFwbfsC2Pkwz2zgULE5DT+0WxRsu27wcAk/a+bAm0w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1774165619; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=yxHin89Xj9yX0lVg8/ElC7xRszf9zWxFj3s37fRZEM0=; b=1MZ0lAbR+8HRLh+nZn2DJD74ctVNLxvfAv0ZRj6Oeo+8XMVDAjELdx5cDPwIKRkzovaheR r+ML+aW1uXaZaKCA== From: "tip-bot2 for Juergen Gross" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/cleanups] block/floppy: Don't use REALLY_SLOW_IO for delays Cc: Juergen Gross , "Borislav Petkov (AMD)" , Ingo Molnar , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20260119182632.596369-4-jgross@suse.com> References: <20260119182632.596369-4-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <177416561817.1647592.18195333937779200369.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/cleanups branch of tip: Commit-ID: 2219ec23b6cf4ba6e6e23f43601e859f9eaaa24d Gitweb: https://git.kernel.org/tip/2219ec23b6cf4ba6e6e23f43601e859f9= eaaa24d Author: Juergen Gross AuthorDate: Mon, 19 Jan 2026 19:26:29 +01:00 Committer: Ingo Molnar CommitterDate: Sun, 22 Mar 2026 08:43:23 +01:00 block/floppy: Don't use REALLY_SLOW_IO for delays Instead of defining REALLY_SLOW_IO before including io.h, add the required additional calls of native_io_delay() to the related functions in arch/x86/include/asm/floppy.h. Drop REALLY_SLOW_IO now too as it has no users. [ bp: Merge the REALLY_SLOW_IO removal into this patch. ] Signed-off-by: Juergen Gross Signed-off-by: Borislav Petkov (AMD) Signed-off-by: Ingo Molnar Link: https://patch.msgid.link/20260119182632.596369-4-jgross@suse.com --- arch/x86/include/asm/floppy.h | 27 ++++++++++++++++++++++----- arch/x86/include/asm/io.h | 5 ----- drivers/block/floppy.c | 2 -- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h index e7a2440..8d1e866 100644 --- a/arch/x86/include/asm/floppy.h +++ b/arch/x86/include/asm/floppy.h @@ -29,9 +29,6 @@ #define CSW fd_routine[can_use_virtual_dma & 1] =20 =20 -#define fd_inb(base, reg) inb_p((base) + (reg)) -#define fd_outb(value, base, reg) outb_p(value, (base) + (reg)) - #define fd_request_dma() CSW._request_dma(FLOPPY_DMA, "floppy") #define fd_free_dma() CSW._free_dma(FLOPPY_DMA) #define fd_enable_irq() enable_irq(FLOPPY_IRQ) @@ -49,6 +46,26 @@ static char *virtual_dma_addr; static int virtual_dma_mode; static int doing_pdma; =20 +static inline u8 fd_inb(u16 base, u16 reg) +{ + u8 ret =3D inb_p(base + reg); + + native_io_delay(); + native_io_delay(); + native_io_delay(); + + return ret; +} + +static inline void fd_outb(u8 value, u16 base, u16 reg) +{ + outb_p(value, base + reg); + + native_io_delay(); + native_io_delay(); + native_io_delay(); +} + static irqreturn_t floppy_hardint(int irq, void *dev_id) { unsigned char st; @@ -79,9 +96,9 @@ static irqreturn_t floppy_hardint(int irq, void *dev_id) if (st !=3D (STATUS_DMA | STATUS_READY)) break; if (virtual_dma_mode) - outb_p(*lptr, virtual_dma_port + FD_DATA); + fd_outb(*lptr, virtual_dma_port, FD_DATA); else - *lptr =3D inb_p(virtual_dma_port + FD_DATA); + *lptr =3D fd_inb(virtual_dma_port, FD_DATA); } virtual_dma_count =3D lcount; virtual_dma_addr =3D lptr; diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 4179a2e..7f4847b 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -253,11 +253,6 @@ static inline void slow_down_io(void) return; =20 native_io_delay(); -#ifdef REALLY_SLOW_IO - native_io_delay(); - native_io_delay(); - native_io_delay(); -#endif } =20 #define BUILDIO(bwl, type) \ diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 92e446a..0509746 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -145,8 +145,6 @@ * Better audit of register_blkdev. */ =20 -#define REALLY_SLOW_IO - #define DEBUGT 2 =20 #define DPRINT(format, args...) \