All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: x86@kernel.org, linux-kernel@vger.kernel.org,
	Andy Lutomirski <luto@kernel.org>,
	Brian Gerst <brgerst@gmail.com>,
	Denys Vlasenko <dvlasenk@redhat.com>,
	"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>,
	Nadav Amit <namit@vmware.com>
Subject: Re: [PATCH -tip v2] x86/percpu: Introduce const-qualified const_pcpu_hot
Date: Sat, 21 Oct 2023 17:00:24 +0200	[thread overview]
Message-ID: <ZTPniJs9/ep11F2I@gmail.com> (raw)
In-Reply-To: <20231021143739.843941-1-ubizjak@gmail.com>


* Uros Bizjak <ubizjak@gmail.com> wrote:

>  arch/x86/include/asm/current.h   | 7 +++++++
>  arch/x86/include/asm/percpu.h    | 6 +++---
>  arch/x86/include/asm/processor.h | 3 +++
>  arch/x86/kernel/cpu/common.c     | 1 +
>  arch/x86/kernel/vmlinux.lds.S    | 1 +
>  include/linux/compiler.h         | 2 +-
>  6 files changed, 16 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/x86/include/asm/current.h b/arch/x86/include/asm/current.h
> index a1168e7b69e5..0538d2436673 100644
> --- a/arch/x86/include/asm/current.h
> +++ b/arch/x86/include/asm/current.h
> @@ -36,8 +36,15 @@ 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);

The aliasing makes me a bit nervous. Could we at least prefix it a bit more 
prominently, like const__pcpu_hot? That way it's immediately obvious at all 
usage sites that it's "special".

Thanks,

	Ingo

  parent reply	other threads:[~2023-10-21 15:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-21 14:36 [PATCH -tip v2] x86/percpu: Introduce const-qualified const_pcpu_hot Uros Bizjak
2023-10-21 14:39 ` Nadav Amit
2023-10-21 15:00 ` Ingo Molnar [this message]
2023-10-21 15:11   ` Uros Bizjak
2023-10-23  9:29 ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZTPniJs9/ep11F2I@gmail.com \
    --to=mingo@kernel.org \
    --cc=brgerst@gmail.com \
    --cc=dvlasenk@redhat.com \
    --cc=hpa@zytor.com \
    --cc=jpoimboe@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=namit@vmware.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=ubizjak@gmail.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.