<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/arch/powerpc, branch v4.0</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>powerpc: fix memory corruption by pnv_alloc_idle_core_states</title>
<updated>2015-04-01T01:05:44+00:00</updated>
<author>
<name>Jan Stancek</name>
<email>jstancek@redhat.com</email>
</author>
<published>2015-03-31T16:11:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=d52356e7f48e400ca258c6763a232a92fa82ff68'/>
<id>d52356e7f48e400ca258c6763a232a92fa82ff68</id>
<content type='text'>
Space allocated for paca is based off nr_cpu_ids,
but pnv_alloc_idle_core_states() iterates paca with
cpu_nr_cores()*threads_per_core, which is using NR_CPUS.

This causes pnv_alloc_idle_core_states() to write over memory,
which is outside of paca array and may later lead to various panics.

Fixes: 7cba160ad789 (powernv/cpuidle: Redesign idle states management)
Signed-off-by: Jan Stancek &lt;jstancek@redhat.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Space allocated for paca is based off nr_cpu_ids,
but pnv_alloc_idle_core_states() iterates paca with
cpu_nr_cores()*threads_per_core, which is using NR_CPUS.

This causes pnv_alloc_idle_core_states() to write over memory,
which is outside of paca array and may later lead to various panics.

Fixes: 7cba160ad789 (powernv/cpuidle: Redesign idle states management)
Signed-off-by: Jan Stancek &lt;jstancek@redhat.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'signed-for-4.0' of git://github.com/agraf/linux-2.6</title>
<updated>2015-03-25T23:20:31+00:00</updated>
<author>
<name>Marcelo Tosatti</name>
<email>mtosatt@redhat.com</email>
</author>
<published>2015-03-25T23:20:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=27bfc6cfda28df47cd7d6d1d3f477badbf685813'/>
<id>27bfc6cfda28df47cd7d6d1d3f477badbf685813</id>
<content type='text'>
Patch queue for 4.0 - 2015-03-25

A few bug fixes for Book3S HV KVM:

  - Fix spinlock ordering
  - Fix idle guests on LE hosts
  - Fix instruction emulation
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Patch queue for 4.0 - 2015-03-25

A few bug fixes for Book3S HV KVM:

  - Fix spinlock ordering
  - Fix idle guests on LE hosts
  - Fix instruction emulation
</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc/book3s: Fix the MCE code to use CONFIG_KVM_BOOK3S_64_HANDLER</title>
<updated>2015-03-23T06:10:47+00:00</updated>
<author>
<name>Mahesh Salgaonkar</name>
<email>mahesh@linux.vnet.ibm.com</email>
</author>
<published>2015-03-17T10:44:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=44d5f6f5901e996744858c175baee320ccf1eda3'/>
<id>44d5f6f5901e996744858c175baee320ccf1eda3</id>
<content type='text'>
commit id 2ba9f0d has changed CONFIG_KVM_BOOK3S_64_HV to tristate to allow
HV/PR bits to be built as modules. But the MCE code still depends on
CONFIG_KVM_BOOK3S_64_HV which is wrong. When user selects
CONFIG_KVM_BOOK3S_64_HV=m to build HV/PR bits as a separate module the
relevant MCE code gets excluded.

This patch fixes the MCE code to use CONFIG_KVM_BOOK3S_64_HANDLER. This
makes sure that the relevant MCE code is included when HV/PR bits
are built as a separate modules.

Fixes: 2ba9f0d88750 ("kvm: powerpc: book3s: Support building HV and PR KVM as module")
Cc: stable@vger.kernel.org  # v3.14+
Signed-off-by: Mahesh Salgaonkar &lt;mahesh@linux.vnet.ibm.com&gt;
Acked-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit id 2ba9f0d has changed CONFIG_KVM_BOOK3S_64_HV to tristate to allow
HV/PR bits to be built as modules. But the MCE code still depends on
CONFIG_KVM_BOOK3S_64_HV which is wrong. When user selects
CONFIG_KVM_BOOK3S_64_HV=m to build HV/PR bits as a separate module the
relevant MCE code gets excluded.

This patch fixes the MCE code to use CONFIG_KVM_BOOK3S_64_HANDLER. This
makes sure that the relevant MCE code is included when HV/PR bits
are built as a separate modules.

Fixes: 2ba9f0d88750 ("kvm: powerpc: book3s: Support building HV and PR KVM as module")
Cc: stable@vger.kernel.org  # v3.14+
Signed-off-by: Mahesh Salgaonkar &lt;mahesh@linux.vnet.ibm.com&gt;
Acked-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: PPC: Book3S HV: Fix instruction emulation</title>
<updated>2015-03-20T10:42:33+00:00</updated>
<author>
<name>Paul Mackerras</name>
<email>paulus@samba.org</email>
</author>
<published>2015-03-20T09:39:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=2bf27601c7b50b6ced72f27304109dc52eb52919'/>
<id>2bf27601c7b50b6ced72f27304109dc52eb52919</id>
<content type='text'>
Commit 4a157d61b48c ("KVM: PPC: Book3S HV: Fix endianness of
instruction obtained from HEIR register") had the side effect that
we no longer reset vcpu-&gt;arch.last_inst to -1 on guest exit in
the cases where the instruction is not fetched from the guest.
This means that if instruction emulation turns out to be required
in those cases, the host will emulate the wrong instruction, since
vcpu-&gt;arch.last_inst will contain the last instruction that was
emulated.

This fixes it by making sure that vcpu-&gt;arch.last_inst is reset
to -1 in those cases.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Commit 4a157d61b48c ("KVM: PPC: Book3S HV: Fix endianness of
instruction obtained from HEIR register") had the side effect that
we no longer reset vcpu-&gt;arch.last_inst to -1 on guest exit in
the cases where the instruction is not fetched from the guest.
This means that if instruction emulation turns out to be required
in those cases, the host will emulate the wrong instruction, since
vcpu-&gt;arch.last_inst will contain the last instruction that was
emulated.

This fixes it by making sure that vcpu-&gt;arch.last_inst is reset
to -1 in those cases.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: PPC: Book3S HV: Endian fix for accessing VPA yield count</title>
<updated>2015-03-20T10:42:08+00:00</updated>
<author>
<name>Paul Mackerras</name>
<email>paulus@samba.org</email>
</author>
<published>2015-03-20T09:39:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ecb6d6185b3ae40067330eb889977bf2a51f7429'/>
<id>ecb6d6185b3ae40067330eb889977bf2a51f7429</id>
<content type='text'>
The VPA (virtual processor area) is defined by PAPR and is therefore
big-endian, so we need a be32_to_cpu when reading it in
kvmppc_get_yield_count().  Without this, H_CONFER always fails on a
little-endian host, causing SMP guests to waste time spinning on
spinlocks.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The VPA (virtual processor area) is defined by PAPR and is therefore
big-endian, so we need a be32_to_cpu when reading it in
kvmppc_get_yield_count().  Without this, H_CONFER always fails on a
little-endian host, causing SMP guests to waste time spinning on
spinlocks.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>KVM: PPC: Book3S HV: Fix spinlock/mutex ordering issue in kvmppc_set_lpcr()</title>
<updated>2015-03-20T10:41:14+00:00</updated>
<author>
<name>Paul Mackerras</name>
<email>paulus@samba.org</email>
</author>
<published>2015-03-20T09:39:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8f902b005ece690f0f50b217975601b804905dc8'/>
<id>8f902b005ece690f0f50b217975601b804905dc8</id>
<content type='text'>
Currently, kvmppc_set_lpcr() has a spinlock around the whole function,
and inside that does mutex_lock(&amp;kvm-&gt;lock).  It is not permitted to
take a mutex while holding a spinlock, because the mutex_lock might
call schedule().  In addition, this causes lockdep to warn about a
lock ordering issue:

======================================================
[ INFO: possible circular locking dependency detected ]
3.18.0-kvm-04645-gdfea862-dirty #131 Not tainted
-------------------------------------------------------
qemu-system-ppc/8179 is trying to acquire lock:
 (&amp;kvm-&gt;lock){+.+.+.}, at: [&lt;d00000000ecc1f54&gt;] .kvmppc_set_lpcr+0xf4/0x1c0 [kvm_hv]

but task is already holding lock:
 (&amp;(&amp;vcore-&gt;lock)-&gt;rlock){+.+...}, at: [&lt;d00000000ecc1ea0&gt;] .kvmppc_set_lpcr+0x40/0x1c0 [kvm_hv]

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 (&amp;(&amp;vcore-&gt;lock)-&gt;rlock){+.+...}:
       [&lt;c000000000b3c120&gt;] .mutex_lock_nested+0x80/0x570
       [&lt;d00000000ecc7a14&gt;] .kvmppc_vcpu_run_hv+0xc4/0xe40 [kvm_hv]
       [&lt;d00000000eb9f5cc&gt;] .kvmppc_vcpu_run+0x2c/0x40 [kvm]
       [&lt;d00000000eb9cb24&gt;] .kvm_arch_vcpu_ioctl_run+0x54/0x160 [kvm]
       [&lt;d00000000eb94478&gt;] .kvm_vcpu_ioctl+0x4a8/0x7b0 [kvm]
       [&lt;c00000000026cbb4&gt;] .do_vfs_ioctl+0x444/0x770
       [&lt;c00000000026cfa4&gt;] .SyS_ioctl+0xc4/0xe0
       [&lt;c000000000009264&gt;] syscall_exit+0x0/0x98

-&gt; #0 (&amp;kvm-&gt;lock){+.+.+.}:
       [&lt;c0000000000ff28c&gt;] .lock_acquire+0xcc/0x1a0
       [&lt;c000000000b3c120&gt;] .mutex_lock_nested+0x80/0x570
       [&lt;d00000000ecc1f54&gt;] .kvmppc_set_lpcr+0xf4/0x1c0 [kvm_hv]
       [&lt;d00000000ecc510c&gt;] .kvmppc_set_one_reg_hv+0x4dc/0x990 [kvm_hv]
       [&lt;d00000000eb9f234&gt;] .kvmppc_set_one_reg+0x44/0x330 [kvm]
       [&lt;d00000000eb9c9dc&gt;] .kvm_vcpu_ioctl_set_one_reg+0x5c/0x150 [kvm]
       [&lt;d00000000eb9ced4&gt;] .kvm_arch_vcpu_ioctl+0x214/0x2c0 [kvm]
       [&lt;d00000000eb940b0&gt;] .kvm_vcpu_ioctl+0xe0/0x7b0 [kvm]
       [&lt;c00000000026cbb4&gt;] .do_vfs_ioctl+0x444/0x770
       [&lt;c00000000026cfa4&gt;] .SyS_ioctl+0xc4/0xe0
       [&lt;c000000000009264&gt;] syscall_exit+0x0/0x98

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&amp;(&amp;vcore-&gt;lock)-&gt;rlock);
                               lock(&amp;kvm-&gt;lock);
                               lock(&amp;(&amp;vcore-&gt;lock)-&gt;rlock);
  lock(&amp;kvm-&gt;lock);

 *** DEADLOCK ***

2 locks held by qemu-system-ppc/8179:
 #0:  (&amp;vcpu-&gt;mutex){+.+.+.}, at: [&lt;d00000000eb93f18&gt;] .vcpu_load+0x28/0x90 [kvm]
 #1:  (&amp;(&amp;vcore-&gt;lock)-&gt;rlock){+.+...}, at: [&lt;d00000000ecc1ea0&gt;] .kvmppc_set_lpcr+0x40/0x1c0 [kvm_hv]

stack backtrace:
CPU: 4 PID: 8179 Comm: qemu-system-ppc Not tainted 3.18.0-kvm-04645-gdfea862-dirty #131
Call Trace:
[c000001a66c0f310] [c000000000b486ac] .dump_stack+0x88/0xb4 (unreliable)
[c000001a66c0f390] [c0000000000f8bec] .print_circular_bug+0x27c/0x3d0
[c000001a66c0f440] [c0000000000fe9e8] .__lock_acquire+0x2028/0x2190
[c000001a66c0f5d0] [c0000000000ff28c] .lock_acquire+0xcc/0x1a0
[c000001a66c0f6a0] [c000000000b3c120] .mutex_lock_nested+0x80/0x570
[c000001a66c0f7c0] [d00000000ecc1f54] .kvmppc_set_lpcr+0xf4/0x1c0 [kvm_hv]
[c000001a66c0f860] [d00000000ecc510c] .kvmppc_set_one_reg_hv+0x4dc/0x990 [kvm_hv]
[c000001a66c0f8d0] [d00000000eb9f234] .kvmppc_set_one_reg+0x44/0x330 [kvm]
[c000001a66c0f960] [d00000000eb9c9dc] .kvm_vcpu_ioctl_set_one_reg+0x5c/0x150 [kvm]
[c000001a66c0f9f0] [d00000000eb9ced4] .kvm_arch_vcpu_ioctl+0x214/0x2c0 [kvm]
[c000001a66c0faf0] [d00000000eb940b0] .kvm_vcpu_ioctl+0xe0/0x7b0 [kvm]
[c000001a66c0fcb0] [c00000000026cbb4] .do_vfs_ioctl+0x444/0x770
[c000001a66c0fd90] [c00000000026cfa4] .SyS_ioctl+0xc4/0xe0
[c000001a66c0fe30] [c000000000009264] syscall_exit+0x0/0x98

This fixes it by moving the mutex_lock()/mutex_unlock() pair outside
the spin-locked region.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Currently, kvmppc_set_lpcr() has a spinlock around the whole function,
and inside that does mutex_lock(&amp;kvm-&gt;lock).  It is not permitted to
take a mutex while holding a spinlock, because the mutex_lock might
call schedule().  In addition, this causes lockdep to warn about a
lock ordering issue:

======================================================
[ INFO: possible circular locking dependency detected ]
3.18.0-kvm-04645-gdfea862-dirty #131 Not tainted
-------------------------------------------------------
qemu-system-ppc/8179 is trying to acquire lock:
 (&amp;kvm-&gt;lock){+.+.+.}, at: [&lt;d00000000ecc1f54&gt;] .kvmppc_set_lpcr+0xf4/0x1c0 [kvm_hv]

but task is already holding lock:
 (&amp;(&amp;vcore-&gt;lock)-&gt;rlock){+.+...}, at: [&lt;d00000000ecc1ea0&gt;] .kvmppc_set_lpcr+0x40/0x1c0 [kvm_hv]

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-&gt; #1 (&amp;(&amp;vcore-&gt;lock)-&gt;rlock){+.+...}:
       [&lt;c000000000b3c120&gt;] .mutex_lock_nested+0x80/0x570
       [&lt;d00000000ecc7a14&gt;] .kvmppc_vcpu_run_hv+0xc4/0xe40 [kvm_hv]
       [&lt;d00000000eb9f5cc&gt;] .kvmppc_vcpu_run+0x2c/0x40 [kvm]
       [&lt;d00000000eb9cb24&gt;] .kvm_arch_vcpu_ioctl_run+0x54/0x160 [kvm]
       [&lt;d00000000eb94478&gt;] .kvm_vcpu_ioctl+0x4a8/0x7b0 [kvm]
       [&lt;c00000000026cbb4&gt;] .do_vfs_ioctl+0x444/0x770
       [&lt;c00000000026cfa4&gt;] .SyS_ioctl+0xc4/0xe0
       [&lt;c000000000009264&gt;] syscall_exit+0x0/0x98

-&gt; #0 (&amp;kvm-&gt;lock){+.+.+.}:
       [&lt;c0000000000ff28c&gt;] .lock_acquire+0xcc/0x1a0
       [&lt;c000000000b3c120&gt;] .mutex_lock_nested+0x80/0x570
       [&lt;d00000000ecc1f54&gt;] .kvmppc_set_lpcr+0xf4/0x1c0 [kvm_hv]
       [&lt;d00000000ecc510c&gt;] .kvmppc_set_one_reg_hv+0x4dc/0x990 [kvm_hv]
       [&lt;d00000000eb9f234&gt;] .kvmppc_set_one_reg+0x44/0x330 [kvm]
       [&lt;d00000000eb9c9dc&gt;] .kvm_vcpu_ioctl_set_one_reg+0x5c/0x150 [kvm]
       [&lt;d00000000eb9ced4&gt;] .kvm_arch_vcpu_ioctl+0x214/0x2c0 [kvm]
       [&lt;d00000000eb940b0&gt;] .kvm_vcpu_ioctl+0xe0/0x7b0 [kvm]
       [&lt;c00000000026cbb4&gt;] .do_vfs_ioctl+0x444/0x770
       [&lt;c00000000026cfa4&gt;] .SyS_ioctl+0xc4/0xe0
       [&lt;c000000000009264&gt;] syscall_exit+0x0/0x98

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(&amp;(&amp;vcore-&gt;lock)-&gt;rlock);
                               lock(&amp;kvm-&gt;lock);
                               lock(&amp;(&amp;vcore-&gt;lock)-&gt;rlock);
  lock(&amp;kvm-&gt;lock);

 *** DEADLOCK ***

2 locks held by qemu-system-ppc/8179:
 #0:  (&amp;vcpu-&gt;mutex){+.+.+.}, at: [&lt;d00000000eb93f18&gt;] .vcpu_load+0x28/0x90 [kvm]
 #1:  (&amp;(&amp;vcore-&gt;lock)-&gt;rlock){+.+...}, at: [&lt;d00000000ecc1ea0&gt;] .kvmppc_set_lpcr+0x40/0x1c0 [kvm_hv]

stack backtrace:
CPU: 4 PID: 8179 Comm: qemu-system-ppc Not tainted 3.18.0-kvm-04645-gdfea862-dirty #131
Call Trace:
[c000001a66c0f310] [c000000000b486ac] .dump_stack+0x88/0xb4 (unreliable)
[c000001a66c0f390] [c0000000000f8bec] .print_circular_bug+0x27c/0x3d0
[c000001a66c0f440] [c0000000000fe9e8] .__lock_acquire+0x2028/0x2190
[c000001a66c0f5d0] [c0000000000ff28c] .lock_acquire+0xcc/0x1a0
[c000001a66c0f6a0] [c000000000b3c120] .mutex_lock_nested+0x80/0x570
[c000001a66c0f7c0] [d00000000ecc1f54] .kvmppc_set_lpcr+0xf4/0x1c0 [kvm_hv]
[c000001a66c0f860] [d00000000ecc510c] .kvmppc_set_one_reg_hv+0x4dc/0x990 [kvm_hv]
[c000001a66c0f8d0] [d00000000eb9f234] .kvmppc_set_one_reg+0x44/0x330 [kvm]
[c000001a66c0f960] [d00000000eb9c9dc] .kvm_vcpu_ioctl_set_one_reg+0x5c/0x150 [kvm]
[c000001a66c0f9f0] [d00000000eb9ced4] .kvm_arch_vcpu_ioctl+0x214/0x2c0 [kvm]
[c000001a66c0faf0] [d00000000eb940b0] .kvm_vcpu_ioctl+0xe0/0x7b0 [kvm]
[c000001a66c0fcb0] [c00000000026cbb4] .do_vfs_ioctl+0x444/0x770
[c000001a66c0fd90] [c00000000026cfa4] .SyS_ioctl+0xc4/0xe0
[c000001a66c0fe30] [c000000000009264] syscall_exit+0x0/0x98

This fixes it by moving the mutex_lock()/mutex_unlock() pair outside
the spin-locked region.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Alexander Graf &lt;agraf@suse.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc/pseries: Little endian fixes for post mobility device tree update</title>
<updated>2015-03-20T03:53:01+00:00</updated>
<author>
<name>Tyrel Datwyler</name>
<email>tyreld@linux.vnet.ibm.com</email>
</author>
<published>2015-03-04T19:59:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=f6ff04149637723261aa4738958b0098b929ee9e'/>
<id>f6ff04149637723261aa4738958b0098b929ee9e</id>
<content type='text'>
We currently use the device tree update code in the kernel after resuming
from a suspend operation to re-sync the kernels view of the device tree with
that of the hypervisor. The code as it stands is not endian safe as it relies
on parsing buffers returned by RTAS calls that thusly contains data in big
endian format.

This patch annotates variables and structure members with __be types as well
as performing necessary byte swaps to cpu endian for data that needs to be
parsed.

Signed-off-by: Tyrel Datwyler &lt;tyreld@linux.vnet.ibm.com&gt;
Cc: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Cc: Cyril Bur &lt;cyrilbur@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We currently use the device tree update code in the kernel after resuming
from a suspend operation to re-sync the kernels view of the device tree with
that of the hypervisor. The code as it stands is not endian safe as it relies
on parsing buffers returned by RTAS calls that thusly contains data in big
endian format.

This patch annotates variables and structure members with __be types as well
as performing necessary byte swaps to cpu endian for data that needs to be
parsed.

Signed-off-by: Tyrel Datwyler &lt;tyreld@linux.vnet.ibm.com&gt;
Cc: Nathan Fontenot &lt;nfont@linux.vnet.ibm.com&gt;
Cc: Cyril Bur &lt;cyrilbur@gmail.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc: Add PVR for POWER8NVL processor</title>
<updated>2015-03-20T03:52:27+00:00</updated>
<author>
<name>Benjamin Herrenschmidt</name>
<email>benh@kernel.crashing.org</email>
</author>
<published>2015-03-19T03:12:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ddee09c099c35074e50aaf9157efd22429d3acdf'/>
<id>ddee09c099c35074e50aaf9157efd22429d3acdf</id>
<content type='text'>
There's a new variant of POWER8 coming called "POWER8 with NVLink". The
core is identical to POWER8 but unfortunately they strapped it with a
different PVR, so we need to add an explicit entry for it.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's a new variant of POWER8 coming called "POWER8 with NVLink". The
core is identical to POWER8 but unfortunately they strapped it with a
different PVR, so we need to add an explicit entry for it.

Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc/powernv: Fixes for hypervisor doorbell handling</title>
<updated>2015-03-20T03:51:53+00:00</updated>
<author>
<name>Paul Mackerras</name>
<email>paulus@samba.org</email>
</author>
<published>2015-03-19T08:29:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=755563bc79c764c90b9f44db5e4fe6c556d3440c'/>
<id>755563bc79c764c90b9f44db5e4fe6c556d3440c</id>
<content type='text'>
Since we can now use hypervisor doorbells for host IPIs, this makes
sure we clear the host IPI flag when taking a doorbell interrupt, and
clears any pending doorbell IPI in pnv_smp_cpu_kill_self() (as we
already do for IPIs sent via the XICS interrupt controller).  Otherwise
if there did happen to be a leftover pending doorbell interrupt for
an offline CPU thread for any reason, it would prevent that thread from
going into a power-saving mode; it would instead keep waking up because
of the interrupt.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since we can now use hypervisor doorbells for host IPIs, this makes
sure we clear the host IPI flag when taking a doorbell interrupt, and
clears any pending doorbell IPI in pnv_smp_cpu_kill_self() (as we
already do for IPIs sent via the XICS interrupt controller).  Otherwise
if there did happen to be a leftover pending doorbell interrupt for
an offline CPU thread for any reason, it would prevent that thread from
going into a power-saving mode; it would instead keep waking up because
of the interrupt.

Signed-off-by: Paul Mackerras &lt;paulus@samba.org&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>powerpc/iommu: Remove IOMMU device references via bus notifier</title>
<updated>2015-03-04T02:19:33+00:00</updated>
<author>
<name>Nishanth Aravamudan</name>
<email>nacc@linux.vnet.ibm.com</email>
</author>
<published>2015-02-21T19:00:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=4ad04e5987115ece5fa8a0cf1dc72fcd4707e33e'/>
<id>4ad04e5987115ece5fa8a0cf1dc72fcd4707e33e</id>
<content type='text'>
After d905c5df9aef ("PPC: POWERNV: move iommu_add_device earlier"), the
refcnt on the kobject backing the IOMMU group for a PCI device is
elevated by each call to pci_dma_dev_setup_pSeriesLP() (via
set_iommu_table_base_and_group). When we go to dlpar a multi-function
PCI device out:

        iommu_reconfig_notifier -&gt;
                iommu_free_table -&gt;
                        iommu_group_put
                        BUG_ON(tbl-&gt;it_group)

We trip this BUG_ON, because there are still references on the table, so
it is not freed. Fix this by moving the powernv bus notifier to common
code and calling it for both powernv and pseries.

Fixes: d905c5df9aef ("PPC: POWERNV: move iommu_add_device earlier")
Signed-off-by: Nishanth Aravamudan &lt;nacc@linux.vnet.ibm.com&gt;
Tested-by: Nishanth Aravamudan &lt;nacc@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
After d905c5df9aef ("PPC: POWERNV: move iommu_add_device earlier"), the
refcnt on the kobject backing the IOMMU group for a PCI device is
elevated by each call to pci_dma_dev_setup_pSeriesLP() (via
set_iommu_table_base_and_group). When we go to dlpar a multi-function
PCI device out:

        iommu_reconfig_notifier -&gt;
                iommu_free_table -&gt;
                        iommu_group_put
                        BUG_ON(tbl-&gt;it_group)

We trip this BUG_ON, because there are still references on the table, so
it is not freed. Fix this by moving the powernv bus notifier to common
code and calling it for both powernv and pseries.

Fixes: d905c5df9aef ("PPC: POWERNV: move iommu_add_device earlier")
Signed-off-by: Nishanth Aravamudan &lt;nacc@linux.vnet.ibm.com&gt;
Tested-by: Nishanth Aravamudan &lt;nacc@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</pre>
</div>
</content>
</entry>
</feed>
