Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Joakim Tjernlund
On Tue, 2015-09-22 at 14:42 -0500, Scott Wood wrote: > On Tue, 2015-09-22 at 19:34 +, Joakim Tjernlund wrote: > > On Tue, 2015-09-22 at 13:58 -0500, Scott Wood wrote: > > > On Tue, 2015-09-22 at 18:12 +, Joakim Tjernlund wrote: > > > > On Tue, 2015-09-22 at 18:51 +0200, Christophe Leroy

[PATCH 8/9] phy: add phy_device_remove()

2015-09-22 Thread Russell King
Add a phy_device_remove() function to complement phy_device_register(), which undoes the effects of phy_device_register() by removing the phy device from visibility, but not freeing it. This allows these details to be moved out of the mdio bus code into the phy code where this action belongs.

[PATCH v2 00/25] powerpc/8xx: Use large pages for RAM and IMMR and other improvments

2015-09-22 Thread Christophe Leroy
The main purpose of this patchset is to dramatically reduce the time spent in DTLB miss handler. This is achieved by: 1/ Mapping RAM with 8M pages 2/ Mapping IMMR with a fixed 512K page On a live running system (VoIP gateway for Air Trafic Control), over a 10 minutes period (with 277s idle), we

[PATCH v2 01/25] powerpc/8xx: Save r3 all the time in DTLB miss handler

2015-09-22 Thread Christophe Leroy
We are spending between 40 and 160 cycles with a mean of 65 cycles in the TLB handling routines (measured with mftbl) so make it more simple althought it adds one instruction. Signed-off-by: Christophe Leroy --- No change in v2 arch/powerpc/kernel/head_8xx.S | 13

[PATCH v2 03/25] powerpc: Update documentation for noltlbs kernel parameter

2015-09-22 Thread Christophe Leroy
Now the noltlbs kernel parameter is also applicable to PPC8xx Signed-off-by: Christophe Leroy --- No change in v2 Documentation/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/kernel-parameters.txt

[PATCH v2 15/25] powerpc/8xx: move 8xx SPRN defines into reg_8xx.h and add some missing ones

2015-09-22 Thread Christophe Leroy
Move 8xx SPRN defines into reg_8xx.h and add some missing ones Signed-off-by: Christophe Leroy --- No change in v2 arch/powerpc/include/asm/mmu-8xx.h | 26 +- arch/powerpc/include/asm/reg_8xx.h | 24 2 files changed, 37

[PATCH v2 19/25] powerpc/8xx: rewrite flush_instruction_cache() in C

2015-09-22 Thread Christophe Leroy
On PPC8xx, flushing instruction cache is performed by writing in register SPRN_IC_CST. This registers suffers CPU6 ERRATA. The patch rewrites the fonction in C so that CPU6 ERRATA will be handled transparently Signed-off-by: Christophe Leroy --- No change in v2

[PATCH v2 23/25] powerpc: Simplify test in __dma_sync()

2015-09-22 Thread Christophe Leroy
This simplification helps the compiler. We now have only one test instead of two, so it reduces the number of branches. Signed-off-by: Christophe Leroy --- New in v2 arch/powerpc/mm/dma-noncoherent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Joakim Tjernlund
On Tue, 2015-09-22 at 13:58 -0500, Scott Wood wrote: > On Tue, 2015-09-22 at 18:12 +, Joakim Tjernlund wrote: > > On Tue, 2015-09-22 at 18:51 +0200, Christophe Leroy wrote: > > > flush/clean/invalidate _dcache_range() functions are all very > > > similar and are quite short. They are mainly

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Joakim Tjernlund
> > And generally the one proposing uglification-for-optimization should > > provide > > the evidence. :-) > > When it comes to gcc, past history is my evidence until proven otherwise :) > Maybe I will check again ... OK then: static inline void mb(void) { __asm__ __volatile__ ("sync"

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 19:34 +, Joakim Tjernlund wrote: > On Tue, 2015-09-22 at 13:58 -0500, Scott Wood wrote: > > On Tue, 2015-09-22 at 18:12 +, Joakim Tjernlund wrote: > > > On Tue, 2015-09-22 at 18:51 +0200, Christophe Leroy wrote: > > > > flush/clean/invalidate _dcache_range() functions

Re: [PATCH v3 5/5] cpufreq: qoriq: Don't look at clock implementation details

2015-09-22 Thread Viresh Kumar
On 19-09-15, 23:29, Scott Wood wrote: > Get the CPU clock's potential parent clocks from the clock interface > itself, rather than manually parsing the clocks property to find a > phandle, looking at the clock-names property of that, and assuming that > those are valid parent clocks for the cpu

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 18:12 +, Joakim Tjernlund wrote: > On Tue, 2015-09-22 at 18:51 +0200, Christophe Leroy wrote: > > flush/clean/invalidate _dcache_range() functions are all very > > similar and are quite short. They are mainly used in __dma_sync() > > perf_event locate them in the top 3

Re: [PATCH 09/31] powerpc/mm: Don't use pte_val as lvalue

2015-09-22 Thread Aneesh Kumar K.V
Scott Wood writes: > On Mon, Sep 21, 2015 at 12:10:36PM +0530, Aneesh Kumar K.V wrote: >> +static inline pte_t pte_mkwrite(pte_t pte) >> +{ >> +pte_basic_t ptev; >> + >> +ptev = pte_val(pte) & ~_PAGE_RO; >> +ptev |= _PAGE_RW; >> +return __pte(pte); >> +}

Re: [PATCH 00/31] powerpc/mm: Update page table format for book3s 64

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 12:18 +0530, Aneesh Kumar K.V wrote: > Scott Wood writes: > > > On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: > > > Hi All, > > > > > > This patch series attempt to update book3s 64 linux page table format to > > > make it more

Re: [PATCH 03/31] powerpc/mm: make a separate copy for book3s

2015-09-22 Thread Aneesh Kumar K.V
Scott Wood writes: > On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: >> In this patch we do: >> cp pgtable-ppc32.h book3s/32/pgtable.h >> cp pgtable-ppc64.h book3s/64/pgtable.h >> >> This enable us to do further changes to hash specific config. >> We will

Re: [PATCH 10/31] powerpc/mm: Don't use pmd_val, pud_val and pgd_val as lvalue

2015-09-22 Thread Aneesh Kumar K.V
Scott Wood writes: > On Mon, Sep 21, 2015 at 12:10:37PM +0530, Aneesh Kumar K.V wrote: >> /* PUD level exusts only on 4k pages */ >> #ifndef CONFIG_PPC_64K_PAGES >> typedef struct { unsigned long pud; } pud_t; >> -#define pud_val(x) ((x).pud) >> #define __pud(x)

Re: [PATCH 00/31] powerpc/mm: Update page table format for book3s 64

2015-09-22 Thread Aneesh Kumar K.V
Scott Wood writes: > On Mon, 2015-09-21 at 12:10 +0530, Aneesh Kumar K.V wrote: >> Hi All, >> >> This patch series attempt to update book3s 64 linux page table format to >> make it more flexible. Our current pte format is very restrictive and we >> overload multiple pte

Re: [PATCH 09/31] powerpc/mm: Don't use pte_val as lvalue

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 12:14 +0530, Aneesh Kumar K.V wrote: > Scott Wood writes: > > > On Mon, Sep 21, 2015 at 12:10:36PM +0530, Aneesh Kumar K.V wrote: > > > +static inline pte_t pte_mkwrite(pte_t pte) > > > +{ > > > + pte_basic_t ptev; > > > + > > > + ptev =

[PATCH 6/9] net: fix phy refcounting in a bunch of drivers

2015-09-22 Thread Russell King
of_phy_find_device() increments the phy struct device refcount, which we need to properly balance. Add code to network drivers using this function to ensure that the struct device refcount is correctly balanced. Signed-off-by: Russell King ---

Re: [PATCH v10 5/5] QE: Move QE from arch/powerpc to drivers/soc

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 03:24 -0500, Zhao Qiang-B45475 wrote: > On Tue, Sep 22, 2015 at 06:56 AM +0800, Wood Scott-B07421 wrote: > > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Tuesday, September 22, 2015 6:56 AM > > To: Zhao Qiang-B45475 > > Cc: linux-ker...@vger.kernel.org;

[PATCH 9/9] net: fix net_device refcounting

2015-09-22 Thread Russell King
of_find_net_device_by_node() uses class_find_device() internally to lookup the corresponding network device. class_find_device() returns a reference to the embedded struct device, with its refcount incremented. Add a comment to the definition in net/core/net-sysfs.c indicating the need to drop

[PATCH v2 02/25] powerpc/8xx: Map linear kernel RAM with 8M pages

2015-09-22 Thread Christophe Leroy
On a live running system (VoIP gateway for Air Trafic Control), over a 10 minutes period (with 277s idle), we get 87 millions DTLB misses and approximatly 35 secondes are spent in DTLB handler. This represents 5.8% of the overall time and even 10.8% of the non-idle time. Among those 87 millions

[PATCH v2 14/25] powerpc32: remove ioremap_base

2015-09-22 Thread Christophe Leroy
ioremap_base is not initialised and is nowhere used so remove it Signed-off-by: Christophe Leroy --- No change in v2 arch/powerpc/mm/mmu_decl.h | 1 - arch/powerpc/mm/pgtable_32.c| 1 - arch/powerpc/platforms/embedded6xx/mpc10x.h | 8

[PATCH v2 21/25] powerpc: add inline functions for cache related instructions

2015-09-22 Thread Christophe Leroy
This patch adds inline functions to use dcbz, dcbi, dcbf, dcbst from C functions Signed-off-by: Christophe Leroy --- New in v2 arch/powerpc/include/asm/cache.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/powerpc/include/asm/cache.h

[PATCH v2 11/25] powerpc/8xx: map 16M RAM at startup

2015-09-22 Thread Christophe Leroy
On recent kernels, with some debug options like for instance CONFIG_LOCKDEP, the BSS requires more than 8M memory, allthough the kernel code fits in the first 8M. Today, it is necessary to activate CONFIG_PIN_TLB to get more than 8M at startup, allthough pinning TLB is not necessary for that.

[PATCH v2 25/25] powerpc32: Remove one insn in mulhdu

2015-09-22 Thread Christophe Leroy
Remove one instruction in mulhdu Signed-off-by: Christophe Leroy --- New in v2 arch/powerpc/kernel/misc_32.S | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Joakim Tjernlund
On Tue, 2015-09-22 at 18:51 +0200, Christophe Leroy wrote: > flush/clean/invalidate _dcache_range() functions are all very > similar and are quite short. They are mainly used in __dma_sync() > perf_event locate them in the top 3 consumming functions during > heavy ethernet activity > > They are

[PATCH v2 0/9] Phy, mdiobus, and netdev struct device fixes

2015-09-22 Thread Russell King - ARM Linux
This is the second version of the series, with the comments David had on the first patch fixed up. Original series description with updated diffstat below. While looking at the DSA code, I noticed we have a of_find_net_device_by_node(), and it looks like users of that are similarly buggy - it

[PATCH 1/9] phy: fix of_mdio_find_bus() device refcount leak

2015-09-22 Thread Russell King
of_mdio_find_bus() leaks a struct device refcount, caused by using class_find_device() and not realising that the device reference has its refcount incremented: * Note, you will need to drop the reference with put_device() after use. ... while ((dev = class_dev_iter_next())) {

[PATCH v2 06/25] powerpc32: iounmap() cannot vunmap() area mapped by TLBCAMs either

2015-09-22 Thread Christophe Leroy
iounmap() cannot vunmap() area mapped by TLBCAMs either Signed-off-by: Christophe Leroy --- No change in v2 arch/powerpc/mm/pgtable_32.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/mm/pgtable_32.c b/arch/powerpc/mm/pgtable_32.c

[PATCH v2 07/25] powerpc32: refactor x_mapped_by_bats() and x_mapped_by_tlbcam() together

2015-09-22 Thread Christophe Leroy
x_mapped_by_bats() and x_mapped_by_tlbcam() serve the same kind of purpose, so lets group them into a single function. Signed-off-by: Christophe Leroy --- No change in v2 arch/powerpc/mm/pgtable_32.c | 33 ++--- 1 file changed, 26

[PATCH v2 08/25] powerpc/8xx: Map IMMR area with 512k page at a fixed address

2015-09-22 Thread Christophe Leroy
Once the linear memory space has been mapped with 8Mb pages, as seen in the related commit, we get 11 millions DTLB missed during the reference 600s period. 77% of the missed are on user addresses and 23% are on kernel addresses (1 fourth for linear address space and 3 fourth for virtual address

[PATCH 3/9] phy: fix mdiobus module safety

2015-09-22 Thread Russell King
Re-implement the mdiobus module refcounting to ensure that we actually ensure that the mdiobus module code does not go away while we might call into it. The old scheme using bus->dev.driver was buggy, because bus->dev is a class device which never has a struct device_driver associated with it,

[PATCH v2 05/25] powerpc/8xx: Fix vaddr for IMMR early remap

2015-09-22 Thread Christophe Leroy
Memory: 124428K/131072K available (3748K kernel code, 188K rwdata, 648K rodata, 508K init, 290K bss, 6644K reserved) Kernel virtual memory layout: * 0xfffdf000..0xf000 : fixmap * 0xfde0..0xfe00 : consistent mem * 0xfddf6000..0xfde0 : early ioremap *

[PATCH v2 04/25] powerpc/8xx: move setup_initial_memory_limit() into 8xx_mmu.c

2015-09-22 Thread Christophe Leroy
Now we have a 8xx specific .c file for that so put it in there as other powerpc variants do Signed-off-by: Christophe Leroy --- No change in v2 arch/powerpc/mm/8xx_mmu.c | 17 + arch/powerpc/mm/init_32.c | 19 --- 2 files changed, 17

[PATCH v2 10/25] powerpc/8xx: CONFIG_PIN_TLB unneeded for CONFIG_PPC_EARLY_DEBUG_CPM

2015-09-22 Thread Christophe Leroy
IMMR is now mapped at 0xff00 by page tables so it is not anymore necessary to PIN TLBs Signed-off-by: Christophe Leroy --- No change in v2 arch/powerpc/Kconfig.debug | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/Kconfig.debug

[PATCH v2 17/25] powerpc/8xx: remove special handling of CPU6 errata in set_dec()

2015-09-22 Thread Christophe Leroy
CPU6 ERRATA is now handled directly in mtspr(), so we can use the standard set_dec() fonction in all cases. Signed-off-by: Christophe Leroy --- No change in v2 arch/powerpc/include/asm/time.h | 6 +- arch/powerpc/kernel/head_8xx.S | 18 -- 2 files

[PATCH v2 20/25] powerpc32: Remove clear_pages() and define clear_page() inline

2015-09-22 Thread Christophe Leroy
clear_pages() is never used, and PPC32 is the only architecture (still) having this function. Neither PPC64 nor any other architecture has it. This patch removes clear_page() and move clear_page() function inline (same as PPC64) as it only is a few isns Signed-off-by: Christophe Leroy

[PATCH v2 09/25] powerpc/8xx: show IMMR area in startup memory layout

2015-09-22 Thread Christophe Leroy
show IMMR area in startup memory layout Signed-off-by: Christophe Leroy --- No change in v2 arch/powerpc/mm/mem.c | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c index 22d94c3..e105ca6 100644 ---

[PATCH v2 12/25] powerpc32: Remove useless/wrong MMU:setio progress message

2015-09-22 Thread Christophe Leroy
Commit 771168494719 ("[POWERPC] Remove unused machine call outs") removed the call to setup_io_mappings(), so remove the associated progress line message Signed-off-by: Christophe Leroy --- No change in v2 arch/powerpc/mm/init_32.c | 4 1 file changed, 4

[PATCH v2 13/25] powerpc/8xx: also use r3 in the ITLB miss in all situations

2015-09-22 Thread Christophe Leroy
We are spending between 40 and 160 cycles with a mean of 65 cycles in the TLB handling routines (measured with mftbl) so make it more simple althought it adds one instruction Signed-off-by: Christophe Leroy --- No change in v2 arch/powerpc/kernel/head_8xx.S | 15

[PATCH v2 16/25] powerpc/8xx: Handle CPU6 ERRATA directly in mtspr() macro

2015-09-22 Thread Christophe Leroy
MPC8xx has an ERRATA on the use of mtspr() for some registers This patch includes the ERRATA handling directly into mtspr() macro so that mtspr() users don't need to bother about that errata Signed-off-by: Christophe Leroy --- No change in v2

[PATCH v2 24/25] powerpc32: small optimisation in flush_icache_range()

2015-09-22 Thread Christophe Leroy
Inlining of _dcache_range() functions has shown that the compiler does the same thing a bit better with one insn less Signed-off-by: Christophe Leroy --- New in v2 arch/powerpc/kernel/misc_32.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v2 20/25] powerpc32: Remove clear_pages() and define clear_page() inline

2015-09-22 Thread Joakim Tjernlund
Hi Christophe Really nice patchset! On Tue, 2015-09-22 at 18:51 +0200, Christophe Leroy wrote: > clear_pages() is never used, and PPC32 is the only architecture > (still) having this function. Neither PPC64 nor any other > architecture has it. > > This patch removes clear_page() and move

[PATCH v2 18/25] powerpc/8xx: rewrite set_context() in C

2015-09-22 Thread Christophe Leroy
There is no real need to have set_context() in assembly. Now that we have mtspr() handling CPU6 ERRATA directly, we can rewrite set_context() in C language for easier maintenance. Signed-off-by: Christophe Leroy --- No change in v2 arch/powerpc/kernel/head_8xx.S | 44

[PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Christophe Leroy
flush/clean/invalidate _dcache_range() functions are all very similar and are quite short. They are mainly used in __dma_sync() perf_event locate them in the top 3 consumming functions during heavy ethernet activity They are good candidate for inlining, as __dma_sync() does almost nothing but

Re: [PATCH v2 22/30] cxlflash: Correct behavior in device reset handler following EEH

2015-09-22 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

RE: [PATCH v10 3/5] CPM/QE: use genalloc to manage CPM/QE muram

2015-09-22 Thread Zhao Qiang
On Wen, Sep 23, 2015 at 8:19 AM +0800, Wood Scott-B07421 wrote: > -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, September 23, 2015 8:19 AM > To: Zhao Qiang-B45475 > Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; > lau...@codeaurora.org; Xie

RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake

2015-09-22 Thread Wang Dongsheng
> -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, September 23, 2015 7:50 AM > To: Sudeep Holla > Cc: linux...@vger.kernel.org; linux-ker...@vger.kernel.org; Thomas Gleixner; > Rafael J. Wysocki; Benjamin Herrenschmidt; Paul Mackerras; Michael Ellerman; > Jia >

RE: [PATCH v10 5/5] QE: Move QE from arch/powerpc to drivers/soc

2015-09-22 Thread Zhao Qiang
On Wen, Sep 23, 2015 at 12:40 AM +0800, Wood Scott-B07421 wrote: > -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, September 23, 2015 12:40 AM > To: Zhao Qiang-B45475 > Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; > lau...@codeaurora.org; Xie

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Joakim Tjernlund
On Tue, 2015-09-22 at 15:14 -0500, Scott Wood wrote: > On Tue, 2015-09-22 at 19:55 +, Joakim Tjernlund wrote: > > On Tue, 2015-09-22 at 14:42 -0500, Scott Wood wrote: > > > On Tue, 2015-09-22 at 19:34 +, Joakim Tjernlund wrote: > > > > On Tue, 2015-09-22 at 13:58 -0500, Scott Wood wrote: >

Re: [PATCH v2 19/30] cxlflash: Fix AFU version access/storage and add check

2015-09-22 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2 24/30] cxlflash: Fix function prolog parameters and return codes

2015-09-22 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 19:55 +, Joakim Tjernlund wrote: > On Tue, 2015-09-22 at 14:42 -0500, Scott Wood wrote: > > On Tue, 2015-09-22 at 19:34 +, Joakim Tjernlund wrote: > > > On Tue, 2015-09-22 at 13:58 -0500, Scott Wood wrote: > > > > On Tue, 2015-09-22 at 18:12 +, Joakim Tjernlund

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Joakim Tjernlund
On Tue, 2015-09-22 at 15:35 -0500, Scott Wood wrote: > On Tue, 2015-09-22 at 20:32 +, Joakim Tjernlund wrote: > > On Tue, 2015-09-22 at 15:14 -0500, Scott Wood wrote: > > > On Tue, 2015-09-22 at 19:55 +, Joakim Tjernlund wrote: > > > > On Tue, 2015-09-22 at 14:42 -0500, Scott Wood wrote: >

Re: [PATCH v2 18/30] cxlflash: Remove dual port online dependency

2015-09-22 Thread Matthew R. Ochs
> On Sep 21, 2015, at 5:02 PM, Brian King wrote: > On 09/16/2015 04:30 PM, Matthew R. Ochs wrote: >> At present, both ports must be online for the device to >> configure properly. Remove this dependency and the unnecessary >> internal LUN override logic as well.

Re: [PATCH v2 23/30] cxlflash: Remove unnecessary scsi_block_requests

2015-09-22 Thread Brian King
Reviewed-by: Brian King -- Brian King Power Linux I/O IBM Linux Technology Center ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v2 20/30] cxlflash: Correct usage of scsi_host_put()

2015-09-22 Thread Matthew R. Ochs
> On Sep 22, 2015, at 3:53 PM, Brian King wrote: > On 09/16/2015 04:30 PM, Matthew R. Ochs wrote: >> Currently, scsi_host_put() is being called prematurely in the >> remove path and is missing entirely in an error cleanup path. >> The former can lead to memory being

Re: [PATCH v2 18/30] cxlflash: Remove dual port online dependency

2015-09-22 Thread Brian King
On 09/22/2015 03:44 PM, Matthew R. Ochs wrote: >> On Sep 21, 2015, at 5:02 PM, Brian King wrote: >> On 09/16/2015 04:30 PM, Matthew R. Ochs wrote: >>> At present, both ports must be online for the device to >>> configure properly. Remove this dependency and the

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 20:32 +, Joakim Tjernlund wrote: > On Tue, 2015-09-22 at 15:14 -0500, Scott Wood wrote: > > On Tue, 2015-09-22 at 19:55 +, Joakim Tjernlund wrote: > > > On Tue, 2015-09-22 at 14:42 -0500, Scott Wood wrote: > > > > On Tue, 2015-09-22 at 19:34 +, Joakim Tjernlund

Re: [PATCH v2 20/30] cxlflash: Correct usage of scsi_host_put()

2015-09-22 Thread Brian King
On 09/16/2015 04:30 PM, Matthew R. Ochs wrote: > Currently, scsi_host_put() is being called prematurely in the > remove path and is missing entirely in an error cleanup path. > The former can lead to memory being freed too early with > subsequent access potentially corrupting data whilst the

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Christophe Leroy
Le 22/09/2015 22:38, Joakim Tjernlund a écrit : On Tue, 2015-09-22 at 15:35 -0500, Scott Wood wrote: On Tue, 2015-09-22 at 20:32 +, Joakim Tjernlund wrote: On Tue, 2015-09-22 at 15:14 -0500, Scott Wood wrote: On Tue, 2015-09-22 at 19:55 +, Joakim Tjernlund wrote: On Tue, 2015-09-22

RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake

2015-09-22 Thread Thomas Gleixner
On Wed, 23 Sep 2015, Wang Dongsheng wrote: > > On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote: > > > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND > > > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak > > > is not implemented. Also

RE: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake

2015-09-22 Thread Wang Dongsheng
> -Original Message- > From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- > ow...@vger.kernel.org] On Behalf Of Thomas Gleixner > Sent: Wednesday, September 23, 2015 11:49 AM > To: Wang Dongsheng-B40534 > Cc: Wood Scott-B07421; Sudeep Holla; linux...@vger.kernel.org; linux- >

Re: [PATCH 4/9] powerpc: inline ip_fast_csum()

2015-09-22 Thread Denis Kirjanov
On 9/22/15, Christophe Leroy wrote: > In several architectures, ip_fast_csum() is inlined > There are functions like ip_send_check() which do nothing > much more than calling ip_fast_csum(). > Inlining ip_fast_csum() allows the compiler to optimise better Hi Christophe,

Re: [PATCH] cxl: Fix lockdep warning while creating afu_err_buff attribute

2015-09-22 Thread Daniel Axtens
Reviewed-by: Daniel Axtens Thanks Vaibhav! On Wed, 2015-09-23 at 08:37 +0530, Vaibhav Jain wrote: > Presently a lockdep warning is reported during creation of afu_err_buff > bin_attribute for the afu. This is caused due to the variable attr.key > not pointing to a static class

[RFC PATCH 1/2] scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target

2015-09-22 Thread Michael Ellerman
Arch Makefiles can set KBUILD_DEFCONFIG to tell kbuild the name of the defconfig that should be built by default. However currently there is an assumption that KBUILD_DEFCONFIG points to a file at arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG). We would like to use a target, using merge_config, as

[PATCH] cxl: Fix lockdep warning while creating afu_err_buff attribute

2015-09-22 Thread Vaibhav Jain
Presently a lockdep warning is reported during creation of afu_err_buff bin_attribute for the afu. This is caused due to the variable attr.key not pointing to a static class key, hence the function lockdep_init_map reports this warning: BUG: key not in .data! The patch fixes this issue by

Re: [PATCH] cxl: Fix lockdep warning while creating afu_err_buff attribute

2015-09-22 Thread Ian Munsie
Thanks for fixing that Vaibhav :) Acked-by: Ian Munsie ___ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev

Re: [PATCH v10 3/5] CPM/QE: use genalloc to manage CPM/QE muram

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 21:20 -0500, Zhao Qiang-B45475 wrote: > On Wen, Sep 23, 2015 at 8:19 AM +0800, Wood Scott-B07421 wrote: > > > > > > { > > > > > - int ret; > > > > > + > > > > > + unsigned long start; > > > > > unsigned long flags; > > > > > + unsigned long size_alloc = size; struct

Re: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake

2015-09-22 Thread Scott Wood
On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote: > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag > as it doesn't

RE: [PATCH v10 3/5] CPM/QE: use genalloc to manage CPM/QE muram

2015-09-22 Thread Zhao Qiang
On Wen, Sep 23, 2015 at 12:03 AM +0800, Wood Scott-B07421 wrote: > -Original Message- > From: Wood Scott-B07421 > Sent: Wednesday, September 23, 2015 12:03 PM > To: Zhao Qiang-B45475 > Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; > lau...@codeaurora.org; Xie

[RFC PATCH 2/2] powerpc: Add ppc64le_defconfig

2015-09-22 Thread Michael Ellerman
Based directly on ppc64_defconfig using merge_config. Signed-off-by: Michael Ellerman --- arch/powerpc/Makefile | 4 1 file changed, 4 insertions(+) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index b9b4af2af9a5..3704db45a832 100644 ---

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Christophe Leroy
Le 23/09/2015 00:34, Scott Wood a écrit : On Tue, 2015-09-22 at 22:57 +0200, Christophe Leroy wrote: >Here is what I get in asm. First one is with "if (i) mb();". We see gcc >puts a beqlr. This is the form that is closest to what we had in the >former misc_32.S >Second one if with "mb()".

Re: [PATCH] powerpc/eeh: Avoid to handle EEH on a passed Child PE

2015-09-22 Thread Gavin Shan
On Tue, Sep 22, 2015 at 12:43:03PM +0800, Wei Yang wrote: >On Mon, Sep 21, 2015 at 09:49:45PM +1000, Gavin Shan wrote: >>On Mon, Sep 21, 2015 at 05:29:48PM +0800, Wei Yang wrote: >>>Current EEH infrastructure would avoid to handle EEH when a PE is passed to >>>guest, while if this PE is a Child PE

Re: [RFC v2 3/7] powerpc: atomic: Implement atomic{,64}_{add,sub}_return_* variants

2015-09-22 Thread Boqun Feng
On Tue, Sep 22, 2015 at 08:25:40AM -0700, Paul E. McKenney wrote: > On Tue, Sep 22, 2015 at 07:37:04AM +0800, Boqun Feng wrote: > > On Tue, Sep 22, 2015 at 07:26:56AM +0800, Boqun Feng wrote: > > > On Mon, Sep 21, 2015 at 11:24:27PM +0100, Will Deacon wrote: > > > > Hi Boqun, > > > > > > > > On

Re: [PATCH v10 3/5] CPM/QE: use genalloc to manage CPM/QE muram

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 03:10 -0500, Zhao Qiang-B45475 wrote: > On Tue, Sep 22, 2015 at 06:47 AM +0800, Wood Scott-B07421 wrote: > > -Original Message- > > From: Wood Scott-B07421 > > Sent: Tuesday, September 22, 2015 6:47 AM > > To: Zhao Qiang-B45475 > > Cc: linux-ker...@vger.kernel.org;

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Scott Wood
On Wed, 2015-09-23 at 00:49 +0200, Christophe Leroy wrote: > Le 23/09/2015 00:34, Scott Wood a écrit : > > On Tue, 2015-09-22 at 22:57 +0200, Christophe Leroy wrote: > > > > Here is what I get in asm. First one is with "if (i) mb();". We see > > > > gcc > > > > puts a beqlr. This is the form that

Re: [PATCH 04/17] powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake

2015-09-22 Thread Scott Wood
On Mon, 2015-09-21 at 16:47 +0100, Sudeep Holla wrote: > mpic_irq_set_wake return -ENXIO for non FSL MPIC and sets IRQF_NO_SUSPEND > flag for FSL ones. enable_irq_wake already returns -ENXIO if irq_set_wak > is not implemented. Also there's no need to set the IRQF_NO_SUSPEND flag > as it doesn't

Re: [PATCH 0/2] VFIO: Accept IOMMU group (PE) ID

2015-09-22 Thread Gavin Shan
On Mon, Sep 21, 2015 at 11:42:28AM +1000, David Gibson wrote: >On Sat, Sep 19, 2015 at 04:22:47PM +1000, David Gibson wrote: >> On Fri, Sep 18, 2015 at 09:47:32AM -0600, Alex Williamson wrote: >> > On Fri, 2015-09-18 at 16:24 +1000, Gavin Shan wrote: >> > > This allows to accept IOMMU group (PE)

Re: [PATCH v2 22/25] powerpc32: move xxxxx_dcache_range() functions inline

2015-09-22 Thread Scott Wood
On Tue, 2015-09-22 at 22:57 +0200, Christophe Leroy wrote: > Here is what I get in asm. First one is with "if (i) mb();". We see gcc > puts a beqlr. This is the form that is closest to what we had in the > former misc_32.S > Second one if with "mb()". Here we get a branch to sync for a useless

[PATCH 2/9] net: dsa: fix of_mdio_find_bus() device refcount leak

2015-09-22 Thread Russell King
Current users of of_mdio_find_bus() leak a struct device refcount, as they fail to clean up the reference obtained inside class_find_device(). Fix the DSA code to properly refcount the returned MDIO bus by: 1. taking a reference on the struct device whenever we assign it to

[PATCH 4/9] phy: add proper phy struct device refcounting

2015-09-22 Thread Russell King
Take a refcount on the phy struct device when the phy device is attached to a network device, and drop it after it's detached. This ensures that a refcount is held on the phy device while the device is being used by a network device, thereby preventing the phy_device from being unexpectedly

[PATCH 5/9] of_mdio: fix MDIO phy device refcounting

2015-09-22 Thread Russell King
bus_find_device() is defined as: * This is similar to the bus_for_each_dev() function above, but it * returns a reference to a device that is 'found' for later use, as * determined by the @match callback. and it does indeed return a reference-counted pointer to the device: while

[PATCH 7/9] phy: fixed-phy: properly validate phy in fixed_phy_update_state()

2015-09-22 Thread Russell King
Validate that the phy_device passed into fixed_phy_update_state() is a fixed-phy device before walking the list of phys for a fixed phy at the same address. Signed-off-by: Russell King --- drivers/net/phy/fixed_phy.c | 2 +- 1 file changed, 1 insertion(+), 1

RE: [PATCH v10 3/5] CPM/QE: use genalloc to manage CPM/QE muram

2015-09-22 Thread Zhao Qiang
On Tue, Sep 22, 2015 at 06:47 AM +0800, Wood Scott-B07421 wrote: > -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, September 22, 2015 6:47 AM > To: Zhao Qiang-B45475 > Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; > lau...@codeaurora.org; Xie Xiaobo-R63061;

RE: [PATCH v10 5/5] QE: Move QE from arch/powerpc to drivers/soc

2015-09-22 Thread Zhao Qiang
On Tue, Sep 22, 2015 at 06:56 AM +0800, Wood Scott-B07421 wrote: > -Original Message- > From: Wood Scott-B07421 > Sent: Tuesday, September 22, 2015 6:56 AM > To: Zhao Qiang-B45475 > Cc: linux-ker...@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; > lau...@codeaurora.org; Xie

Re: [PATCH 4/4] sound/core/seq: make prioq_match return bool

2015-09-22 Thread Johannes Berg
On Tue, 2015-09-22 at 21:22 +0800, Yaowei Bai wrote: > On Mon, Sep 21, 2015 at 04:11:00PM +0200, Johannes Berg wrote: > > > > > -static inline int prioq_match(struct snd_seq_event_cell *cell, > > > +static inline bool prioq_match(struct snd_seq_event_cell *cell, > > > int

Re: [PATCH 4/4] sound/core/seq: make prioq_match return bool

2015-09-22 Thread Yaowei Bai
On Mon, Sep 21, 2015 at 04:11:00PM +0200, Johannes Berg wrote: > > > -static inline int prioq_match(struct snd_seq_event_cell *cell, > > +static inline bool prioq_match(struct snd_seq_event_cell *cell, > > int client, int timestamp) > > I think you should fix up the

Re: [PATCH V2 2/2] powerpc:numa Do not allocate bootmem memory for non existing nodes

2015-09-22 Thread Raghavendra K T
On 09/22/2015 10:59 AM, Michael Ellerman wrote: On Tue, 2015-09-15 at 07:38 +0530, Raghavendra K T wrote: ... nothing Sure this patch looks obvious, but please give me a changelog that proves you've thought about it thoroughly. For example is it OK to use for_each_node() at this point in

[PATCH 0/9] powerpc32: set of optimisation of network checksum functions

2015-09-22 Thread Christophe Leroy
This patch serie gather patches related to checksum functions on powerpc. Some of those patches have already been submitted individually. Christophe Leroy (9): powerpc: unexport csum_tcpudp_magic powerpc: mark xer clobbered in csum_add() powerpc32: checksum_wrappers_64 becomes

[PATCH 2/9] powerpc: mark xer clobbered in csum_add()

2015-09-22 Thread Christophe Leroy
addc uses carry so xer is clobbered in csum_add() Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/checksum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/checksum.h b/arch/powerpc/include/asm/checksum.h index

[PATCH 3/9] powerpc32: checksum_wrappers_64 becomes checksum_wrappers

2015-09-22 Thread Christophe Leroy
The powerpc64 checksum wrapper functions adds csum_and_copy_to_user() which otherwise is implemented in include/net/checksum.h by using csum_partial() then copy_to_user() Those two wrapper fonctions are also applicable to powerpc32 as it is based on the use of csum_partial_copy_generic() which

[PATCH 1/9] powerpc: unexport csum_tcpudp_magic

2015-09-22 Thread Christophe Leroy
csum_tcpudp_magic is now an inline function, so there is nothing to export Signed-off-by: Christophe Leroy --- arch/powerpc/lib/ppc_ksyms.c | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/lib/ppc_ksyms.c b/arch/powerpc/lib/ppc_ksyms.c index

[PATCH 4/9] powerpc: inline ip_fast_csum()

2015-09-22 Thread Christophe Leroy
In several architectures, ip_fast_csum() is inlined There are functions like ip_send_check() which do nothing much more than calling ip_fast_csum(). Inlining ip_fast_csum() allows the compiler to optimise better Suggested-by: Eric Dumazet Signed-off-by: Christophe Leroy

[PATCH 7/9] powerpc32: optimise csum_partial() loop

2015-09-22 Thread Christophe Leroy
On the 8xx, load latency is 2 cycles and taking branches also takes 2 cycles. So let's unroll the loop. This patch improves csum_partial() speed by around 10% on both: * 8xx (single issue processor with parallele execution) * 83xx (superscalar 6xx processor with dual instruction fetch and

[PATCH 9/9] powerpc: optimise csum_partial() call when len is constant

2015-09-22 Thread Christophe Leroy
csum_partial is often called for small fixed length packets for which it is suboptimal to use the generic csum_partial() function. For instance, in my configuration, I got: * One place calling it with constant len 4 * Seven places calling it with constant len 8 * Three places calling it with

[PATCH 6/9] powerpc32: optimise a few instructions in csum_partial()

2015-09-22 Thread Christophe Leroy
r5 does contain the value to be updated, so lets use r5 all way long for that. It makes the code more readable. To avoid confusion, it is better to use adde instead of addc The first addition is useless. Its only purpose is to clear carry. As r4 is a signed int that is always positive, this can

[PATCH 8/9] powerpc: simplify csum_add(a, b) in case a or b is constant 0

2015-09-22 Thread Christophe Leroy
Simplify csum_add(a, b) in case a or b is constant 0 Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/checksum.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/include/asm/checksum.h b/arch/powerpc/include/asm/checksum.h index

  1   2   >