From nobody Sun Feb 8 12:40:30 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DA79AC001DB for ; Mon, 7 Aug 2023 13:55:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232283AbjHGNzH (ORCPT ); Mon, 7 Aug 2023 09:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40486 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234507AbjHGNwx (ORCPT ); Mon, 7 Aug 2023 09:52:53 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E13710D9 for ; Mon, 7 Aug 2023 06:52:46 -0700 (PDT) Message-ID: <20230807135026.802468362@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691416364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=rdpVDGyxoao4mcEVei61Te5kVt75qdc74++NqQsV064=; b=xXRePEYimbFtTcQhqTXK7CmDyZdKWOQrW/h5sONM/hXLov0wCscOlYBnEkAw8OF+XwroDf klF+H+9LEF7KgA7AZfnzImbN2ORr7XuAyPHP+k5wl6PtQazASv/VshmfgEhEJfaVNkCzX9 qGu8lhxcr6QYtL9fmxulrueVRd/o+P2j4XYcuwqkmewf1WM8rqQyk0O8+5yFPJwpFk6k2l goPsrNFJp5uSLc4sx/aTi7vbKfCXJe9SYwJR2C6tLurwLpoaAmKH/QzX0SuMXS0dIVSQ50 kjpCCfby08QzkZG2gbdl4TlokyfPia0v01y0p7wiR9l0of1aeL0TAg1VpN9fxQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691416364; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=rdpVDGyxoao4mcEVei61Te5kVt75qdc74++NqQsV064=; b=yCxcrsAkpce6Ad8kxZ6KgA87XK0sbKAu/OQlXql/iTebm2gQzovKIarKeK3og6kHb9Zb00 bSXWBtH0h+GFrHBg== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Michael Kelley , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko Subject: [patch 07/53] x86/ioapic: Simplify setup_ioapic_ids_from_mpc_nocheck() References: <20230807130108.853357011@linutronix.de> MIME-Version: 1.0 Date: Mon, 7 Aug 2023 15:52:44 +0200 (CEST) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" No need to go through APIC callbacks. It's already established that this is an ancient APIC. So just copy the present mask and use the direct physid* functions all over the place. Signed-off-by: Thomas Gleixner --- arch/x86/kernel/apic/io_apic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) --- a/arch/x86/kernel/apic/io_apic.c +++ b/arch/x86/kernel/apic/io_apic.c @@ -1471,7 +1471,7 @@ static void __init setup_ioapic_ids_from * This is broken; anything with a real cpu count has to * circumvent this idiocy regardless. */ - apic->ioapic_phys_id_map(&phys_cpu_present_map, &phys_id_present_map); + phys_id_present_map =3D phys_cpu_present_map; =20 /* * Set the IOAPIC ID to the value stored in the MPC table. @@ -1496,8 +1496,7 @@ static void __init setup_ioapic_ids_from * system must have a unique ID or we get lots of nice * 'stuck on smp_invalidate_needed IPI wait' messages. */ - if (apic->check_apicid_used(&phys_id_present_map, - mpc_ioapic_id(ioapic_idx))) { + if (physid_isset(mpc_ioapic_id(ioapic_idx), phys_id_present_map)) { pr_err("BIOS bug, IO-APIC#%d ID %d is already used!...\n", ioapic_idx, mpc_ioapic_id(ioapic_idx)); for (i =3D 0; i < broadcast_id; i++)