Re: [PATCH] cxl: Add new kernel traces

2019-04-30 Thread Michael Ellerman
Christophe Lombard writes: > This patch adds new kernel traces in the current in-kernel 'library' > which can be called by other drivers to help interacting with an > IBM XSL on a POWER9 system. > > If some kernel traces exist in the 'normal path' to handle a page or a > segment fault, some other

Re: [PATCH kernel v2 0/2] powerpc/ioda2: Another attempt to allow DMA masks between 32 and 59

2019-04-30 Thread Alistair Popple
Hi Alexey, Do we need a seperate patch to allow this to be used? Last time I tried calling dma_set_mask(52) on powernv it returned an error and there doesn't seem to be anything obvious to me in this series to change that behaviour, but perhaps I missed something. - Alistair On Wednesday, 1 M

Re: [PATCH 4/5] soc/fsl/qe: qe.c: support fsl,qe-snums property

2019-04-30 Thread Rasmus Villemoes
On 30/04/2019 19.19, Christophe Leroy wrote: > > > Le 30/04/2019 à 15:36, Rasmus Villemoes a écrit : >> The current code assumes that the set of snum _values_ to populate the >> snums[] array with is a function of the _number_ of snums >> alone. However, reading table 4-30, and its footnotes, of

Re: [PATCH 2/5] soc/fsl/qe: qe.c: reduce static memory footprint by 1.7K

2019-04-30 Thread Rasmus Villemoes
On 30/04/2019 19.12, Christophe Leroy wrote: > > Le 30/04/2019 à 15:36, Rasmus Villemoes a écrit : >> The current array of struct qe_snum use 256*4 bytes for just keeping >> track of the free/used state of each index, and the struct layout >> means there's another 768 bytes of padding. If we just

Re: [PATCH] crypto: caam/jr - Remove extra memory barrier during job ring dequeue

2019-04-30 Thread Michael Ellerman
Vakul Garg wrote: > In function caam_jr_dequeue(), a full memory barrier is used before > writing response job ring's register to signal removal of the completed > job. Therefore for writing the register, we do not need another write > memory barrier. Hence it is removed by replacing the call to wr

[PATCH kernel v2 2/2] powerpc/powernv/ioda2: Create bigger default window with 64k IOMMU pages

2019-04-30 Thread Alexey Kardashevskiy
At the moment we create a small window only for 32bit devices, the window maps 0..2GB of the PCI space only. For other devices we either use a sketchy bypass or hardware bypass but the former can only work if the amount of RAM is no bigger than the device's DMA mask and the latter requires devices

[PATCH kernel v2 1/2] powerpc/powernv/ioda2: Allocate TCE table levels on demand for default DMA window

2019-04-30 Thread Alexey Kardashevskiy
We allocate only the first level of multilevel TCE tables for KVM already (alloc_userspace_copy==true), and the rest is allocated on demand. This is not enabled though for baremetal. This removes the KVM limitation (implicit, via the alloc_userspace_copy parameter) and always allocates just the fi

[PATCH kernel v2 0/2] powerpc/ioda2: Another attempt to allow DMA masks between 32 and 59

2019-04-30 Thread Alexey Kardashevskiy
This is an attempt to allow DMA masks between 32..59 which are not large enough to use either a PHB3 bypass mode or a sketchy bypass. Depending on the max order, up to 40 is usually available. This is based on sha1 37624b58542f Linus Torvalds "Linux 5.1-rc7". Please comment. Thanks. Alexey Ka

[PATCH kernel] prom_init: Fetch flatten device tree from the system firmware

2019-04-30 Thread Alexey Kardashevskiy
At the moment, on 256CPU + 256 PCI devices guest, it takes the guest about 8.5sec to fetch the entire device tree via the client interface as the DT is traversed twice - for strings blob and for struct blob. Also, "getprop" is quite slow too as SLOF stores properties in a linked list. However, sin

Re: [PATCH 06/41] drivers: tty: serial: sb1250-duart: use dev_err() instead of printk()

2019-04-30 Thread Maciej W. Rozycki
On Sat, 27 Apr 2019, Enrico Weigelt, metux IT consult wrote: > diff --git a/drivers/tty/serial/sb1250-duart.c > b/drivers/tty/serial/sb1250-duart.c > index 329aced..655961c 100644 > --- a/drivers/tty/serial/sb1250-duart.c > +++ b/drivers/tty/serial/sb1250-duart.c > @@ -663,7 +663,6 @@ static void

Re: [PATCH 01/41] drivers: tty: serial: dz: use dev_err() instead of printk()

2019-04-30 Thread Maciej W. Rozycki
On Mon, 29 Apr 2019, Greg KH wrote: > > >> drivers/tty/serial/dz.c | 8 > > > > > > Do you have this hardware to test any of these changes with? > > > > Unfortunately not :( > > Then I can take the "basic" types of patches for the driver (like this > one), but not any others, sorry.

Re: [PATCH] powerpc/mm/radix: Fix kernel crash when running subpage protect test

2019-04-30 Thread Michael Ellerman
"Aneesh Kumar K.V" writes: > This patch fixes the below crash by making sure we touch the subpage > protection > related structures only if we know they are allocated on the platform. With > radix translation we don't allocate hash context at all and trying to access > subpage_prot_table results

Re: [PATCH v2] powerpc/32s: fix BATs setting with CONFIG_STRICT_KERNEL_RWX

2019-04-30 Thread Michael Ellerman
Christophe Leroy writes: > Serge reported some crashes with CONFIG_STRICT_KERNEL_RWX enabled > on a book3s32 machine. > > Analysis shows two issues: > - BATs addresses and sizes are not properly aligned. > - There is a gap between the last address covered by BATs and the > first address covered by

Re: [PATCH] powerpc: vdso: drop unnecessary cc-ldoption

2019-04-30 Thread Nicholas Piggin
Nick Desaulniers's on May 1, 2019 6:25 am: > On Tue, Apr 23, 2019 at 2:11 PM Nick Desaulniers > wrote: >> >> Towards the goal of removing cc-ldoption, it seems that --hash-style= >> was added to binutils 2.17.50.0.2 in 2006. The minimal required version >> of binutils for the kernel according to >

Re: [PATCH 41/41] drivers: tty: serial: lpc32xx_hs: fill mapsize and use it

2019-04-30 Thread Vladimir Zapolskiy
Hi Enrico, On 04/27/2019 03:52 PM, Enrico Weigelt, metux IT consult wrote: > Fill the struct uart_port->mapsize field and use it, insteaf of typo, s/insteaf/instead/ > hardcoded values in many places. This makes the code layout a bit > more consistent and easily allows using generic helpers for

Re: [PATCH] powerpc: Fix kobject memleak

2019-04-30 Thread Tyrel Datwyler
On 04/29/2019 06:09 PM, Tobin C. Harding wrote: > Currently error return from kobject_init_and_add() is not followed by a > call to kobject_put(). This means there is a memory leak. > > Add call to kobject_put() in error path of kobject_init_and_add(). > > Signed-off-by: Tobin C. Harding > ---

Re: [PATCH] powerpc: vdso: drop unnecessary cc-ldoption

2019-04-30 Thread Nick Desaulniers
On Tue, Apr 23, 2019 at 2:11 PM Nick Desaulniers wrote: > > Towards the goal of removing cc-ldoption, it seems that --hash-style= > was added to binutils 2.17.50.0.2 in 2006. The minimal required version > of binutils for the kernel according to > Documentation/process/changes.rst is 2.20. > > Lin

Re: [PATCH v4] powerpc/pseries: Remove limit in wait for dying CPU

2019-04-30 Thread Thiago Jung Bauermann
Hello Nathan, Thanks for reviewing the patch! Nathan Lynch writes: > Thiago Jung Bauermann writes: >> This can be a problem because if the busy loop finishes too early, then the >> kernel may offline another CPU before the previous one finished dying, >> which would lead to two concurrent ca

[PATCH v2] powerpc: remove the __kernel_io_end export

2019-04-30 Thread Christoph Hellwig
This export was added in this merge window, but without any actual user, or justification for a modular user. Fixes: a35a3c6f6065 ("powerpc/mm/hash64: Add a variable to track the end of IO mapping") Signed-off-by: Christoph Hellwig --- Chanes since v1: - actually compiles now.. arch/powerpc

Re: [PATCH 5/5] soc/fsl/qe: qe.c: fold qe_get_num_of_snums into qe_snums_init

2019-04-30 Thread Christophe Leroy
Le 30/04/2019 à 15:36, Rasmus Villemoes a écrit : The comment "No QE ever has fewer than 28 SNUMs" is false; e.g. the MPC8309 has 14. The code path returning -EINVAL is also a recipe for instant disaster, since the caller (qe_snums_init) uncritically assigns the return value to the unsigned qe

Re: [PATCH 4/5] soc/fsl/qe: qe.c: support fsl,qe-snums property

2019-04-30 Thread Christophe Leroy
Le 30/04/2019 à 15:36, Rasmus Villemoes a écrit : The current code assumes that the set of snum _values_ to populate the snums[] array with is a function of the _number_ of snums alone. However, reading table 4-30, and its footnotes, of the QUICC Engine Block Reference Manual shows that that i

Re: [PATCH 3/5] soc/fsl/qe: qe.c: introduce qe_get_device_node helper

2019-04-30 Thread Christophe Leroy
Le 30/04/2019 à 15:36, Rasmus Villemoes a écrit : The 'try of_find_compatible_node(NULL, NULL, "fsl,qe"), fall back to of_find_node_by_type(NULL, "qe")' pattern is repeated five times. Factor it into a common helper. Signed-off-by: Rasmus Villemoes Reviewed-by: Christophe Leroy --- d

Re: [PATCH 2/5] soc/fsl/qe: qe.c: reduce static memory footprint by 1.7K

2019-04-30 Thread Christophe Leroy
Le 30/04/2019 à 15:36, Rasmus Villemoes a écrit : The current array of struct qe_snum use 256*4 bytes for just keeping track of the free/used state of each index, and the struct layout means there's another 768 bytes of padding. If we just unzip that structure, the array of snum values just us

Re: [PATCH v2 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-04-30 Thread Sudeep Holla
On 30/04/2019 17:46, Andy Lutomirski wrote: > On Mon, Mar 18, 2019 at 3:49 AM Sudeep Holla wrote: >> >> Now that we have a new hook ptrace_syscall_enter that can be called from >> syscall entry code and it handles PTRACE_SYSEMU in generic code, we >> can do some cleanup using the same in syscal

Re: [PATCH 1/5] soc/fsl/qe: qe.c: drop useless static qualifier

2019-04-30 Thread Christophe Leroy
Le 30/04/2019 à 15:36, Rasmus Villemoes a écrit : The local variable snum_init has no reason to have static storage duration. Signed-off-by: Rasmus Villemoes Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

Re: [PATCH v2 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-04-30 Thread Andy Lutomirski
On Mon, Mar 18, 2019 at 3:49 AM Sudeep Holla wrote: > > Now that we have a new hook ptrace_syscall_enter that can be called from > syscall entry code and it handles PTRACE_SYSEMU in generic code, we > can do some cleanup using the same in syscall_trace_enter. > > Further the extra logic to find si

Re: [PATCH v2 3/6] x86: clean up _TIF_SYSCALL_EMU handling using ptrace_syscall_enter hook

2019-04-30 Thread Sudeep Holla
On Mon, Mar 18, 2019 at 04:33:22PM +0100, Oleg Nesterov wrote: > On 03/18, Sudeep Holla wrote: > > > > --- a/arch/x86/entry/common.c > > +++ b/arch/x86/entry/common.c > > @@ -70,22 +70,16 @@ static long syscall_trace_enter(struct pt_regs *regs) > > > > struct thread_info *ti = current_thread_in

[PATCH 5/5] soc/fsl/qe: qe.c: fold qe_get_num_of_snums into qe_snums_init

2019-04-30 Thread Rasmus Villemoes
The comment "No QE ever has fewer than 28 SNUMs" is false; e.g. the MPC8309 has 14. The code path returning -EINVAL is also a recipe for instant disaster, since the caller (qe_snums_init) uncritically assigns the return value to the unsigned qe_num_of_snum, and would thus proceed to attempt to copy

[PATCH 4/5] soc/fsl/qe: qe.c: support fsl,qe-snums property

2019-04-30 Thread Rasmus Villemoes
The current code assumes that the set of snum _values_ to populate the snums[] array with is a function of the _number_ of snums alone. However, reading table 4-30, and its footnotes, of the QUICC Engine Block Reference Manual shows that that is a bit too naive. As an alternative, this introduces

[PATCH 1/5] soc/fsl/qe: qe.c: drop useless static qualifier

2019-04-30 Thread Rasmus Villemoes
The local variable snum_init has no reason to have static storage duration. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/fsl/qe/qe.c b/drivers/soc/fsl/qe/qe.c index 612d9c551be5..855373deb746 100644 --

[PATCH 2/5] soc/fsl/qe: qe.c: reduce static memory footprint by 1.7K

2019-04-30 Thread Rasmus Villemoes
The current array of struct qe_snum use 256*4 bytes for just keeping track of the free/used state of each index, and the struct layout means there's another 768 bytes of padding. If we just unzip that structure, the array of snum values just use 256 bytes, while the free/inuse state can be tracked

[PATCH 3/5] soc/fsl/qe: qe.c: introduce qe_get_device_node helper

2019-04-30 Thread Rasmus Villemoes
The 'try of_find_compatible_node(NULL, NULL, "fsl,qe"), fall back to of_find_node_by_type(NULL, "qe")' pattern is repeated five times. Factor it into a common helper. Signed-off-by: Rasmus Villemoes --- drivers/soc/fsl/qe/qe.c | 71 + 1 file changed, 29 in

[PATCH RESEND 0/5] soc/fsl/qe: cleanups and new DT binding

2019-04-30 Thread Rasmus Villemoes
This small series consists of some small cleanups and simplifications of the QUICC engine driver, and introduces a new DT binding that makes it much easier to support other variants of the QUICC engine IP block that appears in the wild: There's no reason to expect in general that the number of vali

Re: [PATCH] powerpc/mm/radix: Fix kernel crash when running subpage protect test

2019-04-30 Thread Sachin Sant
> On 30-Apr-2019, at 1:29 PM, Aneesh Kumar K.V > wrote: > > This patch fixes the below crash by making sure we touch the subpage > protection > related structures only if we know they are allocated on the platform. With > radix translation we don't allocate hash context at all and trying to a

Re: [PATCH v4] powerpc/pseries: Remove limit in wait for dying CPU

2019-04-30 Thread Nathan Lynch
Thiago Jung Bauermann writes: > This can be a problem because if the busy loop finishes too early, then the > kernel may offline another CPU before the previous one finished dying, > which would lead to two concurrent calls to rtas-stop-self, which is > prohibited by the PAPR. > > Since the hotplu

[PATCH v2] powerpc/32s: fix BATs setting with CONFIG_STRICT_KERNEL_RWX

2019-04-30 Thread Christophe Leroy
Serge reported some crashes with CONFIG_STRICT_KERNEL_RWX enabled on a book3s32 machine. Analysis shows two issues: - BATs addresses and sizes are not properly aligned. - There is a gap between the last address covered by BATs and the first address covered by pages. Memory mapped with DBATs: 0: 0

Re: [PATCH 22/41] drivers: tty: serial: cpm_uart: fix logging calls

2019-04-30 Thread Andy Shevchenko
On Mon, Apr 29, 2019 at 05:59:04PM +0200, Christophe Leroy wrote: > Le 27/04/2019 à 14:52, Enrico Weigelt, metux IT consult a écrit : > > Fix checkpatch warnings by using pr_err(): > > > > WARNING: Prefer [subsystem eg: netdev]_err([subsystem]dev, ... then > > dev_err(dev, ... then pr_err(..

Re: [PATCH v2 stable v4.4 2/2] Documentation: Add nospectre_v1 parameter

2019-04-30 Thread Greg KH
On Tue, Apr 30, 2019 at 03:42:27PM +0300, Diana Craciun wrote: > commit 26cb1f36c43ee6e89d2a9f48a5a7500d5248f836 upstream. > > Currently only supported on powerpc. > > Signed-off-by: Diana Craciun > Signed-off-by: Michael Ellerman > --- > Documentation/kernel-parameters.txt | 4 > 1 file

Re: [PATCH v2 stable v4.4 2/2] Documentation: Add nospectre_v1 parameter

2019-04-30 Thread Greg KH
On Tue, Apr 30, 2019 at 03:42:27PM +0300, Diana Craciun wrote: > commit 26cb1f36c43ee6e89d2a9f48a5a7500d5248f836 upstream. > > Currently only supported on powerpc. > > Signed-off-by: Diana Craciun > Signed-off-by: Michael Ellerman > --- > Documentation/kernel-parameters.txt | 4 > 1 file

Re: [PATCH kernel v3] powerpc/powernv: Isolate NVLinks between GV100GL on Witherspoon

2019-04-30 Thread Alex Williamson
On Tue, 30 Apr 2019 16:14:35 +1000 Alexey Kardashevskiy wrote: > On 30/04/2019 15:45, Alistair Popple wrote: > > Alexey, > > > > +void pnv_try_isolate_nvidia_v100(struct pci_dev *bridge) > > +{ > > + u32 mask, val; > > + void __iomem *bar0_0, *bar0_12, *bar0_a00

[PATCH v2 stable v4.4 2/2] Documentation: Add nospectre_v1 parameter

2019-04-30 Thread Diana Craciun
commit 26cb1f36c43ee6e89d2a9f48a5a7500d5248f836 upstream. Currently only supported on powerpc. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman --- Documentation/kernel-parameters.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/kernel-parameters.txt b/Doc

[PATCH v2 stable v4.4 1/2] powerpc/fsl: Add FSL_PPC_BOOK3E as supported arch for nospectre_v2 boot arg

2019-04-30 Thread Diana Craciun
commit e59f5bd759b7dee57593c5b6c0441609bda5d530 upstream. Signed-off-by: Diana Craciun Signed-off-by: Michael Ellerman --- Documentation/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-paramete

[PATCH v3 16/16] powerpc/32: Don't add dummy frames when calling trace_hardirqs_on/off

2019-04-30 Thread Christophe Leroy
No need to add dummy frames when calling trace_hardirqs_on or trace_hardirqs_off. GCC properly handles empty stacks. In addition, powerpc doesn't set CONFIG_FRAME_POINTER, therefore __builtin_return_address(1..) returns NULL at all time. So the dummy frames are definitely unneeded here. In the me

[PATCH v3 14/16] powerpc/32: implement fast entry for syscalls on BOOKE

2019-04-30 Thread Christophe Leroy
This patch implements a fast entry for syscalls. Syscalls don't have to preserve non volatile registers except LR. This patch then implement a fast entry for syscalls, where volatile registers get clobbered. As this entry is dedicated to syscall it always sets MSR_EE and warns in case MSR_EE was

[PATCH v3 15/16] powerpc/32: don't do syscall stuff in transfer_to_handler

2019-04-30 Thread Christophe Leroy
As syscalls are now handled via a fast entry path, syscall related actions can be removed from the generic transfer_to_handler path. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/entry_32.S | 19 --- 1 file changed, 19 deletions(-) diff --git a/arch/powerpc/kernel/entr

[PATCH v3 12/16] powerpc: Fix 32-bit handling of MSR_EE on exceptions

2019-04-30 Thread Christophe Leroy
[text mostly copied from benh's RFC/WIP] ppc32 are still doing something rather gothic and wrong on 32-bit which we stopped doing on 64-bit a while ago. We have that thing where some handlers "copy" the EE value from the original stack frame into the new MSR before transferring to the handler. T

[PATCH v3 13/16] powerpc/32: implement fast entry for syscalls on non BOOKE

2019-04-30 Thread Christophe Leroy
This patch implements a fast entry for syscalls. Syscalls don't have to preserve non volatile registers except LR. This patch then implement a fast entry for syscalls, where volatile registers get clobbered. As this entry is dedicated to syscall it always sets MSR_EE and warns in case MSR_EE was

[PATCH v3 11/16] powerpc/32: get rid of COPY_EE in exception entry

2019-04-30 Thread Christophe Leroy
EXC_XFER_TEMPLATE() is not called with COPY_EE anymore so we can get rid of copyee parameters and related COPY_EE and NOCOPY macros. Suggested-by: Benjamin Herrenschmidt [splited out from benh RFC patch] Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.h| 12 ar

[PATCH v3 10/16] powerpc/32: Enter exceptions with MSR_EE unset

2019-04-30 Thread Christophe Leroy
All exceptions handlers know when to reenable interrupts, so it is safer to enter all of them with MSR_EE unset, except for syscalls. Suggested-by: Benjamin Herrenschmidt [splited out from benh RFC patch] Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.S| 68 +++

[PATCH v3 06/16] powerpc/40x: Split and rename NORMAL_EXCEPTION_PROLOG

2019-04-30 Thread Christophe Leroy
This patch splits NORMAL_EXCEPTION_PROLOG in the same way as in head_8xx.S and head_32.S and renames it EXCEPTION_PROLOG() as well to match head_32.h Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_40x.S | 26 -- 1 file changed, 16 insertions(+), 10 deletions

[PATCH v3 09/16] powerpc/32: enter syscall with MSR_EE inconditionaly set

2019-04-30 Thread Christophe Leroy
syscalls are expected to be entered with MSR_EE set. Lets make it inconditional by forcing MSR_EE on syscalls. This patch adds EXC_XFER_SYS for that. Suggested-by: Benjamin Herrenschmidt [splited out from benh RFC patch] Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.S

[PATCH v3 08/16] powerpc/fsl_booke: ensure SPEFloatingPointException() reenables interrupts

2019-04-30 Thread Christophe Leroy
SPEFloatingPointException() is the only exception handler which 'forgets' to re-enable interrupts. This patch makes sure it does. Suggested-by: Benjamin Herrenschmidt Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/traps.c | 8 1 file changed, 8 insertions(+) diff --git a/arch

[PATCH v3 05/16] powerpc/40x: add exception frame marker

2019-04-30 Thread Christophe Leroy
This patch adds STACK_FRAME_REGS_MARKER in the stack at exception entry in order to see interrupts in call traces as below: [0.013964] Call Trace: [0.014014] [c0745db0] [c007a9d4] tick_periodic.constprop.5+0xd8/0x104 (unreliable) [0.014086] [c0745dc0] [c007aa20] tick_handle_periodic+0

[PATCH v3 07/16] powerpc/40x: Refactor exception entry macros by using head_32.h

2019-04-30 Thread Christophe Leroy
Refactor exception entry macros by using the ones defined in head_32.h Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_32.h | 4 ++ arch/powerpc/kernel/head_40x.S | 88 +- 2 files changed, 6 insertions(+), 86 deletions(-) diff --git a/arch/

[PATCH v3 04/16] powerpc/40x: Don't use SPRN_SPRG_SCRATCH2 in EXCEPTION_PROLOG

2019-04-30 Thread Christophe Leroy
Unlike said in the comment, r1 is not reused by the critical exception handler, as it uses a dedicated critirq_ctx stack. Decrementing r1 early is then unneeded. Should the above be valid, the code is crap buggy anyway as r1 gets some intermediate values that would jeopardise the whole process (fo

[PATCH v3 03/16] powerpc/32: make the 6xx/8xx EXC_XFER_TEMPLATE() similar to the 40x/booke one

2019-04-30 Thread Christophe Leroy
6xx/8xx EXC_XFER_TEMPLATE() macro adds a i##n symbol which is unused and can be removed. 40x and booke EXC_XFER_TEMPLATE() macros takes msr from the caller while the 6xx/8xx version uses only MSR_KERNEL as msr value. This patch modifies the 6xx/8xx version to make it similar to the 40x and booke v

[PATCH v3 02/16] powerpc/32: move LOAD_MSR_KERNEL() into head_32.h and use it

2019-04-30 Thread Christophe Leroy
As preparation for using head_32.h for head_40x.S, move LOAD_MSR_KERNEL() there and use it to load r10 with MSR_KERNEL value. In the mean time, this patch modifies it so that it takes into account the size of the passed value to determine if 'li' can be used or if 'lis/ori' is needed instead of us

[PATCH v3 01/16] powerpc/32: Refactor EXCEPTION entry macros for head_8xx.S and head_32.S

2019-04-30 Thread Christophe Leroy
EXCEPTION_PROLOG is similar in head_8xx.S and head_32.S This patch creates head_32.h and moves EXCEPTION_PROLOG macro into it. It also converts it from a GCC macro to a GAS macro in order to ease refactorisation with 40x later, since GAS macros allows the use of #ifdef/#else/#endif inside it. And

[PATCH v3 00/16] powerpc/32: Implement fast syscall entry

2019-04-30 Thread Christophe Leroy
The purpose of this series is to implement a fast syscall entry on ppc32, as already done on ppc64. Unlike all other exceptions which can happen at any time and require to preserve all registers, the syscalls do not require the preservation of volatile registers (except LR). Syscall entries can t

Re: [PATCH v2 0/5] Allow CPU0 to be nohz full

2019-04-30 Thread Peter Zijlstra
On Tue, Apr 30, 2019 at 12:46:40PM +1000, Nicholas Piggin wrote: > Peter Zijlstra's on April 25, 2019 10:04 pm: > > On Thu, Apr 11, 2019 at 01:34:43PM +1000, Nicholas Piggin wrote: > >> Since last time, I added a compile time option to opt-out of this > >> if the platform does not support suspend o

Re: [PATCH stable v4.4 0/8] missing powerpc spectre backports for 4.4

2019-04-30 Thread Greg KH
On Mon, Apr 29, 2019 at 06:49:00PM +0300, Diana Craciun wrote: > Hi Greg, > > These are missing patches from the initial powerpc spectre backports for 4.4. > Please queue them as well if you don't have any objections. I applied the first 6 of these now. If you could fix up the last two and resen

Patch "powerpc/fsl: Flush the branch predictor at each kernel entry (32 bit)" has been added to the 4.4-stable tree

2019-04-30 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/fsl: Flush the branch predictor at each kernel entry (32 bit) to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the

Patch "powerpc/fsl: Sanitize the syscall table for NXP PowerPC 32 bit platforms" has been added to the 4.4-stable tree

2019-04-30 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/fsl: Sanitize the syscall table for NXP PowerPC 32 bit platforms to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of t

Patch "powerpc/fsl: Flush branch predictor when entering KVM" has been added to the 4.4-stable tree

2019-04-30 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/fsl: Flush branch predictor when entering KVM to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: p

Patch "powerpc/fsl: Fixed warning: orphan section `__btb_flush_fixup'" has been added to the 4.4-stable tree

2019-04-30 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/fsl: Fixed warning: orphan section `__btb_flush_fixup' to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch i

Patch "powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used" has been added to the 4.4-stable tree

2019-04-30 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/fsl: Enable runtime patching if nospectre_v2 boot arg is used to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the

Patch "powerpc/fsl: Emulate SPRN_BUCSR register" has been added to the 4.4-stable tree

2019-04-30 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/fsl: Emulate SPRN_BUCSR register to the 4.4-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: powerpc-fsl-em

Re: [PATCH stable v4.4 8/8] Documentation: Add nospectre_v1 parameter

2019-04-30 Thread Greg KH
On Mon, Apr 29, 2019 at 06:49:08PM +0300, Diana Craciun wrote: > Currently only supported on powerpc. No upstream git commit id for this one? thanks, greg k-h

Re: [PATCH stable v4.4 7/8] powerpc/fsl: Add FSL_PPC_BOOK3E as supported arch for nospectre_v2 boot arg

2019-04-30 Thread Greg KH
On Mon, Apr 29, 2019 at 06:49:07PM +0300, Diana Craciun wrote: > commit f633a8ad636efb5d4bba1a047d4a0f1ef719aa06 upstream. No, the patch below is not that git commit :( I'll stop here in applying these patches. thanks, greg k-h

Re: [PATCH] KVM: PPC: Book3S HV: smb->smp comment fixup

2019-04-30 Thread Paul Mackerras
On Thu, Apr 25, 2019 at 12:53:39PM -0700, Palmer Dabbelt wrote: > I made the same typo when trying to grep for uses of smp_wmb and figured > I might as well fix it. > > Signed-off-by: Palmer Dabbelt Thanks, patch applied to my kvm-ppc-next tree. Paul.

Re: [PATCH] powerpc: Fix kobject memleak

2019-04-30 Thread Greg Kroah-Hartman
On Tue, Apr 30, 2019 at 11:09:23AM +1000, Tobin C. Harding wrote: > Currently error return from kobject_init_and_add() is not followed by a > call to kobject_put(). This means there is a memory leak. > > Add call to kobject_put() in error path of kobject_init_and_add(). > > Signed-off-by: Tobin

[PATCH] powerpc/mm/radix: Fix kernel crash when running subpage protect test

2019-04-30 Thread Aneesh Kumar K.V
This patch fixes the below crash by making sure we touch the subpage protection related structures only if we know they are allocated on the platform. With radix translation we don't allocate hash context at all and trying to access subpage_prot_table results in Faulting instruction address: 0xc0