Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp6172076rwp; Mon, 17 Jul 2023 16:38:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlGsy4Z87SPpnB5NxW4ipy5WE8zqyp7yCINjobLmSe/yuiahyNbvjIArMVrH1w8XT76ZP71e X-Received: by 2002:a05:6a21:99a4:b0:133:bf18:ef7b with SMTP id ve36-20020a056a2199a400b00133bf18ef7bmr12792679pzb.24.1689637127765; Mon, 17 Jul 2023 16:38:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689637127; cv=none; d=google.com; s=arc-20160816; b=m1aFaAvrOuVJBFeMLxgSb8aVCW1HG5agC1+B2W+JF5GOf9N1YC0b1pyLQhDDcarhKL OxEEF7TDkLo22/xy5+Cte3NcgWby2c8szDmF/CHjnAYXQWSsmffjf5PZjQ41Pt5hMqKC HMjojPn0gYiJT8x/iyxWKrnt95Aikveo1EXxdbiu3XLOPpl/yofwayq1/4N5DuFjF4A+ sT62oUmmM+0dhN9UcisrV9to3wH7XZZNPK4XBBHEnNplSnv9pM1kKHNoCCFZIsF32k9a UchgeQ/mRDKWufe8R2VdDzu2yZUKn0TzLfhRybqMmkXKb6U9K2ccE8Rv5BK+UQMZC0e8 QENw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=EVZ3Nalwxs4PGlJG4O/zCaoIlP8Kdk3XpwGeUBcVZSg=; fh=MJzvnywV9/WrN/ASipmGkNx/7jKFHnq83nsgXe/obdc=; b=QijTb/dVd9qIj19Kxs+8XVV5PEBHtjspCBTlQNMQxEQh4G/Rb/VkWMmSkTm1z6Bwrz EwBGK4VqoF/q4Iuht0QD48gmzHOGdlAe8RGeEgp0Ps8VuZRffRGLSeXkWtQ2og17k0M0 sZhhGXRk40texfZtS3XSa5Hv4OWMAJVS2GEaj9dYysCf+NhRBhUHsjLWxZQHlu+KDZ4N TCMb4TIf4fbGgUBJPEld8soMoNISfAxJSu/lfS4QhXEpI9cK8zzcg6dTYawBI5GTvneW WKc8V9yC0/8zG42BDduH50X9pabS0KenJApig+svPda8M1068BUj+GhungPA+6A8QM7+ PVqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=0pf9RWB1; dkim=neutral (no key) header.i=@linutronix.de; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id cm23-20020a056a00339700b006821425440bsi536544pfb.279.2023.07.17.16.38.36; Mon, 17 Jul 2023 16:38:47 -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=0pf9RWB1; dkim=neutral (no key) header.i=@linutronix.de; 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 S231268AbjGQX1b (ORCPT + 99 others); Mon, 17 Jul 2023 19:27:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbjGQX1a (ORCPT ); Mon, 17 Jul 2023 19:27:30 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5643186 for ; Mon, 17 Jul 2023 16:26:44 -0700 (PDT) Message-ID: <20230717223224.623297513@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1689635715; 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=EVZ3Nalwxs4PGlJG4O/zCaoIlP8Kdk3XpwGeUBcVZSg=; b=0pf9RWB1fwKjGpEZA2bDmksipqXKofRhPUeloFtOb3VR7ML7OYdXyDCeKOdNSKBwOC43r4 Vwu+tTGK1yHwm0Mf61yxA7ejaUNV5eIJptgXC7sQx7N/Vw5YJYxssU94+dEccyMqX4e2Qm ztXccliUFlnCFAU+7Z8QFRMfrxUpqVvL24eFMXNoeVHYxRB7qgAPT0BU2v25/HIp0w369N XQs1N4losx/R/25jl8bWHGtcz2PR4NOnx532FpAE4Ib6YqNjqfFbtz2BdTPI9jYt2hvXQ8 gHf0DeWBbnPDqrtBzzhJ4iz017o91rICWKuOfLC50GPUxoczfKErrhcXaNC6qQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1689635715; 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=EVZ3Nalwxs4PGlJG4O/zCaoIlP8Kdk3XpwGeUBcVZSg=; b=cwwdVUeQvFPDl21od6SdWk2ZI0dFdarJO/au6C/T1qOTHKScqvO0XGiK/RN9uGLw0vRh4t cec6hDjXpELcFGAA== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Linus Torvalds , Andrew Cooper , Tom Lendacky , Paolo Bonzini , Wei Liu , Arjan van de Ven , Juergen Gross Subject: [patch 26/58] x86/apic/32: Remove bigsmp_cpu_present_to_apicid() References: <20230717223049.327865981@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Tue, 18 Jul 2023 01:15:14 +0200 (CEST) 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,T_SCC_BODY_TEXT_LINE 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 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 --- arch/x86/kernel/apic/bigsmp_32.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) --- 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(vo 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_afte .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,