From patchwork Wed Aug 9 19:12:19 2023 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: 133509 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6358:9d8d:b0:139:fa0d:b2d with SMTP id d13csp138856rwo; Wed, 9 Aug 2023 13:56:31 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHbQrO2fb64zKo7B/8UJGydmtzo9oCNzDjfPoJOiE+G2a+y4Yi4NRcmWIjwKFwpjDq1soMb X-Received: by 2002:adf:ec42:0:b0:317:cd6a:eb8c with SMTP id w2-20020adfec42000000b00317cd6aeb8cmr404242wrn.5.1691614590335; Wed, 09 Aug 2023 13:56:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691614590; cv=none; d=google.com; s=arc-20160816; b=cP9WfRf7yT6m7CMsstFE9QguRfQ+WfPmSXWDDBPHi+mufeBXyFbQ03pajjHmOWEF5E ihfJXry3qG62k4JhY96ii148mH7XDlQkK+auQKaj9ZNw4T0yTMuigEzXH+G3FAr9o/Gv p2I2Hi1mLfXiEsn+eGVsqzT9dxRZwFhdFMTwV5ZnqazmwsuAGD18F3qTVRUAGvCJ76KV El/eGendqFsMFHpkiXtVj2YBZ3R/adtJ/SbL6uIXFnlLboQwTUdnMoEI7gqkC1bl61M4 esZNi5OpmW1qRr2GZZwHsWTZ26Sw11Wd/hlLMHgjMWL8l0k13iLj9X6t5sghWJC0uaNF 9gGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:cc:subject:to:reply-to:sender:from :dkim-signature:dkim-signature:date; bh=AL5tloo4gcCakXKY0xrTL05hpNQrhljrtfWZbb8Ohaw=; fh=jBwjuriIPWA1lnCf5oMMiNAPpgGE0iGPmBzZMsd85oQ=; b=IPFp/Cn+MILP7v06qMEerT5fyIUfsfm7o3TY1JHu3vjFZz8f4AnZiVxOWUL6SScQOf K+H8i3yX4gkZqWmfhHbPVaJajcugJhipsTS+wSPXSB3BbdIydyxbXnzuS8pKW/4qzC/s P/t7hnfElklHUw2WFo/j/hP9HMxlKC8eSd5uzaBBdJyrbml5BmbRtuWbPFFvJtUDk/60 bnBFmw/gp0UQZzr+YsOM5QVR5ofD2vHEGr0jlcleSCDoIw5tRE8AXiNaFrfFALJCOexa oj8f+cK5jJuAAiR8QzEluHSv6ZGO16q/vJCPkZj+EKwC8vc8fQghKoJ8elOluazOaLnK QYXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pjAWnMGm; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="2MzixbH/"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b18-20020aa7c6d2000000b005233f1f0adcsi4222539eds.517.2023.08.09.13.56.06; Wed, 09 Aug 2023 13:56:30 -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=pjAWnMGm; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="2MzixbH/"; 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 S233380AbjHITMj (ORCPT + 99 others); Wed, 9 Aug 2023 15:12:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42194 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231851AbjHITMc (ORCPT ); Wed, 9 Aug 2023 15:12:32 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04DF526AF; Wed, 9 Aug 2023 12:12:21 -0700 (PDT) Date: Wed, 09 Aug 2023 19:12:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691608339; 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; bh=AL5tloo4gcCakXKY0xrTL05hpNQrhljrtfWZbb8Ohaw=; b=pjAWnMGmmzIKYDOFXAfOTT0R6KFbeKsHRQv8dGLEqmx45Hx5wUeKuNmu/Bb1UvlD/kdVYZ uGYsos75iVwr1AjNiFkMxY/djRpT6oCGPZukqyFJUGPaPthB43arWD43/4hVfVNQjAuBQ4 mF3NCpfPWfMsv3kErtsBM1HjJEsFY815DpU+3P3ik5wWzOOzwAk7+IyQH2Jto2/ZuNN1bj cogeEdAKm1tsRJgo8OfepxOPpcPZeC5xU7W+SXKN+LGBAE6/jmaLhZRfJCZXgsooJHHFrI y28q0D98IKrxFO9hxGc9t5YUgdajPiyfN0zlENEbbV8ZqT27oHbEDDIDe+yXDA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691608339; 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; bh=AL5tloo4gcCakXKY0xrTL05hpNQrhljrtfWZbb8Ohaw=; b=2MzixbH/R+vaZ03KkecjXHRX9IPUBPj40688lwDXl+yecMWsnOVtCf7G/OrCfgR5qZFRPb hH24vnJ49mH4wgBQ== 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/apic/32: Remove bigsmp_cpu_present_to_apicid() Cc: Thomas Gleixner , Dave Hansen , "Peter Zijlstra (Intel)" , Michael Kelley , Sohil Mehta , Juergen Gross , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <169160833914.27769.16527369886376883585.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1773773032923402539 X-GMAIL-MSGID: 1773786460312566483 The following commit has been merged into the x86/apic branch of tip: Commit-ID: 4114e1686fdc350e4191ca670710b3fa9bd10947 Gitweb: https://git.kernel.org/tip/4114e1686fdc350e4191ca670710b3fa9bd10947 Author: Thomas Gleixner AuthorDate: Tue, 08 Aug 2023 15:03:56 -07:00 Committer: Dave Hansen CommitterDate: Wed, 09 Aug 2023 11:58:25 -07:00 x86/apic/32: Remove bigsmp_cpu_present_to_apicid() It's a copy of default_cpu_present_to_apicid() with the omission of the actual check whether the CPU is present. This APIC callback should die completely, but the XEN APIC implementation does something different which needs to be addressed first. Signed-off-by: Thomas Gleixner Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) Tested-by: Michael Kelley Tested-by: Sohil Mehta Tested-by: Juergen Gross # Xen PV (dom0 and unpriv. guest) --- arch/x86/kernel/apic/bigsmp_32.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/x86/kernel/apic/bigsmp_32.c b/arch/x86/kernel/apic/bigsmp_32.c index a26cb46..aba8ce1 100644 --- a/arch/x86/kernel/apic/bigsmp_32.c +++ b/arch/x86/kernel/apic/bigsmp_32.c @@ -43,14 +43,6 @@ static void bigsmp_setup_apic_routing(void) nr_ioapics); } -static int bigsmp_cpu_present_to_apicid(int mps_cpu) -{ - if (mps_cpu < nr_cpu_ids) - return (int) per_cpu(x86_cpu_to_apicid, mps_cpu); - - return BAD_APICID; -} - static void bigsmp_ioapic_phys_id_map(physid_mask_t *phys_map, physid_mask_t *retmap) { /* For clustered we don't have a good way to do this yet - hack */ @@ -119,7 +111,7 @@ static struct apic apic_bigsmp __ro_after_init = { .init_apic_ldr = bigsmp_init_apic_ldr, .ioapic_phys_id_map = bigsmp_ioapic_phys_id_map, .setup_apic_routing = bigsmp_setup_apic_routing, - .cpu_present_to_apicid = bigsmp_cpu_present_to_apicid, + .cpu_present_to_apicid = default_cpu_present_to_apicid, .apicid_to_cpu_present = physid_set_mask_of_physid, .phys_pkg_id = bigsmp_phys_pkg_id,