[PATCH] powerpc: Standardise on NR_syscalls rather than __NR_syscalls.

2015-11-18 Thread Rashmica Gupta
Most architectures use NR_syscalls as the #define for the number of syscalls. We use __NR_syscalls, and then define NR_syscalls as __NR_syscalls. __NR_syscalls is not used outside arch code, whereas NR_syscalls is. So as NR_syscalls must be defined and __NR_syscalls does not, replace __NR_syscall

[PATCH v2 2/2] powerpc/tm: Check for already reclaimed tasks

2015-11-18 Thread Michael Neuling
Currently we can hit a scenario where we'll tm_reclaim() twice. This results in a TM bad thing exception because the second reclaim occurs when not in suspend mode. The scenario in which this can happen is the following. We attempt to deliver a signal to userspace. To do this we need obtain the

[PATCH v2 1/2] powerpc/tm: Block signal return setting invalid MSR state

2015-11-18 Thread Michael Neuling
Currently we allow both the MSR T and S bits to be set by userspace on a signal return. Unfortunately this is a reserved configuration and will cause a TM Bad Thing exception if attempted (via rfid). This patch checks for this case in both the 32 and 64 bit signals code. If both T and S are set,

[PATCH v2 0/2] powerpc/tm: Fixes for crashes

2015-11-18 Thread Michael Neuling
Here's a couple of fixes for crashes with the TM signals code. v2: - Split fixes to go into stable from other patches - other patches will be sent separately - Updates based on mpe's review: - add correct linux version for stable tag - fix white space issues - cleanup signal_32 chang

[RESEND PATCH] powerpc/powernv: Drop owner assignment from platform_driver

2015-11-18 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because platform_driver_register() will set it. Signed-off-by: Krzysztof Kozlowski --- The coccinelle script which generated the patch was sent here: http://www.spinics.net/lists/kernel/msg2029903.html --- arch/powerpc/platforms/powernv/opal-prd.c

Re: [PATCH] powerpc: Remove unused function trace_syscall()

2015-11-18 Thread Andrew Donnellan
On 19/11/15 14:26, Rashmica Gupta wrote: This function has been unused since commit 14cf11af6cf6 ("powerpc: Merge enough to start building in arch/powerpc."), so remove it. Signed-off-by: Rashmica Gupta Reviewed-by: Andrew Donnellan -- Andrew Donnellan Software Engineer, OzLabs

[PATCH] powerpc: Remove unused function trace_syscall()

2015-11-18 Thread Rashmica Gupta
This function has been unused since commit 14cf11af6cf6 ("powerpc: Merge enough to start building in arch/powerpc."), so remove it. Signed-off-by: Rashmica Gupta --- arch/powerpc/kernel/traps.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/k

[PATCH v2] powerpc/85xx: Enable TWR_P102x option by default in mpc85xx_basic_defconfig

2015-11-18 Thread Pengbo Li
Enable TWR_P102x option by default in mpc85xx_basic_defconfig to support p1025twr board. Signed-off-by: Pengbo Li --- arch/powerpc/configs/mpc85xx_basic_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/configs/mpc85xx_basic_defconfig b/arch/powerpc/configs/mpc85xx_basi

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

2015-11-18 Thread Michael Ellerman
On Wed, 2015-11-18 at 09:03 -0500, Mark Salter wrote: > On Wed, 2015-11-18 at 20:18 +1100, Michael Ellerman wrote: > > Hi folks, > > > > I'm intermittently seeing the following oops on at least one powerpc box. > > > > The BUG_ON() is from: > > > > static int scsi_init_sgtable(struct request *re

Re: [PATCH v7 25/50] powerpc/powernv: Reserve PE for root bus

2015-11-18 Thread Alexey Kardashevskiy
On 11/17/2015 08:06 PM, Gavin Shan wrote: On Tue, Nov 17, 2015 at 05:04:42PM +1100, Alexey Kardashevskiy wrote: On 11/05/2015 12:12 AM, Gavin Shan wrote: We're going to reserve/assign PEs when pcibios_setup_bridge() is called. The function won't be called for root bus as it doesn't have parent

Re: [PATCH v7 14/50] powerpc/powernv: M64 support on P7IOC

2015-11-18 Thread Alexey Kardashevskiy
On 11/17/2015 12:37 PM, Gavin Shan wrote: On Mon, Nov 16, 2015 at 07:01:46PM +1100, Alexey Kardashevskiy wrote: On 11/05/2015 12:12 AM, Gavin Shan wrote: This enables M64 window on P7IOC, which has been enabled on PHB3. Different from PHB3 where 16 M64 BARs are supported and each of them can be

Re: [PATCH v7 12/50] powerpc/powernv: Track M64 segment consumption

2015-11-18 Thread Alexey Kardashevskiy
On 11/17/2015 12:04 PM, Gavin Shan wrote: On Mon, Nov 16, 2015 at 07:01:59PM +1100, Alexey Kardashevskiy wrote: On 11/05/2015 12:12 AM, Gavin Shan wrote: As we track M32 segment consumption, this introduces an array to the PHB to track the mapping between M64 segment and PE number. The informat

Re: [PATCH 0/8] FP/VEC/VSX switching optimisations

2015-11-18 Thread Cyril Bur
On Wed, 18 Nov 2015 14:51:25 + David Laight wrote: > From: Cyril Bur > > Sent: 18 November 2015 03:27 > ... > > The goal of these patches is to rework how the 'math' registers (FP, VEC > > and VSX) are context switched. Currently the kernel adopts a lazy approach, > > always switching users

Add xmon command to dump process/task similar to ps(1)

2015-11-18 Thread Douglas Miller
Request for comments Add a command to xmon that prints basic task information like ps(1) but includes the kernel stack pointer for use with 't' (traceback) command. Adds a macro to be used to wrap memory access with setjmp code to protect against memory faults. Is additional locking required? An

[PATCH] Add xmon command to dump process/task similar to ps(1)

2015-11-18 Thread Douglas Miller
--- arch/powerpc/xmon/xmon.c | 58 ++ 1 files changed, 58 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c index 13c6e20..5c24f55 100644 --- a/arch/powerpc/xmon/xmon.c +++ b/arch/powerpc/xmon/xmon.c @@ -14

RE: [PATCH 0/8] FP/VEC/VSX switching optimisations

2015-11-18 Thread David Laight
From: Cyril Bur > Sent: 18 November 2015 03:27 ... > The goal of these patches is to rework how the 'math' registers (FP, VEC > and VSX) are context switched. Currently the kernel adopts a lazy approach, > always switching userspace tasks with all three facilities disabled and > loads in each set o

Re: [PATCH 1/1 v4] drivers/nvme: default to 4k device page size

2015-11-18 Thread Christoph Hellwig
On Fri, Nov 13, 2015 at 03:08:11PM +, Keith Busch wrote: > On Thu, Nov 12, 2015 at 11:37:54PM -0800, Christoph Hellwig wrote: > > Jens, Keith: any chance to get this to Linux for 4.4 (and -stable)? > > I agreed, looks good to me. > > Acked-by: Keith Busch Jens, can you pick this one for -rc

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

2015-11-18 Thread Mark Salter
On Wed, 2015-11-18 at 20:18 +1100, Michael Ellerman wrote: > Hi folks, > > I'm intermittently seeing the following oops on at least one powerpc box. > > The BUG_ON() is from: > > static int scsi_init_sgtable(struct request *req, struct scsi_data_buffer > *sdb) > { > ... > count = bl

Re: [powerpc:test 6/9] arch/sh/math-emu/math.c:129:1: warning: ISO C90 forbids mixed declarations and code

2015-11-18 Thread Joseph Myers
On Wed, 18 Nov 2015, kbuild test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git test > head: ebb77ceeb18554a309846f9025a432fe848ddc8e > commit: a4572d52d6d662db3956d1bc91a745e39a376979 [6/9] sh/math-emu: Move sh > from math-emu-old to math-emu > config:

[powerpc:test 6/9] arch/sh/math-emu/math.c:129:1: warning: ISO C90 forbids mixed declarations and code

2015-11-18 Thread kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git test head: ebb77ceeb18554a309846f9025a432fe848ddc8e commit: a4572d52d6d662db3956d1bc91a745e39a376979 [6/9] sh/math-emu: Move sh from math-emu-old to math-emu config: sh-allyesconfig (attached as .config) reproduce:

Re: [PATCH] selftests/powerpc: Add script to test HMI functionality

2015-11-18 Thread Denis Kirjanov
On 11/18/15, Daniel Axtens wrote: > HMIs (Hypervisor Management|Maintenance Interrupts) are a class of interrupt > on POWER systems. > > HMI support has traditionally been exceptionally difficult to test. However > Skiboot ships a tool that, with the correct magic numbers, will inject them. > > Th

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

2015-11-18 Thread Laurent Dufour
On 18/11/2015 12:10, Michael Ellerman wrote: > On Wed, 2015-11-18 at 12:06 +0100, Laurent Dufour wrote: >> On 18/11/2015 10:18, Michael Ellerman wrote: >>> Hi folks, >>> >>> I'm intermittently seeing the following oops on at least one powerpc box. >>> >>> The BUG_ON() is from: >>> >>> static int sc

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

2015-11-18 Thread Michael Ellerman
On Wed, 2015-11-18 at 12:06 +0100, Laurent Dufour wrote: > On 18/11/2015 10:18, Michael Ellerman wrote: > > Hi folks, > > > > I'm intermittently seeing the following oops on at least one powerpc box. > > > > The BUG_ON() is from: > > > > static int scsi_init_sgtable(struct request *req, struct s

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

2015-11-18 Thread Laurent Dufour
On 18/11/2015 10:18, Michael Ellerman wrote: > Hi folks, > > I'm intermittently seeing the following oops on at least one powerpc box. > > The BUG_ON() is from: > > static int scsi_init_sgtable(struct request *req, struct scsi_data_buffer > *sdb) > { > ... > count = blk_rq_map_sg(re

Re: [PATCH] KVM: powerpc: kvmppc_visible_gpa can be boolean

2015-11-18 Thread Paolo Bonzini
On 16/11/2015 04:10, Yaowei Bai wrote: > In another patch kvm_is_visible_gfn is maken return bool due to this > function only returns zero or one as its return value, let's also make > kvmppc_visible_gpa return bool to keep consistent. > > No functional change. > > Signed-off-by: Yaowei Bai >

[PATCH] of: Fix comparison of reserved memory regions

2015-11-18 Thread Michael Ellerman
In order to check for overlapping reserved memory regions, we first need to sort the array of memory regions. This is implemented using sort(), and a custom comparison function __rmem_cmp(). Unfortunatley __rmem_cmp() doesn't work in all cases. Because the two base values are phys_addr_t, they may

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

2015-11-18 Thread Michael Ellerman
Hi folks, I'm intermittently seeing the following oops on at least one powerpc box. The BUG_ON() is from: static int scsi_init_sgtable(struct request *req, struct scsi_data_buffer *sdb) { ... count = blk_rq_map_sg(req->q, req, sdb->table.sgl); BUG_ON(count > sdb->table.ne

[PATCH v5] powerpc/pseries: Limit EPOW reset event warnings

2015-11-18 Thread Vipin K Parashar
Kernel prints respective warnings about various EPOW events for user information/action after parsing EPOW interrupts. At times below EPOW reset event warning is seen to be flooding kernel log over a period of time. May 25 03:46:34 alp kernel: Non critical power or cooling issue cleared May 25 03: