RE: [PATCH] powerpc/32bit,PREEMPT:Load TI_FLAGS to check NEED_RESCHED

2013-05-26 Thread Jain Priyanka-B32167
If we go some more lines up in the same file, the code is resume_kernel: /* check current_thread_info, _TIF_EMULATE_STACK_STORE */ CURRENT_THREAD_INFO(r9, r1) lwz r8,TI_FLAGS(r9) andis. r8,r8,_TIF_EMULATE_STACK_STORE@h beq+1f --- After execution

Re: [PATCH] powerpc/32bit, PREEMPT:Load TI_FLAGS to check NEED_RESCHED

2013-05-26 Thread tiejun.chen
On 05/27/2013 02:27 PM, Priyanka Jain wrote: Add instruction to load TI_FLAGS in r8 While returning from exception handling in case of PREEMPT enabled, _TIF_NEED_RESCHED bit is checked in TI_FLAGS (thread_info flag) of current task. Only if this bit is set, it should continue with the process of

[PATCH] powerpc/32bit,PREEMPT:Load TI_FLAGS to check NEED_RESCHED

2013-05-26 Thread Priyanka Jain
Add instruction to load TI_FLAGS in r8 While returning from exception handling in case of PREEMPT enabled, _TIF_NEED_RESCHED bit is checked in TI_FLAGS (thread_info flag) of current task. Only if this bit is set, it should continue with the process of calling preempt_schedule_irq() to schedule

[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 Cc: # 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 d0528e0..4a9e408 100644 --- a/arch/powe

[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 checkpo

[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 Cc: # v3.9 --- arch/powerpc/include/asm/reg.h | 14 -- arch/powerpc/include/asm/tm.h |2 ++ arch/powerpc/include/uapi/asm/tm.h | 18 ++ 3 files changed

[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 user

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

2013-05-26 Thread Michael Neuling
Signed-off-by: Michael Neuling Cc: # 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 c907be4..84e04a0 100644 --- a/Documentati

[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 Cc: # 3.9 only --- arch/powerpc/include/asm/reg.h | 1

[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 userspace

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/p

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 y

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 Hesselbarth 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 necessary, because p->value is c

[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 Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Gavin Shan Cc: Greg Kroah-Hartman Cc: Grant Likely Cc: Bill Pemberton Cc: Yinghai Lu Cc: linuxppc-dev@lists.ozlabs.org Cc: linu

[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 ke