Message ID | 20231130162949.83518-1-ubizjak@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp513378vqy; Thu, 30 Nov 2023 08:30:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHfNmua7/pDEwMcUaRMnezrhiGO+7bnDqm+vNjO9Z6AvqMaTAiev7ybFjaMbHIKv6kfyMVH X-Received: by 2002:a17:903:1108:b0:1bc:edd:e891 with SMTP id n8-20020a170903110800b001bc0edde891mr38551650plh.1.1701361808711; Thu, 30 Nov 2023 08:30:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701361808; cv=none; d=google.com; s=arc-20160816; b=e+a03uCrXHWDFxYNRpQYtPLDCP8CVbVVEHzTAEYi1pgGT86bT8nRdqq0qTo2utwKDR VOy3ClPuFn/am+M/FFh9V+GvSsE6cZ2RYz+IVTFnRFmog1dyZhSMK1/9E9eR4TJAbPGq QOvzpTuCNlzOzGEF3iXA/S/sEx1lDkPe4ANU7Wu5uG8wUav1IxJlNJ660NCJm1bN2xkn 5jazsC9Wue83VAfG+rW4+56oyt55JNdEzCSDCKl9vfFABeF4nd8+3+ebjTTbgea/0K1o TzU2YvPHXLZirgQUww5sffqkGmsFV4HZvmFOiS9H29AM3H7jkGowkBLOTBuJPEzWClm4 HkPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=IhZ5jzARbi4JOU98K2pKX6kbTUpp01eflM49jLTsDrU=; fh=DF0+qiJsjJ4L6IMpN09tvInPmNxO4V9GXIkeWgJMfOw=; b=q2+FTal81gZw2yPAdS+7JaHMpEDAkJwPjHQypw+uR9LIawnsp1y+xQj02LrB57TJ+1 +GBXKT979Z7WbSzulFFlCdgd7JZ5ulTFCYTwIT6mkTm8ihyRLSZKUc8pove2ZMT7WXws yaEQbSf7TarVMr+O76GnVJc6zNs2NbeSUHxgy5wwCGliS5FNLc2JvG8xxTA/axVy0tp6 PMAQqz8sdfIlGTR66EBXrjRjsRqBT3k9TyoZqr09FoaPMVooi0dtYSU38XwrUsqGbM4e Fk3fLs4W2QwEOyPfQJjGlqQ95/neBYCWE0lICOP/OVHYKFsiFPA4PyPi9Ijh4l+8DnGH 4lLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hzv7rWRs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id y64-20020a636443000000b005b909e93e2dsi1607594pgb.522.2023.11.30.08.30.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 08:30:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hzv7rWRs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 1427582C9DA7; Thu, 30 Nov 2023 08:30:05 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231796AbjK3Q34 (ORCPT <rfc822;ruipengqi7@gmail.com> + 99 others); Thu, 30 Nov 2023 11:29:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231861AbjK3Q3y (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 30 Nov 2023 11:29:54 -0500 Received: from mail-lj1-x22f.google.com (mail-lj1-x22f.google.com [IPv6:2a00:1450:4864:20::22f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6A7C1B4 for <linux-kernel@vger.kernel.org>; Thu, 30 Nov 2023 08:30:00 -0800 (PST) Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2c9b9191722so15872171fa.1 for <linux-kernel@vger.kernel.org>; Thu, 30 Nov 2023 08:30:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1701361799; x=1701966599; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=IhZ5jzARbi4JOU98K2pKX6kbTUpp01eflM49jLTsDrU=; b=hzv7rWRsgzUQNIDdfYbRzxM7/XgKA1m1JPQdAtYmF01QtPJR4KzFQEzcO8n/FRoZrx UI0gmx6Wv9R4B3l4+AfHnJ4CrfAUIgTaDY9TME8NKQ4prnyo+LqBBfCl3+xTq7CY0gG0 iA2bfQ5JsfszYGKvNKSO3/76Dq7neMAnxIbW6v5k2jZtdFZX4WX0krccUtCOEYmG3T0q L2vCnZZc6S3GJR2CRXSFXWWP8PRWCWFiDfZlI3XVR8EK/9sbpvlLF+lk1O6aG96lj2m3 UX+dsN8D8pgjuBQ+8PVRZT5o0i2agU8ZwfHvlQr8QEhrUPwYd0Ssr2VC8C8h6bWwbRZp RVXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701361799; x=1701966599; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=IhZ5jzARbi4JOU98K2pKX6kbTUpp01eflM49jLTsDrU=; b=v9pITso9Q7b5Wo6Zj1lB4e9IFstEo3IAJ8YS1g204gEtCG9fqRA+ForBmVGKAbht3U omV26KqP2N/qLvQ6pdWsR5g62ir4iCaUC9wzpnWMRLw1CqBVzBS4kP1zDlerBR3AyIfA TAGDS3/JhFhHm6lRVzT2+HXhtBzWe++0zd2JudC77BlGd7ufEVad/E7k/Ln8r2GgqXFS TM/fYJgher2SFuNHPL1FKStZcl/B0A5za6UL5g+XgnL+J5up9JRyZbnx84woAeKyoRQ6 MKlaQJzuojJj0hVnvsiWYTCS/GsyeE5ZA5pZlE6gRXAQM93ObbXd5bWlpU7LChYB1qCz AmIQ== X-Gm-Message-State: AOJu0YzSOeo6ss36Xnp8aQCVgRHalCglijdvWEjuJlvEB0pQxpPMov95 VGt70Gvn9Qb2o4TgSbaABLs= X-Received: by 2002:a2e:870b:0:b0:2c9:b88c:e3a7 with SMTP id m11-20020a2e870b000000b002c9b88ce3a7mr36482lji.25.1701361798603; Thu, 30 Nov 2023 08:29:58 -0800 (PST) Received: from localhost.localdomain ([46.248.82.114]) by smtp.gmail.com with ESMTPSA id fa10-20020a05600c518a00b00405442edc69sm6164938wmb.14.2023.11.30.08.29.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 08:29:57 -0800 (PST) From: Uros Bizjak <ubizjak@gmail.com> To: x86@kernel.org, linux-kernel@vger.kernel.org Cc: Uros Bizjak <ubizjak@gmail.com>, kernel test robot <lkp@intel.com>, Andy Lutomirski <luto@kernel.org>, Brian Gerst <brgerst@gmail.com>, Denys Vlasenko <dvlasenk@redhat.com>, Ingo Molnar <mingo@kernel.org>, "H . Peter Anvin" <hpa@zytor.com>, Linus Torvalds <torvalds@linux-foundation.org>, Peter Zijlstra <peterz@infradead.org>, Thomas Gleixner <tglx@linutronix.de>, Josh Poimboeuf <jpoimboe@redhat.com> Subject: [PATCH] x86/percpu: Declare const_pcpu_hot as extern const variable Date: Thu, 30 Nov 2023 17:27:35 +0100 Message-ID: <20231130162949.83518-1-ubizjak@gmail.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 30 Nov 2023 08:30:05 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784007160096125836 X-GMAIL-MSGID: 1784007160096125836 |
Series |
x86/percpu: Declare const_pcpu_hot as extern const variable
|
|
Commit Message
Uros Bizjak
Nov. 30, 2023, 4:27 p.m. UTC
const_pcpu_hot is aliased by linker to pcpu_hot, so there is no need
to use DECLARE_PER_CPU_ALIGNED macro. Also, declare const_pcpu_hot
as extern to avoid allocating storage space for the aliased structure.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311302257.tSFtZnly-lkp@intel.com/
Fixes: ed2f752e0e0a ("x86/percpu: Introduce const-qualified const_pcpu_hot to micro-optimize code generation")
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
---
arch/x86/include/asm/current.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/current.h b/arch/x86/include/asm/current.h index 0538d2436673..9fbd7cb2dc86 100644 --- a/arch/x86/include/asm/current.h +++ b/arch/x86/include/asm/current.h @@ -37,8 +37,7 @@ static_assert(sizeof(struct pcpu_hot) == 64); DECLARE_PER_CPU_ALIGNED(struct pcpu_hot, pcpu_hot); /* const-qualified alias to pcpu_hot, aliased by linker. */ -DECLARE_PER_CPU_ALIGNED(const struct pcpu_hot __percpu_seg_override, - const_pcpu_hot); +extern const struct pcpu_hot __percpu_seg_override const_pcpu_hot; static __always_inline struct task_struct *get_current(void) {