Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp463602rdb; Tue, 23 Jan 2024 05:16:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IH0qkidIcGQxaBSSeoKgDVqarN8alMmZGNoL9K0JcMy2m9Hd3ZEtndBdesuGigXj+ZlCxM6 X-Received: by 2002:a05:6a20:2449:b0:19c:6293:e597 with SMTP id t9-20020a056a20244900b0019c6293e597mr66388pzc.120.1706015796808; Tue, 23 Jan 2024 05:16:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706015796; cv=pass; d=google.com; s=arc-20160816; b=0j5GP8Z/J6fUJhw3IfZDrUH+M+10Wfnh2McBYkY3o8NmqtrfRzUiedpEshI47luUlf KB9N54pbFRhX1+p9fNxOVwkbJR6/ijn8mv3Rb2j9dyZWA9AOWtnEln5AaVX+PEMqA9pW mPMDtD3dPupv4SvQoItRWC8Pt2j2Jgrwix9WiJUhdUvDEDWPT8ldG0S4ogACo2QXk/Ur 0iaZWnd59cVmwyTDHkix98NgIArRv58vWQJwaAfIq6lmilRKIfbbCcxVMt6jbSK5HKAT gNBhTpOOcvD1RFdut367aGbpG0IT7gHQ7B+hE1Pxhj8FqFbYhl8cYLNNpvPu8BgXPN9z bccQ== 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=NQJOd3I1iF0ZpOogq0e/ZOVhSfa0r+gOFKVceHNfGXE=; fh=FCQyBsGyK8ELfIRvcrNSjETg/eJNjzUYemIkEO1t5RA=; b=IDDY5RU4klVM4HU2eSLqgFevzyQqUX3YAGCv1erNSs6//BFRqic5iRFnhzjqej82nx TUTptWNGqd+L7+9EYT08ZELEi/OExKxX7eTMGJM7+p5uqaMn6c8Yumi5Om1wfLbpgWha /1YHxheZ35fvUia0b3iwu4pFEJmn4Uy/GRG/XrcTZW28VOy8VD7SdWPfFHEKx0Fq17OP hSQ8/w1Z0mtYrbUCm3grqATFyspM6Gr5gBb15xcw3PlcCihPoYJygSUJy9+Tg7gUjDTI 2Sgi7HTcuNpJbYTJXpUSl9/QcmckQo7iPmsBvFWaPNieRaIsLUi96Gile2n4sNPsP/Pc Z6Ig== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=2lZmAzXn; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=s85y0fnB; 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-35324-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35324-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id g18-20020a631112000000b005cdfc019319si9714892pgl.751.2024.01.23.05.16.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 05:16:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35324-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=2lZmAzXn; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=s85y0fnB; 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-35324-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35324-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 805AD28E4E4 for ; Tue, 23 Jan 2024 13:11:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DFDC85FDB5; Tue, 23 Jan 2024 13:10:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="2lZmAzXn"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="s85y0fnB" 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 B92355FBA1 for ; Tue, 23 Jan 2024 13:10:14 +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=1706015416; cv=none; b=gqm9ddA4xvuRtetY2dq7kuh84zX+G8z//+LFIlDn+KciqJBaPw438BfakqJNjH+2QyeFunemPqq0lxFjW/Pg2qtycHaFqA05no+xcbrK0t2O9zoT//Snt72VKs1g7NiDoMK1LO5RRQK6dqWUsZV281b6XcNJR4gmerzfIsz7M4w= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706015416; c=relaxed/simple; bh=9mpthBeL7kUUAZ6hCPKnLP++2Jl+7CeApq/qTLrJ6qA=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=axvvGlDp9Le3l5+L8fZ/28axkHjZB8HD3Dk3UPjkfYHd4UJ3f75xgeTT+hsYONfDajYROwYYeLTsIiebHley+5u5IB1H76ZfgQqEH5U8aPKaaOLhs+irDhLGjjFcj41QAc1V+90PerBn7LSBGYiY6RQlKWaZsdVsAB2/ksluMtk= 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=2lZmAzXn; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=s85y0fnB; 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: <20240117124902.731270121@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1706015412; 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=NQJOd3I1iF0ZpOogq0e/ZOVhSfa0r+gOFKVceHNfGXE=; b=2lZmAzXnBXA7Fmk2fCfFlxnzJXzYcHxnR1Jf+SssQzFy/hZe90uZzuhqqRArPF28EC5mlY yGxSNs5ELRv9BSDLgtmRNbZAuSi1SpjWv2FXIlcUh869DYf+G1Tt1y4FgfhGvaZhTb0i4z zwRa70UjqohgXjjdfNPqZ+QkmD9bWa1sORLvL0HCcxsGV2k0CiIVeMAXc1rsXFnAGatf1H zc5rfqkgjbLkyGess2D7HfRSsPgt/vfXszgGsCHWRDrZgJ7ixz2NlZB1iqRdoIbMTxoe2O VvPdR9+F+PlSy1zeyoLz0rNHwB6HaF671LwBCWEOsFQXCRYo0hfo79BH1iOZ6g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1706015412; 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=NQJOd3I1iF0ZpOogq0e/ZOVhSfa0r+gOFKVceHNfGXE=; b=s85y0fnBTrbfotgHadGQWMRc7DMde2fLELme1l2w/HY425E7/3uDyh02nKNlUIwMOOuq4r 3G1kAgKlRxil7DAg== 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 V2 06/22] x86/ioapic: Simplify setup_ioapic_ids_from_mpc_nocheck() References: <20240117124704.044462658@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, 23 Jan 2024 14:10:11 +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++)