Received: by 2002:a05:7412:1e0b:b0:fc:a2b0:25d7 with SMTP id kr11csp1173078rdb; Fri, 16 Feb 2024 07:26:42 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW+EbKXXe7HNVgYYvkQFEl/jdOge1p0kXsYHsnc/3Wa8mUY2SYgR/p7RoEQoeOz7jg3BeGQdjQfojgATdvpWkRZAIJoyQdeuI8fEJXm6Q== X-Google-Smtp-Source: AGHT+IFavvxVPuAgqp1+aVSs6o7861EkAknMEVbX514x3iK2H2UcJLYiHyB80IHzhQunHtsfGRlS X-Received: by 2002:a17:902:f7d6:b0:1d9:7095:7e4e with SMTP id h22-20020a170902f7d600b001d970957e4emr4304962plw.27.1708097201923; Fri, 16 Feb 2024 07:26:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708097201; cv=pass; d=google.com; s=arc-20160816; b=TpIO2JBmt47lpeaG17mL8iQrto5JPiB1F0ZnOPFGPvAXFMaz61hpvM+d32Swyi7e4z WMdEUYWwcsdtiVNi/w+MCCR9VpLeeekoaVK+e8GDD2sRByz18Nn7ixmMayy5FiW+Mteq ZgB2iNFG4rNZ+OByCctMVvRgre4NqkEi1apdy1zK6H2idJzfcLhlQGqEwLo0z8jYZQET o0hD0rB//ajxBaP7cm2r2ZPTvG5bmGBk8B/2VDiqhGmuX8Tptcv1siJsm2ggMkkj0yhR ev70nJOMshBR10XYBTtrLuvYeGgziHqgkuX35OC666yDnKe3q/nL4aL+yq2GS1UhTsUc 1dIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=4ZNGAVozQiLLoQUjSBFEIndtGk2i+W1n/nLa+kVKDhQ=; fh=HfXWoIhgCc+vt39DMIJv/Ec0aAKnw0eFA8QxuIQTUoQ=; b=an7bg0qVax4SaXsdRPF6cEWejRsukrVbm3NBrZ5+OKHwPsLEghVu5xs8xCeW+W5mv7 qCamgT7B6TDCItev3A1794XF9GCPpNoyQZJCteM7HxONgTMzWbrMorcOXA8mOgbenbYM 4pA9GPBoMS5gwGHm+sS3Fn7BOKnslBEI2q5sIqm8u0VelCJ8CRZxle9e/7axNYlVSb4Y qkrV+AowPfl3FYCt5s7g7nGqeWqVcjJ2b6nl/w8Gc1TXxLX44LpIAZ07vlbqO/Xfvijf 0g/c4b3EwBh2C129nD5IrZHK0OjW3YeAoPGrkLhKZexcFuykKa2b0mqnSremWYtKtLl6 JWrQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fFiIN6Zg; 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-68836-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68836-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. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id mb8-20020a170903098800b001dbaaecde1bsi2329plb.530.2024.02.16.07.26.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:26:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68836-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=fFiIN6Zg; 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-68836-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68836-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 8C805283CD2 for ; Fri, 16 Feb 2024 15:25:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3301014AD2B; Fri, 16 Feb 2024 15:17:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="fFiIN6Zg"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="13EsRCsg" 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 203F914A09B; Fri, 16 Feb 2024 15:17:23 +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=1708096644; cv=none; b=iHaFi4hmmDoKS7CkXd/fatpJy2ixCNVwUqhhm/O5f9sLz2PVs+GSUa5YfNyU/p26P8W20QSoogu7zCASDLXP953aCUuSMo4q+vw7KVCpJuYmLxKnNm4aIQ3tcmcXboDT7oamFtoS1q+iOTQktypFMPjkQFI6VcV9vrBitIkk0pA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708096644; c=relaxed/simple; bh=6PSspZFAHUFdNAdX6o3ML8ZyjGMbT4OOmr0/dvpt6m0=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=iusznNdHSqNJ1W3lpd0zHj4cSZu/0zg6GlVNCTnfROoAz+TGcqUZbLFjw6LXWoCK4gt2btToeYnsSeChaNgDyGWjrMchLs2pvoMTEunRUr+wBsL6L/t/+9PPn04e/f7Vb0OUgTSsowH0gVlCkRHgDJUCTnYOohiUcOwObbAVYB0= 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=fFiIN6Zg; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=13EsRCsg; 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 Date: Fri, 16 Feb 2024 15:17:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1708096641; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4ZNGAVozQiLLoQUjSBFEIndtGk2i+W1n/nLa+kVKDhQ=; b=fFiIN6ZgjBknadJS8lsuldWWO3VHA98VZdjbFbK90EGRUX5WikXrxzfhOvg+dWm0bC1f4X oBa+doxA/Y8IulTuAj1FdiB7QLwqzy3i4SMSRlD6W+0H3VN9Sp5/+1KiTc2LkflN0mgs8r cIyJ+IrmcLhf3D/eoEbf64x+QqDfKpWetPOT9yh6LjNXFMmT4m9u1TaYBhjiHK2geXzAIY V+UW/TzQLrC1cqLQXTIN+YKWjeMMb638HlF1nyoVzBin/MkJw4h7t9bMvKfxXUu0kovxV/ eSF/sTurAiKGIKEFI+Rcl6F0aCawvJNQqfFUK0MCVkVxE9HIuCxCezbpXyeeDg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1708096641; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4ZNGAVozQiLLoQUjSBFEIndtGk2i+W1n/nLa+kVKDhQ=; b=13EsRCsgo3UuvR7c3Z50gM5E7W+Gmr3QSwoysotndXB3WfqAvp2xNNauPgrLxJIysDAJ9/ dXKHyuObT5w1SOAg== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/apic] x86/ioapic: Simplify setup_ioapic_ids_from_mpc_nocheck() Cc: Thomas Gleixner , Michael Kelley , Sohil Mehta , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240212154639.181901887@linutronix.de> References: <20240212154639.181901887@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <170809664103.398.14592865741278123465.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the x86/apic branch of tip: Commit-ID: 4b99e735a5c6cb3c8b23fba522cb1d24a1679f94 Gitweb: https://git.kernel.org/tip/4b99e735a5c6cb3c8b23fba522cb1d24a1679f94 Author: Thomas Gleixner AuthorDate: Tue, 13 Feb 2024 22:04:59 +01:00 Committer: Thomas Gleixner CommitterDate: Thu, 15 Feb 2024 22:07:39 +01:00 x86/ioapic: Simplify setup_ioapic_ids_from_mpc_nocheck() 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 Tested-by: Michael Kelley Tested-by: Sohil Mehta Link: https://lore.kernel.org/r/20240212154639.181901887@linutronix.de --- arch/x86/kernel/apic/io_apic.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c index 8dc91d0..6285d88 100644 --- 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_mpc_nocheck(void) * 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_mpc_nocheck(void) * 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++)