<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/arch/powerpc/kernel/exceptions-64s.S, branch v5.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.3</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-07-17T09:57:51Z</updated>
<entry>
<title>docs: powerpc: convert docs to ReST and rename to *.rst</title>
<updated>2019-07-17T09:57:51Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
<email>mchehab+samsung@kernel.org</email>
</author>
<published>2019-04-10T11:32:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d2e26a38fbcde2ba14882cbdb845caa1c17e19b'/>
<id>urn:sha1:4d2e26a38fbcde2ba14882cbdb845caa1c17e19b</id>
<content type='text'>
Convert docs to ReST and add them to the arch-specific
book.

The conversion here was trivial, as almost every file there
was already using an elegant format close to ReST standard.

The changes were mostly to mark literal blocks and add a few
missing section title identifiers.

One note with regards to "--": on Sphinx, this can't be used
to identify a list, as it will format it badly. This can be
used, however, to identify a long hyphen - and "---" is an
even longer one.

At its new index.rst, let's add a :orphan: while this is not linked to
the main index.rst file, in order to avoid build warnings.

Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
Acked-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt; # cxl
</content>
</entry>
<entry>
<title>powerpc/64s/exception: simplify hmi control flow</title>
<updated>2019-07-03T05:19:35Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2019-06-28T06:33:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=293c2e27b999e431ad5f9df3386bea37b18fce53'/>
<id>urn:sha1:293c2e27b999e431ad5f9df3386bea37b18fce53</id>
<content type='text'>
Branch to the relocated 0xc000 address early (still in real mode), to
simplify subsequent branches. Have the virt mode handler avoid just
'windup' and redo the exception from scratch, rather than branching
back to the trampoline.

Rearrange the stack setup instruction location to match the system
reset handler (e.g., right before EXCEPTION_PROLOG_COMMON).

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64s/exception: hmi remove special case macro</title>
<updated>2019-07-03T05:19:35Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2019-06-28T06:33:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f34c9675ca594bea6f813872a470e1b8b077d454'/>
<id>urn:sha1:f34c9675ca594bea6f813872a470e1b8b077d454</id>
<content type='text'>
No code change.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64s/exception: sreset move trampoline ahead of common code</title>
<updated>2019-07-03T05:19:35Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2019-06-28T06:33:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=acc8da4492ef9b9d60bbdf5f857ead9e84031b5c'/>
<id>urn:sha1:acc8da4492ef9b9d60bbdf5f857ead9e84031b5c</id>
<content type='text'>
Follow convention and move tramp ahead of common.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64s/exception: optimise system_reset for idle, clean up non-idle case</title>
<updated>2019-07-03T05:18:46Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2019-06-28T06:33:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0e10be2bb9cf1f552f5d64bfe786926bba9d11d2'/>
<id>urn:sha1:0e10be2bb9cf1f552f5d64bfe786926bba9d11d2</id>
<content type='text'>
The idle wake up code in the system reset interrupt is not very
optimal. There are two requirements: perform idle wake up quickly;
and save everything including CFAR for non-idle interrupts, with
no performance requirement.

The problem with placing the idle test in the middle of the handler
and using the normal handler code to save CFAR, is that it's quite
costly (e.g., mfcfar is serialising, speculative workarounds get
applied, SRR1 has to be reloaded, etc). It also prevents the standard
interrupt handler boilerplate being used.

This pain can be avoided by using a dedicated idle interrupt handler
at the start of the interrupt handler, which restores all registers
back to the way they were in case it was not an idle wake up. CFAR
is preserved without saving it before the non-idle case by making that
the fall-through, and idle is a taken branch.

Performance seems to be in the noise, but possibly around 0.5% faster,
the executed instructions certainly look better. The bigger benefit is
being able to drop in standard interrupt handlers after the idle code,
which helps with subsequent cleanup and consolidation.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
[mpe: Fixup BE by using DOTSYM for idle_return_gpr_loss call]
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64s/exception: remove bad stack branch</title>
<updated>2019-07-02T11:39:49Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2019-06-28T06:33:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0a882e28468f48ab3d9a36dde0a5723ea29ed1ed'/>
<id>urn:sha1:0a882e28468f48ab3d9a36dde0a5723ea29ed1ed</id>
<content type='text'>
The bad stack test in interrupt handlers has a few problems. For
performance it is taken in the common case, which is a fetch bubble
and a waste of i-cache.

For code development and maintainence, it requires yet another stack
frame setup routine, and that constrains all exception handlers to
follow the same register save pattern which inhibits future
optimisation.

Remove the test/branch and replace it with a trap. Teach the program
check handler to use the emergency stack for this case.

This does not result in quite so nice a message, however the SRR0 and
SRR1 of the crashed interrupt can be seen in r11 and r12, as is the
original r1 (adjusted by INT_FRAME_SIZE). These are the most important
parts to debugging the issue.

The original r9-12 and cr0 is lost, which is the main downside.

  kernel BUG at linux/arch/powerpc/kernel/exceptions-64s.S:847!
  Oops: Exception in kernel mode, sig: 5 [#1]
  BE SMP NR_CPUS=2048 NUMA PowerNV
  Modules linked in:
  CPU: 0 PID: 1 Comm: swapper/0 Not tainted
  NIP:  c000000000009108 LR: c000000000cadbcc CTR: c0000000000090f0
  REGS: c0000000fffcbd70 TRAP: 0700   Not tainted
  MSR:  9000000000021032 &lt;SF,HV,ME,IR,DR,RI&gt;  CR: 28222448  XER: 20040000
  CFAR: c000000000009100 IRQMASK: 0
  GPR00: 000000000000003d fffffffffffffd00 c0000000018cfb00 c0000000f02b3166
  GPR04: fffffffffffffffd 0000000000000007 fffffffffffffffb 0000000000000030
  GPR08: 0000000000000037 0000000028222448 0000000000000000 c000000000ca8de0
  GPR12: 9000000002009032 c000000001ae0000 c000000000010a00 0000000000000000
  GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
  GPR20: c0000000f00322c0 c000000000f85200 0000000000000004 ffffffffffffffff
  GPR24: fffffffffffffffe 0000000000000000 0000000000000000 000000000000000a
  GPR28: 0000000000000000 0000000000000000 c0000000f02b391c c0000000f02b3167
  NIP [c000000000009108] decrementer_common+0x18/0x160
  LR [c000000000cadbcc] .vsnprintf+0x3ec/0x4f0
  Call Trace:
  Instruction dump:
  996d098a 994d098b 38610070 480246ed 48005518 60000000 38200000 718a4000
  7c2a0b78 3821fd00 41c20008 e82d0970 &lt;0981fd00&gt; f92101a0 f9610170 f9810178

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64s/exception: move SET_SCRATCH0 into EXCEPTION_PROLOG_0</title>
<updated>2019-07-02T11:39:49Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2019-06-28T05:33:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7fb34c704719d3c91455297678aa75d9da95817'/>
<id>urn:sha1:d7fb34c704719d3c91455297678aa75d9da95817</id>
<content type='text'>
No generated code change.

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64s/exception: denorm handler use standard scratch save macro</title>
<updated>2019-07-02T11:39:49Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2019-06-28T05:33:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=904f81f3f36d84a4d26c712a9c7741a397a4f348'/>
<id>urn:sha1:904f81f3f36d84a4d26c712a9c7741a397a4f348</id>
<content type='text'>
Although the 0x1500 interrupt only applies to bare metal, it is better
to just use the standard macro for scratch save.

Runtime code path remains unchanged (due to instruction patching).

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64s/exception: machine check use standard macros to save dar/dsisr</title>
<updated>2019-07-02T11:39:49Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2019-06-28T05:33:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=02a1258154eec78783bd7e90d4ee1361c853db66'/>
<id>urn:sha1:02a1258154eec78783bd7e90d4ee1361c853db66</id>
<content type='text'>
Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/64s/exception: add dar and dsisr options to exception macro</title>
<updated>2019-07-02T11:39:49Z</updated>
<author>
<name>Nicholas Piggin</name>
<email>npiggin@gmail.com</email>
</author>
<published>2019-06-28T05:33:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5312c4941e0d0185bb2c95d666d607292b7e3e57'/>
<id>urn:sha1:5312c4941e0d0185bb2c95d666d607292b7e3e57</id>
<content type='text'>
Some exception entry requires DAR and/or DSISR to be saved into the
paca exception save area. Add options to the standard exception
macros for these.

Generated code changes slightly due to code structure.

-     554:      a6 02 72 7d     mfdsisr r11
-     558:      a8 00 4d f9     std     r10,168(r13)
-     55c:      b0 00 6d 91     stw     r11,176(r13)
+     554:      a8 00 4d f9     std     r10,168(r13)
+     558:      a6 02 52 7d     mfdsisr r10
+     55c:      b0 00 4d 91     stw     r10,176(r13)

Signed-off-by: Nicholas Piggin &lt;npiggin@gmail.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
</feed>
