[PATCH v3-resend 07/11] powerpc: uaccess s/might_sleep/might_fault/

2013-05-26 Thread Michael S. Tsirkin
The only reason uaccess routines might sleep is if they fault. Make this explicit. Arnd Bergmann suggested that the following code if (!is_kernel_addr((unsigned long)__pu_addr)) might_fault(); can be further simplified by adding a version of might_fault that includes the

[PATCH v3, part2 10/20] PCI, PPC: use hotplug-safe iterators to walk PCI buses

2013-05-26 Thread Jiang Liu
Enhance PPC architecture specific code to use hotplug-safe iterators to walk PCI buses. Signed-off-by: Jiang Liu jiang@huawei.com Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: Gavin Shan sha...@linux.vnet.ibm.com Cc: Greg Kroah-Hartman

Re: [PATCH 1/2] ARM: kirkwood: proper retain MAC address workaround on DT ethernet

2013-05-26 Thread Sebastian Hesselbarth
On 05/26/2013 06:04 AM, David Miller wrote: From: Sebastian Hesselbarthsebastian.hesselba...@gmail.com Date: Wed, 22 May 2013 22:04:01 +0200 + memcpy((void *)p-value, reg, 6); This cast is completely unnecessary, non-void to void pointer casts are automatic. If it is

Re: [PATCH] ppc: remove unused devm_ioremap_prot

2013-05-26 Thread Kyle McMartin
On Sun, May 26, 2013 at 08:44:35AM +1000, Benjamin Herrenschmidt wrote: It's not used ... yet. It's needed if we ever are to implement something like devm_ioremap_wc(). I suspect if things like framebuffer or even IB drivers start using devm this will be needed. Any specific reason why you

Re: [PATCH 3/4] KVM: PPC: Add support for IOMMU in-kernel handling

2013-05-26 Thread Alexey Kardashevskiy
On 05/25/2013 12:45 PM, David Gibson wrote: On Wed, May 22, 2013 at 04:06:57PM -0500, Scott Wood wrote: On 05/20/2013 10:06:46 PM, Alexey Kardashevskiy wrote: diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 8465c2a..da6bf61 100644 --- a/arch/powerpc/kvm/powerpc.c

[PATCH 0/5] powerpc/tm: Various transactional memory fixes

2013-05-26 Thread Michael Neuling
Bunch of fixes for transactional memory. Michael Neuling (5): powerpc/tm: Make room for hypervisor in abort cause codes powerpc/tm: Update cause codes documentation powerpc/tm: Abort on emulation and alignment faults powerpc/tm: Move TM abort cause codes to uapi powerpc/tm: Fix

[PATCH 1/5] powerpc/tm: Make room for hypervisor in abort cause codes

2013-05-26 Thread Michael Neuling
PAPR carves out 0xff-0xe0 for hypervisor use of transactional memory software abort cause codes. Unfortunately we don't respect this currently. Below fixes this to move our cause codes to below this region. Signed-off-by: Michael Neuling mi...@neuling.org Cc: sta...@vger.kernel.org # 3.9 only

[PATCH 2/5] powerpc/tm: Update cause codes documentation

2013-05-26 Thread Michael Neuling
Signed-off-by: Michael Neuling mi...@neuling.org Cc: sta...@vger.kernel.org # 3.9 only --- Documentation/powerpc/transactional_memory.txt |1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/powerpc/transactional_memory.txt b/Documentation/powerpc/transactional_memory.txt index

[PATCH 3/5] powerpc/tm: Abort on emulation and alignment faults

2013-05-26 Thread Michael Neuling
If we are emulating an instruction inside an active user transaction that touches memory, the kernel can't emulate it as it operates in transactional suspend context. We need to abort these transactions and send them back to userspace for the hardware to rollback. We can service these if the

[PATCH 4/5] powerpc/tm: Move TM abort cause codes to uapi

2013-05-26 Thread Michael Neuling
These cause codes are usable by userspace, so let's export to uapi. Signed-off-by: Michael Neuling mi...@neuling.org Cc: sta...@vger.kernel.org # v3.9 --- arch/powerpc/include/asm/reg.h | 14 -- arch/powerpc/include/asm/tm.h |2 ++ arch/powerpc/include/uapi/asm/tm.h |

[PATCH 5/5] powerpc/tm: Fix userspace stack corruption on signal delivery for active transactions

2013-05-26 Thread Michael Neuling
When in an active transaction that takes a signal, we need to be careful with the stack. It's possible that the stack has moved back up after the tbegin. The obvious case here is when the tbegin is called inside a function that returns before a tend. In this case, the stack is part of the

[PATCH v2 4/5] powerpc/tm: Move TM abort cause codes to uapi

2013-05-26 Thread Michael Neuling
These cause codes are usable by userspace, so let's export to uapi. Signed-off-by: Michael Neuling mi...@neuling.org Cc: sta...@vger.kernel.org # v3.9 -- v2: add uapi/tm.h to Kbuild so it gets exported correctly diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h index