Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp3053684rwb; Mon, 7 Aug 2023 07:36:22 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEG94tOqp7z8l2G8wbeEEsaM+jU4pbFnsCpp9fBl19ZYgISDD/oyXWRtJ038IfoNujotmAe X-Received: by 2002:a17:90a:3941:b0:262:ecd9:ed09 with SMTP id n1-20020a17090a394100b00262ecd9ed09mr6973051pjf.33.1691418982294; Mon, 07 Aug 2023 07:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691418982; cv=none; d=google.com; s=arc-20160816; b=QD09i1Sfl7RGLor9kxFTvZIu4jqgzo0fmjwLR8L+z1q/7yVsQhpjwl24lytO6V9VRw t1M4j6QGu+xaBk5S5kVZomzwtnaRUk5WMvspnTCuFnwkuGJ8Ac4wzwjW1dGGLGDoUem8 nEBzTx4QewVefH4p2nXtjS4rqdVeYFLAQjCnlUXEdRNr+aqNbN6E54xCNbdLDnp2YQ9O +d6yVnNcB3CvitnoBHs3Wx5D3+WcHMWZA+fU/Jfppm6LVlY9PUzUFsjA0YaxfGeuGcgx 6I8jzx67HOPPFyuXYXKA7Z91hfe6mVzOdiOfaTMJSwotE8/b++IspmvTeVmzfB0rPHYO Gk1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=rdpVDGyxoao4mcEVei61Te5kVt75qdc74++NqQsV064=; fh=/92WVKYrcN3rA268QXyKzVtm/UtxHeI2lnbU295XDiQ=; b=P54bR0iyyE89kk5qNRNzX68f3FC+S41RkQY4VoavnOSUWdIRfBGnWU3OdyVhbgNgKJ XX0nCs9ussJKvliEnV5uSCGSUXv2jAFhoXL6/aYeKgXpCayT8oTbHNcQiXpXUAAsUEYV 6nckFGqOJGoQDIivzdk8rlbJOlqSxzYnY8fAPEN/w98uqJkReRLT4RFyrQcklldAe7aQ imNgdGRo+OBU3UxDUbHyXNBhk0oJ10j0xR0ABHK05dJ0wAenHxTqvYv6GmN7COZibPCB DMTm1hU+gM5Y5b443F+lFyElc0RoNaIqNXD1PVLYopuw0VKp52qs+U6dSDFlx5p1CZ7+ efnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xXRePEYi; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=yCxcrsAk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mh5-20020a17090b4ac500b00263fc986e28si9508432pjb.24.2023.08.07.07.36.10; Mon, 07 Aug 2023 07:36:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=xXRePEYi; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=yCxcrsAk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231378AbjHGNzF (ORCPT + 99 others); Mon, 7 Aug 2023 09:55:05 -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 Content-Type: text/plain; charset=UTF-8 Date: Mon, 7 Aug 2023 15:52:44 +0200 (CEST) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 = phys_cpu_present_map; /* * 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 = 0; i < broadcast_id; i++)