[PATCH v2] powernv/pci: Add PHB register dump debugfs handle

2016-07-26 Thread Russell Currey
On EEH events the kernel will print a dump of relevant registers. If EEH is unavailable (i.e. CONFIG_EEH is disabled, a new platform doesn't have EEH support, etc) this information isn't readily available. Add a new debugfs handler to trigger a PHB register dump, so that this information can be ma

Re: [PATCH v11 4/5] powerpc/fsl: move mpc85xx.h to include/linux/fsl

2016-07-26 Thread Scott Wood
On Mon, 2016-07-25 at 06:12 +, Yangbo Lu wrote: > Hi Scott, > > > > > > -Original Message- > > From: Scott Wood [mailto:o...@buserror.net] > > Sent: Friday, July 22, 2016 12:45 AM > > To: Michael Ellerman; Arnd Bergmann > > Cc: linux-...@vger.kernel.org; devicet...@vger.kernel.org; l

Re: [PATCH 2/3] powerpc/mm: Rename hpte_init_lpar() & put fallback in a header

2016-07-26 Thread Michael Ellerman
Benjamin Herrenschmidt writes: > On Mon, 2016-07-25 at 20:36 +1000, Michael Ellerman wrote: >> That would be nice, but these look fishy at least: >> >> arch/powerpc/platforms/cell/spu_manage.c:   if >> (!firmware_has_feature(FW_FEATURE_LPAR)) >> arch/powerpc/platforms/cell/spu_manage.c:

[PATCH v2 3/3] kexec: extend kexec_file_load system call

2016-07-26 Thread Thiago Jung Bauermann
Device tree blob must be passed to a second kernel on DTB-capable archs, like powerpc and arm64, but the current kernel interface lacks this support. This patch extends kexec_file_load system call by adding an extra argument to this syscall so that an arbitrary number of file descriptors can be ha

Re: [patch] ide: missing break statement in set_timings_mdma()

2016-07-26 Thread David Miller
From: Dan Carpenter Date: Thu, 14 Jul 2016 13:48:02 +0300 > There was clearly supposed to be a break statement here. Currently we > use the k2 ata timings instead of sh ata ones we intended. Probably no > one has this hardware anymore so it likely doesn't make a difference > beyond the static c

Re: [PATCH 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler

2016-07-26 Thread Scott Wood
On Tue, 2016-07-26 at 14:22 -0700, Andrey Smirnov wrote: > On Tue, Jul 26, 2016 at 12:59 AM, Scott Wood wrote: > > > > On Mon, 2016-07-25 at 21:25 -0700, Andrey Smirnov wrote: > > > > > > Convert fsl_rstcr_restart into a function to be registered with > > > register_reset_handler() API and intro

Re: [PATCH 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler

2016-07-26 Thread Andrey Smirnov
On Tue, Jul 26, 2016 at 12:59 AM, Scott Wood wrote: > On Mon, 2016-07-25 at 21:25 -0700, Andrey Smirnov wrote: >> Convert fsl_rstcr_restart into a function to be registered with >> register_reset_handler() API and introduce fls_rstcr_restart_register() >> function that can be added as an initcall

_PAGE_PRESENT and _PAGE_ACCESSED

2016-07-26 Thread LEROY Christophe
In ppc8xx tlbmiss handler, we consider a page valid if both _PAGE_PRESENT and _PAGE_ACCESSED are set. Is there any chance to have _PAGE_ACCESSED set and not _PAGE_PRESENT ? Otherwise we could simplify the handler by considering the page valid only when _PAGE_ACCESSED is set Christophe __

[PATCH 6/6] powerpc/kernel: Check features don't change after patching

2016-07-26 Thread Michael Ellerman
Early in boot we binary patch some sections of code based on the CPU and MMU feature bits. But it is a one-time patching, there is no facility for repatching the code later if the set of features change. It is a major bug if the set of features changes after we've done the code patching - so add a

[PATCH 5/6] powerpc/64: Do feature patching before MMU init

2016-07-26 Thread Michael Ellerman
Up until now we needed to do the MMU init before feature patching, because part of the MMU init was scanning the device tree and setting and/or clearing some MMU feature bits. Now that we have split that MMU feature modification out into routines called from early_init_devtree() (called earlier) w

[PATCH 4/6] powerpc/mm: Do radix device tree scanning earlier

2016-07-26 Thread Michael Ellerman
Like we just did for hash, split the device tree scanning parts out and call them from mmu_early_init_devtree(). Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/book3s/64/mmu.h | 1 + arch/powerpc/mm/init_64.c| 4 +++- arch/powerpc/mm/pgtable-radix.c | 3 +--

[PATCH 3/6] powerpc/mm: Do hash device tree scanning earlier

2016-07-26 Thread Michael Ellerman
Currently MMU initialisation (early_init_mmu()) consists of a mixture of scanning the device tree, setting MMU feature bits, and then also doing actual initialisation of MMU data structures. We'd like to decouple the setting of the MMU features from the actual setup. So split out the device tree s

[PATCH 2/6] powerpc/mm: Move disable_radix handling into mmu_early_init_devtree()

2016-07-26 Thread Michael Ellerman
Move the handling of the disable_radix command line argument into the newly created mmu_early_init_devtree(). It's an MMU option so it's preferable to have it in an mm related file, and it also means platforms that don't support radix don't have to carry the code. Signed-off-by: Michael Ellerman

[PATCH 1/6] powerpc/mm: Add mmu_early_init_devtree()

2016-07-26 Thread Michael Ellerman
Empty for now, but we'll add to it in the next patch. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/book3s/64/mmu.h | 1 + arch/powerpc/include/asm/mmu.h | 1 + arch/powerpc/kernel/prom.c | 2 ++ arch/powerpc/mm/init_64.c| 6 ++ 4 files

Re: [RFC PATCH 0/9]powerpc: "paca->soft_enabled" based local atomic operation implementation

2016-07-26 Thread Madhavan Srinivasan
On Tuesday 26 July 2016 05:51 PM, Benjamin Herrenschmidt wrote: On Mon, 2016-07-25 at 20:22 +0530, Madhavan Srinivasan wrote: But this patchset uses Benjamin Herrenschmidt suggestion of using arch_local_irq_disable_var() to soft_disable interrupts (including PMIs). After finishing the "op", ar

Re: [RFC PATCH 0/9]powerpc: "paca->soft_enabled" based local atomic operation implementation

2016-07-26 Thread Benjamin Herrenschmidt
On Mon, 2016-07-25 at 20:22 +0530, Madhavan Srinivasan wrote: > But this patchset uses Benjamin Herrenschmidt suggestion of using > arch_local_irq_disable_var() to soft_disable interrupts (including PMIs). > After finishing the "op", arch_local_irq_restore() called and correspondingly > interrupts

Re: [v3] UCC_GETH/UCC_FAST: Use IS_ERR_VALUE_U32 API to avoid IS_ERR_VALUE abuses.

2016-07-26 Thread Arnd Bergmann
On Saturday, July 23, 2016 11:35:51 PM CEST Arvind Yadav wrote: > diff --git a/include/linux/err.h b/include/linux/err.h > index 1e35588..a42f942 100644 > --- a/include/linux/err.h > +++ b/include/linux/err.h > @@ -19,6 +19,7 @@ > #ifndef __ASSEMBLY__ > > #define IS_ERR_VALUE(x) unlikely((unsig

Re: [PATCH V2 1/2] tty/hvc: Use IRQF_SHARED for OPAL hvc consoles

2016-07-26 Thread Michael Ellerman
Greg KH writes: > On Tue, Jul 26, 2016 at 02:11:11PM +1000, Michael Ellerman wrote: >> Quoting Michael Ellerman (2016-07-11 16:29:20) >> > Greg are you happy to take these two? >> >> I don't see this series anywhere, do you mind if I take them via the >> powerpc tree for 4.8 ? Or do you want to

Re: [PATCH] powernv/pci: Add PHB register dump debugfs handle

2016-07-26 Thread Michael Ellerman
Russell Currey writes: > On Tue, 2016-07-26 at 11:45 +1000, Michael Ellerman wrote: >> Quoting Russell Currey (2016-07-22 15:23:36) >> >> DEFINE_SIMPLE_ATTRIBUTE(fops_foo, NULL, foo_set, "%llu\n"); >> >> That requires that you write "1" to the file to trigger the reg dump. > > I don't think I c

RE: [v3] UCC_GETH/UCC_FAST: Use IS_ERR_VALUE_U32 API to avoid IS_ERR_VALUE abuses.

2016-07-26 Thread David Laight
From: Arvind Yadav > Sent: 23 July 2016 19:06 > IS_ERR_VALUE() assumes that its parameter is an unsigned long. > It can not be used to check if an 'unsigned int' reflects an error. > As they pass an 'unsigned int' into a function that takes an > 'unsigned long' argument. This happens to work becaus

[PATCH] powerpc: set used_vsr/used_vr/used_spe in sigreturn path when MSR bits are active

2016-07-26 Thread wei . guo . simon
From: Simon Guo Normally, when MSR[VSX/VR/SPE] bits = 1, the used_vsr/used_vr/used_spe bit have already been set. However signal frame locates at user space and it is controlled by user application. It is up to kernel to make sure used_vsr/used_vr/used_spe(in kernel)=1 and consistent with MSR bit

RE: [Patch v3 1/3] irqchip/qeic: move qeic driver from drivers/soc/fsl/qe

2016-07-26 Thread Qiang Zhao
Hi Jason, On Mon, Jul 26, 2016 at 03:24AM, Jason Cooper wrote: > -Original Message- > From: Jason Cooper [mailto:ja...@lakedaemon.net] > Sent: Tuesday, July 26, 2016 3:24 AM > To: Qiang Zhao > Cc: o...@buserror.net; linuxppc-dev@lists.ozlabs.org; linux- > ker...@vger.kernel.org; Xiaobo Xi

Re: [PATCH 3/3] powerpc: Convert fsl_rstcr_restart to a reset handler

2016-07-26 Thread Scott Wood
On Mon, 2016-07-25 at 21:25 -0700, Andrey Smirnov wrote: > Convert fsl_rstcr_restart into a function to be registered with > register_reset_handler() API and introduce fls_rstcr_restart_register() > function that can be added as an initcall that would do aforementioned > registration. > > Signed-o

Re: [RFC PATCH 7/9] powerpc: Add support to mask perf interrupts

2016-07-26 Thread Nicholas Piggin
On Tue, 26 Jul 2016 12:52:02 +0530 Madhavan Srinivasan wrote: > On Tuesday 26 July 2016 12:40 PM, Nicholas Piggin wrote: > > On Tue, 26 Jul 2016 12:16:32 +0530 > > Madhavan Srinivasan wrote: > > > >> On Tuesday 26 July 2016 12:00 PM, Nicholas Piggin wrote: > >>> On Tue, 26 Jul 2016 11:55:51

Re: [RFC PATCH 7/9] powerpc: Add support to mask perf interrupts

2016-07-26 Thread Madhavan Srinivasan
On Tuesday 26 July 2016 12:40 PM, Nicholas Piggin wrote: On Tue, 26 Jul 2016 12:16:32 +0530 Madhavan Srinivasan wrote: On Tuesday 26 July 2016 12:00 PM, Nicholas Piggin wrote: On Tue, 26 Jul 2016 11:55:51 +0530 Madhavan Srinivasan wrote: On Tuesday 26 July 2016 11:16 AM, Nicholas Piggi

Re: [RFC PATCH 7/9] powerpc: Add support to mask perf interrupts

2016-07-26 Thread Nicholas Piggin
On Tue, 26 Jul 2016 12:16:32 +0530 Madhavan Srinivasan wrote: > On Tuesday 26 July 2016 12:00 PM, Nicholas Piggin wrote: > > On Tue, 26 Jul 2016 11:55:51 +0530 > > Madhavan Srinivasan wrote: > > > >> On Tuesday 26 July 2016 11:16 AM, Nicholas Piggin wrote: > >>> On Mon, 25 Jul 2016 20:22:20