<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/exceptions-64s.S, 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>2022-10-18T11:46:19Z</updated>
<entry>
<title>powerpc/64s/interrupt: Perf NMI should not take normal exit path</title>
<updated>2022-10-18T11:46:19Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2022-10-06T14:04:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dc398a084d459f065658855454e09f2778f8c5cc'/>
<id>urn:sha1:dc398a084d459f065658855454e09f2778f8c5cc</id>
<content type='text'>
NMI interrupts should exit with EXCEPTION_RESTORE_REGS not with
interrupt_return_srr, which is what the perf NMI handler currently does.
This breaks if a PMI hits after interrupt_exit_user_prepare_main() has
switched the context tracking to user mode, then the CT_WARN_ON() in
interrupt_exit_kernel_prepare() fires because it returns to kernel with
context set to user.

This could possibly be solved by soft-disabling PMIs in the exit path,
but that reduces our ability to profile that code. The warning could be
removed, but it's potentially useful.

All other NMIs and soft-NMIs return using EXCEPTION_RESTORE_REGS, so
this makes perf interrupts consistent with that and seems like the best
fix.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
[mpe: Squash in fixups from Nick]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20221006140413.126443-3-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/64s/interrupt: Fix stack frame regs marker</title>
<updated>2022-10-05T00:09:22Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2022-10-04T13:29:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b2e82e495a528eed77c15f3923c2b049a21d7280'/>
<id>urn:sha1:b2e82e495a528eed77c15f3923c2b049a21d7280</id>
<content type='text'>
The value of the stack frame regs marker that gets saved on the stack in
interrupt entry code does not match the regs marker value, which breaks
stack frame marker matching.

This stray instruction looks to have been introduced in a mismerge.

Fixes: bf75a3258a403 ("powerpc/64s/interrupt: move early boot ILE fixup into a macro")
Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
[mpe: Mismerge by yours truly -_-]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20221004132952.984341-1-npiggin@gmail.com
</content>
</entry>
<entry>
<title>powerpc/64s/interrupt: Change must-hard-mask interrupt check from BUG to WARN</title>
<updated>2022-10-04T12:16:20Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2022-10-04T05:11:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8154850b28bd57a35ea73a7518ffcb9ccd5e43bc'/>
<id>urn:sha1:8154850b28bd57a35ea73a7518ffcb9ccd5e43bc</id>
<content type='text'>
This new assertion added is generally harmless and gets fixed up
naturally, but it does indicate a problem with MSR manipulation
somewhere.

Fixes: c39fb71a54f0 ("powerpc/64s/interrupt: masked handler debug check for previous hard disable")
Reported-by: Sachin Sant &lt;sachinp@linux.ibm.com&gt;
Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Tested-by: Sachin Sant &lt;sachinp@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20221004051157.308999-1-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/64s: Remove lost/old comment</title>
<updated>2022-09-30T08:35:51Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2022-09-28T13:09:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c360996425e36945c10479e2bc6ad5992c57794'/>
<id>urn:sha1:0c360996425e36945c10479e2bc6ad5992c57794</id>
<content type='text'>
The bulk of this was moved/reworded in:
  57f266497d81 ("powerpc: Use gas sections for arranging exception vectors")

And now appears around line 700 in arch/powerpc/kernel/exceptions-64s.S.

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

</content>
</entry>
<entry>
<title>powerpc/64s: Remove old STAB comment</title>
<updated>2022-09-30T08:35:51Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2022-09-28T13:09:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=57a8e4b26eaa8f30aa8bc737255d192915a53023'/>
<id>urn:sha1:57a8e4b26eaa8f30aa8bc737255d192915a53023</id>
<content type='text'>
This used to be about the 0x4300 handler, but that was moved in commit
da2bc4644c75 ("powerpc/64s: Add new exception vector macros").

Note that "STAB" here refers to "Segment Table" not the debug format.

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

</content>
</entry>
<entry>
<title>powerpc/64s/interrupt: halt early boot interrupts if paca is not set up</title>
<updated>2022-09-28T09:22:13Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2022-09-26T05:56:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e1100cee059ad0bea6a668177e835baa087a0c65'/>
<id>urn:sha1:e1100cee059ad0bea6a668177e835baa087a0c65</id>
<content type='text'>
Ensure r13 is zero from very early in boot until it gets set to the
boot paca pointer. This allows early program and mce handlers to halt
if there is no valid paca, rather than potentially run off into the
weeds. This preserves register and memory contents for low level
debugging tools.

Nothing could be printed to console at this point in any case because
even udbg is only set up after the boot paca is set, so this shouldn't
be missed.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220926055620.2676869-6-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/64s: early boot machine check handler</title>
<updated>2022-09-28T09:22:13Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2022-09-26T05:56:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f5182cffa43f31c241131a2c10a4ecd8e90fb3e'/>
<id>urn:sha1:2f5182cffa43f31c241131a2c10a4ecd8e90fb3e</id>
<content type='text'>
Use the early boot interrupt fixup in the machine check handler to allow
the machine check handler to run before interrupt endian is set up.
Branch to an early boot handler that just does a basic crash, which
allows it to run before ppc_md is set up. MSR[ME] is enabled on the boot
CPU earlier, and the machine check stack is temporarily set to the
middle of the init task stack.

This allows machine checks (e.g., due to invalid data access in real
mode) to print something useful earlier in boot (as soon as udbg is set
up, if CONFIG_PPC_EARLY_DEBUG=y).

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220926055620.2676869-3-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/64s/interrupt: move early boot ILE fixup into a macro</title>
<updated>2022-09-28T09:22:12Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2022-09-26T05:56:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bf75a3258a40327b73c5b4458ae8102cfa921b40'/>
<id>urn:sha1:bf75a3258a40327b73c5b4458ae8102cfa921b40</id>
<content type='text'>
In preparation for using this sequence in machine check interrupt, move
it into a macro, with a small change to make it position independent.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220926055620.2676869-2-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/64: provide a helper macro to load r2 with the kernel TOC</title>
<updated>2022-09-28T09:22:12Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2022-09-26T03:40:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8e93fb33c84f68db20c0bc2821334a4c54c3e251'/>
<id>urn:sha1:8e93fb33c84f68db20c0bc2821334a4c54c3e251</id>
<content type='text'>
A later change stops the kernel using r2 and loads it with a poison
value.  Provide a PACATOC loading abstraction which can hide this
detail.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220926034057.2360083-5-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/64: use 32-bit immediate for STACK_FRAME_REGS_MARKER</title>
<updated>2022-09-28T09:22:12Z</updated>
<author>
<name>Nicholas Piggin</name>
</author>
<published>2022-09-26T03:40:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=17773afdcd1589c5925a984f512330410cb2ba4f'/>
<id>urn:sha1:17773afdcd1589c5925a984f512330410cb2ba4f</id>
<content type='text'>
Using a 32-bit constant for this marker allows it to be loaded with
two ALU instructions, like 32-bit. This avoids a TOC entry and a
TOC load that depends on the r2 value that has just been loaded from
the PACA.

This changes the value for 32-bit as well, so both have the same
value in the low 4 bytes and 64-bit has 0 in the top bytes.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20220926034057.2360083-2-npiggin@gmail.com

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