All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
	mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com,
	x86@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org,
	peterz@infradead.org, Jonathan.Cameron@huawei.com,
	linuxarm@huawei.com, linux@roeck-us.net
Subject: Re: [PATCH 1/2] x86/cpu/topology: don't write to immutable cpu_present_mask
Date: Tue, 9 Apr 2024 10:42:13 +0200	[thread overview]
Message-ID: <ZhT/ZTdRN+Gxfe8S@gmail.com> (raw)
In-Reply-To: <87ttkc6kwx.ffs@tglx>


* Thomas Gleixner <tglx@linutronix.de> wrote:

> On Sun, Apr 07 2024 at 18:26, Alexey Dobriyan wrote:
> > Workaround the following oops:
> >
> > 	topology_hotplug_apic
> > 	topo_set_cpuids
> > 		set_cpu_possible(cpu, true);
> > 		// write to __ro_after_init section after init
> 
> Duh, yes.
> 
> > adobriyan: I'm not sure what's going on, can it set unset bit here?
> > If not, then why does it repeat the job and set already set bits.
> >
> > Anyhow, let's not oops peoples' machines for now.
> 
> Adding a bandaid to paper over the non-understood real problem is
> definitely not a good plan. I take this patch as a bug report.
> 
> Proper fix below.

BTW., independently of the fix, warning about a too late set_cpu_possible() 
might still make sense - clearly it *can* be called too late by 
architecture init code :-)

It's not a performance-sensitive function in any case, so the extra 
debugging code might not hurt.

Thanks,

	Ingo

  reply	other threads:[~2024-04-09  8:42 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-07 15:26 [PATCH 1/2] x86/cpu/topology: don't write to immutable cpu_present_mask Alexey Dobriyan
2024-04-08 13:31 ` Thomas Gleixner
2024-04-09  8:42   ` Ingo Molnar [this message]
2024-04-09  9:24     ` Peter Zijlstra
2024-04-10 13:33   ` [tip: x86/alternatives] x86/topology: Don't update cpu_possible_map in topo_set_cpuids() tip-bot2 for Thomas Gleixner
2024-04-10 13:41   ` [tip: x86/urgent] " tip-bot2 for Thomas Gleixner

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=ZhT/ZTdRN+Gxfe8S@gmail.com \
    --to=mingo@kernel.org \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=adobriyan@gmail.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=linuxarm@huawei.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.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.