From: "tip-bot2 for Juergen Gross" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Juergen Gross <jgross@suse.com>,
"Borislav Petkov (AMD)" <bp@alien8.de>,
Ingo Molnar <mingo@kernel.org>,
x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/cleanups] block/floppy: Don't use REALLY_SLOW_IO for delays
Date: Sun, 22 Mar 2026 07:46:58 -0000 [thread overview]
Message-ID: <177416561817.1647592.18195333937779200369.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260119182632.596369-4-jgross@suse.com>
The following commit has been merged into the x86/cleanups branch of tip:
Commit-ID: 2219ec23b6cf4ba6e6e23f43601e859f9eaaa24d
Gitweb: https://git.kernel.org/tip/2219ec23b6cf4ba6e6e23f43601e859f9eaaa24d
Author: Juergen Gross <jgross@suse.com>
AuthorDate: Mon, 19 Jan 2026 19:26:29 +01:00
Committer: Ingo Molnar <mingo@kernel.org>
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 <jgross@suse.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
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]
-#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;
+static inline u8 fd_inb(u16 base, u16 reg)
+{
+ u8 ret = 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 != (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 = inb_p(virtual_dma_port + FD_DATA);
+ *lptr = fd_inb(virtual_dma_port, FD_DATA);
}
virtual_dma_count = lcount;
virtual_dma_addr = 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;
native_io_delay();
-#ifdef REALLY_SLOW_IO
- native_io_delay();
- native_io_delay();
- native_io_delay();
-#endif
}
#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.
*/
-#define REALLY_SLOW_IO
-
#define DEBUGT 2
#define DPRINT(format, args...) \
next prev parent reply other threads:[~2026-03-22 7:47 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-19 18:26 [PATCH v4 0/6] x86: Cleanups around slow_down_io() Juergen Gross
2026-01-19 18:26 ` [PATCH v4 1/6] x86/irqflags: Fix build failure Juergen Gross
2026-03-21 15:47 ` [tip: x86/cleanups] x86/irqflags: Preemptively move include paravirt.h directive where it belongs tip-bot2 for Juergen Gross
2026-03-22 7:47 ` tip-bot2 for Juergen Gross
2026-01-19 18:26 ` [PATCH v4 2/6] x86/paravirt: Replace io_delay() hook with a bool Juergen Gross
2026-03-21 15:47 ` [tip: x86/cleanups] " tip-bot2 for Juergen Gross
2026-03-22 7:46 ` tip-bot2 for Juergen Gross
2026-01-19 18:26 ` [PATCH v4 3/6] block/floppy: Don't use REALLY_SLOW_IO for delays Juergen Gross
2026-03-21 15:47 ` [tip: x86/cleanups] " tip-bot2 for Juergen Gross
2026-03-22 7:46 ` tip-bot2 for Juergen Gross [this message]
2026-01-19 18:26 ` [PATCH v4 4/6] x86/io: Remove REALLY_SLOW_IO handling Juergen Gross
2026-03-26 8:39 ` Juergen Gross
2026-03-26 10:04 ` Borislav Petkov
2026-03-26 10:23 ` Jürgen Groß
2026-01-19 18:26 ` [PATCH v4 5/6] x86/io_delay: Switch io_delay() default mechanism to "none" Juergen Gross
2026-03-20 22:02 ` Borislav Petkov
2026-03-21 6:29 ` Jürgen Groß
2026-03-21 11:32 ` Borislav Petkov
2026-01-19 18:26 ` [PATCH v4 6/6] x86/io_delay: Add config option for controlling build of io_delay Juergen Gross
2026-02-02 10:27 ` [PATCH v4 0/6] x86: Cleanups around slow_down_io() Juergen Gross
2026-02-09 9:11 ` Juergen Gross
2026-02-09 10:19 ` Borislav Petkov
2026-03-11 9:16 ` Juergen Gross
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=177416561817.1647592.18195333937779200369.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=bp@alien8.de \
--cc=jgross@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®