From nobody Sat Apr 4 00:24:55 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 905BB14A60F; Sat, 21 Mar 2026 15:47:54 +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=1774108075; cv=none; b=MXZu5Bdh2rrEHPCmUFZgKXiekLA7VhnSq8w88eZwxkQOJ0XEnZ2+Q4+udJIsmMcHV5lp4uSIJNp422V4Oba7nbMyVilK7nWhg+ne2x+7wIDGEd+o/D8bxThWAuTGvyaPSAgIKz1K29894DX9rj7T5UzlX3vxeVMFiWs+ffTgi9Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774108075; c=relaxed/simple; bh=YPyur6NLtWChNy01NRnFSeum8fra+atqZojCcvEHKFc=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=tbOdj3sZ1hUgcnL1tc0aTjqV2erxEpv8U42oL297NryFoFU8r4xpU7/zr0ddEqBA+UtmMNrST3KfmgtWnScK9ty91CcI7lxBLPr/9Y5vzR3rb+2pngU34yQeczLircPlyOUEVLDDCcmB0eehvVrq4GFeEE/lg2au/rHm9dKiC+U= 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=ppCI/JWD; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=UBv2NCrs; 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="ppCI/JWD"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="UBv2NCrs" Date: Sat, 21 Mar 2026 15:47:45 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1774108066; 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=//A2J0TVh1ovGd1vQWANgdHwzk/JQhWH8lOxuEQST9k=; b=ppCI/JWDeUwnxXnt4hsSUyjxLLC5MOGebUFq7lY8xebSfD7SafccaJv43Wlm8m8P0jCJma 9TIeTMRmGmE766Oug/Wn1tmC9/Sf87gLi82gpRt+rhilEgYbvDVpEl3qdMrrYEkFYAUvTb GFi7KCdpJtAR5g+hNwNrQFCc4sPImJpL9e9E3W326hdJkmSOk4vxaK2BCw/NsAlcF1jUfD 2Fdgy4KZkmN24CuEwaguuIg07mbO+6PuL0LkZ+SQbicaiDaYlVd/oF8fJU56r6PMFc7Qnc eG31RP6hfvvVgO8WEcHRRpRGumptQnknIckpZ2GFlsKbuQ0g27/VyKXTrkRqrQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1774108066; 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=//A2J0TVh1ovGd1vQWANgdHwzk/JQhWH8lOxuEQST9k=; b=UBv2NCrs8owourTfgo4tutAywVaAeJdF+r9ybmNYDQt03p7eQUtB7UeJiA3EZoFZQ9snMk RiWzIP9OY58GBPDw== 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)" , 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: <177410806520.1647592.847845180752230687.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: 00c5f98db0e3a109331de89a42081cd9cdad8ec1 Gitweb: https://git.kernel.org/tip/00c5f98db0e3a109331de89a42081cd9c= dad8ec1 Author: Juergen Gross AuthorDate: Mon, 19 Jan 2026 19:26:29 +01:00 Committer: Borislav Petkov (AMD) CommitterDate: Sat, 21 Mar 2026 12:36:41 +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) Link: https://patch.msgid.link/20260119182632.596369-4-jgross@suse.com Signed-off-by: Borislav Petkov (AMD) --- 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...) \