From patchwork Mon Aug 7 13:52:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 132088 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp1492854vqr; Mon, 7 Aug 2023 07:32:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH0InTPBUUb85tytnp/Jk7RWvbkwy3jCz9eqUx59BVzwk6cFq3arW2zqwah+Z0pNdJbb5XH X-Received: by 2002:a17:902:c20c:b0:1b8:adc:7c3d with SMTP id 12-20020a170902c20c00b001b80adc7c3dmr9440519pll.40.1691418724842; Mon, 07 Aug 2023 07:32:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691418724; cv=none; d=google.com; s=arc-20160816; b=0ooaONT24QbYnlOV6QmnLvuKSmPdTnkw8B42zokKGGIkGkqznEFFRcBQxCB9jKNvdl 38SeOEBinTr+v1OP6t8LoLbprS/3YAFCvgq5G1HAGhFTuxJ3/IYHuJ3D4cKNEtMx+5TP +TCYhU0F1Knm3T0mD5iRlM3rsXzF/ecizkMZz5GafdovIGANKb8MKYNZWZvlhyjkpzS1 qObIaZmLcAhouWZXpfZE8vKSFIWN8uOCVrCCY1cOwVYryESuZquDQXjECbXGPArPKsZm VaRs/ra8yoXQcnT/XoKy937ODnqBrxcinJxHO4E5yB/uAa9TKMxWf1EaVyrLvnZLTi4J Bkhg== 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=pV6oTjHlZpDv1EoB3lKno45EpFKoJahAlGz3jQzkcpE=; fh=/92WVKYrcN3rA268QXyKzVtm/UtxHeI2lnbU295XDiQ=; b=xL9Z3YbQkRRuByTCnDHyAVJa0IhohIv0Q33km+/akZUErEO4B0srRlRXafs6r9/cX8 IySlu17hNYnQTI2ogtLQXhHo8weMb6Q7Hv9mNmOUeA55DaLqqiz9qnk3aop0OZUkAEWt zf11U+t90z3QVnTBHJrxsqBqyoRE1PMdMPBmKLhna8FrFR99thppMb0yTnQ5AyM7S8sf G/N39673cTZcurdu3raivLitsQ1mPXu/HtZBBDK0SfxDa2rEr5Fi3UVCAKGixFla9e/o NsmnADxXB4TBOUIodxFpj7Pbsm6eh8z2GT1KvhIrMLgdih2J4cBcJLhtZPEd+gFietAK TGAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=RYJC16Qg; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z12-20020a1709027e8c00b001bb9533b968si5691215pla.408.2023.08.07.07.31.51; Mon, 07 Aug 2023 07:32:04 -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=RYJC16Qg; 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 S234525AbjHGNx0 (ORCPT + 99 others); Mon, 7 Aug 2023 09:53:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234523AbjHGNwy (ORCPT ); Mon, 7 Aug 2023 09:52:54 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A9E91730 for ; Mon, 7 Aug 2023 06:52:48 -0700 (PDT) Message-ID: <20230807135026.854491808@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691416366; 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=pV6oTjHlZpDv1EoB3lKno45EpFKoJahAlGz3jQzkcpE=; b=RYJC16Qg+xko8CIrW97uwJtJjai3Te5eCtMaVLupODScJPGvUnR9g3d/tsF2bK26F8xLZv DsvmHhb7jZotBd1Ex6My1pZS5HGwtDEMnshcdvLqytoswSc9MKgPm5u/cbqYZHVtjZ0T8T c5Zc3QI+2A/5Ris10Z4do2zkj9eoEhnzE5ILMccs2YTw5C+Us+E9g/nelH0X422odp0S+A u6cOn8A2caWEKxNQDoz0C0BKdddbHB+BDtHJlAE+Zf3V4JquWk9E2iEPIa813euSCpGUUy sXyiQr2ss8QE0xOjSxeoLmKF/EKt95qY+/W2yg10fQ/8vnTyZnHBzXMtr1PCIA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691416366; 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=pV6oTjHlZpDv1EoB3lKno45EpFKoJahAlGz3jQzkcpE=; b=cdkdbtDQ4oLgW4u1nsn3j+7DcH7Uq1oK/zJW4YGMKdupOouSKUb/OOOJ6F79VQVOJz+B/B F+DRsCqxathE/KCg== From: Thomas Gleixner To: LKML Cc: x86@kernel.org, Tom Lendacky , Andrew Cooper , Arjan van de Ven , Huang Rui , Juergen Gross , Dimitri Sivanich , Michael Kelley , Sohil Mehta , K Prateek Nayak , Kan Liang , Zhang Rui , "Paul E. McKenney" , Feng Tang , Andy Shevchenko Subject: [patch 08/53] x86/apic: Remove check_apicid_used() and ioapic_phys_id_map() References: <20230807130108.853357011@linutronix.de> MIME-Version: 1.0 Date: Mon, 7 Aug 2023 15:52:45 +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 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: 1773581080824970464 X-GMAIL-MSGID: 1773581080824970464 No more users. Signed-off-by: Thomas Gleixner --- arch/x86/include/asm/apic.h | 3 --- arch/x86/include/asm/mpspec.h | 6 ------ arch/x86/kernel/apic/apic_noop.c | 2 -- arch/x86/kernel/apic/bigsmp_32.c | 13 ------------- arch/x86/kernel/apic/probe_32.c | 2 -- arch/x86/kernel/apic/x2apic_cluster.c | 2 -- 6 files changed, 28 deletions(-) --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -292,9 +292,7 @@ struct apic { int (*acpi_madt_oem_check)(char *oem_id, char *oem_table_id); bool (*apic_id_registered)(void); - bool (*check_apicid_used)(physid_mask_t *map, u32 apicid); void (*init_apic_ldr)(void); - void (*ioapic_phys_id_map)(physid_mask_t *phys_map, physid_mask_t *retmap); u32 (*cpu_present_to_apicid)(int mps_cpu); u32 (*get_apic_id)(u32 id); @@ -527,7 +525,6 @@ extern int default_apic_id_valid(u32 api extern u32 apic_default_calc_apicid(unsigned int cpu); extern u32 apic_flat_calc_apicid(unsigned int cpu); -extern void default_ioapic_phys_id_map(physid_mask_t *phys_map, physid_mask_t *retmap); extern u32 default_cpu_present_to_apicid(int mps_cpu); #else /* CONFIG_X86_LOCAL_APIC */ --- a/arch/x86/include/asm/mpspec.h +++ b/arch/x86/include/asm/mpspec.h @@ -92,12 +92,6 @@ typedef struct physid_mask physid_mask_t #define physids_empty(map) \ bitmap_empty((map).mask, MAX_LOCAL_APIC) -static inline void physids_promote(unsigned long physids, physid_mask_t *map) -{ - physids_clear(*map); - map->mask[0] = physids; -} - static inline void physid_set_mask_of_physid(int physid, physid_mask_t *map) { physids_clear(*map); --- a/arch/x86/kernel/apic/apic_noop.c +++ b/arch/x86/kernel/apic/apic_noop.c @@ -51,8 +51,6 @@ struct apic apic_noop __ro_after_init = .disable_esr = 0, - .check_apicid_used = default_check_apicid_used, - .ioapic_phys_id_map = default_ioapic_phys_id_map, .cpu_present_to_apicid = default_cpu_present_to_apicid, .max_apic_id = 0xFE, --- a/arch/x86/kernel/apic/bigsmp_32.c +++ b/arch/x86/kernel/apic/bigsmp_32.c @@ -18,17 +18,6 @@ static u32 bigsmp_get_apic_id(u32 x) return (x >> 24) & 0xFF; } -static bool bigsmp_check_apicid_used(physid_mask_t *map, u32 apicid) -{ - return false; -} - -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 */ - physids_promote(0xFFL, retmap); -} - static void bigsmp_send_IPI_allbutself(int vector) { default_send_IPI_mask_allbutself_phys(cpu_online_mask, vector); @@ -80,8 +69,6 @@ static struct apic apic_bigsmp __ro_afte .disable_esr = 1, - .check_apicid_used = bigsmp_check_apicid_used, - .ioapic_phys_id_map = bigsmp_ioapic_phys_id_map, .cpu_present_to_apicid = default_cpu_present_to_apicid, .max_apic_id = 0xFE, --- a/arch/x86/kernel/apic/probe_32.c +++ b/arch/x86/kernel/apic/probe_32.c @@ -45,9 +45,7 @@ static struct apic apic_default __ro_aft .disable_esr = 0, - .check_apicid_used = default_check_apicid_used, .init_apic_ldr = default_init_apic_ldr, - .ioapic_phys_id_map = default_ioapic_phys_id_map, .cpu_present_to_apicid = default_cpu_present_to_apicid, .max_apic_id = 0xFE, --- a/arch/x86/kernel/apic/x2apic_cluster.c +++ b/arch/x86/kernel/apic/x2apic_cluster.c @@ -232,9 +232,7 @@ static struct apic apic_x2apic_cluster _ .disable_esr = 0, - .check_apicid_used = NULL, .init_apic_ldr = init_x2apic_ldr, - .ioapic_phys_id_map = NULL, .cpu_present_to_apicid = default_cpu_present_to_apicid, .max_apic_id = UINT_MAX,