Re: [PATCH v2 1/8] powerpc: Create a helper for getting the kernel toc value

2016-03-01 Thread Kamalesh Babulal
* Michael Ellerman [2016-02-29 20:26:22]: > Move the logic to work out the kernel toc pointer into a header. This is > a good cleanup, and also means we can use it elsewhere in future. > > Signed-off-by: Michael Ellerman Reviewed-by: Kamalesh Babulal _

Re: [PATCH v2 2/8] powerpc/module: Only try to generate the ftrace_caller() stub once

2016-03-01 Thread Kamalesh Babulal
* Michael Ellerman [2016-02-29 20:26:23]: > Currently we generate the module stub for ftrace_caller() at the bottom > of apply_relocate_add(). However apply_relocate_add() is potentially > called more than once per module, which means we will try to generate > the ftrace_caller() stub multiple ti

Re: [PATCH v2 5/8] powerpc/ftrace: Use generic ftrace_modify_all_code()

2016-03-01 Thread Kamalesh Babulal
* Michael Ellerman [2016-02-29 20:26:26]: > From: Torsten Duwe > > Convert powerpc's arch_ftrace_update_code() from its own version to use > the generic default functionality (without stop_machine -- our > instructions are properly aligned and the replacements atomic). > > With this we gain er

Re: [PATCH v2 1/8] powerpc: Create a helper for getting the kernel toc value

2016-03-01 Thread Torsten Duwe
On Mon, Feb 29, 2016 at 08:26:22PM +1100, Michael Ellerman wrote: > Move the logic to work out the kernel toc pointer into a header. This is > a good cleanup, and also means we can use it elsewhere in future. Yes, looks better, very nice. > Signed-off-by: Michael Ellerman Reviewed-by: Torsten Du

Re: [PATCH v2 2/8] powerpc/module: Only try to generate the ftrace_caller() stub once

2016-03-01 Thread Torsten Duwe
On Mon, Feb 29, 2016 at 08:26:23PM +1100, Michael Ellerman wrote: [...] > diff --git a/arch/powerpc/kernel/module_32.c b/arch/powerpc/kernel/module_32.c > index 2c01665eb410..dd095496d225 100644 > --- a/arch/powerpc/kernel/module_32.c > +++ b/arch/powerpc/kernel/module_32.c > @@ -294,11 +294,19 @@

Re: [PATCH v3 4/4] printk/nmi: Increase the size of NMI buffer and make it configurable

2016-03-01 Thread Daniel Thompson
On 18/12/15 17:00, Daniel Thompson wrote: The MCE handlers should only call printk() when they decide to panic and *after* busting the spinlocks. At this point deferring printk() until it is safe is not very helpful. When we bust the spinlocks we should probably restore the normal printk() funct

Re: [RFC PATCH v1 2/2] powerpc/86xx: Introduce and use common dtsi

2016-03-01 Thread Alessio Igor Bogani
Scott, On 29 February 2016 at 23:38, Scott Wood wrote: [...] > Could you post a diff of what the decompiled trees look like before and after > this change (e.g. interrupts went from 2-cell to 4-cell)? It is very hard to > review in this form. Or better, like the config change, have a commit tha

Re: [RFC PATCH v1 2/2] powerpc/86xx: Introduce and use common dtsi

2016-03-01 Thread Scott Wood
On Tue, 2016-03-01 at 15:55 +0100, Alessio Igor Bogani wrote: > Scott, > > On 29 February 2016 at 23:38, Scott Wood wrote: > [...] > > > > > +&pci0 { > > > + compatible = "fsl,mpc8641-pcie"; > > > + device_type = "pci"; > > > + #size-cells = <2>; > > > + #address-cells = <3>; > >

[PATCH 0/6] rtc: generic: follow up for COMPILE_TEST

2016-03-01 Thread Arnd Bergmann
Today's linux-next kernel allowed building the rtc-generic driver (and most other rtc drivers) on all architectures, but this caused some errors on architectures without asm/rtc.h. This series reworks that driver to avoid the dependency, and simplifies all four implementations. My first approach w

[PATCH 1/6] rtc: generic: allow building on all architectures

2016-03-01 Thread Arnd Bergmann
There are four architectures using this driver, but since we can build it with COMPILE_TEST, we should try dealing with the absence of the asm/rtc.h header file, to avoid getting a build error: drivers/rtc/rtc-generic.c:12:21: fatal error: asm/rtc.h: No such file or directory This creates an alt

[PATCH 2/6] m68k: rtc: provide rtc_class_ops directly

2016-03-01 Thread Arnd Bergmann
The rtc-generic driver provides an architecture specific wrapper on top of the generic rtc_class_ops abstraction, and m68k has another abstraction on top, which is a bit silly. This changes the m68k rtc-generic device to provide its rtc_class_ops directly, to reduce the number of layers by one. S

[PATCH 3/6] powerpc: rtc: provide rtc_class_ops directly

2016-03-01 Thread Arnd Bergmann
The rtc-generic driver provides an architecture specific wrapper on top of the generic rtc_class_ops abstraction, and powerpc has another abstraction on top, which is a bit silly. This changes the powerpc rtc-generic device to provide its rtc_class_ops directly, to reduce the number of layers by o

[PATCH 4/6] parisc: rtc: provide rtc_class_ops directly

2016-03-01 Thread Arnd Bergmann
The rtc-generic driver provides an architecture specific wrapper on top of the generic rtc_class_ops abstraction, and on pa-risc, that is implemented using an open-coded version of rtc_time_to_tm/rtc_tm_to_time. This changes the parisc rtc-generic device to provide its rtc_class_ops directly, usin

[PATCH 5/6] sh: rtc: provide rtc_class_ops directly

2016-03-01 Thread Arnd Bergmann
The rtc-generic driver provides an architecture specific wrapper on top of the generic rtc_class_ops abstraction, and on sh, that goes through another indirection using the rtc_sh_get_time/rtc_sh_set_time functions. This changes the sh rtc-generic device to provide its rtc_class_ops directly, skip

[PATCH 6/6] rtc: generic: remove get_rtc_time/set_rtc_time wrappers

2016-03-01 Thread Arnd Bergmann
All architectures using this driver are now converted to provide their own operations, so this one can be turned into a trivial stub driver relying on its platform data. Signed-off-by: Arnd Bergmann --- drivers/rtc/rtc-generic.c | 36 +--- 1 file changed, 1 insert

Re: [PATCH 4/6] parisc: rtc: provide rtc_class_ops directly

2016-03-01 Thread kbuild test robot
Hi Arnd, [auto build test ERROR on abelloni/rtc-next] [also build test ERROR on v4.5-rc6 next-20160301] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Arnd-Bergmann/rtc-generic-follow-up-for

Re: [PATCH 3/6] powerpc: rtc: provide rtc_class_ops directly

2016-03-01 Thread kbuild test robot
Hi Arnd, [auto build test ERROR on abelloni/rtc-next] [also build test ERROR on v4.5-rc6 next-20160301] [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] url: https://github.com/0day-ci/linux/commits/Arnd-Bergmann/rtc-generic-follow-up-for

Re: [PATCH 3/6] powerpc: rtc: provide rtc_class_ops directly

2016-03-01 Thread Arnd Bergmann
On Wednesday 02 March 2016 02:37:14 kbuild test robot wrote: > [auto build test ERROR on abelloni/rtc-next] > [also build test ERROR on v4.5-rc6 next-20160301] > [if your patch is applied to the wrong git tree, please drop us a note to > help improving the system] > >

Re: [1/4] powerpc/mm: Clean up error handling for htab_remove_mapping

2016-03-01 Thread Michael Ellerman
On Tue, 2016-09-02 at 03:32:40 UTC, David Gibson wrote: > Currently, the only error that htab_remove_mapping() can report is -EINVAL, > if removal of bolted HPTEs isn't implemeted for this platform. We make > a few clean ups to the handling of this: > > * EINVAL isn't really the right code - the

Re: [v2, 1/4] powerpc/ps3: gelic_udbg: use struct ethhdr from

2016-03-01 Thread Michael Ellerman
On Mon, 2016-08-02 at 22:27:04 UTC, Luis Henriques wrote: > Instead of defining a local version of struct ethhdr use the standard > definition from . > > The fields in the definition have different names: > - dest -> h_dest > - src -> h_source > - type -> h_proto > > While there, use a few ot

Re: [2/4] powerpc/mm: Handle removing maybe-present bolted HPTEs

2016-03-01 Thread Michael Ellerman
On Tue, 2016-09-02 at 03:32:41 UTC, David Gibson wrote: > At the moment the hpte_removebolted callback in ppc_md returns void and > will BUG_ON() if the hpte it's asked to remove doesn't exist in the first > place. This is awkward for the case of cleaning up a mapping which was > partially made be

Re: [3/4] powerpc/mm: Clean up memory hotplug failure paths

2016-03-01 Thread Michael Ellerman
On Tue, 2016-09-02 at 03:32:42 UTC, David Gibson wrote: > This makes a number of cleanups to handling of mapping failures during > memory hotplug on Power: > > For errors creating the linear mapping for the hot-added region: > * This is now reported with EFAULT which is more appropriate than the

Re: [4/4] powerpc/mm: Split hash page table sizing heuristic into a helper

2016-03-01 Thread Michael Ellerman
On Tue, 2016-09-02 at 03:32:43 UTC, David Gibson wrote: > htab_get_table_size() either retrieve the size of the hash page table (HPT) > from the device tree - if the HPT size is determined by firmware - or > uses a heuristic to determine a good size based on RAM size if the kernel > is responsible

Re: powerpc: Fix misspellings in comments.

2016-03-01 Thread Michael Ellerman
On Wed, 2016-24-02 at 18:51:11 UTC, Adam Buchbinder wrote: > Signed-off-by: Adam Buchbinder Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/446957ba5127141ee007fc6150 cheers ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org

GPIO expander for p2041

2016-03-01 Thread Nora Björklund
Hi, I was working on a p2041rdb target not so long ago and needed to use the gpio pins (described in detail in the p2041 reference manual), these are visible on the p2041 fact sheet [1]. The pins are connected to a gpio expander, PCA9672 [2], which is connected to a i2c-bus.  The expander was not

Re: [3/3] powerpc/pseries: Cleanup property cloning in memory dlpar

2016-03-01 Thread Michael Ellerman
On Wed, 2016-10-02 at 17:13:29 UTC, Nathan Fontenot wrote: > Now that the DLPAR add/remove flow updates the ibm,dynamic-memory device > tree property each time we add or remove a LMB the work needed to clone > this property can be reduced. > > Prior to performing any memory DLPAR operation we now

Re: [4/4] powerpc/mm: Split hash page table sizing heuristic into a helper

2016-03-01 Thread David Gibson
On Wed, Mar 02, 2016 at 09:21:19AM +1100, Michael Ellerman wrote: > On Tue, 2016-09-02 at 03:32:43 UTC, David Gibson wrote: > > htab_get_table_size() either retrieve the size of the hash page table (HPT) > > from the device tree - if the HPT size is determined by firmware - or > > uses a heuristic

Re: [PATCH V10 02/28] powerpc, process: Add the function flush_tmregs_to_thread

2016-03-01 Thread Cyril Bur
On Tue, 16 Feb 2016 14:29:32 +0530 Anshuman Khandual wrote: > This patch creates a function flush_tmregs_to_thread which > will then be used by subsequent patches in this series. The > function checks for self tracing ptrace interface attempts > while in the TM context and logs appropriate warnin

Re: [PATCH V10 17/28] selftests, powerpc: Add ptrace tests for EBB

2016-03-01 Thread Cyril Bur
On Tue, 16 Feb 2016 14:29:47 +0530 Anshuman Khandual wrote: > This patch adds ptrace interface test for EBB specific > registers. This also adds some generic ptrace interface > based helper functions to be used by other patches later > on in the series. > > Signed-off-by: Anshuman Khandual > --

Re: [PATCH V10 18/28] selftests, powerpc: Add ptrace tests for GPR/FPR registers

2016-03-01 Thread Cyril Bur
On Tue, 16 Feb 2016 14:29:48 +0530 Anshuman Khandual wrote: > This patch adds ptrace interface test for GPR/FPR registers. > This adds ptrace interface based helper functions related to > GPR/FPR access and some assembly helper functions related to > GPR/FPR registers. > I wonder if with a bit

Re: [PATCH 3/3] powerpc/eeh: Synchronize recovery in host/guest

2016-03-01 Thread Russell Currey
On Fri, 2016-02-26 at 11:04 +1100, Gavin Shan wrote: > When passing through SRIOV VFs to guest, we possibly encounter EEH > error on PF. In this case, the VF PEs are put into frozen state. > The error could be reported to guest before it's captured by the > host. That means the guest could attempt

Re: [PATCH 0/3] powerpc/eeh: Enhancement to EEH for VF

2016-03-01 Thread Russell Currey
On Fri, 2016-02-26 at 11:04 +1100, Gavin Shan wrote: > Those patches are based on the series of patches supporting EEH for VF, > which is pending for merging: https://patchwork.ozlabs.org/patch/581315/ > > This series of patches fixes couple of issue that resides in previous > patchset: > >    *

Re: [RFC PATCH 1/2] powerpc/mm: Update prot_none implementation using _PAGE_READ

2016-03-01 Thread Paul Mackerras
On Fri, Feb 26, 2016 at 08:50:49AM +0530, Aneesh Kumar K.V wrote: > Now that we have _PAGE_READ use that to implement prot none. With this > prot_none is _PAGE_PRESENT with none of the access bits set. While > hashing we map that to PP bit 00. > > With this implementation, we will now take a prot

Re: [RFC PATCH 2/2] powerpc/mm: Replace _PAGE_USER with _PAGE_PRIV

2016-03-01 Thread Paul Mackerras
On Fri, Feb 26, 2016 at 08:50:50AM +0530, Aneesh Kumar K.V wrote: > _PAGE_PRIV means the page can be accessed only by kernel. This is done > to keep pte bits similar to PowerISA 3.0 radix PTE format. User > pages are now makred by clearing _PAGE_PRIV bit. Mostly looks good, but some comments below

[PATCH] MAINTAINERS: Add powerpc drivers to the powerpc section

2016-03-01 Thread Michael Ellerman
We'd like folks working on drivers for powerpc to also Cc linuxppc-dev, so we can be aware of what's going on in drivers and/or review the changes. So add patterns to the powerpc MAINTAINERS section to catch some of the drivers we're interested in. Signed-off-by: Michael Ellerman --- MAINTAINER

Re: [RFC PATCH 1/2] powerpc/mm: Update prot_none implementation using _PAGE_READ

2016-03-01 Thread Paul Mackerras
Another thing: On Fri, Feb 26, 2016 at 08:50:49AM +0530, Aneesh Kumar K.V wrote: > --- a/arch/powerpc/mm/hash_utils_64.c > +++ b/arch/powerpc/mm/hash_utils_64.c > @@ -173,9 +173,11 @@ unsigned long htab_convert_pte_flags(unsigned long > pteflags) >* and there is no kernel RO (_PAGE_KERNEL

Re: [3/3] powerpc/pseries: Cleanup property cloning in memory dlpar

2016-03-01 Thread Michael Ellerman
On Wed, 2016-03-02 at 10:02 +1100, Michael Ellerman wrote: > On Wed, 2016-10-02 at 17:13:29 UTC, Nathan Fontenot wrote: > > Now that the DLPAR add/remove flow updates the ibm,dynamic-memory device > > tree property each time we add or remove a LMB the work needed to clone > > this property can be r

Re: [PATCH] MAINTAINERS: Add powerpc drivers to the powerpc section

2016-03-01 Thread Joel Stanley
On Wed, Mar 2, 2016 at 12:06 PM, Michael Ellerman wrote: > We'd like folks working on drivers for powerpc to also Cc linuxppc-dev, > so we can be aware of what's going on in drivers and/or review the > changes. > > So add patterns to the powerpc MAINTAINERS section to catch some of the > drivers w

Re: [PATCH v2 2/8] powerpc/module: Only try to generate the ftrace_caller() stub once

2016-03-01 Thread Michael Ellerman
On Tue, 2016-03-01 at 13:00 +0100, Torsten Duwe wrote: > On Mon, Feb 29, 2016 at 08:26:23PM +1100, Michael Ellerman wrote: > [...] > > diff --git a/arch/powerpc/kernel/module_32.c > > b/arch/powerpc/kernel/module_32.c > > index 2c01665eb410..dd095496d225 100644 > > --- a/arch/powerpc/kernel/module

Re: [PATCH 3/3] powerpc/eeh: Synchronize recovery in host/guest

2016-03-01 Thread Gavin Shan
On Wed, Mar 02, 2016 at 12:03:20PM +1100, Russell Currey wrote: >On Fri, 2016-02-26 at 11:04 +1100, Gavin Shan wrote: >> When passing through SRIOV VFs to guest, we possibly encounter EEH >> error on PF. In this case, the VF PEs are put into frozen state. >> The error could be reported to guest bef

Re: [PATCH 2/2] numa, mm, cleanup: remove redundant NODE_DATA macro from asm header files.

2016-03-01 Thread Will Deacon
On Wed, Feb 24, 2016 at 04:02:08PM -0800, David Daney wrote: > From: Ganapatrao Kulkarni > > NODE_DATA is defined across multiple asm header files. > Moving generic definition to asm-generic/mmzone.h to > remove redundant definitions. > > Reviewed-by: Robert Richter > Signed-off-by: Ganapatrao

Re: [PATCH 1/2] topology, cleanup: Avoid redefinition of cpumask_of_pcibus in asm header files.

2016-03-01 Thread Will Deacon
On Wed, Feb 24, 2016 at 04:02:07PM -0800, David Daney wrote: > From: Ganapatrao Kulkarni > > At present cpumask_of_pcibus is defined for !CONFIG_NUMA and moving out > to common will allow to use for numa too. This also avoids > redefinition of this macro in respective architecture header files. >

[PATCH v2 1/3] powerpc/eeh: Don't propagate error to guest

2016-03-01 Thread Gavin Shan
When EEH error happened to the parent PE of those PEs that have been passed through to guest, the error is propagated to guest domain and the VFIO driver's error handlers are called. It's not correct as the error in the host domain shouldn't be propagated to guests and affect them. This adds one m

[PATCH v2 2/3] powerpc/eeh: Don't remove passed VFs

2016-03-01 Thread Gavin Shan
When we have partial hotplug as part of the error recovery on PF, the VFs that are bound with vfio-pci driver will experience hotplug. That's not allowed. This checks if the VF PE is passed or not. If it does, we leave the VF without removing it. Signed-off-by: Gavin Shan Reviewed-by: Russell Cu

[PATCH v2 0/3] powerpc/eeh: Enhancement to EEH for VF

2016-03-01 Thread Gavin Shan
Those patches are based on the series of patches supporting EEH for VF, which is pending for merging: https://patchwork.ozlabs.org/patch/581315/ This series of patches fixes couple of issue that resides in previous patchset: * The error handlers provided by vfio-pci driver shouldn't be called.

[PATCH v2 3/3] powerpc/eeh: Synchronize recovery in host/guest

2016-03-01 Thread Gavin Shan
When passing through SRIOV VFs to guest, we possibly encounter EEH error on PF. In this case, the VF PEs are put into frozen state. The error could be reported to guest before it's captured by the host. That means the guest could attempt to recover errors on VFs before host gets chance to recover e

Re: [PATCH v8 42/45] drivers/of: Rename unflatten_dt_node()

2016-03-01 Thread Rob Herring
On Thu, Feb 18, 2016 at 9:16 PM, Gavin Shan wrote: > On Wed, Feb 17, 2016 at 08:59:53AM -0600, Rob Herring wrote: >>On Tue, Feb 16, 2016 at 9:44 PM, Gavin Shan wrote: >>> This renames unflatten_dt_node() to unflatten_dt_nodes() as it >>> populates multiple device nodes from FDT blob. No logical c

Re: [PATCH v2 0/3] powerpc/eeh: Enhancement to EEH for VF

2016-03-01 Thread Michael Ellerman
On Wed, 2016-03-02 at 13:28 +1100, Gavin Shan wrote: > Those patches are based on the series of patches supporting EEH for VF, > which is pending for merging: https://patchwork.ozlabs.org/patch/581315/ I haven't merged them yet, so can you please fold the fixes into the series where appropriate.

Re: [PATCH] MAINTAINERS: Add powerpc drivers to the powerpc section

2016-03-01 Thread Michael Ellerman
On Wed, 2016-03-02 at 12:20 +1030, Joel Stanley wrote: > On Wed, Mar 2, 2016 at 12:06 PM, Michael Ellerman wrote: > > We'd like folks working on drivers for powerpc to also Cc linuxppc-dev, > > so we can be aware of what's going on in drivers and/or review the > > changes. > > > > So add patter

Re: [PATCH] MAINTAINERS: Add powerpc drivers to the powerpc section

2016-03-01 Thread Joe Perches
On Wed, 2016-03-02 at 14:12 +1100, Michael Ellerman wrote: > On Wed, 2016-03-02 at 12:20 +1030, Joel Stanley wrote: > > > > > On Wed, Mar 2, 2016 at 12:06 PM, Michael Ellerman wrote: > > > > > > > > We'd like folks working on drivers for powerpc to also Cc linuxppc-dev, > > > so we can be awar

Re: [PATCH V10 02/28] powerpc, process: Add the function flush_tmregs_to_thread

2016-03-01 Thread Anshuman Khandual
On 03/02/2016 05:45 AM, Cyril Bur wrote: > On Tue, 16 Feb 2016 14:29:32 +0530 > Anshuman Khandual wrote: > >> This patch creates a function flush_tmregs_to_thread which >> will then be used by subsequent patches in this series. The >> function checks for self tracing ptrace interface attempts >>

Re: [PATCH V10 02/28] powerpc, process: Add the function flush_tmregs_to_thread

2016-03-01 Thread Cyril Bur
On Wed, 02 Mar 2016 09:59:06 +0530 Anshuman Khandual wrote: > On 03/02/2016 05:45 AM, Cyril Bur wrote: > > On Tue, 16 Feb 2016 14:29:32 +0530 > > Anshuman Khandual wrote: > > > >> This patch creates a function flush_tmregs_to_thread which > >> will then be used by subsequent patches in this s

Re: [PATCH] MAINTAINERS: Add powerpc drivers to the powerpc section

2016-03-01 Thread Mike & Meg
On Tue, 2016-03-01 at 19:33 -0800, Joe Perches wrote: > On Wed, 2016-03-02 at 14:12 +1100, Michael Ellerman wrote: > > On Wed, 2016-03-02 at 12:20 +1030, Joel Stanley wrote: > > > > > > > > On Wed, Mar 2, 2016 at 12:06 PM, Michael Ellerman wrote: > > > > > > > > > > > We'd like folks working o

[PATCH] powerpc/swsusp: Only use tlbie in POWER4 mode

2016-03-01 Thread Russell Currey
If CONFIG_HIBERNATION and CONFIG_PPC_BOOK3S_64 are set, code in arch/powerpc/kernel/swsusp_amd64.S which uses the tlbia macro is enabled. tlbia in turn uses tlbie, an instruction which takes more than one operand in newer versions of POWER. As such, the kernel fails to build due to the assembler c

Re: [PATCH v2 0/3] powerpc/eeh: Enhancement to EEH for VF

2016-03-01 Thread Gavin Shan
On Wed, Mar 02, 2016 at 02:03:36PM +1100, Michael Ellerman wrote: >On Wed, 2016-03-02 at 13:28 +1100, Gavin Shan wrote: > >> Those patches are based on the series of patches supporting EEH for VF, >> which is pending for merging: https://patchwork.ozlabs.org/patch/581315/ > >I haven't merged them y

[RFC PATCH] powerpc/mm: Drop WIMG in favour of new constants

2016-03-01 Thread Aneesh Kumar K.V
PowerISA 3.0 introduce three pte bits with the below meaning 000 -> Normal Memory 001 -> Strong Access Order 010 -> Non idempotent I/O ( Also cache inhibited and guarded) 100 -> Tolerant I/O (Cache inhibited) We drop the existing WIMG bits in linux page table in favour of above contants. We loos