From patchwork Wed Aug 9 19:12:20 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: 133472 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c44e:0:b0:3f2:4152:657d with SMTP id w14csp3041758vqr; Wed, 9 Aug 2023 13:03:25 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFsCE/ivBW3BS6Nyd6LU4bVmiPla/i+JW9MkQlB3j4ksAJxD1B+c1PmQHANTeQw6v26jx7c X-Received: by 2002:a17:907:6e88:b0:99c:2e3:cad7 with SMTP id sh8-20020a1709076e8800b0099c02e3cad7mr885454ejc.5.1691611404734; Wed, 09 Aug 2023 13:03:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691611404; cv=none; d=google.com; s=arc-20160816; b=IgVckfz1reroJJzegho2D0NNAxt0kyNHvUnkRANYTK0smRO6Q3wC1N46nzK+V4BVvM tr55FRCxlRgNtA5rT6gKQw05iS6a/BAXQH7doA7x1BuaOuEHbM51pBsE2lfThJYDMjGl EInh078CZVcU3BSFwxe9egSAVcSH0qQe08as2jmzx5rwvT8W1kvmZQBCnzwCtneFSaWc +IV0ZB+sLXp+rmVQOja9LdW2sWweJTzyETk/uHD/Win2vAEvsGq0CQ54yMK/BwXxSHxS Y4U+X94k6J7+W3lcgJTnL6c+tpLPh8RLr98h1ZfqFVIdJEalu46e8Vx3mrSS5fidoaS/ KGbg== 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=ePpxdb54UK1w0dW/aOACxgPueYpJk/5MQbAXokeoOik=; fh=jBwjuriIPWA1lnCf5oMMiNAPpgGE0iGPmBzZMsd85oQ=; b=yQ7sWgCp1bz2S1QpLb1a+6JaPBnXJZvbRjgtptDm9EoPYap1zWcZM7a2i/tMJHwKlC QGBl5QBGdhnT9IOeyRZZCepIezOSqg+15UhURm+tYcaljNoyCE0RlfiXlsUQQi2nbhJL UcOBkoxfx7HWLLfolX//QFz67f8ikP/+AYMkpkLOLYXz88UyIt4fPeXPHK+39eohQj+k TgAlOho2nf7Pt1kBoKZZS1GZowuNcWJv0jQjc3x9IUG8LbdDiuqLxOGWMR52MLzE8ur+ f1Q0T4UooZJYla6RGLMQERO7mdELzS3In3J7/0bAOsxBUU/LRHYPTymZ3ZgHIRDVTOtt wlxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=IpgwJJIZ; 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 r15-20020a1709067fcf00b00991f1a1c99csi9923271ejs.360.2023.08.09.13.02.29; Wed, 09 Aug 2023 13:03:24 -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=IpgwJJIZ; 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 S233482AbjHITM7 (ORCPT + 99 others); Wed, 9 Aug 2023 15:12:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232469AbjHITMe (ORCPT ); Wed, 9 Aug 2023 15:12:34 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 136D62718; Wed, 9 Aug 2023 12:12:25 -0700 (PDT) Date: Wed, 09 Aug 2023 19:12:20 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1691608340; 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=ePpxdb54UK1w0dW/aOACxgPueYpJk/5MQbAXokeoOik=; b=IpgwJJIZbEC5wSbbiRbn/KNdZhihTac2Yba+t5gaOwpJa4ZcN/ez/lri/i6wPfubh8kd+t qHKdiEOjQZcLDRNF9s7ArsKKvK0+5RnsQaleLPWNc07EnB+v2s3Jw5NErp7ViSZhn7HHiT dK2zt93RF0dpy0dIn3ekjOvhIx6sMK+l0mwTzqiQ4tNhccrvZKzwYVgFz2LrxLzcfnzwpX W9VlKFg3hQqxXQQEPxJkvTjFMFfNxUczuNEMsYg+3O/WUIHF4hX9z1CQAMlJaYmVXf4TBq 6qX5XZBgVSgU0ldUEhpD3erkcz38zr9geZxLnn1nPJ0vBNooawhgIYp26gn0HA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1691608340; 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=ePpxdb54UK1w0dW/aOACxgPueYpJk/5MQbAXokeoOik=; b=E5h8WbS6BmrP1KupnMEWHiruGuAewEsq1N4R9g15wU+3ovKy4xN8F6o+I/PBlqFPyK6Y5x 5xBqn42mhgU33pDA== 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)" , Michael Kelley , Sohil Mehta , Juergen Gross , x86@kernel.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Message-ID: <169160834035.27769.6808573188622126756.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: 1773776480580278035 X-GMAIL-MSGID: 1773783119866295272 The following commit has been merged into the x86/apic branch of tip: Commit-ID: e3243ed0142bb438bbd284c8c04f4c8e0c2ff498 Gitweb: https://git.kernel.org/tip/e3243ed0142bb438bbd284c8c04f4c8e0c2ff498 Author: Thomas Gleixner AuthorDate: Tue, 08 Aug 2023 15:03:54 -07:00 Committer: Dave Hansen CommitterDate: Wed, 09 Aug 2023 11:58:24 -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) Tested-by: Michael Kelley Tested-by: Sohil Mehta Tested-by: Juergen Gross # Xen PV (dom0 and unpriv. guest) --- 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;