Re: [PATCH v2 9/9] powerpc/eeh: Add eeh_state_active() helper

2018-03-20 Thread Alexey Kardashevskiy
On 19/3/18 1:49 pm, Sam Bobroff wrote: > Checking for a "fully active" device state requires testing two flag > bits, which is open coded in several places, so add a function to do > it. > > Signed-off-by: Sam Bobroff Reviewed-by: Alexey Kardashevskiy

Re: [PATCH v3 8/9] powerpc/eeh: Factor out common code eeh_reset_device()

2018-03-20 Thread Alexey Kardashevskiy
On 21/3/18 1:06 pm, Sam Bobroff wrote: > The caller will always pass NULL for 'rmv_data' when > 'eeh_aware_driver' is true, so the first two calls to > eeh_pe_dev_traverse() can be combined without changing behaviour as > can the two arms of the final 'if' block. > > This should not change

Re: [PATCH v2 7/9] powerpc/eeh: Remove always-true tests in eeh_reset_device()

2018-03-20 Thread Alexey Kardashevskiy
On 19/3/18 1:49 pm, Sam Bobroff wrote: > eeh_reset_device() tests the value of 'bus' more than once but the > only caller, eeh_handle_normal_device() does this test itself and will > never pass NULL. > > So, remove the dead tests. > > This should not change behaviour. > > Signed-off-by: Sam

Re: [PATCH v2 6/9] powerpc/eeh: Clarify arguments to eeh_reset_device()

2018-03-20 Thread Alexey Kardashevskiy
On 19/3/18 1:48 pm, Sam Bobroff wrote: > It is currently difficult to understand the behaviour of > eeh_reset_device() due to the way it's parameters are used. In > particular, when 'bus' is NULL, it's value is still necessary so the > same value is looked up again locally under a different name >

Re: [PATCH v2 5/9] powerpc/eeh: Rename frozen_bus to bus in eeh_handle_normal_event()

2018-03-20 Thread Alexey Kardashevskiy
On 19/3/18 1:47 pm, Sam Bobroff wrote: > The name "frozen_bus" is misleading: it's not necessarily frozen, it's > just the PE's PCI bus. > > Signed-off-by: Sam Bobroff Reviewed-by: Alexey Kardashevskiy > --- > arch/powerpc/kernel/eeh_driver.c | 10

Re: [PATCH v2 4/9] powerpc/eeh: Remove misleading test in eeh_handle_normal_event()

2018-03-20 Thread Alexey Kardashevskiy
On 19/3/18 1:46 pm, Sam Bobroff wrote: > Remove a test that checks if "frozen_bus" is NULL, because it cannot > have changed since it was tested at the start of the function and so > must be true here. > > Signed-off-by: Sam Bobroff Reviewed-by: Alexey Kardashevskiy

Re: [PATCH v2 3/9] powerpc/eeh: Fix misleading comment in __eeh_addr_cache_get_device()

2018-03-20 Thread Alexey Kardashevskiy
On 19/3/18 1:46 pm, Sam Bobroff wrote: > Commit "0ba17b05 powerpc/eeh: Remove reference to PCI device" > removed a call to pci_dev_get() from __eeh_addr_cache_get_device() but > did not update the comment to match. > > Signed-off-by: Sam Bobroff Reviewed-by: Alexey

Re: [PATCH v2 2/9] powerpc/eeh: Manage EEH_PE_RECOVERING inside eeh_handle_normal_event()

2018-03-20 Thread Alexey Kardashevskiy
On 19/3/18 1:46 pm, Sam Bobroff wrote: > Currently the EEH_PE_RECOVERING flag for a PE is managed by both the > caller and callee of eeh_handle_normal_event() (among other places not > considered here). This is complicated by the fact that the PE may > or may not have been invalidated by the call.

Re: [PATCH v2 1/9] powerpc/eeh: Remove eeh_handle_event()

2018-03-20 Thread Alexey Kardashevskiy
On 19/3/18 1:46 pm, Sam Bobroff wrote: > The function eeh_handle_event(pe) does nothing other than switching > between calling eeh_handle_normal_event(pe) and > eeh_handle_special_event(). However it is only called in two places, > one where pe can't be NULL and the other where it must be NULL

Re: [PATCH v2 0/9] EEH refactoring 1

2018-03-20 Thread Alexey Kardashevskiy
On 19/3/18 1:45 pm, Sam Bobroff wrote: > Hello everyone, > > Here is a set of some small, mostly idempotent, changes to improve > maintainability in some of the EEH code, primarily in eeh_driver.c. > > I've kept them all small to aid review but perhaps they should be squashed > down > before

Re: [PATCH] powerpc/64s: Fix lost pending interrupt due to race causing lost update to irq_happened

2018-03-20 Thread Benjamin Herrenschmidt
On Wed, 2018-03-21 at 13:16 +1000, Nicholas Piggin wrote: > Yes Carol is working on this with distros. Backporting should be > simple, so hoping to get this upstream soon to help the process. > We can take that as a Reviewed-by:? :) Ah yup. Cheers, Ben.

Re: RFC on writel and writel_relaxed

2018-03-20 Thread Oliver
On Wed, Mar 21, 2018 at 2:07 PM, Sinan Kaya wrote: > Hi PPC Maintainers, > > We are seeking feedback on the status of relaxed write API implementation. > What is the motivation for not implementing the relaxed API? Hmm, good question. Looks like we've implemented the

Re: [PATCH] powerpc/64s: Fix lost pending interrupt due to race causing lost update to irq_happened

2018-03-20 Thread Nicholas Piggin
Adding Carol... On Wed, 21 Mar 2018 13:32:28 +1100 Benjamin Herrenschmidt wrote: > On Wed, 2018-03-21 at 12:22 +1000, Nicholas Piggin wrote: > > force_external_irq_replay() can be called in the do_IRQ path with > > interrupts hard enabled and soft disabled if

RFC on writel and writel_relaxed

2018-03-20 Thread Sinan Kaya
Hi PPC Maintainers, We are seeking feedback on the status of relaxed write API implementation. What is the motivation for not implementing the relaxed API? I see that network drivers are working around the issue by calling __raw_write() API directly but this also breaks other architectures like

Re: [PATCH] powerpc/64s: Fix lost pending interrupt due to race causing lost update to irq_happened

2018-03-20 Thread Benjamin Herrenschmidt
On Wed, 2018-03-21 at 12:22 +1000, Nicholas Piggin wrote: > force_external_irq_replay() can be called in the do_IRQ path with > interrupts hard enabled and soft disabled if may_hard_irq_enable() set > MSR[EE]=1. It updates local_paca->irq_happened with a load, modify, > store sequence. If a

[PATCH] powerpc/64s: Fix lost pending interrupt due to race causing lost update to irq_happened

2018-03-20 Thread Nicholas Piggin
force_external_irq_replay() can be called in the do_IRQ path with interrupts hard enabled and soft disabled if may_hard_irq_enable() set MSR[EE]=1. It updates local_paca->irq_happened with a load, modify, store sequence. If a maskable interrupt hits during this sequence, it will go to the masked

[PATCH v3 8/9] powerpc/eeh: Factor out common code eeh_reset_device()

2018-03-20 Thread Sam Bobroff
The caller will always pass NULL for 'rmv_data' when 'eeh_aware_driver' is true, so the first two calls to eeh_pe_dev_traverse() can be combined without changing behaviour as can the two arms of the final 'if' block. This should not change behaviour. Signed-off-by: Sam Bobroff

linux-next: manual merge of the powerpc tree with the asm-generic tree

2018-03-20 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the powerpc tree got a conflict in: lib/raid6/test/Makefile between commit: fa523d54a7eb ("raid: remove tile specific raid6 implementation") from the asm-generic tree and commit: 751ba79cc552 ("lib/raid6/altivec: Add vpermxor implementation for raid6

Re: [bug?] Access was denied by memory protection keys in execute-only address

2018-03-20 Thread Ram Pai
On Fri, Mar 09, 2018 at 11:43:00AM +0800, Li Wang wrote: >On Fri, Mar 9, 2018 at 12:45 AM, Ram Pai <[1]linux...@us.ibm.com> wrote: > > On Thu, Mar 08, 2018 at 11:19:12PM +1100, Michael Ellerman wrote: > > Li Wang <[2]liw...@redhat.com> writes: > > > Hi, > > > > > >

Re: [PATCH 4/5] powerpc/zImage: Rework serial driver probing

2018-03-20 Thread Oliver
On Tue, Mar 20, 2018 at 8:20 PM, Michael Ellerman wrote: > Oliver O'Halloran writes: > >> Rather than checking the compatible string in serial_driver_init() >> we call into the driver's init function and wait for a driver to >> inidicate it bound to the

Re: [PATCH 3/5] powerpc/zImage: Check compatible at driver init

2018-03-20 Thread Oliver
On Tue, Mar 20, 2018 at 8:19 PM, Michael Ellerman wrote: > Oliver O'Halloran writes: >> diff --git a/arch/powerpc/boot/mpc52xx-psc.c >> b/arch/powerpc/boot/mpc52xx-psc.c >> index c2c08633ee35..75470936e661 100644 >> --- a/arch/powerpc/boot/mpc52xx-psc.c >>

Re: [PATCH 2/2] powerpc/mm: Trace tlbia instruction

2018-03-20 Thread kbuild test robot
Hi Christophe, Thank you for the patch! Yet something to improve: [auto build test ERROR on v4.16-rc4] [also build test ERROR on next-20180320] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits

Re: [PATCH 1/2] powerpc64/ftrace: Add a field in paca to disable ftrace in unsafe code paths

2018-03-20 Thread Naveen N. Rao
Michael Ellerman wrote: Nicholas Piggin writes: On Mon, 19 Mar 2018 14:43:00 +0530 "Naveen N. Rao" wrote: We have some C code that we call into from real mode where we cannot take any exceptions. Though the C functions themselves are

Re: [01/10] selftests/powerpc: add process creation benchmark

2018-03-20 Thread Michael Ellerman
On Tue, 2018-03-06 at 13:24:58 UTC, Nicholas Piggin wrote: > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/dd40c5b4c90d84d30cdb452c2d193d cheers

Re: powerpc: dts: replace 'linux,stdout-path' with 'stdout-path'

2018-03-20 Thread Michael Ellerman
On Wed, 2018-02-28 at 22:44:06 UTC, Rob Herring wrote: > 'linux,stdout-path' has been deprecated for some time in favor of > 'stdout-path'. Now dtc will warn on occurrences of 'linux,stdout-path'. > Search and replace all the of occurrences with 'stdout-path'. > > Signed-off-by: Rob Herring

Re: [3/3] powernv/pci: Improve a size determination in pnv_pci_init_ioda_phb()

2018-03-20 Thread Michael Ellerman
On Tue, 2017-10-17 at 15:40:17 UTC, SF Markus Elfring wrote: > From: Markus Elfring > Date: Tue, 17 Oct 2017 17:18:10 +0200 > > Replace the specification of a data structure by a pointer dereference > as the parameter for the operator "sizeof" to make the

Re: [v6, 1/2] raid6/altivec: Add vpermxor implementation for raid6 Q syndrome

2018-03-20 Thread Michael Ellerman
On Fri, 2017-08-04 at 03:42:32 UTC, Matt Brown wrote: > This patch uses the vpermxor instruction to optimise the raid6 Q syndrome. > This instruction was made available with POWER8, ISA version 2.07. > It allows for both vperm and vxor instructions to be done in a single > instruction. This has

Re: powerpc/include/asm: Remove unused 64bit cacheflush function

2018-03-20 Thread Michael Ellerman
On Thu, 2017-07-20 at 06:25:14 UTC, Matt Brown wrote: > The flush_dcache_phys_range function is no longer used in the kernel. > This patch removes and cleans up the function. > > Signed-off-by: Matt Brown Applied to powerpc next, thanks.

Re: [PATCH 4/5] powerpc/zImage: Rework serial driver probing

2018-03-20 Thread Michael Ellerman
Oliver O'Halloran writes: > Rather than checking the compatible string in serial_driver_init() > we call into the driver's init function and wait for a driver to > inidicate it bound to the device by returning zero. > > The pointers to each driver probe functions are stored in

Re: [PATCH 3/5] powerpc/zImage: Check compatible at driver init

2018-03-20 Thread Michael Ellerman
Oliver O'Halloran writes: > diff --git a/arch/powerpc/boot/mpc52xx-psc.c b/arch/powerpc/boot/mpc52xx-psc.c > index c2c08633ee35..75470936e661 100644 > --- a/arch/powerpc/boot/mpc52xx-psc.c > +++ b/arch/powerpc/boot/mpc52xx-psc.c > @@ -52,6 +52,9 @@ static unsigned char

Re: [RFC PATCH 4/6] mm: provide generic compat_sys_readahead() implementation

2018-03-20 Thread Ingo Molnar
* Al Viro wrote: > > For example this attempt at creating a new system call: > > > > SYSCALL_DEFINE3(moron, int, fd, loff_t, offset, size_t, count) > > > > ... would translate into something like: > > > > .name = "moron", .pattern = "WWW", .type = "int",

Re: [RFC PATCH 4/6] mm: provide generic compat_sys_readahead() implementation

2018-03-20 Thread Dominik Brodowski
On Mon, Mar 19, 2018 at 11:23:42PM +, Al Viro wrote: > static inline long C_S_moron(int, loff_t, size_t); > long compat_SyS_moron(long a0, long a1, long a2, long a3, long a4, long a5, > long a6) > { > return C_S_moron((__force int)a0, > (__force loff_t)(((u64)a2 <<

Re: [PATCH v2 8/9] powerpc/eeh: Factor out common code eeh_reset_device()

2018-03-20 Thread kbuild test robot
-Bobroff/EEH-refactoring-1/20180320-024729 config: powerpc-ppc64_defconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin

Re: [PATCH 4/5] powerpc/zImage: Rework serial driver probing

2018-03-20 Thread kbuild test robot
/Oliver-O-Halloran/powerpc-zImage-Remove-ifdef-in-opal-c/20180320-023705 config: powerpc-ppc64_defconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross

Re: [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie

2018-03-20 Thread kbuild test robot
/Christophe-Leroy/powerpc-mm-Add-missing-tracepoint-for-tlbie/20180320-130831 config: powerpc-maple_defconfig (attached as .config) compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin

Re: [PATCH 1/2] powerpc/mm: Add missing tracepoint for tlbie

2018-03-20 Thread Christophe LEROY
Le 19/03/2018 à 23:39, Balbir Singh a écrit : On Mon, 19 Mar 2018 11:32:38 +0100 (CET) Christophe Leroy wrote: commit 0428491cba927 ("powerpc/mm: Trace tlbie(l) instructions") added tracepoints for tlbie calls, but _tlbil_va() was forgotten Fixes: 0428491cba927

Re: [PATCH 4/5] powerpc/zImage: Rework serial driver probing

2018-03-20 Thread kbuild test robot
/Oliver-O-Halloran/powerpc-zImage-Remove-ifdef-in-opal-c/20180320-023705 config: powerpc64-alldefconfig (attached as .config) compiler: powerpc-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross

Re: [PATCH 2/2] powerpc/mm: Trace tlbia instruction

2018-03-20 Thread Christophe LEROY
Le 19/03/2018 à 23:43, Balbir Singh a écrit : On Mon, 19 Mar 2018 11:32:40 +0100 (CET) Christophe Leroy wrote: Add a trace point for tlbia (Translation Lookaside Buffer Invalidate All) instruction. Signed-off-by: Christophe Leroy ---