* [PATCH v4 3/6] block/floppy: Don't use REALLY_SLOW_IO for delays
2026-01-19 18:26 [PATCH v4 0/6] x86: Cleanups around slow_down_io() Juergen Gross
@ 2026-01-19 18:26 ` Juergen Gross
2026-02-02 10:27 ` [PATCH v4 0/6] x86: Cleanups around slow_down_io() Juergen Gross
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2026-01-19 18:26 UTC (permalink / raw)
To: linux-kernel, x86, linux-block
Cc: Juergen Gross, Thomas Gleixner, Ingo Molnar, Borislav Petkov,
Dave Hansen, H. Peter Anvin, Denis Efremov, Jens Axboe
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.
This will remove the last place where REALLY_SLOW_IO is being defined.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
arch/x86/include/asm/floppy.h | 27 ++++++++++++++++++++++-----
drivers/block/floppy.c | 2 --
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/arch/x86/include/asm/floppy.h b/arch/x86/include/asm/floppy.h
index e7a244051c62..8d1e86687b98 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/drivers/block/floppy.c b/drivers/block/floppy.c
index c28786e0fe1c..4422bc57a4f2 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...) \
--
2.52.0
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v4 0/6] x86: Cleanups around slow_down_io()
2026-01-19 18:26 [PATCH v4 0/6] x86: Cleanups around slow_down_io() Juergen Gross
2026-01-19 18:26 ` [PATCH v4 3/6] block/floppy: Don't use REALLY_SLOW_IO for delays Juergen Gross
@ 2026-02-02 10:27 ` Juergen Gross
2026-02-09 9:11 ` Juergen Gross
2026-03-11 9:16 ` Juergen Gross
3 siblings, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2026-02-02 10:27 UTC (permalink / raw)
To: linux-kernel, x86, virtualization, kvm, linux-block
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
H. Peter Anvin, Ajay Kaher, Alexey Makhalov,
Broadcom internal kernel review list, Paolo Bonzini,
Vitaly Kuznetsov, Boris Ostrovsky, xen-devel, Denis Efremov,
Jens Axboe
[-- Attachment #1.1.1: Type: text/plain, Size: 2156 bytes --]
Ping?
On 19.01.26 19:26, Juergen Gross wrote:
> While looking at paravirt cleanups I stumbled over slow_down_io() and
> the related REALLY_SLOW_IO define.
>
> Do several cleanups, resulting in a deletion of REALLY_SLOW_IO and the
> io_delay() paravirt function hook.
>
> Patch 4 is removing the config options for selecting the default delay
> mechanism and sets the default to "no delay". This is in preparation of
> removing the io_delay() functionality completely, as suggested by Ingo
> Molnar.
>
> Patch 5 is adding an additional config option allowing to avoid
> building io_delay.c (default is still to build it).
>
> Changes in V2:
> - patches 2 and 3 of V1 have been applied
> - new patches 4 and 5
>
> Changes in V3:
> - rebase to tip/master kernel branch
>
> Changes in V4:
> - add patch 1 as prereq patch to the series
>
> Juergen Gross (6):
> x86/irqflags: Fix build failure
> x86/paravirt: Replace io_delay() hook with a bool
> block/floppy: Don't use REALLY_SLOW_IO for delays
> x86/io: Remove REALLY_SLOW_IO handling
> x86/io_delay: Switch io_delay() default mechanism to "none"
> x86/io_delay: Add config option for controlling build of io_delay.
>
> arch/x86/Kconfig | 8 +++
> arch/x86/Kconfig.debug | 30 ----------
> arch/x86/include/asm/floppy.h | 31 ++++++++--
> arch/x86/include/asm/io.h | 19 ++++---
> arch/x86/include/asm/irqflags.h | 6 +-
> arch/x86/include/asm/paravirt-base.h | 6 ++
> arch/x86/include/asm/paravirt.h | 11 ----
> arch/x86/include/asm/paravirt_types.h | 2 -
> arch/x86/kernel/Makefile | 3 +-
> arch/x86/kernel/cpu/vmware.c | 2 +-
> arch/x86/kernel/io_delay.c | 81 +--------------------------
> arch/x86/kernel/kvm.c | 8 +--
> arch/x86/kernel/paravirt.c | 3 +-
> arch/x86/kernel/setup.c | 4 +-
> arch/x86/xen/enlighten_pv.c | 6 +-
> drivers/block/floppy.c | 2 -
> 16 files changed, 63 insertions(+), 159 deletions(-)
>
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 0/6] x86: Cleanups around slow_down_io()
2026-01-19 18:26 [PATCH v4 0/6] x86: Cleanups around slow_down_io() Juergen Gross
2026-01-19 18:26 ` [PATCH v4 3/6] block/floppy: Don't use REALLY_SLOW_IO for delays 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
3 siblings, 1 reply; 6+ messages in thread
From: Juergen Gross @ 2026-02-09 9:11 UTC (permalink / raw)
To: linux-kernel, x86, virtualization, kvm, linux-block
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
H. Peter Anvin, Ajay Kaher, Alexey Makhalov,
Broadcom internal kernel review list, Paolo Bonzini,
Vitaly Kuznetsov, Boris Ostrovsky, xen-devel, Denis Efremov,
Jens Axboe
[-- Attachment #1.1.1: Type: text/plain, Size: 2195 bytes --]
PING?
Now 3 weeks without any reaction...
On 19.01.26 19:26, Juergen Gross wrote:
> While looking at paravirt cleanups I stumbled over slow_down_io() and
> the related REALLY_SLOW_IO define.
>
> Do several cleanups, resulting in a deletion of REALLY_SLOW_IO and the
> io_delay() paravirt function hook.
>
> Patch 4 is removing the config options for selecting the default delay
> mechanism and sets the default to "no delay". This is in preparation of
> removing the io_delay() functionality completely, as suggested by Ingo
> Molnar.
>
> Patch 5 is adding an additional config option allowing to avoid
> building io_delay.c (default is still to build it).
>
> Changes in V2:
> - patches 2 and 3 of V1 have been applied
> - new patches 4 and 5
>
> Changes in V3:
> - rebase to tip/master kernel branch
>
> Changes in V4:
> - add patch 1 as prereq patch to the series
>
> Juergen Gross (6):
> x86/irqflags: Fix build failure
> x86/paravirt: Replace io_delay() hook with a bool
> block/floppy: Don't use REALLY_SLOW_IO for delays
> x86/io: Remove REALLY_SLOW_IO handling
> x86/io_delay: Switch io_delay() default mechanism to "none"
> x86/io_delay: Add config option for controlling build of io_delay.
>
> arch/x86/Kconfig | 8 +++
> arch/x86/Kconfig.debug | 30 ----------
> arch/x86/include/asm/floppy.h | 31 ++++++++--
> arch/x86/include/asm/io.h | 19 ++++---
> arch/x86/include/asm/irqflags.h | 6 +-
> arch/x86/include/asm/paravirt-base.h | 6 ++
> arch/x86/include/asm/paravirt.h | 11 ----
> arch/x86/include/asm/paravirt_types.h | 2 -
> arch/x86/kernel/Makefile | 3 +-
> arch/x86/kernel/cpu/vmware.c | 2 +-
> arch/x86/kernel/io_delay.c | 81 +--------------------------
> arch/x86/kernel/kvm.c | 8 +--
> arch/x86/kernel/paravirt.c | 3 +-
> arch/x86/kernel/setup.c | 4 +-
> arch/x86/xen/enlighten_pv.c | 6 +-
> drivers/block/floppy.c | 2 -
> 16 files changed, 63 insertions(+), 159 deletions(-)
>
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 0/6] x86: Cleanups around slow_down_io()
2026-02-09 9:11 ` Juergen Gross
@ 2026-02-09 10:19 ` Borislav Petkov
0 siblings, 0 replies; 6+ messages in thread
From: Borislav Petkov @ 2026-02-09 10:19 UTC (permalink / raw)
To: Juergen Gross
Cc: linux-kernel, x86, virtualization, kvm, linux-block,
Thomas Gleixner, Ingo Molnar, Dave Hansen, H. Peter Anvin,
Ajay Kaher, Alexey Makhalov, Broadcom internal kernel review list,
Paolo Bonzini, Vitaly Kuznetsov, Boris Ostrovsky, xen-devel,
Denis Efremov, Jens Axboe
On Mon, Feb 09, 2026 at 10:11:49AM +0100, Juergen Gross wrote:
> PING?
>
> Now 3 weeks without any reaction...
Jürgen, there are other patchsets that need review too. And we have merge
window right now so no reviewing anyway.
And you know all that damn well!
How about you help us out and you start reviewing x86 patches instead of
pinging every week?
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v4 0/6] x86: Cleanups around slow_down_io()
2026-01-19 18:26 [PATCH v4 0/6] x86: Cleanups around slow_down_io() Juergen Gross
` (2 preceding siblings ...)
2026-02-09 9:11 ` Juergen Gross
@ 2026-03-11 9:16 ` Juergen Gross
3 siblings, 0 replies; 6+ messages in thread
From: Juergen Gross @ 2026-03-11 9:16 UTC (permalink / raw)
To: linux-kernel, x86, virtualization, kvm, linux-block
Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
H. Peter Anvin, Ajay Kaher, Alexey Makhalov,
Broadcom internal kernel review list, Paolo Bonzini,
Vitaly Kuznetsov, Boris Ostrovsky, xen-devel, Denis Efremov,
Jens Axboe
[-- Attachment #1.1.1: Type: text/plain, Size: 2175 bytes --]
On 19.01.26 19:26, Juergen Gross wrote:
> While looking at paravirt cleanups I stumbled over slow_down_io() and
> the related REALLY_SLOW_IO define.
>
> Do several cleanups, resulting in a deletion of REALLY_SLOW_IO and the
> io_delay() paravirt function hook.
>
> Patch 4 is removing the config options for selecting the default delay
> mechanism and sets the default to "no delay". This is in preparation of
> removing the io_delay() functionality completely, as suggested by Ingo
> Molnar.
>
> Patch 5 is adding an additional config option allowing to avoid
> building io_delay.c (default is still to build it).
>
> Changes in V2:
> - patches 2 and 3 of V1 have been applied
> - new patches 4 and 5
>
> Changes in V3:
> - rebase to tip/master kernel branch
>
> Changes in V4:
> - add patch 1 as prereq patch to the series
>
> Juergen Gross (6):
> x86/irqflags: Fix build failure
> x86/paravirt: Replace io_delay() hook with a bool
> block/floppy: Don't use REALLY_SLOW_IO for delays
> x86/io: Remove REALLY_SLOW_IO handling
> x86/io_delay: Switch io_delay() default mechanism to "none"
> x86/io_delay: Add config option for controlling build of io_delay.
>
> arch/x86/Kconfig | 8 +++
> arch/x86/Kconfig.debug | 30 ----------
> arch/x86/include/asm/floppy.h | 31 ++++++++--
> arch/x86/include/asm/io.h | 19 ++++---
> arch/x86/include/asm/irqflags.h | 6 +-
> arch/x86/include/asm/paravirt-base.h | 6 ++
> arch/x86/include/asm/paravirt.h | 11 ----
> arch/x86/include/asm/paravirt_types.h | 2 -
> arch/x86/kernel/Makefile | 3 +-
> arch/x86/kernel/cpu/vmware.c | 2 +-
> arch/x86/kernel/io_delay.c | 81 +--------------------------
> arch/x86/kernel/kvm.c | 8 +--
> arch/x86/kernel/paravirt.c | 3 +-
> arch/x86/kernel/setup.c | 4 +-
> arch/x86/xen/enlighten_pv.c | 6 +-
> drivers/block/floppy.c | 2 -
> 16 files changed, 63 insertions(+), 159 deletions(-)
>
Any comments?
Juergen
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3743 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread