<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/lib, branch linux-3.18.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.18.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2018-04-24T07:29:28Z</updated>
<entry>
<title>powerpc/lib: Fix off-by-one in alternate feature patching</title>
<updated>2018-04-24T07:29:28Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2018-04-16T13:25:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eaf2bca68881d2d99289d5cfb18d04de55cc92ac'/>
<id>urn:sha1:eaf2bca68881d2d99289d5cfb18d04de55cc92ac</id>
<content type='text'>
commit b8858581febb050688e276b956796bc4a78299ed upstream.

When we patch an alternate feature section, we have to adjust any
relative branches that branch out of the alternate section.

But currently we have a bug if we have a branch that points to past
the last instruction of the alternate section, eg:

  FTR_SECTION_ELSE
  1:     b       2f
         or      6,6,6
  2:
  ALT_FTR_SECTION_END(...)
         nop

This will result in a relative branch at 1 with a target that equals
the end of the alternate section.

That branch does not need adjusting when it's moved to the non-else
location. Currently we do adjust it, resulting in a branch that goes
off into the link-time location of the else section, which is junk.

The fix is to not patch branches that have a target == end of the
alternate section.

Fixes: d20fe50a7b3c ("KVM: PPC: Book3S HV: Branch inside feature section")
Fixes: 9b1a735de64c ("powerpc: Add logic to patch alternative feature sections")
Cc: stable@vger.kernel.org # v2.6.27+
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc: Fix emulation of mfocrf in emulate_step()</title>
<updated>2017-07-27T22:03:25Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2017-06-14T23:46:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b0298990fe4ad9885aa75a106e356b35862f375'/>
<id>urn:sha1:0b0298990fe4ad9885aa75a106e356b35862f375</id>
<content type='text'>
commit 64e756c55aa46fc18fd53e8f3598b73b528d8637 upstream.

From POWER4 onwards, mfocrf() only places the specified CR field into
the destination GPR, and the rest of it is set to 0. The PowerPC AS
from version 3.0 now requires this behaviour.

The emulation code currently puts the entire CR into the destination GPR.
Fix it.

Fixes: 6888199f7fe5 ("[POWERPC] Emulate more instructions in software")
Signed-off-by: Anton Blanchard &lt;anton@samba.org&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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc: Fix emulation of mcrf in emulate_step()</title>
<updated>2017-07-27T22:03:25Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2017-06-14T23:46:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=242aa00b89e3adf22b7d1fb7a2b5f4e9cb191213'/>
<id>urn:sha1:242aa00b89e3adf22b7d1fb7a2b5f4e9cb191213</id>
<content type='text'>
commit 87c4b83e0fe234a1f0eed131ab6fa232036860d5 upstream.

The mcrf emulation code was using the CR field number directly as the shift
value, without taking into account that CR fields are numbered from 0-7 starting
at the high bits. That meant it was looking at the CR fields in the reverse
order.

Fixes: cf87c3f6b647 ("powerpc: Emulate icbi, mcrf and conditional-trap instructions")
Signed-off-by: Anton Blanchard &lt;anton@samba.org&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;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc: Emulation support for load/store instructions on LE</title>
<updated>2017-04-18T05:55:54Z</updated>
<author>
<name>Ravi Bangoria</name>
</author>
<published>2017-02-14T09:16:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee9062fc5f3abb853ded22dc1d41fffff63d39a8'/>
<id>urn:sha1:ee9062fc5f3abb853ded22dc1d41fffff63d39a8</id>
<content type='text'>
commit e148bd17f48bd17fca2f4f089ec879fa6e47e34c upstream.

emulate_step() uses a number of underlying kernel functions that were
initially not enabled for LE. This has been rectified since. So, fix
emulate_step() for LE for the corresponding instructions.

Reported-by: Anton Blanchard &lt;anton@samba.org&gt;
Signed-off-by: Ravi Bangoria &lt;ravi.bangoria@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc: Implement emulation of string loads and stores</title>
<updated>2014-09-25T13:14:52Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2014-09-02T04:35:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c9f6f4ed95d47e3319dedaf8cc31d744ac67fe6f'/>
<id>urn:sha1:c9f6f4ed95d47e3319dedaf8cc31d744ac67fe6f</id>
<content type='text'>
The size field of the op.type word is now the total number of bytes
to be loaded or stored.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc: Emulate icbi, mcrf and conditional-trap instructions</title>
<updated>2014-09-25T13:14:51Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2014-09-02T04:35:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cf87c3f6b64791ce5d4c7e591c915065d31a162d'/>
<id>urn:sha1:cf87c3f6b64791ce5d4c7e591c915065d31a162d</id>
<content type='text'>
This extends the instruction emulation done by analyse_instr() and
emulate_step() to handle a few more instructions that are found in
the kernel.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc: Split out instruction analysis part of emulate_step()</title>
<updated>2014-09-25T13:14:51Z</updated>
<author>
<name>Paul Mackerras</name>
</author>
<published>2014-09-02T04:35:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be96f63375a14ee8e690856ac77e579c75bd0bae'/>
<id>urn:sha1:be96f63375a14ee8e690856ac77e579c75bd0bae</id>
<content type='text'>
This splits out the instruction analysis part of emulate_step() into
a separate analyse_instr() function, which decodes the instruction,
but doesn't execute any load or store instructions.  It does execute
integer instructions and branches which can be executed purely by
updating register values in the pt_regs struct.  For other instructions,
it returns the instruction type and other details in a new
instruction_op struct.  emulate_step() then uses that information
to execute loads, stores, cache operations, mfmsr, mtmsr[d], and
(on 64-bit) sc instructions.

The reason for doing this is so that the KVM code can use it instead
of having its own separate instruction emulation code.  Possibly the
alignment interrupt handler could also use this.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc: Make a bunch of things static</title>
<updated>2014-09-25T13:14:41Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2014-08-19T22:55:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e51df2c170efaeadce4d416e1825b0830de0a795'/>
<id>urn:sha1:e51df2c170efaeadce4d416e1825b0830de0a795</id>
<content type='text'>
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: Move lib symbol exports into arch/powerpc/lib/ppc_ksyms.c</title>
<updated>2014-09-25T13:14:39Z</updated>
<author>
<name>Anton Blanchard</name>
</author>
<published>2014-08-19T22:00:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7b20a955c3eec58e87f3d32cc1438eab6447ff4c'/>
<id>urn:sha1:7b20a955c3eec58e87f3d32cc1438eab6447ff4c</id>
<content type='text'>
Move the lib symbol exports closer to their function definitions

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: Add smp_mb()s to arch_spin_unlock_wait()</title>
<updated>2014-08-13T05:13:27Z</updated>
<author>
<name>Michael Ellerman</name>
</author>
<published>2014-08-07T05:36:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=78e05b1421fa41ae8457701140933baa5e7d9479'/>
<id>urn:sha1:78e05b1421fa41ae8457701140933baa5e7d9479</id>
<content type='text'>
Similar to the previous commit which described why we need to add a
barrier to arch_spin_is_locked(), we have a similar problem with
spin_unlock_wait().

We need a barrier on entry to ensure any spinlock we have previously
taken is visibly locked prior to the load of lock-&gt;slock.

It's also not clear if spin_unlock_wait() is intended to have ACQUIRE
semantics. For now be conservative and add a barrier on exit to give it
ACQUIRE semantics.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
</feed>
