<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/arch/powerpc/lib/sstep.c, branch linux-4.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-4.16.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2017-11-12T12:51:42Z</updated>
<entry>
<title>powerpc/kprobes: Blacklist emulate_update_regs() from kprobes</title>
<updated>2017-11-12T12:51:42Z</updated>
<author>
<name>Naveen N. Rao</name>
<email>naveen.n.rao@linux.vnet.ibm.com</email>
</author>
<published>2017-10-23T16:37:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=67ac0bfe29e9b4359012a8961c196baa813c707a'/>
<id>urn:sha1:67ac0bfe29e9b4359012a8961c196baa813c707a</id>
<content type='text'>
Commit 3cdfcbfd32b9d ("powerpc: Change analyse_instr so it doesn't
modify *regs") introduced emulate_update_regs() to perform part of what
emulate_step() was doing earlier. However, this function was not added
to the kprobes blacklist. Add it so as to prevent it from being probed.

Signed-off-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Acked-by: Masami Hiramatsu &lt;mhiramat@kernel.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fixes' into next</title>
<updated>2017-11-10T09:55:03Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2017-11-10T09:55:03Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=a54c61f46e25345e99eec06a402f746fe33febc6'/>
<id>urn:sha1:a54c61f46e25345e99eec06a402f746fe33febc6</id>
<content type='text'>
We have some dependencies &amp; conflicts between patches in fixes and
things to go in next, both in the radix TLB flush code and the IMC PMU
driver. So merge fixes into next.
</content>
</entry>
<entry>
<title>powerpc/lib/sstep: Fix count leading zeros instructions</title>
<updated>2017-10-10T09:16:32Z</updated>
<author>
<name>Sandipan Das</name>
<email>sandipan@linux.vnet.ibm.com</email>
</author>
<published>2017-10-10T06:45:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=b0490a04e736356e427e227902b17f9927a56caf'/>
<id>urn:sha1:b0490a04e736356e427e227902b17f9927a56caf</id>
<content type='text'>
According to the GCC documentation, the behaviour of __builtin_clz()
and __builtin_clzl() is undefined if the value of the input argument
is zero. Without handling this special case, these builtins have been
used for emulating the following instructions:
  * Count Leading Zeros Word (cntlzw[.])
  * Count Leading Zeros Doubleword (cntlzd[.])

This fixes the emulated behaviour of these instructions by adding an
additional check for this special case.

Fixes: 3cdfcbfd32b9d ("powerpc: Change analyse_instr so it doesn't modify *regs")
Signed-off-by: Sandipan Das &lt;sandipan@linux.vnet.ibm.com&gt;
Reviewed-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/lib/sstep: Fix fixed-point shift instructions that set CA32</title>
<updated>2017-10-04T00:28:04Z</updated>
<author>
<name>Sandipan Das</name>
<email>sandipan@linux.vnet.ibm.com</email>
</author>
<published>2017-09-29T05:44:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0a75aff178df005b0619703cf7886d5c8e28e486'/>
<id>urn:sha1:0a75aff178df005b0619703cf7886d5c8e28e486</id>
<content type='text'>
This fixes the emulated behaviour of existing fixed-point shift right
algebraic instructions that are supposed to set both the CA and CA32
bits of XER when running on a system that is compliant with POWER ISA
v3.0 independent of whether the system is executing in 32-bit mode or
64-bit mode. The following instructions are affected:
  * Shift Right Algebraic Word Immediate (srawi[.])
  * Shift Right Algebraic Word (sraw[.])
  * Shift Right Algebraic Doubleword Immediate (sradi[.])
  * Shift Right Algebraic Doubleword (srad[.])

Fixes: 0016a4cf5582 ("powerpc: Emulate most Book I instructions in emulate_step()")
Signed-off-by: Sandipan Das &lt;sandipan@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/lib/sstep: Fix fixed-point arithmetic instructions that set CA32</title>
<updated>2017-10-04T00:28:03Z</updated>
<author>
<name>Sandipan Das</name>
<email>sandipan@linux.vnet.ibm.com</email>
</author>
<published>2017-09-29T05:44:09Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=dc39c1d68f256990d4bb0033a219e8ca15ba4d7f'/>
<id>urn:sha1:dc39c1d68f256990d4bb0033a219e8ca15ba4d7f</id>
<content type='text'>
There are existing fixed-point arithmetic instructions that always set the
CA bit of XER to reflect the carry out of bit 0 in 64-bit mode and out of
bit 32 in 32-bit mode. In ISA v3.0, these instructions also always set the
CA32 bit of XER to reflect the carry out of bit 32.

This fixes the emulated behaviour of such instructions when running on a
system that is compliant with POWER ISA v3.0. The following instructions
are affected:
  * Add Immediate Carrying (addic)
  * Add Immediate Carrying and Record (addic.)
  * Subtract From Immediate Carrying (subfic)
  * Add Carrying (addc[.])
  * Subtract From Carrying (subfc[.])
  * Add Extended (adde[.])
  * Subtract From Extended (subfe[.])
  * Add to Minus One Extended (addme[.])
  * Subtract From Minus One Extended (subfme[.])
  * Add to Zero Extended (addze[.])
  * Subtract From Zero Extended (subfze[.])

Fixes: 0016a4cf5582 ("powerpc: Emulate most Book I instructions in emulate_step()")
Signed-off-by: Sandipan Das &lt;sandipan@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/lib/sstep: Add XER bits introduced in POWER ISA v3.0</title>
<updated>2017-10-04T00:28:03Z</updated>
<author>
<name>Sandipan Das</name>
<email>sandipan@linux.vnet.ibm.com</email>
</author>
<published>2017-09-29T05:44:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=924c8feb041c3ef22d46ac2e7468161aad85e979'/>
<id>urn:sha1:924c8feb041c3ef22d46ac2e7468161aad85e979</id>
<content type='text'>
This adds definitions for the OV32 and CA32 bits of XER that
were introduced in POWER ISA v3.0. There are some existing
instructions that currently set the OV and CA bits based on
certain conditions.

The emulation behaviour of all these instructions needs to
be updated to set these new bits accordingly.

Signed-off-by: Sandipan Das &lt;sandipan@linux.vnet.ibm.com&gt;
Acked-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/sstep: mullw should calculate a 64 bit signed result</title>
<updated>2017-09-20T03:30:09Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2017-09-19T23:32:19Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=1575fe06f6b1d156ed31fb22c8631d49d79751d8'/>
<id>urn:sha1:1575fe06f6b1d156ed31fb22c8631d49d79751d8</id>
<content type='text'>
mullw should do a 32 bit signed multiply and create a 64 bit signed
result. It currently truncates the result to 32 bits.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/sstep: Fix issues with mcrf</title>
<updated>2017-09-20T03:30:09Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2017-09-19T10:45:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5bcaa4cc41923871777c3d13906267e812775094'/>
<id>urn:sha1:5bcaa4cc41923871777c3d13906267e812775094</id>
<content type='text'>
mcrf broke when we changed analyse_instr() to not modify the register
state. The instruction writes to the CR, so we need to store the result
in op-&gt;ccval, not op-&gt;val.

Fixes: 3cdfcbfd32b9 ("powerpc: Change analyse_instr so it doesn't modify *regs")
Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/sstep: Fix issues with set_cr0()</title>
<updated>2017-09-20T03:30:09Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2017-09-19T10:45:52Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ad47ff3e33503e0969db2d4f9a40942aa6414598'/>
<id>urn:sha1:ad47ff3e33503e0969db2d4f9a40942aa6414598</id>
<content type='text'>
set_cr0() broke when we changed analyse_instr() to not modify the
register state. Instead of looking at regs-&gt;gpr[x] which has not
been updated yet, we need to look at op-&gt;val.

Fixes: 3cdfcbfd32b9 ("powerpc: Change analyse_instr so it doesn't modify *regs")
Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/sstep: Avoid used uninitialized error</title>
<updated>2017-09-01T22:04:26Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2017-09-01T21:48:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3b79b26101936bbdb7a5c69161c69d65a1108fb0'/>
<id>urn:sha1:3b79b26101936bbdb7a5c69161c69d65a1108fb0</id>
<content type='text'>
Older compilers think val may be used uninitialized:

  arch/powerpc/lib/sstep.c: In function 'emulate_loadstore':
  arch/powerpc/lib/sstep.c:2758:23: error: 'val' may be used uninitialized in this function

We know better, but initialise val to 0 to avoid breaking the build.

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