linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.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>,
	Ingo Molnar <mingo@kernel.org>, "H . Peter Anvin" <hpa@zytor.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Josh Poimboeuf <jpoimboe@redhat.com>
Subject: Re: [PATCH -tip 1/3] x86/percpu: Fix "const_pcpu_hot" version generation failure
Date: Mon, 4 Dec 2023 07:19:26 +0900	[thread overview]
Message-ID: <CAHk-=wiS6nyWNjaTW_XL1ec3+-=tOszj+_sWGfPv9RG5WX5isQ@mail.gmail.com> (raw)
In-Reply-To: <20231203221151.794615-1-ubizjak@gmail.com>

On Mon, 4 Dec 2023 at 07:12, Uros Bizjak <ubizjak@gmail.com> wrote:
>
> +/*
> + * The generic per-cpu infrastrucutre is not suitable for
> + * reading const-qualified variables.
> + */
> +#define this_cpu_read_const(pcp)       ({ BUG(); (typeof(pcp))0; })

NAK. Absolutely not.

No way in hell is it acceptable to make this a run-time BUG. If it
doesn't work, it needs to be a compile failure. End of story.

                Linus

  parent reply	other threads:[~2023-12-03 22:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-03 22:10 [PATCH -tip 1/3] x86/percpu: Fix "const_pcpu_hot" version generation failure Uros Bizjak
2023-12-03 22:10 ` [PATCH -tip 2/3] x86/traps: Use current_top_of_stack() helper in traps.c Uros Bizjak
2023-12-03 22:10 ` [PATCH -tip 3/3] x86/percpu: Avoid sparse warning with cast to named address space Uros Bizjak
2023-12-03 22:19 ` Linus Torvalds [this message]
2023-12-03 22:49   ` [PATCH -tip 1/3] x86/percpu: Fix "const_pcpu_hot" version generation failure Uros Bizjak

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='CAHk-=wiS6nyWNjaTW_XL1ec3+-=tOszj+_sWGfPv9RG5WX5isQ@mail.gmail.com' \
    --to=torvalds@linux-foundation.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=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).