Re: linuxppc patchwork queue

2015-11-25 Thread Michael Ellerman
On Tue, 2015-11-24 at 08:56 +1100, Daniel Axtens wrote: > > The main thing you could do, and anyone could do (!), is just review some > > patches. Even if you don't know the area of code that well, you can usually > > do > > a basic review. > > > > eg. Just the basic stuff: > > - Is the subject

Re: [PATCH 2/2] powerpc: tracing: don't trace hcalls on offline CPUs

2015-11-25 Thread Michael Ellerman
On Tue, 2015-11-24 at 21:23 +0300, Denis Kirjanov wrote: > ./drmgr -c cpu -a -r gives the following warning: > > [ 2327.035563] RCU used illegally from offline CPU! > rcu_scheduler_active = 1, debug_locks = 1 > [ 2327.035564] no locks held by swapper/12/0. > [ 2327.035565] stack backtrace: > [ 23

[PATCH V2] cpufreq: qoriq: Register cooling device based on device tree

2015-11-25 Thread Jia Hongtao
Register the qoriq cpufreq driver as a cooling device, based on the thermal device tree framework. When temperature crosses the passive trip point cpufreq is used to throttle CPUs. Signed-off-by: Jia Hongtao --- Changes for V2: * Using ->ready callback for cpu cooling device registering. driver

Re: [PATCH V5 23/31] powerpc/mm: Increase the width of #define

2015-11-25 Thread Anshuman Khandual
On 11/23/2015 03:52 PM, Aneesh Kumar K.V wrote: > No real change, only style changes If there are no real changes and it does not help upcoming patches in the series, should not it just follow patch 17 after all the header movement has been completed before we get down to real changes. IMHO the se

Re: [PATCH 7/7] powerpc: fix a problematic usage of WARN()

2015-11-25 Thread Michael Ellerman
On Wed, 2015-11-25 at 21:12 +0800, Geliang Tang wrote: > WARN() takes a condition and a format string. The condition was > omitted. So I added it. > > Signed-off-by: Geliang Tang > --- > arch/powerpc/kernel/setup_64.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch

Re: [PATCH v2 5/6] powerpc/pseries: Add CPU dlpar add functionality

2015-11-25 Thread Michael Ellerman
On Tue, 2015-10-27 at 13:27 -0500, Nathan Fontenot wrote: > Add the ability to hotplug add cpus via rtas hotplug events by either > specifying the drc index of the CPU to add, or providing a count of the > number of CPUs to add. So I just tried running this on my system, without doing anything on

Re: [PATCH v2 4/6] powerpc/pseries: Add CPU dlpar remove functionality

2015-11-25 Thread Michael Ellerman
On Tue, 2015-10-27 at 13:26 -0500, Nathan Fontenot wrote: > Add the ability to dlpar remove CPUs via hotplug rtas events, either by > specifying the drc-index of the CPU to remove or providing a count of cpus > to remove. > > diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c > b/arch/pow

[PATCH] powerpc/cell: Remove the Cell QPACE code.

2015-11-25 Thread Rashmica Gupta
All users of QPACE have upgraded to QPACE2 so remove the Cell QPACE code. Signed-off-by: Rashmica Gupta --- arch/powerpc/boot/Makefile| 2 - arch/powerpc/configs/ppc64_defconfig | 1 - arch/powerpc/platforms/cell/Kconfig | 5 - arch/powerpc/platforms/cell/Makefil

[PATCH] powerpc: Avoid -maltivec when using clang integrated assembler

2015-11-25 Thread Anton Blanchard
Check the assembler supports -maltivec by wrapping it with call as-option. Signed-off-by: Anton Blanchard --- arch/powerpc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 96efd82..76a315d 100644 --- a/arch/powerpc/M

[PATCH v2 9/9] KVM: PPC: Book3S HV: Add tunable to control H_IPI redirection

2015-11-25 Thread Suresh Warrier
Redirecting the wakeup of a VCPU from the H_IPI hypercall to a core running in the host is usually a good idea, most workloads seemed to benefit. However, in one heavily interrupt-driven SMT1 workload, some regression was observed. This patch adds a kvm_hv module parameter called h_ipi_redirect to

[PATCH v2 7/9] KVM: PPC: Book3S HV: Host side kick VCPU when poked by real-mode KVM

2015-11-25 Thread Suresh Warrier
This patch adds the support for the kick VCPU operation for kvmppc_host_rm_ops. The kvmppc_xics_ipi_action() function provides the function to be invoked for a host side operation when poked by the real mode KVM. This is initiated by KVM by sending an IPI to any free host core. KVM real mode must

[PATCH v2 8/9] KVM: PPC: Book3S HV: Send IPI to host core to wake VCPU

2015-11-25 Thread Suresh Warrier
This patch adds support to real-mode KVM to search for a core running in the host partition and send it an IPI message with VCPU to be woken. This avoids having to switch to the host partition to complete an H_IPI hypercall when the VCPU which is the target of the the H_IPI is not loaded (is not ru

[PATCH v2 6/9] KVM: PPC: Book3S HV: kvmppc_host_rm_ops - handle offlining CPUs

2015-11-25 Thread Suresh Warrier
The kvmppc_host_rm_ops structure keeps track of which cores are are in the host by maintaining a bitmask of active/runnable online CPUs that have not entered the guest. This patch adds support to manage the bitmask when a CPU is offlined or onlined in the host. Signed-off-by: Suresh Warrier ---

[PATCH v2 5/9] KVM: PPC: Book3S HV: Manage core host state

2015-11-25 Thread Suresh Warrier
Update the core host state in kvmppc_host_rm_ops whenever the primary thread of the core enters the guest or returns back. Signed-off-by: Suresh Warrier --- arch/powerpc/kvm/book3s_hv.c | 44 1 file changed, 44 insertions(+) diff --git a/arch/powerpc

[PATCH v2 4/9] KVM: PPC: Book3S HV: Host-side RM data structures

2015-11-25 Thread Suresh Warrier
This patch defines the data structures to support the setting up of host side operations while running in real mode in the guest, and also the functions to allocate and free it. The operations are for now limited to virtual XICS operations. Currently, we have only defined one operation in the data

[PATCH v2 3/9] powerpc/powernv: Add icp_native_cause_ipi_rm

2015-11-25 Thread Suresh Warrier
Function to cause an IPI. Requires kvm_hstate.xics_phys to be initialized with physical address of XICS. Signed-off-by: Suresh Warrier --- arch/powerpc/include/asm/xics.h | 1 + arch/powerpc/sysdev/xics/icp-native.c | 19 +++ 2 files changed, 20 insertions(+) diff --git a

[PATCH v2 2/9] powerpc/smp: Add smp_muxed_ipi_set_message

2015-11-25 Thread Suresh Warrier
smp_muxed_ipi_message_pass() invokes smp_ops->cause_ipi, which updates the MFFR through an ioremapped address, to cause the IPI. Because of this real mode callers cannot call smp_muxed_ipi_message_pass() for IPI messaging. This patch creates a separate function smp_muxed_ipi_set_message just to se

[PATCH v2 1/9] powerpc/smp: Support more IPI messages

2015-11-25 Thread Suresh Warrier
This patch increases the number of demuxed messages for a controller with a single ipi to 8 for 64-bit systems This is required because we want to use the IPI mechanism to send messages from a CPU running in KVM real mode in a guest to a CPU in the host to take some action. Currently, we only supp

[PATCH v2 0/9] KVM: PPC: Book3S HV: Optimize wakeup VCPU from H_IPI

2015-11-25 Thread Suresh Warrier
When the VCPU target of an H_IPI hypercall is not running in the guest, we need to do a kick VCPU (wake the VCPU thread) to make it runnable. The real-mode version of the H_IPI hypercall cannot do this because it involves waking a sleeping thread. Thus the hcall returns H_TOO_HARD which forces a sw

Re: [PATCH] cxl: Fix build failure due to -Wunused-variable behaviour change

2015-11-25 Thread Michael Ellerman
On Wed, 2015-11-25 at 17:16 +0100, Torsten Duwe wrote: > On Tue, Sep 15, 2015 at 03:48:34PM +1000, Ian Munsie wrote: > > --- a/drivers/misc/cxl/Makefile > > +++ b/drivers/misc/cxl/Makefile > > @@ -1,4 +1,4 @@ > > -ccflags-y := -Werror > > +ccflags-y := -Werror -Wno-unused-const-variable > > JFYI,

Re: [PATCH] cxl: Fix build failure due to -Wunused-variable behaviour change

2015-11-25 Thread Anton Blanchard
Hi Torsten, > > -ccflags-y := -Werror > > +ccflags-y := -Werror -Wno-unused-const-variable > > JFYI, my gcc-4.3 does not like this switch. > What's the minimum compiler version to build this code? -Werror is such a moving target. I'm also seeing issues when building with clang, eg: drivers/misc

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Mike Snitzer
On Wed, Nov 25 2015 at 3:23pm -0500, Mike Snitzer wrote: > On Wed, Nov 25 2015 at 2:24pm -0500, > Jens Axboe wrote: > > > On 11/25/2015 12:10 PM, Hannes Reinecke wrote: > > >The problem is that NOMERGE does too much, as it inhibits _any_ merging. > > > > Right, that is the point of the flag

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Jens Axboe
On 11/25/2015 12:10 PM, Hannes Reinecke wrote: On 11/25/2015 06:56 PM, Jens Axboe wrote: On 11/25/2015 02:04 AM, Hannes Reinecke wrote: On 11/20/2015 04:28 PM, Ewan Milne wrote: On Fri, 2015-11-20 at 15:55 +0100, Hannes Reinecke wrote: Can't we have a joint effort here? I've been spending a _

[RFC 1/1] powerpc: legacy serial port use device tree cell-index property

2015-11-25 Thread Curt Brune
Currently for PowerPC systems using device tree, the legacy serial ports are allocated in the order by which they are found in the device tree structure. This can cause problems in cases where the device tree nodes are sysnthesized by an external program (kexec for example), which may not preserve

[RFC 0/1] PowerPC legacy serial console / device tree

2015-11-25 Thread Curt Brune
Proposing to use the 'cell-index' property to map device tree serial nodes to legacy serial port number. For example this allows the device to explicity specify which serial device to use for ttyS0. The basic idea is outlined in the following patch. If this approach seems reasonable I would foll

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Jens Axboe
On 11/25/2015 02:04 AM, Hannes Reinecke wrote: On 11/20/2015 04:28 PM, Ewan Milne wrote: On Fri, 2015-11-20 at 15:55 +0100, Hannes Reinecke wrote: Can't we have a joint effort here? I've been spending a _LOT_ of time trying to debug things here, but none of the ideas I've come up with have been

[PATCH 7/7] powerpc: fix a problematic usage of WARN()

2015-11-25 Thread Geliang Tang
WARN() takes a condition and a format string. The condition was omitted. So I added it. Signed-off-by: Geliang Tang --- arch/powerpc/kernel/setup_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c index 5c03a6a

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Mike Snitzer
On Wed, Nov 25 2015 at 2:24pm -0500, Jens Axboe wrote: > On 11/25/2015 12:10 PM, Hannes Reinecke wrote: > >On 11/25/2015 06:56 PM, Jens Axboe wrote: > >>On 11/25/2015 02:04 AM, Hannes Reinecke wrote: > >>>On 11/20/2015 04:28 PM, Ewan Milne wrote: > On Fri, 2015-11-20 at 15:55 +0100, Hannes R

Re: [PATCH] PCI: designware: bail out if host_init failed

2015-11-25 Thread Bjorn Helgaas
Hi Jisheng, On Thu, Nov 12, 2015 at 09:48:45PM +0800, Jisheng Zhang wrote: > There's no reason to continue the initialization such as configure > register, scan root bus etc. if customized host_init() failed. This > patch tries to check the host_init result, bail out if failed. This patch changes

Re: [2/2] powerpc/smp: Add smp_muxed_ipi_rm_message_pass

2015-11-25 Thread Suresh E. Warrier
Hi Mike, After looking at this a little more, I think it would perhaps be better to define the real-mode function that causes IPI in book3s_hv_rm_xics.c along with other real-mode functions that operate on the xics. Hope this is acceptable to you. If not, we can discuss when I re-submit the pat

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Hannes Reinecke
On 11/25/2015 06:56 PM, Jens Axboe wrote: On 11/25/2015 02:04 AM, Hannes Reinecke wrote: On 11/20/2015 04:28 PM, Ewan Milne wrote: On Fri, 2015-11-20 at 15:55 +0100, Hannes Reinecke wrote: Can't we have a joint effort here? I've been spending a _LOT_ of time trying to debug things here, but no

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Hannes Reinecke
On 11/25/2015 07:01 PM, Mike Snitzer wrote: On Wed, Nov 25 2015 at 4:04am -0500, Hannes Reinecke wrote: On 11/20/2015 04:28 PM, Ewan Milne wrote: On Fri, 2015-11-20 at 15:55 +0100, Hannes Reinecke wrote: Can't we have a joint effort here? I've been spending a _LOT_ of time trying to debug t

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Mike Snitzer
On Wed, Nov 25 2015 at 4:04am -0500, Hannes Reinecke wrote: > On 11/20/2015 04:28 PM, Ewan Milne wrote: > > On Fri, 2015-11-20 at 15:55 +0100, Hannes Reinecke wrote: > >> Can't we have a joint effort here? > >> I've been spending a _LOT_ of time trying to debug things here, but > >> none of the

[PATCH v4 8/9] Implement kernel live patching for ppc64le (ABIv2)

2015-11-25 Thread Torsten Duwe
* create the appropriate files+functions arch/powerpc/include/asm/livepatch.h klp_check_compiler_support, klp_arch_set_pc arch/powerpc/kernel/livepatch.c with a stub for klp_write_module_reloc This is architecture-independent work in progress. * introduce a f

[PATCH v4 7/9] ppc64 ftrace: disable profiling for some files

2015-11-25 Thread Torsten Duwe
This patch complements the "notrace" attribute for selected functions. It adds -mprofile-kernel to the cc flags to be stripped from the command line for code-patching.o and feature-fixups.o, in addition to "-pg" Signed-off-by: Torsten Duwe --- arch/powerpc/lib/Makefile | 4 ++-- 1 file changed,

[PATCH v4 6/9] ppc64 ftrace: disable profiling for some functions

2015-11-25 Thread Torsten Duwe
At least POWER7/8 have MMUs that don't completely autoload; a normal, recoverable memory fault might pass through these functions. If a dynamic tracer function causes such a fault, any of these functions being traced with -mprofile-kernel may cause an endless recursion. Signed-off-by: Torsten Duwe

[PATCH v4 4/9] ppc64 ftrace_with_regs configuration variables

2015-11-25 Thread Torsten Duwe
* Makefile: - globally use -mprofile-kernel in case it's configured. * arch/powerpc/Kconfig / kernel/trace/Kconfig: - declare that ppc64le HAVE_MPROFILE_KERNEL and HAVE_DYNAMIC_FTRACE_WITH_REGS, and use it. Signed-off-by: Torsten Duwe --- arch/powerpc/Kconfig | 2 ++ arch/powe

[PATCH v4 9/9] Enable LIVEPATCH to be configured on ppc64le and add livepatch.o if it is selected.

2015-11-25 Thread Torsten Duwe
Signed-off-by: Torsten Duwe --- arch/powerpc/Kconfig | 5 + arch/powerpc/kernel/Makefile | 1 + 2 files changed, 6 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 55fd59e..47f479c 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -163,6 +163

[PATCH v4 2/9] ppc64le FTRACE_WITH_REGS implementation

2015-11-25 Thread Torsten Duwe
Implement FTRACE_WITH_REGS for powerpc64, on ELF ABI v2. Initial work started by Vojtech Pavlik, used with permission. * arch/powerpc/kernel/entry_64.S: - Implement an effective ftrace_caller that works from within the kernel binary as well as from modules. * arch/powerpc/kernel/ftra

[PATCH v4 3/9] ppc use ftrace_modify_all_code default

2015-11-25 Thread Torsten Duwe
Convert ppc's arch_ftrace_update_code from its own function copy to use the generic default functionality (without stop_machine -- our instructions are properly aligned and the replacements atomic ;) With this we gain error checking and the much-needed function_trace_op handling. Signed-off-by: T

[PATCH v4 1/9] ppc64 (le): prepare for -mprofile-kernel

2015-11-25 Thread Torsten Duwe
The gcc switch -mprofile-kernel, available for ppc64 on gcc > 4.8.5, allows to call _mcount very early in the function, which low-level ASM code and code patching functions need to consider. Especially the link register and the parameter registers are still alive and not yet saved into a new stack

[PATCH v4 5/9] ppc64 ftrace_with_regs: spare early boot and low level

2015-11-25 Thread Torsten Duwe
Using -mprofile-kernel on early boot code not only confuses the checker but is also useless, as the infrastructure is not yet in place. Proceed like with -pg (remove it from CFLAGS), equally with time.o and ftrace itself. * arch/powerpc/kernel/Makefile: - remove -mprofile-kernel from low lev

[PATCH v4 0/9] ftrace with regs + live patching for ppc64 LE (ABI v2)

2015-11-25 Thread Torsten Duwe
Major changes since v3: * the graph tracer works now. It turned out the stack frame it tried to manipulate does not exist at that point. * changes only needed in order to support -mprofile-kernel are now in a separate patch, prepended. * Kconfig cleanup so this is only selectable

Re: [PATCH] cxl: Fix build failure due to -Wunused-variable behaviour change

2015-11-25 Thread Torsten Duwe
On Tue, Sep 15, 2015 at 03:48:34PM +1000, Ian Munsie wrote: > --- a/drivers/misc/cxl/Makefile > +++ b/drivers/misc/cxl/Makefile > @@ -1,4 +1,4 @@ > -ccflags-y := -Werror > +ccflags-y := -Werror -Wno-unused-const-variable JFYI, my gcc-4.3 does not like this switch. What's the minimum compiler versi

Re: [PATCH] cxl: Fix DSI misses when the context owning task exits

2015-11-25 Thread Matthew R. Ochs
Reviewed-by: Matthew R. Ochs ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2] powerpc: Append linux_banner to exception information in xmon.

2015-11-25 Thread Michael Ellerman
On 25 November 2015 7:15:46 pm AEDT, Denis Kirjanov wrote: >You forgot to update the subject line That's OK I will fix it up when I apply it. cheers -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. ___ Linuxppc-dev mailing lis

Re: [PATCH V5 17/31] powerpc/booke: Move nohash headers (part 5)

2015-11-25 Thread Anshuman Khandual
On 11/23/2015 03:52 PM, Aneesh Kumar K.V wrote: > Acked-by: Scott Wood > Signed-off-by: Aneesh Kumar K.V This and some previous patches can use some amount of description in the commit message to make them clear. Now these first 17 patches in the series are code movement and re organization of h

Re: kernel BUG at drivers/scsi/scsi_lib.c:1096!

2015-11-25 Thread Hannes Reinecke
On 11/20/2015 04:28 PM, Ewan Milne wrote: > On Fri, 2015-11-20 at 15:55 +0100, Hannes Reinecke wrote: >> Can't we have a joint effort here? >> I've been spending a _LOT_ of time trying to debug things here, but >> none of the ideas I've come up with have been able to fix anything. > > Yes. I'm no

Re: [PATCH] cxl: Fix DSI misses when the context owning task exits

2015-11-25 Thread Frederic Barrat
Le 24/11/2015 11:56, Vaibhav Jain a écrit : Presently when a user-space process issues CXL_IOCTL_START_WORK ioctl we store the pid of the current task_struct and use it to get pointer to the mm_struct of the process, while processing page or segment faults from the capi card. However this cause

Re: [PATCH] powerpc: Fix xmon ml command to work with 64 bit values.

2015-11-25 Thread Denis Kirjanov
On 11/25/15, Rashmica Gupta wrote: > The ml command in xmon currently only works for 32-bit values and so fails > to find 64-bit values on a ppc64 machine. So change to work for 64-bit > values. > > This is based off a patch by Josh Boyer. > > Signed-off-by: Rashmica Gupta > --- Please remove(up

Re: [PATCH v2] powerpc: Append linux_banner to exception information in xmon.

2015-11-25 Thread Denis Kirjanov
On 11/25/15, Rashmica Gupta wrote: > Currently if you are in xmon without an oops etc. to view the kernel > version you have to type "d $linux_banner" - not necessarily obvious. As > this is useful information, append to the output of "e" command. > > Example output: > $mon> e > cpu 0x1: Vector: 0

Re: [PATCH] powerpc: Fix xmon ml command to work with 64 bit values.

2015-11-25 Thread Denis Kirjanov
On 11/25/15, Rashmica Gupta wrote: > The ml command in xmon currently only works for 32-bit values and so fails > to find 64-bit values on a ppc64 machine. So change to work for 64-bit > values. Please add xmon to the subject line > > This is based off a patch by Josh Boyer. based on > > Signed-of

RE: [PATCH] cpufreq: qoriq: Register cooling device based on device tree

2015-11-25 Thread Hongtao Jia
> -Original Message- > From: Viresh Kumar [mailto:viresh.ku...@linaro.org] > Sent: Tuesday, November 24, 2015 3:11 PM > To: Jia Hongtao-B38951 > Cc: edubez...@gmail.com; linux...@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org; devicet...@vger.kernel.org; Wood Scott-B07421 > Subject: R