Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp176096rdh; Tue, 13 Feb 2024 13:11:22 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVloD+4LG+BZ4UwSX1NeayGR3KEhJ1XQZmvKvi54GLSylD5Asich8XGT571oISssmb75BeIA2/E6hKqAs/0+ASad8iBXW3sAZx+MbyLUA== X-Google-Smtp-Source: AGHT+IHaD85zXXYX2x4Y8T8rmH37r+gM3STVQh1w+S8ZcKdVarc5S6R2iyntean2RpSIM2uqj9ay X-Received: by 2002:a05:6a21:150c:b0:19e:c0c9:7b0d with SMTP id nq12-20020a056a21150c00b0019ec0c97b0dmr1121755pzb.56.1707858682069; Tue, 13 Feb 2024 13:11:22 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707858682; cv=pass; d=google.com; s=arc-20160816; b=qROAssJXmVGMu6rVlsnARnIgu5VETW45NWjlIyoIM82nfQYfr9eBH2s6R+Bic4JUO4 LXc43P8QnpyqwvillEn1Dpv9jBeev7Ey06O4MPiocqvEgGYkjwWQZhhUdCfXa0osS5t2 VyfiVUGJ5wkliPbNavsbgh1GUQ93a0voZrBg3CwckDlwIysUzPw8XklpNzMOZFA5x7qM pX99UBKagAkBd9aRp+mSsL76YKBoJKxv2NIhxMZcTWRMEhzHktVBEpvWgR5OOPWVN2Le GXr8BxYe1q5VaCXHhiGHTj+K9dUUkYD3jFggNfNBlocN8L8qONFmasvZP2nisKnwLoud dxCw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:subject:cc:to:from:dkim-signature :dkim-signature:message-id; bh=hMiM4L8vp+2japRxi++Ub50/ZfEK7uDmkyG5Cn3W1hU=; fh=5ce3Q2vmoCgYgVwAeO+6NUUhD8y3qfCKQxvFeeJ/oaE=; b=YG+SD30diOSSDu7IZ5v7A8Yg0tVL9c73STXIwfSColxS6WP6ndFbER8K/ePli8Vp2n lLZiFUKoUr3cuFyrDAsKzqF69KsWW1BbSQzrOBk5VoI3fkYCHBLAzypANUZjqW/AgB5c n4HeREPpUDnl6W1RXJoBcR77XDHwOoSzGmDu6gs9QGZh5zyNKNFV2cexS2WRtkeJRu25 8a+cd/Kj2v/qufk+gTliASwnpRGa2s1a+GVa3hGXSc0cT7D+SPLBzvf7BKxxQJ3bCOC5 Kmn3pxYvbsV2Mc8eo4NdeFNIKUEc5iWJpufE2e+2CSe4Q56OBtsT5CHA1dMrnHHZzI9B 7CNA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fWMxfEMQ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-64267-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64267-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de X-Forwarded-Encrypted: i=2; AJvYcCUmSzNKiAVHAeTGVgm6CYwuXQCNpr84W6IGTlc/dtkBVa2S2Ec8MCxWW9x/QV2sImoUJBdpLf0SQJhjtYfQhMlLayEPXhs6Aa2jeBIQWA== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id k11-20020aa792cb000000b006d3c35096dcsi7028636pfa.320.2024.02.13.13.11.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 13:11:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64267-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fWMxfEMQ; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-64267-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64267-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 052A4B25737 for ; Tue, 13 Feb 2024 21:10:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4FD4769D3D; Tue, 13 Feb 2024 21:05:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="fWMxfEMQ"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="STKLtlXW" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 109B369D01 for ; Tue, 13 Feb 2024 21:05:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858302; cv=none; b=QTmdvf1fIHc/vdI0IVQRPYfNSFsA1zXEP2mpZo1gZPSv8PpQkt2uECpUXZ7alZMM83Y7AZ6KLa4WXbijgX22bkrPqn4vIM/Pc8c2cQuAJ29YM+8t/xCJ7PapmeYNYS3oI3MUgmM8A6dLu9vX5D0yB98luF/MOyuIZKy+ZvcQi+o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707858302; c=relaxed/simple; bh=2/Hm6WNmDS/4OY4V9WHX1/j5wrA9UAtsOeWkPcmxqVM=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=oW0kZD/EDWIJzlory4Wieu+ktr9clBGlUL5EaLozOx//F/y0YXb/20RZvhnqcXRXudMuJGcsgbWlg+CoXyqSoUcBmeFNlGgxkb+/z61ZwiV1pINsgHobvBthdywz7M6+le1Xn1ecQbJ9WYCtZBYAEMap6X+zoyDKS7Cl5295Jy0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=fWMxfEMQ; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=STKLtlXW; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Message-ID: <20240212154639.181901887@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1707858299; 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=hMiM4L8vp+2japRxi++Ub50/ZfEK7uDmkyG5Cn3W1hU=; b=fWMxfEMQIB3Iq4ZGSTNhFHQZg6BCC3sJpSeEKKkYZnMTHZMfQbJAmmhokQH8DkIuvd+b4i hjppc7E7CpFBM0S9TY8c5H6wzlgIsAhJ2ZGntqI5W+FrsCNU+Ju/+EkLwd5FkZmelhQj0s RSZ1qHI4pT6yviPr3KQCiYknQWQQt5FuH0DVY84BDxTy2izbXD3abcgtHhLe3kInN+wd1H 4kW3UIrEdwxlBJvRoh1Qdjd4A+N0i+HLpY2fc/JBxcYWmUiGZ8Mk46lIGdHDuvOdn+bO57 0D7338GApqje6TqfK7omYPr4ZarUWiBzlrO2z8mvT5RWwzb4Y5T7lAV9Npfyug== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1707858299; 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=hMiM4L8vp+2japRxi++Ub50/ZfEK7uDmkyG5Cn3W1hU=; b=STKLtlXWkjx+CrERra5QBIKVBKtYeOU8jSjeuYfwIcpfW9T7MBXEHO+v9UWKS6SC5/tCRJ 8WIjIEyCOxM3oCBg== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko , Michael Kelley , "Peter Zijlstra (Intel)" , Andy Shevchenko , Wei Liu Subject: [patch V3 06/22] x86/ioapic: Simplify setup_ioapic_ids_from_mpc_nocheck() References: <20240212154529.402604963@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Tue, 13 Feb 2024 22:04:59 +0100 (CET) From: Thomas Gleixner 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(FW_BUG "IO-APIC#%d ID %d is already used!...\n", ioapic_idx, mpc_ioapic_id(ioapic_idx)); for (i = 0; i < broadcast_id; i++)