From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A1459C0015E for ; Tue, 1 Aug 2023 10:49:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233313AbjHAKtJ (ORCPT ); Tue, 1 Aug 2023 06:49:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234234AbjHAKsL (ORCPT ); Tue, 1 Aug 2023 06:48:11 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A75332113 for ; Tue, 1 Aug 2023 03:47:20 -0700 (PDT) Message-ID: <20230801103816.638137038@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1690886834; 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=XhABCxwHPGY7DF2UNzN4o5WpsX1JegdIqFCLm4OuXKU=; b=ZLJEXzsJtJYGRrxFytcloiCsPbo6DqPVeh8GFOjdTD/P9EvePOxkscKnA6aOO9mvH1unrL Y5NLH2mAfWlBpAGsoWlacrOyInhzSmDcL1G9jravJrzZ0G8HR0Vjhn1LNETu3HM3l/IeC2 zjHqfO8nUHHhMi/6zsEwlAQV9pYRncra/NONW2RwLgxCpbAjnqCn7seCryVh2nI5FwcqNY /HKORR4B6yTSpzikvN6OLlu8u768Kh9bCbD81+SmQGYRwb593+V81ERkdQWBhKkhExgTER btvfRgyPUP+nsKov9XAGpyWCBza8QlujwuGrJH6KUdQLgWxF5MYHjt0DsL6smw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1690886834; 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=XhABCxwHPGY7DF2UNzN4o5WpsX1JegdIqFCLm4OuXKU=; b=Up0KUSj8J7MVjxiRALiNOwtofePybPN5BfjmopOobB8WDGZKPQm8PksdLK/zwX1Yutw08L qE5gagXEVSw4clBg== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Andrew Cooper , Tom Lendacky , Paolo Bonzini , Wei Liu , Arjan van de Ven , Juergen Gross , Michael Kelley , Peter Keresztes Schmidt , "Peter Zijlstra (Intel)" Subject: [patch V3 27/60] x86/apic/32: Remove bigsmp_cpu_present_to_apicid() References: <20230801103042.936020332@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Tue, 1 Aug 2023 12:47:14 +0200 (CEST) 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 Acked-by: Peter Zijlstra (Intel) --- 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,