[PATCH] powerpc: Add user-return-notifier support

2015-08-24 Thread Ananth N Mavinakayanahalli
Add user return notifier support for powerpc. Similar to x86, this feature keys off of the KVM Kconfig. Signed-off-by: Ananth N Mavinakayanahalli --- Documentation/features/debug/user-ret-profiler/arch-support.txt |2 +- arch/powerpc/Kconfig|1

[PATCH] cxl: Release irqs if memory allocation fails

2015-08-24 Thread Vaibhav Jain
This minor patch plugs a potential irq leak in case of a memory allocation failure inside function the afu_allocate_irqs. Presently the irqs allocated to the context gets leaked if allocation of either one of context irq_bitmap or irq_names fails. Signed-off-by: Vaibhav Jain --- drivers/misc/cxl

Re: [PATCH v6 3/3] qe_common: add qe_muram_ functions to manage muram

2015-08-24 Thread Laura Abbott
On 08/24/2015 08:03 PM, Zhao Qiang wrote: -Original Message- From: Laura Abbott [mailto:labb...@redhat.com] Sent: Tuesday, August 25, 2015 7:32 AM To: Zhao Qiang-B45475; Wood Scott-B07421 Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; lau...@codeaurora.org; Xie Xiaobo-

Re: [PATCH v6 1/3] genalloc:support memory-allocation with bytes-alignment to genalloc

2015-08-24 Thread Laura Abbott
On 08/24/2015 07:40 PM, Zhao Qiang wrote: On 08/25/2015 07:11 AM, Laura Abbott wrote: -Original Message- From: Laura Abbott [mailto:labb...@redhat.com] Sent: Tuesday, August 25, 2015 7:11 AM To: Zhao Qiang-B45475; Wood Scott-B07421 Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozl

RE: [PATCH v6 3/3] qe_common: add qe_muram_ functions to manage muram

2015-08-24 Thread Zhao Qiang
> -Original Message- > From: Laura Abbott [mailto:labb...@redhat.com] > Sent: Tuesday, August 25, 2015 7:32 AM > To: Zhao Qiang-B45475; Wood Scott-B07421 > Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; > lau...@codeaurora.org; Xie Xiaobo-R63061; b...@kernel.crashing.org;

RE: [PATCH v6 1/3] genalloc:support memory-allocation with bytes-alignment to genalloc

2015-08-24 Thread Zhao Qiang
On 08/25/2015 07:11 AM, Laura Abbott wrote: > -Original Message- > From: Laura Abbott [mailto:labb...@redhat.com] > Sent: Tuesday, August 25, 2015 7:11 AM > To: Zhao Qiang-B45475; Wood Scott-B07421 > Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; > lau...@codeaurora.org; X

Re: [RFC PATCH 14/17] powerpc/book3e-64/kexec: Enable SMP release

2015-08-24 Thread Michael Ellerman
On Mon, 2015-08-24 at 15:25 -0500, Scott Wood wrote: > On Thu, 2015-08-20 at 14:54 +1000, Michael Ellerman wrote: > > Hi Scott, > > > > Sorry for the delay. So I'm back to square one on this patch. > > > > On Sat, 2015-07-18 at 15:08 -0500, Scott Wood wrote: > > > booted_from_exec is similar to _

Re: [v2 03/11] soc/fsl: Introduce the DPAA BMan portal driver

2015-08-24 Thread Scott Wood
On Wed, Aug 12, 2015 at 04:14:49PM -0400, Roy Pledge wrote: > diff --git a/drivers/soc/fsl/qbman/bman.c b/drivers/soc/fsl/qbman/bman.c > index 9a500ce..d6e2204 100644 > --- a/drivers/soc/fsl/qbman/bman.c > +++ b/drivers/soc/fsl/qbman/bman.c > @@ -165,11 +165,11 @@ static struct bman *bm_create(void

Re: [v2 02/11] soc/fsl: Introduce DPAA BMan device management driver

2015-08-24 Thread Scott Wood
On Wed, 2015-08-12 at 16:14 -0400, Roy Pledge wrote: > From: Geoff Thorpe > > This driver enables the Freescale DPAA 1.0 Buffer Manager block. BMan > is a hardware buffer pool manager that allows accelerators > connected to the SoC datapath to acquire and release buffers during > data processing.

Re: [PATCH v6 3/3] qe_common: add qe_muram_ functions to manage muram

2015-08-24 Thread Laura Abbott
On 08/24/2015 02:31 AM, Zhao Qiang wrote: diff --git a/drivers/soc/fsl/qe/qe_common.c b/drivers/soc/fsl/qe/qe_common.c new file mode 100644 index 000..7f1762c --- /dev/null +++ b/drivers/soc/fsl/qe/qe_common.c @@ -0,0 +1,193 @@ +/* + * common qe code + * + * author: scott wood + * + * copyr

Re: [PATCH v6 1/3] genalloc:support memory-allocation with bytes-alignment to genalloc

2015-08-24 Thread Laura Abbott
On 08/24/2015 02:31 AM, Zhao Qiang wrote: Bytes alignment is required to manage some special RAM, so add gen_pool_first_fit_align to genalloc, meanwhile add gen_pool_alloc_data to pass data to gen_pool_first_fit_align(modify gen_pool_alloc as a wrapper) Signed-off-by: Zhao Qiang --- Changes for

Re: [v2 00/11] Freescale DPAA QBMan Drivers

2015-08-24 Thread Scott Wood
On Wed, 2015-08-12 at 16:14 -0400, Roy Pledge wrote: > The Freescale Data Path Acceleration Architecture (DPAA) is a set of > hardware components on specific QorIQ multicore processors. This > architecture provides the infrastructure to support simplified sharing of > networking interfaces and a

Re: [RFC PATCH 14/17] powerpc/book3e-64/kexec: Enable SMP release

2015-08-24 Thread Scott Wood
On Thu, 2015-08-20 at 14:54 +1000, Michael Ellerman wrote: > Hi Scott, > > Sorry for the delay. So I'm back to square one on this patch. > > On Sat, 2015-07-18 at 15:08 -0500, Scott Wood wrote: > > booted_from_exec is similar to __run_at_load, except that it is set for > > regular kexec as well a

[PATCH v3 2/5] powerpc/fsl: Move fsl_guts.h out of arch/powerpc

2015-08-24 Thread Scott Wood
Freescale's Layerscape ARM chips use the same structure. Signed-off-by: Scott Wood Cc: Madalin-Cristian Bucur --- v3: Add linux/types.h to linux/fsl/guts.h arch/powerpc/include/asm/fsl_guts.h| 192 - arch/powerpc/platforms/85xx/mpc85xx_mds.c | 2 +- arch/

[PATCH v2] powerpc/fsl_pci: Check for get_user/probe_kernel_address failure

2015-08-24 Thread Scott Wood
Signed-off-by: Scott Wood Reported-by: Andrew Morton Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Hongtao Jia --- v2: s/ret/!ret/ arch/powerpc/sysdev/fsl_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.

Re: [PATCH v6 3/3] qe_common: add qe_muram_ functions to manage muram

2015-08-24 Thread Scott Wood
On Mon, 2015-08-24 at 17:31 +0800, Zhao Qiang wrote: > muram is used for qe, add qe_muram_ functions to manage > muram. > > Signed-off-by: Zhao Qiang > --- > Changes for v2: > - no changes > Changes for v3: > - no changes > Changes for v4: > - no changes > Changes for v5: >

[PATCH] powerpc/fsl_pci: Check for get_user/probe_kernel_address failure

2015-08-24 Thread Scott Wood
Signed-off-by: Scott Wood Reported-by: Andrew Morton Cc: Andrew Morton Cc: Benjamin Herrenschmidt Cc: Hongtao Jia --- arch/powerpc/sysdev/fsl_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index ebc1f412.

[PATCH 2/2] powerpc/PCI: Disable MSI/MSI-X interrupts at PCI probe time in OF case

2015-08-24 Thread Michael Ellerman
From: "Guilherme G. Piccoli" Since commit 1851617cd2da ("PCI/MSI: Disable MSI at enumeration even if kernel doesn't support MSI"), the setup of dev->msi_cap/msix_cap and the disable of MSI/MSI-X interrupts isn't being done at PCI probe time, as the logic responsible for this was moved in the afor

[PATCH 1/2] PCI: Make pci_msi_setup_pci_dev() non-static for use by arch code

2015-08-24 Thread Michael Ellerman
From: "Guilherme G. Piccoli" Commit 1851617cd2da ("PCI/MSI: Disable MSI at enumeration even if kernel doesn't support MSI") changed the location of the code that initialises dev->msi_cap/msix_cap and then disables MSI/MSI-X interrupts at PCI probe time in devices that have this flag set. It moved

Re: [PATCH v2 1/2] PCI: Make pci_msi_setup_pci_dev() non-static for use by arch code

2015-08-24 Thread Guilherme G. Piccoli
On 08/24/2015 04:37 AM, Michael Ellerman wrote: more: I was testing driver issues on kernel 2.6.32 (RHEL 6.6), and when I tried the mainline kernel, the driver wasn't able to enable MSI-X capabilities. Interestingly, on kernel 4.1 this behavior doesn't happen and the driver can use MSI-X interrup

[PATCH v2 6/6] powerpc: use jump label for mmu_has_feature

2015-08-24 Thread Kevin Hao
The mmu features are fixed once the probe of mmu features are done. And the function mmu_has_feature() does be used in some hot path. The checking of the mmu features for each time of invoking of mmu_has_feature() seems suboptimal. This tries to reduce this overhead of this check by using jump labe

[PATCH v2 5/6] powerpc: use the jump label for cpu_has_feature

2015-08-24 Thread Kevin Hao
The cpu features are fixed once the probe of cpu features are done. And the function cpu_has_feature() does be used in some hot path. The checking of the cpu features for each time of invoking of cpu_has_feature() seems suboptimal. This tries to reduce this overhead of this check by using jump labe

[PATCH v2 4/6] powerpc: move the cpu_has_feature to a separate file

2015-08-24 Thread Kevin Hao
We plan to use jump label for cpu_has_feature. In order to implement this we need to include the linux/jump_label.h in asm/cputable.h. But it seems that asm/cputable.h is so basic header file for ppc that it is almost included by all the other header files. The including of the linux/jump_label.h w

[PATCH v2 3/6] powerpc: kill mfvtb()

2015-08-24 Thread Kevin Hao
This function is only used by get_vtb(). They are almost the same except the reading from the real register. Move the mfspr() to get_vtb() and kill the function mfvtb(). With this, we can eliminate the use of cpu_has_feature() in very core header file like reg.h. This is a preparation for the use o

[PATCH v2 2/6] powerpc: invoke jump_label_init() in a much earlier stage

2015-08-24 Thread Kevin Hao
So we can use static_key for cpu_has_feature() and mmu_has_feature(). Signed-off-by: Kevin Hao --- v2: No change. arch/powerpc/kernel/setup_32.c | 2 ++ arch/powerpc/kernel/setup_64.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/arch/powerpc/kernel/setup_32.c b/arch/powerpc/kernel/set

[PATCH v2 1/6] jump_label: make it possible for the archs to invoke jump_label_init() much earlier

2015-08-24 Thread Kevin Hao
For some archs (such as powerpc) would want to invoke jump_label_init() in a much earlier stage. So check static_key_initialized in order to make sure this function run only once. Signed-off-by: Kevin Hao --- v2: No change. kernel/jump_label.c | 3 +++ 1 file changed, 3 insertions(+) diff --gi

[PATCH v2 0/6] powerpc: use jump label for {cpu,mmu}_has_feature()

2015-08-24 Thread Kevin Hao
Hi, v2: Drop the following two patches as suggested by Ingo and Peter: jump_label: no need to acquire the jump_label_mutex in jump_lable_init() jump_label: introduce DEFINE_STATIC_KEY_{TRUE,FALSE}_ARRAY macros v1: I have tried to change the {cpu,mmu}_has_feature() to use jump label two ye

[PATCH v6 3/3] qe_common: add qe_muram_ functions to manage muram

2015-08-24 Thread Zhao Qiang
muram is used for qe, add qe_muram_ functions to manage muram. Signed-off-by: Zhao Qiang --- Changes for v2: - no changes Changes for v3: - no changes Changes for v4: - no changes Changes for v5: - no changes Changes for v5: - using genalloc instead rheap t

[PATCH v6 2/3] QE: Move QE from arch/powerpc to drivers/soc

2015-08-24 Thread Zhao Qiang
ls1 has qe and ls1 has arm cpu. move qe from arch/powerpc to drivers/soc/fsl to adapt to powerpc and arm Signed-off-by: Zhao Qiang --- Changes for v2: - move code to driver/soc Changes for v3: - change drivers/soc/qe to drivers/soc/fsl-qe Changes for v4: - move drivers/soc

[PATCH v6 1/3] genalloc:support memory-allocation with bytes-alignment to genalloc

2015-08-24 Thread Zhao Qiang
Bytes alignment is required to manage some special RAM, so add gen_pool_first_fit_align to genalloc, meanwhile add gen_pool_alloc_data to pass data to gen_pool_first_fit_align(modify gen_pool_alloc as a wrapper) Signed-off-by: Zhao Qiang --- Changes for v6: - patches set v6 include a new

Re: Build regressions/improvements in v4.2-rc8

2015-08-24 Thread Geert Uytterhoeven
On Mon, Aug 24, 2015 at 10:34 AM, Geert Uytterhoeven wrote: > JFYI, when comparing v4.2-rc8[1] to v4.2-rc7[3], the summaries are: > - build errors: +4/-7 4 regressions: + /home/kisskb/slave/src/include/linux/kvm_host.h: error: array subscript is above array bounds [-Werror=array-bounds]: =>

Re: [PATCH v2 1/2] PCI: Make pci_msi_setup_pci_dev() non-static for use by arch code

2015-08-24 Thread Michael Ellerman
On Thu, 2015-08-20 at 16:10 -0300, Guilherme G. Piccoli wrote: > On 08/19/2015 10:02 PM, Michael Ellerman wrote: > > In future you should send a reply like the above to my mail, and then > > separately send the new patch series. My preference is that the new series > > is > > not a reply to anythi