From nobody Sat Feb 7 05:57:30 2026 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9E3232D7FB for ; Mon, 19 Jan 2026 18:27:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768847231; cv=none; b=dh+ZRGAa0GNx40C0pT6P/m0Q2WO7tKDxaxe0jpOPI3ZBy5iNtEFbA1FGYqjI5wgSkCDGO9SLYNEUUKDErnc5ZShJZSM6sEcjpbo9T3/XVBWhhwV0gQQneQ89/j0uG7n+rDRVvK9TWQk7gTauhRsl9AvCVJ/+nmKA2CN6lAJ+JzE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768847231; c=relaxed/simple; bh=ZJVpcJeQoV9U3uHqQhnD5PEYhoWFY7uY79p9Tnku4B4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WP3VDMebyxALSwrefRrsqgfNjgYnIRZVvN+6fghGCXOG/7iYD5OR4PREq/GFCIsvlLzhG39kCg8g7NnTSBwLntILFvHj3L3GAXVDxihqscodsh6VDENIqymxTKlQReOIV+gAJfZZmeWOSiIoM/PxI5Ayx9dUtZPLVh6vufMocFs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=u+htYiFs; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=u+htYiFs; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="u+htYiFs"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="u+htYiFs" Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id B9E305BCD0; Mon, 19 Jan 2026 18:27:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847224; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mpi3GKeACFs/xCcj009EhiLZQrzcqmc1AaBpmyadVAc=; b=u+htYiFs6temhxZIWCGfVrQfqflZj7YA+6Sm7WRilIQ2Tf8xe3q1WdTLdbTXUE/O/XWWNc SOPUmWuQgxFyAFAA/3f8GEtfVuvOHI8gan27cf9VSdFTLqGpRgkhzaRH8UtOKiAxTJZdht GgeMMUBUA0D+TYHsIzisAtgRVVsCNOQ= Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1768847224; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mpi3GKeACFs/xCcj009EhiLZQrzcqmc1AaBpmyadVAc=; b=u+htYiFs6temhxZIWCGfVrQfqflZj7YA+6Sm7WRilIQ2Tf8xe3q1WdTLdbTXUE/O/XWWNc SOPUmWuQgxFyAFAA/3f8GEtfVuvOHI8gan27cf9VSdFTLqGpRgkhzaRH8UtOKiAxTJZdht GgeMMUBUA0D+TYHsIzisAtgRVVsCNOQ= Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 73B573EA63; Mon, 19 Jan 2026 18:27:04 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id vCyoGnh3bmlbaQAAD6G6ig (envelope-from ); Mon, 19 Jan 2026 18:27:04 +0000 From: Juergen Gross To: linux-kernel@vger.kernel.org, x86@kernel.org Cc: Juergen Gross , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" Subject: [PATCH v4 5/6] x86/io_delay: Switch io_delay() default mechanism to "none" Date: Mon, 19 Jan 2026 19:26:31 +0100 Message-ID: <20260119182632.596369-6-jgross@suse.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260119182632.596369-1-jgross@suse.com> References: <20260119182632.596369-1-jgross@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.80 X-Spamd-Result: default: False [-2.80 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:mid,suse.com:email]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCPT_COUNT_SEVEN(0.00)[8]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; TO_DN_SOME(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Spam-Level: X-Spam-Flag: NO Content-Type: text/plain; charset="utf-8" The habit to delay some port operations via io_delay() is probably a no longer needed relict from i386 times. Switch the default to no longer do delays for port operations. In case this is breaking some still supported hardware, the default can still be overwritten via boot parameter. Remove the Kconfig options to select the default io_delay() mechanism. This makes io_delay_init() a nop, so it can be removed together with dmi_io_delay_0xed_port() and the associated io_delay_0xed_port_dmi_table(). Signed-off-by: Juergen Gross --- V2: - new patch (kind of suggested by Ingo Molnar) --- arch/x86/Kconfig.debug | 30 -------------- arch/x86/include/asm/io.h | 1 - arch/x86/kernel/io_delay.c | 81 +------------------------------------- arch/x86/kernel/setup.c | 2 - 4 files changed, 1 insertion(+), 113 deletions(-) diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index c95c3aaadf97..56888156a64b 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug @@ -120,36 +120,6 @@ config X86_DECODER_SELFTEST decoder code. If unsure, say "N". =20 -choice - prompt "IO delay type" - default IO_DELAY_0X80 - -config IO_DELAY_0X80 - bool "port 0x80 based port-IO delay [recommended]" - help - This is the traditional Linux IO delay used for in/out_p. - It is the most tested hence safest selection here. - -config IO_DELAY_0XED - bool "port 0xed based port-IO delay" - help - Use port 0xed as the IO delay. This frees up port 0x80 which is - often used as a hardware-debug port. - -config IO_DELAY_UDELAY - bool "udelay based port-IO delay" - help - Use udelay(2) as the IO delay method. This provides the delay - while not having any side-effect on the IO port space. - -config IO_DELAY_NONE - bool "no port-IO delay" - help - No port-IO delay. Will break on old boxes that require port-IO - delay for certain operations. Should work on most new machines. - -endchoice - config DEBUG_BOOT_PARAMS bool "Debug boot parameters" depends on DEBUG_KERNEL diff --git a/arch/x86/include/asm/io.h b/arch/x86/include/asm/io.h index 843f23044754..d50d31023385 100644 --- a/arch/x86/include/asm/io.h +++ b/arch/x86/include/asm/io.h @@ -240,7 +240,6 @@ static inline void __iowrite32_copy(void __iomem *to, c= onst void *from, extern void native_io_delay(void); =20 extern int io_delay_type; -extern void io_delay_init(void); =20 #if defined(CONFIG_PARAVIRT) #include diff --git a/arch/x86/kernel/io_delay.c b/arch/x86/kernel/io_delay.c index fdb6506ceaaa..458e2fd9279b 100644 --- a/arch/x86/kernel/io_delay.c +++ b/arch/x86/kernel/io_delay.c @@ -9,8 +9,6 @@ #include #include #include -#include -#include #include =20 #define IO_DELAY_TYPE_0X80 0 @@ -18,19 +16,7 @@ #define IO_DELAY_TYPE_UDELAY 2 #define IO_DELAY_TYPE_NONE 3 =20 -#if defined(CONFIG_IO_DELAY_0X80) -#define DEFAULT_IO_DELAY_TYPE IO_DELAY_TYPE_0X80 -#elif defined(CONFIG_IO_DELAY_0XED) -#define DEFAULT_IO_DELAY_TYPE IO_DELAY_TYPE_0XED -#elif defined(CONFIG_IO_DELAY_UDELAY) -#define DEFAULT_IO_DELAY_TYPE IO_DELAY_TYPE_UDELAY -#elif defined(CONFIG_IO_DELAY_NONE) -#define DEFAULT_IO_DELAY_TYPE IO_DELAY_TYPE_NONE -#endif - -int io_delay_type __read_mostly =3D DEFAULT_IO_DELAY_TYPE; - -static int __initdata io_delay_override; +int io_delay_type __read_mostly =3D IO_DELAY_TYPE_NONE; =20 /* * Paravirt wants native_io_delay to be a constant. @@ -61,70 +47,6 @@ void native_io_delay(void) } EXPORT_SYMBOL(native_io_delay); =20 -static int __init dmi_io_delay_0xed_port(const struct dmi_system_id *id) -{ - if (io_delay_type =3D=3D IO_DELAY_TYPE_0X80) { - pr_notice("%s: using 0xed I/O delay port\n", id->ident); - io_delay_type =3D IO_DELAY_TYPE_0XED; - } - - return 0; -} - -/* - * Quirk table for systems that misbehave (lock up, etc.) if port - * 0x80 is used: - */ -static const struct dmi_system_id io_delay_0xed_port_dmi_table[] __initcon= st =3D { - { - .callback =3D dmi_io_delay_0xed_port, - .ident =3D "Compaq Presario V6000", - .matches =3D { - DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), - DMI_MATCH(DMI_BOARD_NAME, "30B7") - } - }, - { - .callback =3D dmi_io_delay_0xed_port, - .ident =3D "HP Pavilion dv9000z", - .matches =3D { - DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), - DMI_MATCH(DMI_BOARD_NAME, "30B9") - } - }, - { - .callback =3D dmi_io_delay_0xed_port, - .ident =3D "HP Pavilion dv6000", - .matches =3D { - DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), - DMI_MATCH(DMI_BOARD_NAME, "30B8") - } - }, - { - .callback =3D dmi_io_delay_0xed_port, - .ident =3D "HP Pavilion tx1000", - .matches =3D { - DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), - DMI_MATCH(DMI_BOARD_NAME, "30BF") - } - }, - { - .callback =3D dmi_io_delay_0xed_port, - .ident =3D "Presario F700", - .matches =3D { - DMI_MATCH(DMI_BOARD_VENDOR, "Quanta"), - DMI_MATCH(DMI_BOARD_NAME, "30D3") - } - }, - { } -}; - -void __init io_delay_init(void) -{ - if (!io_delay_override) - dmi_check_system(io_delay_0xed_port_dmi_table); -} - static int __init io_delay_param(char *s) { if (!s) @@ -141,7 +63,6 @@ static int __init io_delay_param(char *s) else return -EINVAL; =20 - io_delay_override =3D 1; return 0; } =20 diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 1b2edd07a3e1..8ef29c1ebb8d 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -1176,8 +1176,6 @@ void __init setup_arch(char **cmdline_p) =20 vsmp_init(); =20 - io_delay_init(); - early_platform_quirks(); =20 /* Some platforms need the APIC registered for NUMA configuration */ --=20 2.52.0