All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Borislav Petkov <bp@alien8.de>
Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	x86@kernel.org
Subject: Re: [tip: x86/apic] smp: Provide 'setup_max_cpus' definition on UP too
Date: Tue, 27 Feb 2024 10:19:07 +0100	[thread overview]
Message-ID: <Zd2pCxSm0FKJ8DZn@gmail.com> (raw)
In-Reply-To: <20240226150234.GCZdyoCtNj8lFwViAW@fat_crate.local>


* Borislav Petkov <bp@alien8.de> wrote:

> On Mon, Feb 26, 2024 at 11:48:06AM -0000, tip-bot2 for Ingo Molnar wrote:
> > The following commit has been merged into the x86/apic branch of tip:
> > 
> > Commit-ID:     429bb0269058e2e1f4ab69a0d33d374933aa15b9
> > Gitweb:        https://git.kernel.org/tip/429bb0269058e2e1f4ab69a0d33d374933aa15b9
> > Author:        Ingo Molnar <mingo@kernel.org>
> > AuthorDate:    Mon, 26 Feb 2024 12:07:31 +01:00
> > Committer:     Ingo Molnar <mingo@kernel.org>
> > CommitterDate: Mon, 26 Feb 2024 12:13:40 +01:00
> > 
> > smp: Provide 'setup_max_cpus' definition on UP too
> > 
> > This was already defined locally by init/main.c, but let's make
> > it generic, as arch/x86/kernel/cpu/topology.c is going to make
> > use of it to have more uniform code.
> > 
> > [ Keep it a C variable, not a define, because there's
> >   some namespace overlap for the 'setup_max_cpus' token
> >   in existing function argument names. ]
> > 
> > Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
> > Cc: linux-kernel@vger.kernel.org
> > Signed-off-by: Ingo Molnar <mingo@kernel.org>
> > --
> > ---
> >  include/linux/smp.h | 2 ++
> >  init/main.c         | 1 -
> >  2 files changed, 2 insertions(+), 1 deletion(-)
> 
> That one needs some work:
> 
> $ grep setup_max_cpus 13-37-17-randconfig-x86_64-2517.log
> ...
> ./include/linux/smp.h:221:27: warning: ‘setup_max_cpus’ defined but not used [-Wunused-const-variable=]
> $ grep setup_max_cpus 13-37-17-randconfig-x86_64-2517.log  | wc -l
> 122
> 
> very noisy.

Yeah, a bit sad.

So I resolved this all with using #define and (first) fixing a namespace 
collision that broke with the #define:

  4c8a49854130 smp: Avoid 'setup_max_cpus' namespace collision/shadowing
  3c2f8859ae1c smp: Provide 'setup_max_cpus' definition on UP too
  6be4ec29685c x86/apic: Build the x86 topology enumeration functions on UP APIC builds too

Thanks,

	Ingo

  reply	other threads:[~2024-02-27  9:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-26 11:48 [tip: x86/apic] smp: Provide 'setup_max_cpus' definition on UP too tip-bot2 for Ingo Molnar
2024-02-26 15:02 ` Borislav Petkov
2024-02-27  9:19   ` Ingo Molnar [this message]
2024-02-26 18:19 ` Thomas Gleixner
  -- strict thread matches above, loose matches on Subject: below --
2024-02-27  9:17 tip-bot2 for 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=Zd2pCxSm0FKJ8DZn@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@alien8.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --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.