[PATCH v2] powernv: kvm: make _PAGE_NUMA take effect

2014-01-21 Thread Liu Ping Fan
To make sure that on host, the pages marked with _PAGE_NUMA result in a fault when guest access them, we should force the checking when guest uses hypercall to setup hpte. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- v2: It should be the reply to [PATCH 2/4] powernv: kvm: make

Re: Build regressions/improvements in v3.13

2014-01-21 Thread Geert Uytterhoeven
On Tue, Jan 21, 2014 at 9:10 AM, Geert Uytterhoeven ge...@linux-m68k.org wrote: JFYI, when comparing v3.13[1] to v3.13-rc8[3], the summaries are: - build errors: +22/-3 + /scratch/kisskb/src/arch/sh/drivers/superhyway/ops-sh4-202.c: error: (near initialization for 'dmac_resource.end'): =

Re: [PATCH 0/4] powernv: kvm: numa fault improvement

2014-01-21 Thread Liu ping fan
On Tue, Jan 21, 2014 at 11:40 AM, Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com wrote: Liu ping fan kernelf...@gmail.com writes: On Mon, Jan 20, 2014 at 11:45 PM, Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com wrote: Liu ping fan kernelf...@gmail.com writes: On Thu, Jan 9, 2014 at 8:08

Re: [PATCH 0/4] powernv: kvm: numa fault improvement

2014-01-21 Thread Liu ping fan
On Tue, Jan 21, 2014 at 5:07 PM, Liu ping fan kernelf...@gmail.com wrote: On Tue, Jan 21, 2014 at 11:40 AM, Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com wrote: Liu ping fan kernelf...@gmail.com writes: On Mon, Jan 20, 2014 at 11:45 PM, Aneesh Kumar K.V aneesh.ku...@linux.vnet.ibm.com

Re: [PATCH v2] powernv: kvm: make _PAGE_NUMA take effect

2014-01-21 Thread Aneesh Kumar K.V
Liu Ping Fan kernelf...@gmail.com writes: To make sure that on host, the pages marked with _PAGE_NUMA result in a fault when guest access them, we should force the checking when guest uses hypercall to setup hpte. Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com Reviewed-by: Aneesh

Re: [PATCH 0/4] powernv: kvm: numa fault improvement

2014-01-21 Thread Paul Mackerras
On Mon, Jan 20, 2014 at 03:48:36PM +0100, Alexander Graf wrote: On 15.01.2014, at 07:36, Liu ping fan kernelf...@gmail.com wrote: On Thu, Jan 9, 2014 at 8:08 PM, Alexander Graf ag...@suse.de wrote: On 11.12.2013, at 09:47, Liu Ping Fan kernelf...@gmail.com wrote: This series is

Re: KGDB panics on p2020 target

2014-01-21 Thread Arun Chandran
On Tue, Jan 21, 2014 at 12:06 PM, “tiejun.chen” tiejun.c...@windriver.com wrote: On 01/21/2014 02:04 PM, Arun Chandran wrote: On Mon, Jan 20, 2014 at 1:55 PM, �tiejun.chen� tiejun.c...@windriver.comwrote: On 01/17/2014 03:52 PM, Arun Chandran wrote: Hi, I am testing kgdb on freescale

Re: [PATCH] powerpc: set the correct ksp_limit on ppc32 when switching to irq stack

2014-01-21 Thread Guenter Roeck
On Fri, Jan 17, 2014 at 12:25:28PM +0800, Kevin Hao wrote: Guenter Roeck has got the following call trace on a p2020 board: Kernel stack overflow in process eb3e5a00, r1=eb79df90 CPU: 0 PID: 2838 Comm: ssh Not tainted 3.13.0-rc8-juniper-00146-g19eca00 #4 task: eb3e5a00 ti: c0616000

Re: [PATCH RFC] powerpc/mpc85xx: add support for the kmp204x reference board

2014-01-21 Thread Valentin Longchamp
On 01/20/2014 11:37 PM, Scott Wood wrote: On Mon, 2014-01-20 at 17:38 +0100, Valentin Longchamp wrote: On 01/17/2014 10:48 PM, Scott Wood wrote: On Fri, 2014-01-17 at 13:51 +0100, Valentin Longchamp wrote: Hi Scott, Thanks for you feedback. On 01/17/2014 12:35 AM, Scott Wood wrote: On

Re: [PATCH RFC] powerpc/mpc85xx: add support for the kmp204x reference board

2014-01-21 Thread Scott Wood
On Tue, 2014-01-21 at 17:34 +0100, Valentin Longchamp wrote: On 01/20/2014 11:37 PM, Scott Wood wrote: On Mon, 2014-01-20 at 17:38 +0100, Valentin Longchamp wrote: On 01/17/2014 10:48 PM, Scott Wood wrote: Why isn't the compatible keymile,kmcoge4, like the model? Because kmcoge4 is the

Re: [PATCH 1/2][v5] driver/memory:Move Freescale IFC driver to a common driver

2014-01-21 Thread Kumar Gala
On Jan 18, 2014, at 12:21 AM, Prabhakar Kushwaha prabha...@freescale.com wrote: Freescale IFC controller has been used for mpc8xxx. It will be used for ARM-based SoC as well. This patch moves the driver to driver/memory and fix the header file includes. Also remove

[PATCH 11/73] powerpc: book3s KVM can be modular so it should use module.h

2014-01-21 Thread Paul Gortmaker
Even though KVM is bool, KVM_BOOK3S_32 and KVM_BOOK3S_64 are declared as Kconfig tristate, so this file really should be including module.h instead of export.h -- it only works currently because module_init is currently (mis)placed in init.h -- but we are intending to clean that up and relocate it

[PATCH 12/73] powerpc: kvm e500/44x is not modular, so don't use module_init

2014-01-21 Thread Paul Gortmaker
In powerpc, CONFIG_KVM is bool, and so are these three subarch options, for the 44x and e500 variants. This means that any module_exit() calls and functions used by them such as the kvmppc_booke_exit() are dead code. Here we remove them. In addition, rather than use module_init, which is just

[PATCH 13/73] powerpc: use subsys_initcall for Freescale Local Bus

2014-01-21 Thread Paul Gortmaker
The FSL_SOC option is bool, and hence this code is either present or absent. It will never be modular, so using module_init as an alias for __initcall is rather misleading. Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd

[PATCH 14/73] powerpc: don't use module_init for non-modular core hugetlb code

2014-01-21 Thread Paul Gortmaker
The hugetlbpage.o is obj-y (always built in). It will never be modular, so using module_init as an alias for __initcall is somewhat misleading. Fix this up now, so that we can relocate module_init from init.h into module.h in the future. If we don't do this, we'd have to add module.h to

[PATCH 15/73] powerpc: don't use module_init in non-modular 83xx suspend code

2014-01-21 Thread Paul Gortmaker
The suspend.o is built for SUSPEND -- which is bool, and hence this code is either present or absent. It will never be modular, so using module_init as an alias for __initcall can be somewhat misleading. Fix this up now, so that we can relocate module_init from init.h into module.h in the

[PATCH RFC 00/73] tree-wide: clean up some no longer required #include linux/init.h

2014-01-21 Thread Paul Gortmaker
TL;DR - We removed cpuinit and devinit, which left ~2000 instances of include linux/init.h that were no longer needed. To fully enable this removal/cleanup, we relocate module_init() from init.h into module.h. Multi arch/multi config build testing on linux-next has been used to find and fix any

[PATCH 39/73] powerpc: delete another unrequired instance of linux/init.h

2014-01-21 Thread Paul Gortmaker
Most were already deleted in the 1st pass audit; this instance showed up more recently. Cc: Benjamin Herrenschmidt b...@kernel.crashing.org Cc: Paul Mackerras pau...@samba.org Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Paul Gortmaker paul.gortma...@windriver.com ---

[PATCH 66/73] drivers/macintosh: delete non-required instances of include linux/init.h

2014-01-21 Thread Paul Gortmaker
None of these files are actually using any __init type directives and hence don't need to include linux/init.h. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Cc: Benjamin Herrenschmidt b...@kernel.crashing.org

[PATCH 10/73] powerpc: use device_initcall for registering rtc devices

2014-01-21 Thread Paul Gortmaker
Currently these two RTC devices are in core platform code where it is not possible for them to be modular. It will never be modular, so using module_init as an alias for __initcall can be somewhat misleading. Fix this up now, so that we can relocate module_init from init.h into module.h in the

[PATCH] powerpc: Fix endian issues in kexec and crash dump code

2014-01-21 Thread Anton Blanchard
We expose a number of OF properties in the kexec and crash dump code and these need to be big endian. Cc: sta...@vger.kernel.org # v3.13 Signed-off-by: Anton Blanchard an...@samba.org -- diff --git a/arch/powerpc/kernel/machine_kexec.c b/arch/powerpc/kernel/machine_kexec.c index

Re: [PATCH] powerpc: set the correct ksp_limit on ppc32 when switching to irq stack

2014-01-21 Thread Benjamin Herrenschmidt
On Tue, 2014-01-21 at 08:14 -0800, Guenter Roeck wrote: On Fri, Jan 17, 2014 at 12:25:28PM +0800, Kevin Hao wrote: Guenter Roeck has got the following call trace on a p2020 board: Kernel stack overflow in process eb3e5a00, r1=eb79df90 CPU: 0 PID: 2838 Comm: ssh Not tainted

Re: [PATCH 12/73] powerpc: kvm e500/44x is not modular, so don't use module_init

2014-01-21 Thread Paul Gortmaker
On 14-01-21 04:22 PM, Paul Gortmaker wrote: In powerpc, CONFIG_KVM is bool, and so are these three subarch options, for the 44x and e500 variants. This means that any module_exit() calls and functions used by them such as the kvmppc_booke_exit() are dead code. Here we remove them. In

[PATCH] powerpc: fix hw breakpoints on !HAVE_HW_BREAKPOINT configurations

2014-01-21 Thread Andreas Schwab
This fixes a logic error that caused a failure to update the hw breakpoint registers when not using the hw-breakpoint interface. Signed-off-by: Andreas Schwab sch...@linux-m68k.org --- arch/powerpc/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 0/3] powerpc/pseries: fix issues in suspend/resume code

2014-01-21 Thread Tyrel Datwyler
This patchset fixes a couple of issues encountered in the suspend/resume code base. First when using the kernel device tree update code update-nodes is unnecessarily called more than once. Second the cpu cache lists are not updated after a suspend/resume which under certain conditions may cause a

[PATCH 1/3] powerpc/pseries: Device tree should only be updated once after suspend/migrate

2014-01-21 Thread Tyrel Datwyler
The current code makes rtas calls for update-nodes, activate-firmware and then update-nodes again. The FW provides the same data for both update-nodes calls. As a result a proc entry exists error is reported for the second update while adding device nodes. This patch makes a single rtas call for

[PATCH 2/3] powerpc/pseries: Update dynamic cache nodes for suspend/resume operation

2014-01-21 Thread Tyrel Datwyler
pHyp can change cache nodes for suspend/resume operation. The current code updates the device tree after all non boot CPUs are enabled. Hence, we do not modify the cache list based on the latest cache nodes. Also we do not remove cache entries for the primary CPU. This patch removes the cache

[PATCH 3/3] powerpc/pseries: Report in kernel device tree update to drmgr

2014-01-21 Thread Tyrel Datwyler
Tradiontally it has been drmgr's responsibilty to update the device tree through the /proc/ppc64/ofdt interface after a suspend/resume operation. This patchset however has modified suspend/resume ops to preform that update entirely in the kernel during the resume. Therefore, a mechanism is

Re: [PATCH 10/73] powerpc: use device_initcall for registering rtc devices

2014-01-21 Thread Geoff Levand
Hi Paul, On Tue, 2014-01-21 at 16:22 -0500, Paul Gortmaker wrote: Currently these two RTC devices are in core platform code where it is not possible for them to be modular. It will never be modular, so using module_init as an alias for __initcall can be somewhat misleading.

Re: [PATCH 0/8] Add support for PowerPC Hypervisor supplied performance counters

2014-01-21 Thread Michael Ellerman
On Thu, 2014-01-16 at 15:53 -0800, Cody P Schafer wrote: These patches add basic pmus for 2 powerpc hypervisor interfaces to obtain performance counters: gpci (get performance counter info) and 24x7. The counters supplied by these interfaces are continually counting and never need to be (and

Re: [PATCH 10/73] powerpc: use device_initcall for registering rtc devices

2014-01-21 Thread Paul Gortmaker
On Tue, Jan 21, 2014 at 6:48 PM, Geoff Levand ge...@infradead.org wrote: Hi Paul, On Tue, 2014-01-21 at 16:22 -0500, Paul Gortmaker wrote: Currently these two RTC devices are in core platform code where it is not possible for them to be modular. It will never be modular, so using

Re: [PATCH 0/4] powernv: kvm: numa fault improvement

2014-01-21 Thread Aneesh Kumar K.V
Paul Mackerras pau...@samba.org writes: On Mon, Jan 20, 2014 at 03:48:36PM +0100, Alexander Graf wrote: On 15.01.2014, at 07:36, Liu ping fan kernelf...@gmail.com wrote: On Thu, Jan 9, 2014 at 8:08 PM, Alexander Graf ag...@suse.de wrote: On 11.12.2013, at 09:47, Liu Ping Fan

Re: [PATCH] powerpc: fix hw breakpoints on !HAVE_HW_BREAKPOINT configurations

2014-01-21 Thread Michael Neuling
I'm not near my machine to test but looks good. Thanks, Mikey On 22 Jan 2014 08:56, Andreas Schwab sch...@linux-m68k.org wrote: This fixes a logic error that caused a failure to update the hw breakpoint registers when not using the hw-breakpoint interface. Signed-off-by: Andreas Schwab

Re: [PATCH RFC 00/73] tree-wide: clean up some no longer required #include linux/init.h

2014-01-21 Thread Stephen Rothwell
Hi Paul, On Tue, 21 Jan 2014 16:22:03 -0500 Paul Gortmaker paul.gortma...@windriver.com wrote: Where: This work exists as a queue of patches that I apply to linux-next; since the changes are fixing some things that currently can only be found there. The patch series can be found at:

[RESEND PATCH V5 0/8] cpuidle/ppc: Enable deep idle states on PowerNV

2014-01-21 Thread Preeti U Murthy
On PowerPC, when CPUs enter certain deep idle states, the local timers stop and the time base could go out of sync with the rest of the cores in the system. This patchset adds support to wake up CPUs in such idle states by broadcasting IPIs to them at their next timer events using the tick

[RESEND PATCH V5 1/8] powerpc: Free up the slot of PPC_MSG_CALL_FUNC_SINGLE IPI message

2014-01-21 Thread Preeti U Murthy
From: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com The IPI handlers for both PPC_MSG_CALL_FUNC and PPC_MSG_CALL_FUNC_SINGLE map to a common implementation - generic_smp_call_function_single_interrupt(). So, we can consolidate them and save one of the IPI message slots, (which are precious on

[RESEND PATCH V5 2/8] powerpc: Implement tick broadcast IPI as a fixed IPI message

2014-01-21 Thread Preeti U Murthy
From: Srivatsa S. Bhat srivatsa.b...@linux.vnet.ibm.com For scalability and performance reasons, we want the tick broadcast IPIs to be handled as efficiently as possible. Fixed IPI messages are one of the most efficient mechanisms available - they are faster than the smp_call_function mechanism

[RESEND PATCH V5 3/8] cpuidle/ppc: Split timer_interrupt() into timer handling and interrupt handling routines

2014-01-21 Thread Preeti U Murthy
Split timer_interrupt(), which is the local timer interrupt handler on ppc into routines called during regular interrupt handling and __timer_interrupt(), which takes care of running local timers and collecting time related stats. This will enable callers interested only in running expired local

[RESEND PATCH V5 4/8] powernv/cpuidle: Add context management for Fast Sleep

2014-01-21 Thread Preeti U Murthy
From: Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com Before adding Fast-Sleep into the cpuidle framework, some low level support needs to be added to enable it. This includes saving and restoring of certain registers at entry and exit time of this state respectively just like we do in the NAP

[RESEND PATCH V5 5/8] powermgt: Add OPAL call to resync timebase on wakeup

2014-01-21 Thread Preeti U Murthy
From: Vaidyanathan Srinivasan sva...@linux.vnet.ibm.com During Fast-sleep and deeper power savings state, decrementer and timebase could be stopped making it out of sync with rest of the cores in the system. Add a firmware call to request platform to resync timebase using low level platform

[RESEND PATCH V5 6/8] time/cpuidle: Support in tick broadcast framework in the absence of external clock device

2014-01-21 Thread Preeti U Murthy
On some architectures, in certain CPU deep idle states the local timers stop. An external clock device is used to wakeup these CPUs. The kernel support for the wakeup of these CPUs is provided by the tick broadcast framework by using the external clock device as the wakeup source. However not

[RESEND PATCH V5 7/8] cpuidle/powernv: Add Fast-Sleep CPU idle state

2014-01-21 Thread Preeti U Murthy
Fast sleep is one of the deep idle states on Power8 in which local timers of CPUs stop. On PowerPC we do not have an external clock device which can handle wakeup of such CPUs. Now that we have the support in the tick broadcast framework for archs that do not sport such a device and the low level

[RESEND PATCH V5 8/8] cpuidle/powernv: Parse device tree to setup idle states

2014-01-21 Thread Preeti U Murthy
Add deep idle states such as nap and fast sleep to the cpuidle state table only if they are discovered from the device tree during cpuidle initialization. Signed-off-by: Preeti U Murthy pre...@linux.vnet.ibm.com --- drivers/cpuidle/cpuidle-powernv.c | 81 +