From patchwork Wed Aug 9 16:49:35 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: 133405 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp2988838vqr; Wed, 9 Aug 2023 11:17:52 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFPb0EeLeHB++JifWg9ZRxT7niTEdQKsKK8MsoQYLASv8SCP/YrX0hdYtNe/zkIAzi0Z+hW X-Received: by 2002:a17:906:5393:b0:99c:7915:b844 with SMTP id g19-20020a170906539300b0099c7915b844mr2737663ejo.57.1691605072619; Wed, 09 Aug 2023 11:17:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691605072; cv=none; d=google.com; s=arc-20160816; b=p6mo2ObVnuDxpAVC2I6qNDq1fYpO440Ci+fi6pyCihxdtcsa0UaR9cy6sVPQcTlpcl aTxIbZ0Qk2wKtQX8I/iVgTah5hPIM7jM5SdQBAkC3Ss2dWwnfU6DOKSJasvjhyFkWzlk OpE86Ki7KUNjlSTH6ZKdrNF7RQu85On8BAKHobxr2+OhdiIUCmw9xuotHhp2kjlCEZU/ Hm3v2LMigyROV6WZCh1f+D979/ggTEg64PyrBSljWqh/TIHPBjl5rZpWFFjH9E+BdL/t 1YFeLi1CkpRHJchZq5J7ky6Jwbl3mgPH0O7m5Pl41iBoEt18Adkn9GZXqoT8xiZBSIcX R9lA== 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=/GwX0rszb2x9MA2YppYcgNgbM4zFjweMap2+ZtzhiVw=; fh=xeBNGOuZM5vy4okdFvBNsMTGHQ6tdBlFPaNKCUScG5A=; b=y0OUUHuDlOOF1PYrshuPKwwlmC27bpiCMTVDN31bxMnpYjv4zg7Q1zWtrGxbtn+NTL SwcPLKsW9RH+4nsu/4atz8Fh9VHqNVcttQitu8nqdnq7GJExkqUhxdO3jQ+7+B2stVs2 oaAgzOBRjTwb+blWFE0tlb3gmIX/vZCnNHormNCcJxjgKlpbjquZVNWBgfxR6WstwAIl x6pFxi9IFqhxjacdnOcsCovNoZpnuHorSAIKiRMu8mM1FBdpyhQEMh3iaUIwn31GR2+U JrmmD34LcQYOuHOkWCcbiMj7r43uQs9e+QZFvbQB8zzhLTCYbXz95OK198zlOotrZDyA zsuw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=q1kdMC1b; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 gy18-20020a170906f25200b0099cd34c0f5esi5588974ejb.466.2023.08.09.11.17.28; Wed, 09 Aug 2023 11:17:52 -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=q1kdMC1b; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S231574AbjHIQuK (ORCPT + 99 others); Wed, 9 Aug 2023 12:50:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231430AbjHIQtl (ORCPT ); Wed, 9 Aug 2023 12:49:41 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DEC832100; Wed, 9 Aug 2023 09:49:37 -0700 (PDT) Date: Wed, 09 Aug 2023 16:49:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691599776; 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=/GwX0rszb2x9MA2YppYcgNgbM4zFjweMap2+ZtzhiVw=; b=q1kdMC1bTt66vt+IaBU968aO7ZDOvVO3xvKfzvSvzEZb2yREB9queDcih0MKbudAI62135 zug9vrGIlR3Ex0/zNBiDCEjCq98UD/kx3haHpzRu3UiF+IIG9VuIhk61kd6/6BU088fJCd w3Sdxl3l3uWYurCPyzDpR1FsBIqEYC21d3zSmuTmJQExeCR5ZvNwxtzSb+F/rZmNME6TpF fMG5vwPxJi1Wzl1y1glkN9dzqJi43KxuhZxprpYqF/uRl4K7S5R9CS95y79sOPok4B1q1R isTfJLK0DgowBIux9N99iH1YV9Ikh1o9XlA3RQooxIkt8GGRhcwPGBXPx6V56A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691599776; 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=/GwX0rszb2x9MA2YppYcgNgbM4zFjweMap2+ZtzhiVw=; b=K85Zuc6h4XJA920lkzTrjwFjcWRmc4osgDUxDBZvx7R1BIdqoXuE/3uUy0Z+Xg0wDbqpvV 3/0PcYcNjvi5DICw== 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: Mop up early_per_cpu() abuse Cc: Thomas Gleixner , Dave Hansen , "Peter Zijlstra (Intel)" , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <169159977585.27769.18374483975095792643.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,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: 1773776480580278035 X-GMAIL-MSGID: 1773776480580278035 The following commit has been merged into the x86/apic branch of tip: Commit-ID: 94f775bda55918705399d4e05e868a5cd40e14fe Gitweb: https://git.kernel.org/tip/94f775bda55918705399d4e05e868a5cd40e14fe Author: Thomas Gleixner AuthorDate: Tue, 08 Aug 2023 15:03:54 -07:00 Committer: Dave Hansen CommitterDate: Wed, 09 Aug 2023 08:10:11 -07:00 x86/apic: Mop up early_per_cpu() abuse UV X2APIC uses the per CPU variable from: native_smp_prepare_cpus() uv_system_init() uv_system_init_hub() which is long after the per CPU areas have been set up. Signed-off-by: Thomas Gleixner Signed-off-by: Dave Hansen Acked-by: Peter Zijlstra (Intel) --- arch/x86/kernel/apic/x2apic_uv_x.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 0d812fd..8b14451 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -1843,7 +1843,7 @@ static void __init uv_system_init_hub(void) /* Initialize per CPU info: */ for_each_possible_cpu(cpu) { - int apicid = early_per_cpu(x86_cpu_to_apicid, cpu); + int apicid = per_cpu(x86_cpu_to_apicid, cpu); unsigned short bid; unsigned short pnode;