<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/x86/kernel/smpboot.c, branch linux-6.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-06-10T11:17:08Z</updated>
<entry>
<title>Revert "x86/smp: Eliminate mwait_play_dead_cpuid_hint()"</title>
<updated>2025-06-10T11:17:08Z</updated>
<author>
<name>Rafael J. Wysocki</name>
</author>
<published>2025-05-29T13:40:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ca83fbe0b52f8643797e64ececbea41ffe5a9b94'/>
<id>urn:sha1:ca83fbe0b52f8643797e64ececbea41ffe5a9b94</id>
<content type='text'>
commit 70523f335734b0b42f97647556d331edf684c7dc upstream.

Revert commit 96040f7273e2 ("x86/smp: Eliminate mwait_play_dead_cpuid_hint()")
because it introduced a significant power regression on systems that
start with "nosmt" in the kernel command line.

Namely, on such systems, SMT siblings permanently go offline early,
when cpuidle has not been initialized yet, so after the above commit,
hlt_play_dead() is called for them.  Later on, when the processor
attempts to enter a deep package C-state, including PC10 which is
requisite for reaching minimum power in suspend-to-idle, it is not
able to do that because of the SMT siblings staying in C1 (which
they have been put into by HLT).

As a result, the idle power (including power in suspend-to-idle)
rises quite dramatically on those systems with all of the possible
consequences, which (needless to say) may not be expected by their
users.

This issue is hard to debug and potentially dangerous, so it needs to
be addressed as soon as possible in a way that will work for 6.15.y,
hence the revert.

Of course, after this revert, the issue that commit 96040f7273e2
attempted to address will be back and it will need to be fixed again
later.

Fixes: 96040f7273e2 ("x86/smp: Eliminate mwait_play_dead_cpuid_hint()")
Reported-by: Todd Brandt &lt;todd.e.brandt@linux.intel.com&gt;
Tested-by: Todd Brandt &lt;todd.e.brandt@linux.intel.com&gt;
Cc: 6.15+ &lt;stable@vger.kernel.org&gt; # 6.15+
Signed-off-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Acked-by: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Link: https://patch.msgid.link/12674167.O9o76ZdvQC@rjwysocki.net
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>x86/smpboot: Fix INIT delay assignment for extended Intel Families</title>
<updated>2025-03-19T10:19:50Z</updated>
<author>
<name>Sohil Mehta</name>
</author>
<published>2025-02-19T18:41:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7a2ad752746bfb13e89a83984ecc52a48bae4969'/>
<id>urn:sha1:7a2ad752746bfb13e89a83984ecc52a48bae4969</id>
<content type='text'>
Some old crusty CPUs need an extra delay that slows down booting. See
the comment above 'init_udelay' for details. Newer CPUs don't need the
delay.

Right now, for Intel, Family 6 and only Family 6 skips the delay. That
leaves out both the Family 15 (Pentium 4s) and brand new Family 18/19
models.

The omission of Family 15 (Pentium 4s) seems like an oversight and 18/19
do not need the delay.

Skip the delay on all Intel processors Family 6 and beyond.

Signed-off-by: Sohil Mehta &lt;sohil.mehta@intel.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20250219184133.816753-11-sohil.mehta@intel.com
</content>
</entry>
<entry>
<title>x86/smpboot: Remove confusing quirk usage in INIT delay</title>
<updated>2025-03-19T10:19:48Z</updated>
<author>
<name>Sohil Mehta</name>
</author>
<published>2025-02-19T18:41:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=58d1c1fd0319d00e83f58f2a195847e189e447ce'/>
<id>urn:sha1:58d1c1fd0319d00e83f58f2a195847e189e447ce</id>
<content type='text'>
Very old multiprocessor systems required a 10 msec delay between
asserting and de-asserting INIT but modern processors do not require
this delay.

Over time the usage of the "quirk" wording while setting the INIT delay
has become misleading. The code comments suggest that modern processors
need to be quirked, which clears the default init_udelay of 10 msec,
while legacy processors don't need the quirk and continue to use the
default init_udelay.

With a lot more modern processors, the wording should be inverted if at
all needed. Instead, simplify the comments and the code by getting rid
of "quirk" usage altogether and clarifying the following:

  - Old legacy processors -&gt; Set the "legacy" 10 msec delay
  - Modern processors     -&gt; Do not set any delay

No functional change.

Signed-off-by: Sohil Mehta &lt;sohil.mehta@intel.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Link: https://lore.kernel.org/r/20250219184133.816753-10-sohil.mehta@intel.com
</content>
</entry>
<entry>
<title>x86/percpu: Move current_task to percpu hot section</title>
<updated>2025-03-04T19:30:33Z</updated>
<author>
<name>Brian Gerst</name>
</author>
<published>2025-03-03T16:52:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a1e4cc0155ad577adc3a2c563fc5eec625945ce7'/>
<id>urn:sha1:a1e4cc0155ad577adc3a2c563fc5eec625945ce7</id>
<content type='text'>
No functional change.

Signed-off-by: Brian Gerst &lt;brgerst@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Acked-by: Uros Bizjak &lt;ubizjak@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20250303165246.2175811-10-brgerst@gmail.com
</content>
</entry>
<entry>
<title>x86/percpu: Move top_of_stack to percpu hot section</title>
<updated>2025-03-04T19:30:33Z</updated>
<author>
<name>Brian Gerst</name>
</author>
<published>2025-03-03T16:52:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=385f72c83eb609652f02dc9ee415520c23bda629'/>
<id>urn:sha1:385f72c83eb609652f02dc9ee415520c23bda629</id>
<content type='text'>
No functional change.

Signed-off-by: Brian Gerst &lt;brgerst@gmail.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Acked-by: Uros Bizjak &lt;ubizjak@gmail.com&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Cc: Peter Zijlstra &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20250303165246.2175811-9-brgerst@gmail.com
</content>
</entry>
<entry>
<title>Merge branch 'x86/asm' into x86/core, to pick up dependent commits</title>
<updated>2025-03-04T19:29:35Z</updated>
<author>
<name>Ingo Molnar</name>
</author>
<published>2025-03-04T10:23:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71c2ff150f34904f693c654ee8c55c996629abb7'/>
<id>urn:sha1:71c2ff150f34904f693c654ee8c55c996629abb7</id>
<content type='text'>
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
</content>
</entry>
<entry>
<title>x86/cpu: Get rid of the smp_store_cpu_info() indirection</title>
<updated>2025-03-04T10:17:33Z</updated>
<author>
<name>Thomas Gleixner</name>
</author>
<published>2025-03-04T08:51:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=535d9a82702ee75b0da6e4547f367beeeef184a3'/>
<id>urn:sha1:535d9a82702ee75b0da6e4547f367beeeef184a3</id>
<content type='text'>
smp_store_cpu_info() is just a wrapper around identify_secondary_cpu()
without further value.

Move the extra bits from smp_store_cpu_info() into identify_secondary_cpu()
and remove the wrapper.

[ darwi: Make it compile and fix up the xen/smp_pv.c instance ]

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Signed-off-by: Ahmed S. Darwish &lt;darwi@linutronix.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@kernel.org&gt;
Link: https://lore.kernel.org/r/20250304085152.51092-9-darwi@linutronix.de
</content>
</entry>
<entry>
<title>x86/boot: Mark start_secondary() with __noendbr</title>
<updated>2025-02-14T09:32:05Z</updated>
<author>
<name>Peter Zijlstra</name>
</author>
<published>2025-02-07T12:15:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=93f16a1ab78ca56e3cd997d1ea54c214774781ac'/>
<id>urn:sha1:93f16a1ab78ca56e3cd997d1ea54c214774781ac</id>
<content type='text'>
The handoff between the boot stubs and start_secondary() are before IBT is
enabled and is definitely not subject to kCFI. As such, suppress all that for
this function.

Notably when the ENDBR poison would become fatal (ud1 instead of nop) this will
trigger a tripple fault because we haven't set up the IDT to handle #UD yet.

Signed-off-by: Peter Zijlstra (Intel) &lt;peterz@infradead.org&gt;
Reviewed-by: Sami Tolvanen &lt;samitolvanen@google.com&gt;
Link: https://lore.kernel.org/r/20250207122546.509520369@infradead.org
</content>
</entry>
<entry>
<title>x86/smp: Eliminate mwait_play_dead_cpuid_hint()</title>
<updated>2025-02-05T18:44:52Z</updated>
<author>
<name>Patryk Wlazlyn</name>
</author>
<published>2025-02-05T15:52:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96040f7273e2bc0be1871ad9ed4da7b504da9410'/>
<id>urn:sha1:96040f7273e2bc0be1871ad9ed4da7b504da9410</id>
<content type='text'>
Currently, mwait_play_dead_cpuid_hint() looks up the MWAIT hint of the
deepest idle state by inspecting CPUID leaf 0x5 with the assumption
that, if the number of sub-states for a given major C-state is nonzero,
those sub-states are always represented by consecutive numbers starting
from 0. This assumption is not based on the documented platform behavior
and in fact it is not met on recent Intel platforms.

For example, Intel's Sierra Forest report two C-states with two
substates each in cpuid leaf 0x5:

  Name*   target cstate    target subcstate (mwait hint)
  ===========================================================
  C1      0x00             0x00
  C1E     0x00             0x01

  --      0x10             ----

  C6S     0x20             0x22
  C6P     0x20             0x23

  --      0x30             ----

  /* No more (sub)states all the way down to the end. */
  ===========================================================

   * Names of the cstates are not included in the CPUID leaf 0x5,
     they are taken from the product specific documentation.

Notice that hints 0x20 and 0x21 are not defined for C-state 0x20
(C6), so the existing MWAIT hint lookup in
mwait_play_dead_cpuid_hint() based on the CPUID leaf 0x5 contents does
not work in this case.

Instead of using MWAIT hint lookup that is not guaranteed to work,
make native_play_dead() rely on the idle driver for the given platform
to put CPUs going offline into appropriate idle state and, if that
fails, fall back to hlt_play_dead().

Accordingly, drop mwait_play_dead_cpuid_hint() altogether and make
native_play_dead() call cpuidle_play_dead() instead of it
unconditionally with the assumption that it will not return if it is
successful. Still, in case cpuidle_play_dead() fails, call
hlt_play_dead() at the end.

Signed-off-by: Patryk Wlazlyn &lt;patryk.wlazlyn@linux.intel.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://lore.kernel.org/all/20250205155211.329780-5-artem.bityutskiy%40linux.intel.com
</content>
</entry>
<entry>
<title>x86/smp: Allow calling mwait_play_dead with an arbitrary hint</title>
<updated>2025-02-05T18:44:52Z</updated>
<author>
<name>Patryk Wlazlyn</name>
</author>
<published>2025-02-05T15:52:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a7dd183f0b3848c056bbeed78ef5d5c52fe94d83'/>
<id>urn:sha1:a7dd183f0b3848c056bbeed78ef5d5c52fe94d83</id>
<content type='text'>
Introduce a helper function to allow offlined CPUs to enter idle states
with a specific MWAIT hint. The new helper will be used in subsequent
patches by the acpi_idle and intel_idle drivers.

No functional change intended.

Signed-off-by: Patryk Wlazlyn &lt;patryk.wlazlyn@linux.intel.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
Signed-off-by: Dave Hansen &lt;dave.hansen@linux.intel.com&gt;
Reviewed-by: Gautham R. Shenoy &lt;gautham.shenoy@amd.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael.j.wysocki@intel.com&gt;
Link: https://lore.kernel.org/all/20250205155211.329780-2-artem.bityutskiy%40linux.intel.com
</content>
</entry>
</feed>
