From patchwork Fri Feb 16 15:17:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 202190 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:c619:b0:108:e6aa:91d0 with SMTP id hn25csp588992dyb; Fri, 16 Feb 2024 07:27:12 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVcOvy0gdxpW2JTFoArjZGgLV5vLD1pmmW7LOHYHngeYfNEjqZpTatDs0bqv89+b/pEKfEMahR1YhXP9ytzYfjdHt4LGg== X-Google-Smtp-Source: AGHT+IHWPKcxbEjU0ciHFxuyxEycvEnCx4S6PX8aNQhpCOVT5/FUiXYN7a1r2OvGwpNsA8kyqsDJ X-Received: by 2002:a17:90a:de0c:b0:299:39bb:1f46 with SMTP id m12-20020a17090ade0c00b0029939bb1f46mr1420119pjv.16.1708097232418; Fri, 16 Feb 2024 07:27:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708097232; cv=pass; d=google.com; s=arc-20160816; b=bmEn8t5EQW601c8CtCau0FxWY2BhRglN2gKSirVEGmAAe5JALaAAzAPOiZT6Lvm7gk nY3OxP5JZq5naJXL+amTYeMxzolK4gQ+VmNt13xJlWsYu+NEeiC63mRd53WX3NzlqiIV KHOTQjm6d2e6qQN3WynzbVHZARjWcjmLoXHtr3Hb329psq2BqeLeLO7LkIF1UyulS0Ad w6IAnPEuHHJo0LzeXZ1dXCgJRYcjTWkiSK7lDesTCMKTKZxYn+e1W8UOIudLBDA7+I7i KRB2KLhXs83iwy01UFp8lhzSiNhaGGgZGuRt+6vvH8q3CM3/XbnsU8hEDvVBExip5EOu PyKg== 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 header.b=13EsRCsg; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68836-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id sf3-20020a17090b51c300b0029606bc0b08si96531pjb.171.2024.02.16.07.27.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Feb 2024 07:27:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-68836-ouuuleilei=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 header.b=13EsRCsg; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-68836-ouuuleilei=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 C726B287299 for ; Fri, 16 Feb 2024 15:26:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 91F1B14D434; Fri, 16 Feb 2024 15:17:28 +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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790819595051710324 X-GMAIL-MSGID: 1791069764018296515 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++)