Re: [PATCH] powerpc/64s: relocation, register save fixes for system reset interrupt

2016-10-13 Thread Balbir Singh
On 14/10/16 14:16, Nicholas Piggin wrote: > Thanks Balbir and Gautham for testing and reviewing. > > On Thu, 13 Oct 2016 22:54:32 +1100 > Balbir Singh wrote: > >> On 13/10/16 13:17, Nicholas Piggin wrote: >>> This patch does a couple of things. First of all, powernv

Re: [PATCH] powerpc: link error on orphan sections

2016-10-13 Thread Nicholas Piggin
On Fri, 14 Oct 2016 13:35:54 +1100 Balbir Singh wrote: > On 12/10/16 18:00, Nicholas Piggin wrote: > > Add --orphan-handling=error to final link flags. This ensures we have to > > handle all sections. This would have caught subtle breakage such as > >

Re: [PATCH] powerpc: link error on orphan sections

2016-10-13 Thread Nicholas Piggin
Cc Alan Modra On Fri, 14 Oct 2016 14:27:45 +1100 Michael Ellerman wrote: > With DEBUG_INFO=y I'm seeing: > > /opt/toolchains/6/powerpc/bin/ld: error: unplaced orphan section > `.debug_addr' from `arch/powerpc/kernel/prom_init.o'. > /opt/toolchains/6/powerpc/bin/ld:

Re: [PATCH 0/6] kvm: powerpc halt polling updates

2016-10-13 Thread Sam Bobroff
On Fri, Oct 14, 2016 at 11:53:18AM +1100, Suraj Jitindar Singh wrote: > This patch series makes some updates and bug fixes to the powerpc kvm-hv > halt polling code. > > The first two patches are concerned with exporting the generic kvm module > parameter variables and accessing these from the

Re: [PATCH] powerpc: link error on orphan sections

2016-10-13 Thread Michael Ellerman
Nicholas Piggin writes: > diff --git a/arch/powerpc/kernel/vmlinux.lds.S > b/arch/powerpc/kernel/vmlinux.lds.S > index 8295f51..9f4d85e 100644 > --- a/arch/powerpc/kernel/vmlinux.lds.S > +++ b/arch/powerpc/kernel/vmlinux.lds.S > @@ -317,6 +319,16 @@ SECTIONS > _end = .

Re: [PATCH] powerpc: make _ASM_NOKPROBE_SYMBOL a noop when KPROBES not defined

2016-10-13 Thread Nicholas Piggin
On Fri, 14 Oct 2016 11:48:35 +1100 Michael Ellerman wrote: > Nicholas Piggin writes: > > Signed-off-by: Nicholas Piggin > > --- > > The linker orphan sections error patch caught this > > You mean with the orphan sections patch

Re: [PATCH] powerpc/64s: relocation, register save fixes for system reset interrupt

2016-10-13 Thread Nicholas Piggin
Thanks Balbir and Gautham for testing and reviewing. On Thu, 13 Oct 2016 22:54:32 +1100 Balbir Singh wrote: > On 13/10/16 13:17, Nicholas Piggin wrote: > > This patch does a couple of things. First of all, powernv immediately > > explodes when running a relocated kernel,

Re: [PATCH] powerpc: link error on orphan sections

2016-10-13 Thread Balbir Singh
On 12/10/16 18:00, Nicholas Piggin wrote: > Add --orphan-handling=error to final link flags. This ensures we have to > handle all sections. This would have caught subtle breakage such as > 7de3b27bac47da9de08409df1d69664acbb72197 at build-time. > > Also bring some wayward sections into the

Re: [PATCH 6/6] doc/kvm: Add halt polling documentation

2016-10-13 Thread Suraj Jitindar Singh
On Fri, 2016-10-14 at 09:16 +0800, Wanpeng Li wrote: > 2016-10-14 8:53 GMT+08:00 Suraj Jitindar Singh com>: > > > > There is currently no documentation about the halt polling > > capabilities > > of the kvm module. Add some documentation describing the mechanism > > as

Re: [PATCH 6/6] doc/kvm: Add halt polling documentation

2016-10-13 Thread Wanpeng Li
2016-10-14 8:53 GMT+08:00 Suraj Jitindar Singh : > There is currently no documentation about the halt polling capabilities > of the kvm module. Add some documentation describing the mechanism as well > as the module parameters to all better understanding of how halt

[PATCH 6/6] doc/kvm: Add halt polling documentation

2016-10-13 Thread Suraj Jitindar Singh
There is currently no documentation about the halt polling capabilities of the kvm module. Add some documentation describing the mechanism as well as the module parameters to all better understanding of how halt polling should be used and the effect of tuning the module parameters. Signed-off-by:

[PATCH 5/6] powerpc/kvm: Comment style and print format fixups

2016-10-13 Thread Suraj Jitindar Singh
Fix comment block to match kernel comment style. Fix print format from signed to unsigned. Signed-off-by: Suraj Jitindar Singh --- arch/powerpc/kvm/book3s_hv.c | 3 ++- arch/powerpc/kvm/trace_hv.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 4/6] powerpc/kvm: Decrease the powerpc default halt poll max value

2016-10-13 Thread Suraj Jitindar Singh
KVM_HALT_POLL_NS_DEFAULT is an arch specific constant which sets the default value of the halt_poll_ns kvm module parameter which determines the global maximum halt polling interval. The current value for powerpc is 50 (500us) which means that any repetitive workload with a period of less

[PATCH 3/6] powerpc/kvm: Add check for module parameter halt_poll_ns

2016-10-13 Thread Suraj Jitindar Singh
The kvm module parameter halt_poll_ns defines the global maximum halt polling interval and can be dynamically changed by writing to the /sys/module/kvm/parameters/halt_poll_ns sysfs file. However in kvm-hv this module parameter value is only ever checked when we grow the current polling interval

[PATCH 2/6] powerpc/kvm: Use generic kvm module parameters in kvm-hv

2016-10-13 Thread Suraj Jitindar Singh
The previous patch exported the variables which back the module parameters of the generic kvm module. Now use these variables in the kvm-hv module so that any change to the generic module parameters will also have the same effect for the kvm-hv module. This removes the duplication of the kvm

Re: [PATCH] powerpc: make _ASM_NOKPROBE_SYMBOL a noop when KPROBES not defined

2016-10-13 Thread Michael Ellerman
Nicholas Piggin writes: > Signed-off-by: Nicholas Piggin > --- > The linker orphan sections error patch caught this You mean with the orphan sections patch applied this breaks the build when KPROBES=n right? cheers

Re: [PATCH] powerpc: link error on orphan sections

2016-10-13 Thread Michael Ellerman
Nicholas Piggin writes: > Add --orphan-handling=error to final link flags. This ensures we have to > handle all sections. This would have caught subtle breakage such as > 7de3b27bac47da9de08409df1d69664acbb72197 at build-time. > > Also bring some wayward sections into the

Re: [PATCH] powerpc/fadump: Fix the race in crash_fadump().

2016-10-13 Thread Balbir Singh
On 13/10/16 04:48, Mahesh Jagannath Salgaonkar wrote: > On 10/10/2016 04:22 PM, Michael Ellerman wrote: >> Mahesh J Salgaonkar writes: >> >>> From: Mahesh Salgaonkar >>> >>> There are chances that multiple CPUs can call crash_fadump()

Re: [PATCH] powerpc/mm: Prevent unlikely crash in copro_calculate_slb()

2016-10-13 Thread Michael Ellerman
Frederic Barrat writes: > Le 13/10/2016 à 12:51, Michael Ellerman a écrit : >> Frederic Barrat writes: >> >>> ping? The patch still applies cleanly on recent trees. >> >> Fell through the cracks :/ >> >> Fixes: ? > > Nothing obvious.

Re: [PATCH] powerpc/64: option to force run-at-load to test relocation

2016-10-13 Thread Balbir Singh
On 13/10/16 13:25, Nicholas Piggin wrote: > On Wed, 12 Oct 2016 18:35:21 +1100 > Balbir Singh wrote: > >> On 12/10/16 17:57, Nicholas Piggin wrote: >>> This adds a config option that can help exercise the case when >>> the kernel is not running at PAGE_OFFSET. >>> >>>

Re: [PATCH] powerpc/mm: Drop dump_numa_memory_topology()

2016-10-13 Thread Michael Ellerman
Balbir Singh writes: > On 13/10/16 16:27, Michael Ellerman wrote: >> At boot we dump the NUMA memory topology in dump_numa_memory_topology(), >> at KERN_DEBUG level, resulting in output like: >> >> Node 0 Memory: 0x0-0x1 >> Node 1 Memory:

Re: [PATCH v3] cxl: Prevent adapter reset if an active context exists

2016-10-13 Thread Michael Ellerman
Vaibhav Jain writes: > This patch prevents resetting the cxl adapter via sysfs in presence of > one or more active cxl_context on it. This protects against an > unrecoverable error caused by PSL owning a dirty cache line even after > reset and host tries to touch the

Re: [PATCH] powerpc/mm: simplify loop control in parse_numa_properties()

2016-10-13 Thread Michael Ellerman
Reza Arbab writes: > The flow of the main loop in parse_numa_properties() is overly > complicated. Simplify it to be less confusing and easier to read. > No functional change. I think you're right, but it's not obvious from the diff. Please explain in more detail why

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-13 Thread Steffen Maier
Hm, still behaves for me like I reported for v2: http://marc.info/?l=linux-scsi=147637177902937=2 On 10/13/2016 05:00 PM, Johannes Thumshirn wrote: Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpfull when

Re: [PATCH v2 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-13 Thread Steffen Maier
I'm puzzled. $ git bisect start fc_bsg master Bisecting: 8 revisions left to test after this (roughly 3 steps) [005d51510eee6102636d5dbb06310531c5d46151] scsi: fc: implement kref backed reference counting $ git bisect bad Bisecting: 3 revisions left to test after this (roughly 2 steps)

Re: [PATCH 00/10] mm: adjust get_user_pages* functions to explicitly pass FOLL_* flags

2016-10-13 Thread Christian König
Am 13.10.2016 um 02:20 schrieb Lorenzo Stoakes: This patch series adjusts functions in the get_user_pages* family such that desired FOLL_* flags are passed as an argument rather than implied by flags. The purpose of this change is to make the use of FOLL_FORCE explicit so it is easier to grep

[PATCH] powerpc/mm: simplify loop control in parse_numa_properties()

2016-10-13 Thread Reza Arbab
The flow of the main loop in parse_numa_properties() is overly complicated. Simplify it to be less confusing and easier to read. No functional change. Signed-off-by: Reza Arbab --- arch/powerpc/mm/numa.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-)

Re: [PATCH v3] cxl: Prevent adapter reset if an active context exists

2016-10-13 Thread Frederic Barrat
Hi Vaibhav, Le 13/10/2016 à 13:08, Vaibhav Jain a écrit : This patch prevents resetting the cxl adapter via sysfs in presence of one or more active cxl_context on it. This protects against an unrecoverable error caused by PSL owning a dirty cache line even after reset and host tries to touch

Re: [PATCH v2 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-13 Thread Johannes Thumshirn
On Thu, Oct 13, 2016 at 05:15:25PM +0200, Steffen Maier wrote: > I'm puzzled. > > $ git bisect start fc_bsg master > Bisecting: 8 revisions left to test after this (roughly 3 steps) > [005d51510eee6102636d5dbb06310531c5d46151] scsi: fc: implement kref backed > reference counting > $ git bisect

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-13 Thread Johannes Thumshirn
On Thu, Oct 13, 2016 at 05:55:11PM +0200, Steffen Maier wrote: > Hm, still behaves for me like I reported for v2: > http://marc.info/?l=linux-scsi=147637177902937=2 > Well given what you've wrote for v2 it's kinda expected. Byte, Johannes -- Johannes Thumshirn

[PATCH v3 10/16] scsi: change FC drivers to use 'struct bsg_job'

2016-10-13 Thread Johannes Thumshirn
Change FC drivers to use 'struct bsg_job' from bsg-lib.h instead of 'struct fc_bsg_job' from scsi_transport_fc.h and remove 'struct fc_bsg_job'. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke --- drivers/s390/scsi/zfcp_ext.h | 4 +--

[PATCH v3 13/16] scsi: fc: use bsg_job_done

2016-10-13 Thread Johannes Thumshirn
fc_bsg_jobdone() and bsg_job_done() are 1:1 copies now so use the bsg-lib one instead of the FC private implementation. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke --- drivers/s390/scsi/zfcp_fc.c | 2 +- drivers/scsi/bfa/bfad_bsg.c

[PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-13 Thread Johannes Thumshirn
Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use helper variables bsg_request and bsg_reply. This will be helpfull when transitioning to bsg-lib. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke ---

[PATCH v3 05/16] scsi: fc: provide fc_bsg_to_shost() helper

2016-10-13 Thread Johannes Thumshirn
Provide fc_bsg_to_shost() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Also use this little helper in the LLDDs. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke ---

[PATCH v3 06/16] scsi: fc: provide fc_bsg_to_rport() helper

2016-10-13 Thread Johannes Thumshirn
Provide fc_bsg_to_rport() helper that will become handy when we're moving from struct fc_bsg_job to a plain struct bsg_job. Also move all LLDDs to use the new helper. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke ---

[PATCH v3 04/16] scsi: Unify interfaces of fc_bsg_jobdone and bsg_job_done

2016-10-13 Thread Johannes Thumshirn
Unify the interfaces of fc_bsg_jobdone and bsg_job_done. This will reduce the diff when moving from 'struct fc_bsg_job' to a plain 'struct bsg_job' later on. Signed-off-by: Johannes Thumshirn Reviewed-by: Hannes Reinecke --- drivers/s390/scsi/zfcp_fc.c |

[PATCH v3 03/16] scsi: fc: Export fc_bsg_jobdone and use it in FC drivers

2016-10-13 Thread Johannes Thumshirn
Export fc_bsg_jobdone so drivers can use it directly instead of doing the round-trip via struct fc_bsg_job::job_done() and use it in the LLDDs. As we've converted all LLDDs over to use fc_bsg_jobdone() directly, we can remove the function pointer from struct fc_bsg_job as well. Signed-off-by:

Re: [PATCH] powerpc/mm: Drop dump_numa_memory_topology()

2016-10-13 Thread Balbir Singh
On 13/10/16 16:27, Michael Ellerman wrote: > At boot we dump the NUMA memory topology in dump_numa_memory_topology(), > at KERN_DEBUG level, resulting in output like: > > Node 0 Memory: 0x0-0x1 > Node 1 Memory: 0x1-0x2 > > Which is nice enough, but immediately after

Re: [PATCH] powerpc/64s: relocation, register save fixes for system reset interrupt

2016-10-13 Thread Balbir Singh
On 13/10/16 13:17, Nicholas Piggin wrote: > This patch does a couple of things. First of all, powernv immediately > explodes when running a relocated kernel, because the system reset > exception for handling sleeps does not do correct relocated branches. > > Secondly, the sleep handling code

Re: [PATCH] powerpc/mm: Prevent unlikely crash in copro_calculate_slb()

2016-10-13 Thread Frederic Barrat
Le 13/10/2016 à 12:51, Michael Ellerman a écrit : Frederic Barrat writes: ping? The patch still applies cleanly on recent trees. Fell through the cracks :/ Fixes: ? Nothing obvious. Current code was introduced by 73d16a6e0e51990cbe13f8d8f43bd5329bbab30a but

Re: [PATCH v2 13/16] scsi: fc: use bsg_job_done

2016-10-13 Thread Hannes Reinecke
On 10/12/2016 03:06 PM, Johannes Thumshirn wrote: > fc_bsg_jobdone() and bsg_job_done() are 1:1 copies now so use the bsg-lib one > instead of the FC private implementation. > > Signed-off-by: Johannes Thumshirn > --- > drivers/s390/scsi/zfcp_fc.c | 2 +- >

Re: [PATCH v2 10/16] scsi: change FC drivers to use 'struct bsg_job'

2016-10-13 Thread Hannes Reinecke
On 10/12/2016 03:06 PM, Johannes Thumshirn wrote: > Change FC drivers to use 'struct bsg_job' from bsg-lib.h instead of 'struct > fc_bsg_job' from scsi_transport_fc.h and remove 'struct fc_bsg_job'. > > Signed-off-by: Johannes Thumshirn > --- > drivers/s390/scsi/zfcp_ext.h

Re: [PATCH v2 06/16] scsi: fc: provide fc_bsg_to_rport() helper

2016-10-13 Thread Hannes Reinecke
On 10/12/2016 03:06 PM, Johannes Thumshirn wrote: > Provide fc_bsg_to_rport() helper that will become handy when we're moving > from struct fc_bsg_job to a plain struct bsg_job. Also move all LLDDs to use > the new helper. > > Signed-off-by: Johannes Thumshirn > --- >

Re: [PATCH v2 05/16] scsi: fc: provide fc_bsg_to_shost() helper

2016-10-13 Thread Hannes Reinecke
On 10/12/2016 03:06 PM, Johannes Thumshirn wrote: > Provide fc_bsg_to_shost() helper that will become handy when we're moving from > struct fc_bsg_job to a plain struct bsg_job. Also use this little helper in > the LLDDs. > > Signed-off-by: Johannes Thumshirn > --- >

Re: [PATCH v2 04/16] scsi: Unify interfaces of fc_bsg_jobdone and bsg_job_done

2016-10-13 Thread Hannes Reinecke
On 10/12/2016 03:06 PM, Johannes Thumshirn wrote: > Unify the interfaces of fc_bsg_jobdone and bsg_job_done. This will reduce the > diff when moving from 'struct fc_bsg_job' to a plain 'struct bsg_job' later > on. > > Signed-off-by: Johannes Thumshirn > --- >

Re: [PATCH v2 03/16] scsi: fc: Export fc_bsg_jobdone and use it in FC drivers

2016-10-13 Thread Hannes Reinecke
On 10/12/2016 03:06 PM, Johannes Thumshirn wrote: > Export fc_bsg_jobdone so drivers can use it directly instead of doing > the round-trip via struct fc_bsg_job::job_done() and use it in the LLDDs. > > As we've converted all LLDDs over to use fc_bsg_jobdone() directly, > we can remove the

Re: [PATCH v2 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

2016-10-13 Thread Hannes Reinecke
On 10/12/2016 03:06 PM, Johannes Thumshirn wrote: > Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use > helper variables bsg_request and bsg_reply. This will be helpfull when > transitioning to bsg-lib. > > Signed-off-by: Johannes Thumshirn > --- >

Re: [PATCH 2/2] powernv: Pass PSSCR value and mask to power9_idle_stop

2016-10-13 Thread Gautham R Shenoy
Hi Stewart, On Wed, Oct 12, 2016 at 04:35:35PM +1100, Stewart Smith wrote: > > What if we just treat the 0xF state from firmware as special and set it > to DEFAULT_PSSCR_MASK in that case? That deals with old skiboot, new > kernel, and sets a pretty small special case that's easy to track into >

[PATCH v3] cxl: Prevent adapter reset if an active context exists

2016-10-13 Thread Vaibhav Jain
This patch prevents resetting the cxl adapter via sysfs in presence of one or more active cxl_context on it. This protects against an unrecoverable error caused by PSL owning a dirty cache line even after reset and host tries to touch the same cache line. In case a force reset of the card is

Re: [PATCH] powerpc/64s: relocation, register save fixes for system reset interrupt

2016-10-13 Thread Gautham R Shenoy
Hi Nick, [Updated Shreyas's current e-mail address: "Shreyas B. Prabhu" ] On Thu, Oct 13, 2016 at 01:17:14PM +1100, Nicholas Piggin wrote: > This patch does a couple of things. First of all, powernv immediately > explodes when running a relocated kernel, because the

Re: [PATCH] powerpc/mm: Prevent unlikely crash in copro_calculate_slb()

2016-10-13 Thread Michael Ellerman
Frederic Barrat writes: > ping? The patch still applies cleanly on recent trees. Fell through the cracks :/ Fixes: ? cheers

Re: [PATCH] powerpc/fadump: Fix the race in crash_fadump().

2016-10-13 Thread Michael Ellerman
Mahesh Jagannath Salgaonkar writes: > On 10/10/2016 04:22 PM, Michael Ellerman wrote: >> Mahesh J Salgaonkar writes: >> >>> From: Mahesh Salgaonkar >>> >>> There are chances that multiple CPUs can call

Re: [PATCH] powerpc: make _ASM_NOKPROBE_SYMBOL a noop when KPROBES not defined

2016-10-13 Thread Balbir Singh
On 13/10/16 13:07, Nicholas Piggin wrote: > Signed-off-by: Nicholas Piggin > --- > The linker orphan sections error patch caught this Seems reasonable Acked-by: Balbir Singh

[GIT PULL] Please pull powerpc/linux.git powerpc-4.9-2 tag

2016-10-13 Thread Michael Ellerman
Hi Linus, Please pull some more powerpc updates for 4.9: The following changes since commit b7b7013cac55d794940bd9cb7b7c55c9dececac4: powerpc/bpf: Add support for bpf constant blinding (2016-10-04 20:33:20 +1100) are available in the git repository at:

Re: [PATCH v3 03/11] tracing/syscalls: add compat syscall metadata

2016-10-13 Thread Michael Ellerman
Marcin Nowakowski writes: > On 12.10.2016 10:50, Michael Ellerman wrote: >> <...> >> It's annoying that we have to duplicate all that just to do a + 1. >> >> How about this as a precursor? > > <...> > > Thanks for the suggestion - unless anyone sees a reason to

[PATCH][RFC] powerpc/64s: Use emergency stack for 0x100 system reset interrupt

2016-10-13 Thread Nicholas Piggin
Also use EX_NMI save space. This should give cleaner debug data in case kernel stacks have become corrupted. MSR_RI is kept clear for the 0x100 handler, because we can't mask it, and can't tolerate a reentrant NMI. Technically the 0x100 is not really recoverable yet, because it could trample on

Re: [PATCH kernel v2 1/2] powerpc/iommu: Stop using @current in mm_iommu_xxx

2016-10-13 Thread Alexey Kardashevskiy
On 13/10/16 13:25, David Gibson wrote: > On Wed, Oct 12, 2016 at 03:58:27PM +1100, Alexey Kardashevskiy wrote: >> In some situations the userspace memory context may live longer than >> the userspace process itself so if we need to do proper memory context >> cleanup, we better cache @mm and use