<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/arch/powerpc/kernel/exceptions-64e.S, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/arch/powerpc/kernel/exceptions-64e.S?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/arch/powerpc/kernel/exceptions-64e.S?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2021-11-29T12:15:20Z</updated>
<entry>
<title>powerpc: flexible GPR range save/restore macros</title>
<updated>2021-11-29T12:15:20Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2021-10-22T06:13:22Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=aebd1fb45c622e9a2b06fb70665d084d3a8d6c78'/>
<id>urn:sha1:aebd1fb45c622e9a2b06fb70665d084d3a8d6c78</id>
<content type='text'>
Introduce macros that operate on a (start, end) range of GPRs, which
reduces lines of code and need to do mental arithmetic while reading the
code.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Reviewed-by: Segher Boessenkool &lt;segher@kernel.crashing.org&gt;
Reviewed-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20211022061322.2671178-1-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/64e: Get dear offset with _DEAR macro</title>
<updated>2021-08-26T11:21:07Z</updated>
<author>
<name>Xiongwei Song</name>
<email>sxwjean@gmail.com</email>
</author>
<published>2021-08-07T01:02:39Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d9db6e420268b2d561731468a31f0b15e2e9a145'/>
<id>urn:sha1:d9db6e420268b2d561731468a31f0b15e2e9a145</id>
<content type='text'>
Use _DEAR to get the offset of dear register in pr_regs for 64e cpus.

Signed-off-by: Xiongwei Song &lt;sxwjean@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20210807010239.416055-5-sxwjean@me.com

</content>
</entry>
<entry>
<title>powerpc/64e: Get esr offset with _ESR macro</title>
<updated>2021-08-26T11:21:07Z</updated>
<author>
<name>Xiongwei Song</name>
<email>sxwjean@gmail.com</email>
</author>
<published>2021-08-07T01:02:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=cfa47772ca8d53d7a6c9b331a7f6e7c4c9827214'/>
<id>urn:sha1:cfa47772ca8d53d7a6c9b331a7f6e7c4c9827214</id>
<content type='text'>
Use _ESR to get the offset of esr register in pr_regs for 64e cpus.

Signed-off-by: Xiongwei Song &lt;sxwjean@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20210807010239.416055-3-sxwjean@me.com

</content>
</entry>
<entry>
<title>powerpc/booke: Avoid link stack corruption in several places</title>
<updated>2021-08-25T03:35:47Z</updated>
<author>
<name>Christophe Leroy</name>
<email>christophe.leroy@csgroup.eu</email>
</author>
<published>2021-08-24T07:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f5007dbf4da729baa850b33a64dc3cc53757bdf8'/>
<id>urn:sha1:f5007dbf4da729baa850b33a64dc3cc53757bdf8</id>
<content type='text'>
Use bcl 20,31,+4 instead of bl in order to preserve link stack.

See commit c974809a26a1 ("powerpc/vdso: Avoid link stack corruption
in __get_datapage()") for details.

Signed-off-by: Christophe Leroy &lt;christophe.leroy@csgroup.eu&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/e9fbc285eceb720e6c0e032ef47fe8b05f669b48.1629791751.git.christophe.leroy@csgroup.eu

</content>
</entry>
<entry>
<title>powerpc/64e: remove implicit soft-masking and interrupt exit restart logic</title>
<updated>2021-06-30T12:21:20Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2021-06-30T07:46:15Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9b69d48c7516a29cdaacd18d8bf5f575014a42a1'/>
<id>urn:sha1:9b69d48c7516a29cdaacd18d8bf5f575014a42a1</id>
<content type='text'>
The implicit soft-masking to speed up interrupt return was going to be
used by 64e as well, but it has not been extensively tested on that
platform and is not considered ready. It was intended to be disabled
before merge. Disable it for now.

Most of the restart code is common with 64s, so with more correctness
and performance testing this could be re-enabled again by adding the
extra soft-mask checks to interrupt handlers and flipping
exit_must_hard_disable().

Fixes: 9d1988ca87dd ("powerpc/64: treat low kernel text as irqs soft-masked")
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/20210630074621.2109197-4-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/64e: fix CONFIG_RELOCATABLE build warnings</title>
<updated>2021-06-30T12:21:19Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2021-06-30T07:46:14Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=fce01acf830a697110ed72ecace4b0afdbcd53cb'/>
<id>urn:sha1:fce01acf830a697110ed72ecace4b0afdbcd53cb</id>
<content type='text'>
CONFIG_RELOCATABLE=y causes build warnings from unresolved relocations.
Fix these by using TOC addressing for these cases.

Commit 24d33ac5b8ff ("powerpc/64s: Make prom_init require RELOCATABLE")
caused some 64e configs to select RELOCATABLE resulting in these
warnings, but the underlying issue was already there.

This passes basic qemu testing.

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/20210630074621.2109197-3-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/64: treat low kernel text as irqs soft-masked</title>
<updated>2021-06-24T14:06:56Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2021-06-17T15:51:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9d1988ca87dd90ecf80a0601c7fd13071fbb1a83'/>
<id>urn:sha1:9d1988ca87dd90ecf80a0601c7fd13071fbb1a83</id>
<content type='text'>
Treat code below __end_soft_masked as soft-masked for the purpose
of alternate return. 64s already mostly does this for scv entry.

This will be used to exit from interrupts without disabling MSR[EE].

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/20210617155116.2167984-12-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/64: allow alternate return locations for soft-masked interrupts</title>
<updated>2021-06-24T14:06:56Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2021-06-17T15:51:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f23699c93becd746295aaa506537882a46a62219'/>
<id>urn:sha1:f23699c93becd746295aaa506537882a46a62219</id>
<content type='text'>
The exception table fixup adjusts a failed page fault's interrupt return
location if it was taken at an address specified in the exception table,
to a corresponding fixup handler address.

Introduce a variation of that idea which adds a fixup table for NMIs and
soft-masked asynchronous interrupts. This will be used to protect
certain critical sections that are sensitive to being clobbered by
interrupts coming in (due to using the same SPRs and/or irq soft-mask
state).

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/20210617155116.2167984-10-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/64s: introduce different functions to return from SRR vs HSRR interrupts</title>
<updated>2021-06-24T14:06:55Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2021-06-17T15:51:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=1df7d5e4baeac74d14c1bee18b2dff9302b3efbc'/>
<id>urn:sha1:1df7d5e4baeac74d14c1bee18b2dff9302b3efbc</id>
<content type='text'>
This makes no real difference yet except that HSRR type interrupts will
use hrfid to return. This is important for the next patch.

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/20210617155116.2167984-4-npiggin@gmail.com

</content>
</entry>
<entry>
<title>powerpc/64e/interrupt: Fix nvgprs being clobbered</title>
<updated>2021-05-14T07:28:54Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2021-05-14T04:40:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c6ac667b07996929835b512de0e9a988977e6abc'/>
<id>urn:sha1:c6ac667b07996929835b512de0e9a988977e6abc</id>
<content type='text'>
Some interrupt handlers have an "extra" that saves 1 or 2
registers (r14, r15) in the paca save area and makes them available to
use by the handler.

The change to always save nvgprs in exception handlers lead to some
interrupt handlers saving those scratch r14 / r15 registers into the
interrupt frame's GPR saves, which get restored on interrupt exit.

Fix this by always reloading those scratch registers from paca before
the EXCEPTION_COMMON that saves nvgprs.

Fixes: 4228b2c3d20e ("powerpc/64e/interrupt: always save nvgprs on interrupt")
Reported-by: Christian Zigotzky &lt;chzigotzky@xenosoft.de&gt;
Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Tested-by: Christian Zigotzky &lt;chzigotzky@xenosoft.de&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/20210514044008.1955783-1-npiggin@gmail.com

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