Re: [RFC PATCH 02/10] KVM: PPC: BOOK3S: PR: Emulate virtual timebase register

2014-01-29 Thread Paul Mackerras
On Tue, Jan 28, 2014 at 10:14:07PM +0530, Aneesh Kumar K.V wrote: > virtual time base register is a per vm register and need to saved > and restored on vm exit and entry. Writing to VTB is not allowed > in the privileged mode. ... > +#ifdef CONFIG_PPC_BOOK3S_64 > +#define mfvtb() ({un

Re: [RFC PATCH 07/10] KVM: PPC: BOOK3S: PR: Emulate facility status and control register

2014-01-29 Thread Paul Mackerras
On Tue, Jan 28, 2014 at 10:14:12PM +0530, Aneesh Kumar K.V wrote: > We allow priv-mode update of this. The guest value is saved in fscr, > and the value actually used is saved in shadow_fscr. shadow_fscr > only contains values that are allowed by the host. On > facility unavailable interrupt, if th

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Preeti U Murthy
Hi Nicolas, On 01/30/2014 10:58 AM, Nicolas Pitre wrote: > On Thu, 30 Jan 2014, Preeti U Murthy wrote: > >> Hi Nicolas, >> >> On 01/30/2014 02:01 AM, Nicolas Pitre wrote: >>> On Wed, 29 Jan 2014, Nicolas Pitre wrote: >>> In order to integrate cpuidle with the scheduler, we must have a better

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Nicolas Pitre
On Thu, 30 Jan 2014, Preeti U Murthy wrote: > Hi Nicolas, > > On 01/30/2014 02:01 AM, Nicolas Pitre wrote: > > On Wed, 29 Jan 2014, Nicolas Pitre wrote: > > > >> In order to integrate cpuidle with the scheduler, we must have a better > >> proximity in the core code with what cpuidle is doing and

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Preeti U Murthy
Hi Nicolas, On 01/30/2014 02:01 AM, Nicolas Pitre wrote: > On Wed, 29 Jan 2014, Nicolas Pitre wrote: > >> In order to integrate cpuidle with the scheduler, we must have a better >> proximity in the core code with what cpuidle is doing and not delegate >> such interaction to arch code. >> >> Archi

Re: [PATCH] powerpc: Add cpu family documentation

2014-01-29 Thread Stephen Rothwell
Hi Michael, Nice. On Thu, 30 Jan 2014 13:38:00 +1100 Michael Ellerman wrote: > > +++ b/Documentation/powerpc/cpu_families.txt > @@ -0,0 +1,76 @@ > +CPU Families > + > + > +This doco tries to summarise some of the different cpu families that exist > and document > + |

[git pull] Please pull powerpc.git next branch

2014-01-29 Thread Benjamin Herrenschmidt
Hi Linus ! Here are a few more powerpc bits for this merge window. The bulk is made of two pull requests from Scott and Anatolij that I had missed previously (they arrived while I was away). Since both their branches are in -next independently, and the content has been around for a little while, t

[PATCH] powerpc: Add cpu family documentation

2014-01-29 Thread Michael Ellerman
This patch adds some documentation on the different cpu families supported by arch/powerpc. Signed-off-by: Michael Ellerman --- Documentation/powerpc/cpu_families.txt | 76 ++ 1 file changed, 76 insertions(+) create mode 100644 Documentation/powerpc/cpu_families.

Re: [RFC PATCH 02/10] KVM: PPC: BOOK3S: PR: Emulate virtual timebase register

2014-01-29 Thread Benjamin Herrenschmidt
On Thu, 2014-01-30 at 09:54 +1100, Benjamin Herrenschmidt wrote: > On Wed, 2014-01-29 at 17:39 +0100, Alexander Graf wrote: > > static inline mfvtb(unsigned long) > > { > > #ifdef CONFIG_PPC_BOOK3S_64 > > return mfspr(SPRN_VTB); > > #else > > BUG(); > > #endif > > } > > > > is a lot easi

Re: [PATCH 2/2] Fix compile error of pgtable-ppc64.h

2014-01-29 Thread Benjamin Herrenschmidt
On Wed, 2014-01-29 at 10:45 -0800, Greg KH wrote: > On Tue, Jan 28, 2014 at 05:52:42PM +0530, Aneesh Kumar K.V wrote: > > From: Li Zhong > > > > It seems that forward declaration couldn't work well with typedef, use > > struct spinlock directly to avoiding following build errors: > > > > In file

Re: [RFC PATCH 02/10] KVM: PPC: BOOK3S: PR: Emulate virtual timebase register

2014-01-29 Thread Benjamin Herrenschmidt
On Wed, 2014-01-29 at 17:39 +0100, Alexander Graf wrote: > static inline mfvtb(unsigned long) > { > #ifdef CONFIG_PPC_BOOK3S_64 > return mfspr(SPRN_VTB); > #else > BUG(); > #endif > } > > is a lot easier to read and get right. But reg.h is Ben's call. Agreed. > Also could you please gi

Re: [PATCH] slub: Don't throw away partial remote slabs if there is no local memory

2014-01-29 Thread Nishanth Aravamudan
On 28.01.2014 [10:29:47 -0800], Nishanth Aravamudan wrote: > On 27.01.2014 [14:58:05 +0900], Joonsoo Kim wrote: > > On Fri, Jan 24, 2014 at 05:10:42PM -0800, Nishanth Aravamudan wrote: > > > On 24.01.2014 [16:25:58 -0800], David Rientjes wrote: > > > > On Fri, 24 Jan 2014, Nishanth Aravamudan wrote

Re: [PATCH 2/2] Fix compile error of pgtable-ppc64.h

2014-01-29 Thread Greg KH
On Tue, Jan 28, 2014 at 05:52:42PM +0530, Aneesh Kumar K.V wrote: > From: Li Zhong > > It seems that forward declaration couldn't work well with typedef, use > struct spinlock directly to avoiding following build errors: > > In file included from include/linux/spinlock.h:81, > f

Re: Please pull 'next' branch of 5xxx tree

2014-01-29 Thread Anatolij Gustschin
Hi Ben ! On Wed, 29 Jan 2014 18:46:09 +1100 Benjamin Herrenschmidt wrote: ... > Hrm, I get a merge conflicts with spi-mpc512x-psc.c, please check that I > fixed it up properly in powerpc-next and let me know. your fix is correct. Thanks, Anatolij __

Re: [PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Nicolas Pitre
On Wed, 29 Jan 2014, Nicolas Pitre wrote: > In order to integrate cpuidle with the scheduler, we must have a better > proximity in the core code with what cpuidle is doing and not delegate > such interaction to arch code. > > Architectures implementing arch_cpu_idle() should simply enter > a chea

Re: [PATCH v2 5/6] X86: remove redundant cpuidle_idle_call()

2014-01-29 Thread Nicolas Pitre
On Wed, 29 Jan 2014, Olof Johansson wrote: > Hi, > > On Wed, Jan 29, 2014 at 9:45 AM, Nicolas Pitre > wrote: > > The core idle loop now takes care of it. > > > > Signed-off-by: Nicolas Pitre > > Acked-by: Daniel Lezcano > > --- > > arch/x86/kernel/process.c | 5 + > > 1 file changed, 1 i

Re: [PATCH v2 5/6] X86: remove redundant cpuidle_idle_call()

2014-01-29 Thread Olof Johansson
Hi, On Wed, Jan 29, 2014 at 9:45 AM, Nicolas Pitre wrote: > The core idle loop now takes care of it. > > Signed-off-by: Nicolas Pitre > Acked-by: Daniel Lezcano > --- > arch/x86/kernel/process.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/arch/x86/kernel/proces

[PATCH v2 6/6] cpu/idle.c: move to sched/idle.c

2014-01-29 Thread Nicolas Pitre
Integration of cpuidle with the scheduler requires that the idle loop be closely integrated with the scheduler proper. Moving cpu/idle.c into the sched directory will allow for a smoother integration, and eliminate a subdirectory which contained only one source file. Signed-off-by: Nicolas Pitre

[PATCH v2 4/6] SH: remove redundant cpuidle_idle_call()

2014-01-29 Thread Nicolas Pitre
The core idle loop now takes care of it. Signed-off-by: Nicolas Pitre Acked-by: Daniel Lezcano --- arch/sh/kernel/idle.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/arch/sh/kernel/idle.c b/arch/sh/kernel/idle.c index 2ea4483fd7..be616ee0cf 100644 --- a/arch/sh/kernel/

[PATCH v2 3/6] PPC: remove redundant cpuidle_idle_call()

2014-01-29 Thread Nicolas Pitre
The core idle loop now takes care of it. However a few things need checking: - Invocation of cpuidle_idle_call() in pseries_lpar_idle() happened through arch_cpu_idle() and was therefore always preceded by a call to ppc64_runlatch_off(). To preserve this property now that cpuidle_idle_call

[PATCH v2 5/6] X86: remove redundant cpuidle_idle_call()

2014-01-29 Thread Nicolas Pitre
The core idle loop now takes care of it. Signed-off-by: Nicolas Pitre Acked-by: Daniel Lezcano --- arch/x86/kernel/process.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 3fb8d95ab8..4505e2a950 100644 --- a/ar

[PATCH v2 2/6] ARM: remove redundant cpuidle_idle_call()

2014-01-29 Thread Nicolas Pitre
The core idle loop now takes care of it. Signed-off-by: Nicolas Pitre Acked-by: Daniel Lezcano --- arch/arm/kernel/process.c | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c index 92f7b15dd2..adabeababe 1

[PATCH v2 1/6] idle: move the cpuidle entry point to the generic idle loop

2014-01-29 Thread Nicolas Pitre
In order to integrate cpuidle with the scheduler, we must have a better proximity in the core code with what cpuidle is doing and not delegate such interaction to arch code. Architectures implementing arch_cpu_idle() should simply enter a cheap idle mode in the absence of a proper cpuidle driver.

[PATCH v2 0/6] setting the table for integration of cpuidle with the scheduler

2014-01-29 Thread Nicolas Pitre
As everyone should know by now, we want to integrate the cpuidle governor with the scheduler for a more efficient idling of CPUs. In order to help the transition, this small patch series moves the existing interaction with cpuidle from architecture code to generic core code. The ARM, PPC, SH and X

Re: [RFC PATCH 10/10] PPC: BOOK3S: Disable/Enable TM looking at the ibm,pa-features device tree entry

2014-01-29 Thread Alexander Graf
On 01/28/2014 05:44 PM, Aneesh Kumar K.V wrote: Runtime disable transactional memory feature looking at pa-features device tree entry. We need to do this so that we can run a kernel built with TM config in PR mode. For PR guest we provide a device tree entry with TM feature disabled in pa-feature

Re: [RFC PATCH 08/10] KVM: PPC: BOOK3S: PR: Add support for facility unavailable interrupt

2014-01-29 Thread Alexander Graf
On 01/28/2014 05:44 PM, Aneesh Kumar K.V wrote: At this point we allow all the supported facilities except EBB. So forward the interrupt to guest as illegal instruction. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/kvm_asm.h | 4 +++- arch/powerpc/kvm/book3s.c | 4

Re: [RFC PATCH 07/10] KVM: PPC: BOOK3S: PR: Emulate facility status and control register

2014-01-29 Thread Alexander Graf
On 01/28/2014 05:44 PM, Aneesh Kumar K.V wrote: We allow priv-mode update of this. The guest value is saved in fscr, and the value actually used is saved in shadow_fscr. shadow_fscr only contains values that are allowed by the host. On facility unavailable interrupt, if the facility is allowed by

[PATCH] Handle vmalloc addresses

2014-01-29 Thread Nathan Fontenot
The nx-842 compression driver does not currently handle getting a physical address for vmalloc addresses. The current driver uses __pa() for all addresses which does not properly handle vmalloc addresses and thus causes a failure since we do not pass a proper physical address to phyp. This patch a

Re: [RFC PATCH 03/10] KVM: PPC: BOOK3S: PR: Emulate instruction counter

2014-01-29 Thread Alexander Graf
On 01/28/2014 05:44 PM, Aneesh Kumar K.V wrote: Writing to IC is not allowed in the privileged mode. This is not a patch description. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/kvm_host.h | 1 + arch/powerpc/kvm/book3s_emulate.c | 3 +++ arch/powerpc/kvm/book3s_pr.c

Re: [RFC PATCH 02/10] KVM: PPC: BOOK3S: PR: Emulate virtual timebase register

2014-01-29 Thread Alexander Graf
On 01/28/2014 05:44 PM, Aneesh Kumar K.V wrote: virtual time base register is a per vm register and need to saved and restored on vm exit and entry. Writing to VTB is not allowed in the privileged mode. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/kvm_host.h | 1 + arch/powe

Re: [RFC PATCH 01/10] KVM: PPC: BOOK3S: PR: Fix PURR and SPURR emulation

2014-01-29 Thread Alexander Graf
On 01/28/2014 05:44 PM, Aneesh Kumar K.V wrote: We definitely don't need to emulate mtspr, because both the registers are hypervisor resource. This patch description doesn't cover what the patch actually does. It changes the implementation from "always tell the guest it uses 100%" to "give th

Re: [PATCH] powerpc: enable CONFIG_HAVE_MEMORYLESS_NODES

2014-01-29 Thread Christoph Lameter
On Tue, 28 Jan 2014, Nishanth Aravamudan wrote: > Anton Blanchard found an issue with an LPAR that had no memory in Node > 0. Christoph Lameter recommended, as one possible solution, to use > numa_mem_id() for locality of the nearest memory node-wise. However, > numa_mem_id() [and the other relate

Re: [PATCH] slub: Don't throw away partial remote slabs if there is no local memory

2014-01-29 Thread Christoph Lameter
On Tue, 28 Jan 2014, Nishanth Aravamudan wrote: > This helps about the same as David's patch -- but I found the reason > why! ppc64 doesn't set CONFIG_HAVE_MEMORYLESS_NODES :) Expect a patch > shortly for that and one other case I found. Oww... ___ Lin

[PATCH] powerpc/ppc32: fix the bug in the init of non-base exception stack for UP

2014-01-29 Thread Kevin Hao
We would allocate one specific exception stack for each kind of non-base exceptions for every CPU. For ppc32 the CPU hard ID is used as the subscript to get the specific exception stack for one CPU. But for an UP kernel, there is only one element in the each kind of exception stack array. We would

Re: Please pull 'next' branch of 5xxx tree

2014-01-29 Thread Gerhard Sittig
On Wed, Jan 29, 2014 at 18:46 +1100, Benjamin Herrenschmidt wrote: > > On Tue, 2014-01-28 at 17:00 +1100, Benjamin Herrenschmidt wrote: > > On Tue, 2014-01-28 at 06:46 +0100, Anatolij Gustschin wrote: > > > Hi Ben ! > > > > > > On Wed, 15 Jan 2014 22:18:59 +0100 > > > Anatolij Gustschin wrote: >

Re: [git pull] Please pull powerpc.git next branch

2014-01-29 Thread Olaf Hering
On Wed, Jan 29, Alistair Popple wrote: > Looks like I missed the dart iommu code when changing the iommu table > initialisation. The patch below should fix it, would you mind testing it Ben? > +++ b/arch/powerpc/sysdev/dart_iommu.c > + iommu_table_dart.it_page_shift = IOMMU_PAGE_SHIFT_4K; Yes,