<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/prom.c, branch linux-6.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-08-03T06:49:20Z</updated>
<entry>
<title>powerpc/prom: Add CPU info to hardware description string later</title>
<updated>2024-08-03T06:49:20Z</updated>
<author>
<name>Nathan Lynch</name>
</author>
<published>2024-06-03T12:36:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77c182c6ab5447fa048511b2cb03cbea2fa6f493'/>
<id>urn:sha1:77c182c6ab5447fa048511b2cb03cbea2fa6f493</id>
<content type='text'>
[ Upstream commit 7bdd1c6c87de758750d419eedab7285b95b66417 ]

cur_cpu_spec-&gt;cpu_name is appended to ppc_hw_desc before cur_cpu_spec
has taken on its final value. This is illustrated on pseries by
comparing the CPU name as reported at boot ("POWER8E (raw)") to the
contents of /proc/cpuinfo ("POWER8 (architected)"):

  $ dmesg | grep Hardware
  Hardware name: IBM,8408-E8E POWER8E (raw) 0x4b0201 0xf000004 \
    of:IBM,FW860.50 (SV860_146) hv:phyp pSeries

  $ grep -m 1 ^cpu /proc/cpuinfo
  cpu             : POWER8 (architected), altivec supported

Some 44x models would appear to be affected as well; see
identical_pvr_fixup().

This results in incorrect CPU information in stack dumps --
ppc_hw_desc is an input to dump_stack_set_arch_desc().

Delay gathering the CPU name until after all potential calls to
identify_cpu().

Signed-off-by: Nathan Lynch &lt;nathanl@linux.ibm.com&gt;
Fixes: bd649d40e0f2 ("powerpc: Add PVR &amp; CPU name to hardware description")
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20240603-fix-cpu-hwdesc-v1-1-945f2850fcaa@linux.ibm.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/smp: Increase nr_cpu_ids to include the boot CPU</title>
<updated>2024-04-03T13:19:26Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2024-02-14T13:14:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=605ddb3a6e5f2ba5c55b73e62dc2e6f2c127eee4'/>
<id>urn:sha1:605ddb3a6e5f2ba5c55b73e62dc2e6f2c127eee4</id>
<content type='text'>
[ Upstream commit 777f81f0a9c780a6443bcf2c7785f0cc2e87c1ef ]

If nr_cpu_ids is too low to include the boot CPU adjust nr_cpu_ids
upward. Otherwise the kernel will BUG when trying to allocate a paca
for the boot CPU and fail to boot.

Cc: stable@vger.kernel.org
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20231229120107.2281153-2-mpe@ellerman.id.au
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/smp: Adjust nr_cpu_ids to cover all threads of a core</title>
<updated>2024-04-03T13:19:26Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2024-02-14T13:14:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=334fb14389b500a6dbf4e70ab2c3dabdddaa1d70'/>
<id>urn:sha1:334fb14389b500a6dbf4e70ab2c3dabdddaa1d70</id>
<content type='text'>
[ Upstream commit 5580e96dad5a439d561d9648ffcbccb739c2a120 ]

If nr_cpu_ids is too low to include at least all the threads of a single
core adjust nr_cpu_ids upwards. This avoids triggering odd bugs in code
that assumes all threads of a core are available.

Cc: stable@vger.kernel.org
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://msgid.link/20231229120107.2281153-1-mpe@ellerman.id.au
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/64: Move paca allocation to early_setup()</title>
<updated>2023-03-17T07:50:31Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2022-12-16T11:59:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=07a5f4e69761e851cf4397cbb2db1228b18b8f83'/>
<id>urn:sha1:07a5f4e69761e851cf4397cbb2db1228b18b8f83</id>
<content type='text'>
[ Upstream commit dc222fa7737212fe0da513e5b8937c156d02225d ]

The early paca and boot cpuid dance is complicated and currently does
not quite work as expected for boot cpuid != 0 cases.

early_init_devtree() currently allocates the paca_ptrs and boot cpuid
paca, but until that returns and early_setup() calls setup_paca(), this
thread is currently still executing with smp_processor_id() == 0.

One problem this causes is the paca_ptrs[smp_processor_id()] pointer is
poisoned, so valid_emergency_stack() (any backtrace) and any similar
users will crash.

Another is that the hardware id which is set here will not be returned
by get_hard_smp_processor_id(smp_processor_id()), but it would work
correctly for boot_cpuid == 0, which could lead to difficult to
reproduce or find bugs. The hard id does not seem to be used by the rest
of early_init_devtree(), it just looks like all this code might have
been put here to allocate somewhere to store boot CPU hardware id while
scanning the devtree.

Rearrange things so the hwid is put in a global variable like
boot_cpuid, and do all the paca allocation and boot paca setup in the
64-bit early_setup() after we have everything ready to go.

The paca_ptrs[0] re-poisoning code in early_setup does not seem to have
ever worked, because paca_ptrs[0] was never not-poisoned when boot_cpuid
is not 0.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
[mpe: Fix build error on 32-bit]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20221216115930.2667772-4-npiggin@gmail.com
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc: Add device-tree model to the hardware description</title>
<updated>2022-09-30T08:35:53Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2022-09-30T08:27:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=541229707970ff2ad3f7705b1dbd025d7cc9bc48'/>
<id>urn:sha1:541229707970ff2ad3f7705b1dbd025d7cc9bc48</id>
<content type='text'>
Add the model of the machine we're on to the hardware description, which
is printed at boot and in case of an oops.

eg: Hardware name: IBM,8247-22L

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220930082709.55830-4-mpe@ellerman.id.au

</content>
</entry>
<entry>
<title>powerpc/64: Add logical PVR to the hardware description</title>
<updated>2022-09-30T08:35:53Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2022-09-30T08:27:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=48b7019b6abd029d3800620bb53f0ae3ca052441'/>
<id>urn:sha1:48b7019b6abd029d3800620bb53f0ae3ca052441</id>
<content type='text'>
If we detect a logical PVR add that to the hardware description, which
is printed at boot and in case of an oops.

eg: Hardware name: ... 0xf000004

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220930082709.55830-3-mpe@ellerman.id.au

</content>
</entry>
<entry>
<title>powerpc: Add PVR &amp; CPU name to hardware description</title>
<updated>2022-09-30T08:35:52Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2022-09-30T08:27:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bd649d40e0f2ffa1e16b4dbb93dc627177410e78'/>
<id>urn:sha1:bd649d40e0f2ffa1e16b4dbb93dc627177410e78</id>
<content type='text'>
Add the PVR and CPU name to the hardware description, which is printed
at boot and in case of an oops.

eg: Hardware name: ... POWER8E (raw) 0x4b0201

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220930082709.55830-2-mpe@ellerman.id.au

</content>
</entry>
<entry>
<title>powerpc: Ignore DSI error caused by the copy/paste instruction</title>
<updated>2022-09-28T12:52:32Z</updated>
<author>
<name>Haren Myneni</name>
</author>
<published>2022-09-28T01:29:27Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=335e1a91042764629fbbcd8c7e40379fa3762d35'/>
<id>urn:sha1:335e1a91042764629fbbcd8c7e40379fa3762d35</id>
<content type='text'>
The data storage interrupt (DSI) error will be generated when the
paste operation is issued on the suspended Nest Accelerator (NX)
window due to NX state changes. The hypervisor expects the
partition to ignore this error during page fault handling.
To differentiate DSI caused by an actual HW configuration or by
the NX window, a new “ibm,pi-features” type value is defined.
Byte 0, bit 3 of pi-attribute-specifier-type is now defined to
indicate this DSI error. If this error is not ignored, the user
space can get SIGBUS when the NX request is issued.

This patch adds changes to read ibm,pi-features property and ignore
DSI error during page fault handling if MMU_FTR_NX_DSI is defined.

Signed-off-by: Haren Myneni &lt;haren@linux.ibm.com&gt;
[mpe: Mention PAPR version in comment]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/b9cd844b85eb8f70459109ce1b14e44c4cc85fa7.camel@linux.ibm.com
</content>
</entry>
<entry>
<title>powerpc/64: Init jump labels before parse_early_param()</title>
<updated>2022-08-01T12:21:19Z</updated>
<author>
<name>Zhouyi Zhou</name>
</author>
<published>2022-07-26T01:57:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ca829e05d3d4f728810cc5e4b468d9ebc7745eb3'/>
<id>urn:sha1:ca829e05d3d4f728810cc5e4b468d9ebc7745eb3</id>
<content type='text'>
On 64-bit, calling jump_label_init() in setup_feature_keys() is too
late because static keys may be used in subroutines of
parse_early_param() which is again subroutine of early_init_devtree().

For example booting with "threadirqs":

  static_key_enable_cpuslocked(): static key '0xc000000002953260' used before call to jump_label_init()
  WARNING: CPU: 0 PID: 0 at kernel/jump_label.c:166 static_key_enable_cpuslocked+0xfc/0x120
  ...
  NIP static_key_enable_cpuslocked+0xfc/0x120
  LR  static_key_enable_cpuslocked+0xf8/0x120
  Call Trace:
    static_key_enable_cpuslocked+0xf8/0x120 (unreliable)
    static_key_enable+0x30/0x50
    setup_forced_irqthreads+0x28/0x40
    do_early_param+0xa0/0x108
    parse_args+0x290/0x4e0
    parse_early_options+0x48/0x5c
    parse_early_param+0x58/0x84
    early_init_devtree+0xd4/0x518
    early_setup+0xb4/0x214

So call jump_label_init() just before parse_early_param() in
early_init_devtree().

Suggested-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Zhouyi Zhou &lt;zhouzhouyi@gmail.com&gt;
[mpe: Add call trace to change log and minor wording edits.]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220726015747.11754-1-zhouzhouyi@gmail.com

</content>
</entry>
<entry>
<title>powerpc: Remove asm/prom.h from asm/mpc52xx.h and asm/pci.h</title>
<updated>2022-07-28T06:22:12Z</updated>
<author>
<name>Christophe Leroy</name>
</author>
<published>2022-07-08T07:11:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4d5c5bad51935482437528f7fa4dffdcb3330d8b'/>
<id>urn:sha1:4d5c5bad51935482437528f7fa4dffdcb3330d8b</id>
<content type='text'>
asm/pci.h and asm/mpc52xx.h don't need asm/prom.h

Declare struct device_node locally to avoid including of.h

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
[mpe: Add missing include of prom.h to of_rtc.c]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/cf5243343e2364c2b40f22ee5ad9a6e2453d1121.1657264228.git.christophe.leroy@csgroup.eu

</content>
</entry>
</feed>
