[PATCH v5 13/23] powerpc/8xx: Add missing SPRN defines into reg_8xx.h

2016-02-03 Thread Christophe Leroy
Add missing SPRN defines into reg_8xx.h Some of them are defined in mmu-8xx.h, so we include mmu-8xx.h in reg_8xx.h, for that we remove references to PAGE_SHIFT in mmu-8xx.h to have it self sufficient, as includers of reg_8xx.h don't all include asm/page.h Signed-off-by: Christophe Leroy -

[PATCH v5 14/23] powerpc/8xx: Handle CPU6 ERRATA directly in mtspr() macro

2016-02-03 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 --- v2: no change v3: no change v4: no change v5: no change

[PATCH v5 15/23] powerpc/8xx: remove special handling of CPU6 errata in set_dec()

2016-02-03 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 --- v2: no change v3: no change v4: no change v5: no change arch/powerpc/include/asm/time.h | 6 +- arch/powerpc/kernel/head_8xx.S | 18

[PATCH v5 16/23] powerpc/8xx: rewrite set_context() in C

2016-02-03 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 --- v2: no change v3: no change v4: no change v5: no change arch/powerpc/kernel

[PATCH v5 17/23] powerpc/8xx: rewrite flush_instruction_cache() in C

2016-02-03 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 --- v2: no change v3: no change v4: no change v5: no

[PATCH v5 18/23] powerpc: add inline functions for cache related instructions

2016-02-03 Thread Christophe Leroy
This patch adds inline functions to use dcbz, dcbi, dcbf, dcbst from C functions Signed-off-by: Christophe Leroy --- v2: new v3: no change v4: no change v5: no change arch/powerpc/include/asm/cache.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch/powerpc/include

[PATCH v5 19/23] powerpc32: Remove clear_pages() and define clear_page() inline

2016-02-03 Thread Christophe Leroy
: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change arch/powerpc/include/asm/page_32.h | 17 ++--- arch/powerpc/kernel/misc_32.S | 16 arch/powerpc/kernel/ppc_ksyms_32.c | 1 - 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a

[PATCH v5 20/23] powerpc32: move xxxxx_dcache_range() functions inline

2016-02-03 Thread Christophe Leroy
calling them Signed-off-by: Christophe Leroy --- v2: new v3: no change v4: no change v5: no change arch/powerpc/include/asm/cacheflush.h | 52 ++-- arch/powerpc/kernel/misc_32.S | 65 --- arch/powerpc/kernel/ppc_ksyms.c | 2

[PATCH v5 21/23] powerpc: Simplify test in __dma_sync()

2016-02-03 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 --- v2: new v3: no change v4: no change v5: no change arch/powerpc/mm/dma-noncoherent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH v5 22/23] powerpc32: small optimisation in flush_icache_range()

2016-02-03 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 --- v2: new v3: no change v4: no change v5: no change arch/powerpc/kernel/misc_32.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[PATCH v5 23/23] powerpc32: Remove one insn in mulhdu

2016-02-03 Thread Christophe Leroy
Remove one instruction in mulhdu Signed-off-by: Christophe Leroy --- v2: new v3: no change v4: no change v5: no change 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

[PATCH] powerpc/885: set SDCR to 0x40

2016-02-04 Thread Christophe Leroy
supported by the MPC885 HW. Signed-off-by: Christophe Leroy --- arch/powerpc/sysdev/cpm1.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/sysdev/cpm1.c b/arch/powerpc/sysdev/cpm1.c index 5e6ff38..8ed6536 100644 --- a/arch/powerpc/sysdev/cpm1.c +++ b/arch

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

2016-02-04 Thread Christophe Leroy
for mapping IMMR Change in v4: * Fix of a wrong #if notified by kbuild robot in 07/23 Change in v5: * Removed use of pmd_val() as L-value * Adapted to match the new include files layout in Linux 4.5 Change in v6: * Removed remaining use of pmd_val() as L-value Christophe Leroy (23): powerpc/8xx

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

2016-02-04 Thread Christophe Leroy
: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change v6: no change arch/powerpc/kernel/head_8xx.S | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index e629e28..a89492e

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

2016-02-04 Thread Christophe Leroy
increased to 313s and the overall time spent in DTLB miss handler is 6.3s, which represents 1% of the overall time and 2.2% of non-idle time. Signed-off-by: Christophe Leroy --- v2: using bt instead of bgt and named the label explicitly v3: no change v4: no change v5: removed use of pmd_val() as L-value

[PATCH v6 03/23] powerpc: Update documentation for noltlbs kernel parameter

2016-02-04 Thread Christophe Leroy
Now the noltlbs kernel parameter is also applicable to PPC8xx Signed-off-by: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change v6: no change Documentation/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/kernel

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

2016-02-04 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 --- v2: no change v3: no change v4: no change v5: no change v6: no change arch/powerpc/mm/8xx_mmu.c | 17 + arch/powerpc/mm/init_32.c | 19

[PATCH v6 05/23] powerpc32: Fix pte_offset_kernel() to return NULL for bad pages

2016-02-04 Thread Christophe Leroy
The fixmap related functions try to map kernel pages that are already mapped through Large TLBs. pte_offset_kernel() has to return NULL for LTLBs, otherwise the caller will try to access level 2 table which doesn't exist Signed-off-by: Christophe Leroy --- v3: new v4: no change v5: no chan

[PATCH v6 06/23] powerpc32: refactor x_mapped_by_bats() and x_mapped_by_tlbcam() together

2016-02-04 Thread Christophe Leroy
x_mapped_by_bats() and x_mapped_by_tlbcam() serve the same kind of purpose, and are never defined at the same time. So rename them x_block_mapped() and define them in the relevant places Signed-off-by: Christophe Leroy --- v2: no change v3: Functions are mutually exclusive so renamed iaw Scott

[PATCH v6 07/23] powerpc/8xx: Fix vaddr for IMMR early remap

2016-02-04 Thread Christophe Leroy
s at 0xfa20 which overlaps with VM ioremap area This patch fixes the virtual address for remapping IMMR with the fixmap regardless of the value of IMMR. The size of IMMR area is 256kbytes (CPM at offset 0, security engine at offset 128k) so a 512k page is enough Signed-off-by: Christophe L

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

2016-02-04 Thread Christophe Leroy
will be no speculative accesses. With this patch applied, the number of DTLB misses during the 10 min period is reduced to 11.8 millions for a duration of 5.8s, which represents 2% of the non-idle time hence yet another 10% reduction. Signed-off-by: Christophe Leroy --- v2: - using bt instead of blt

[PATCH v6 09/23] powerpc/8xx: CONFIG_PIN_TLB unneeded for CONFIG_PPC_EARLY_DEBUG_CPM

2016-02-04 Thread Christophe Leroy
IMMR is now mapped by page tables so it is not anymore necessary to PIN TLBs Signed-off-by: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change v6: no change arch/powerpc/Kconfig.debug | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/Kconfig.debug b/arch

[PATCH v6 10/23] powerpc/8xx: map more RAM at startup when needed

2016-02-04 Thread Christophe Leroy
selected. Signed-off-by: Christophe Leroy --- v2: no change v3: Automatic detection of available/needed memory instead of allocating 16M for all. v4: no change v5: no change v6: no change arch/powerpc/kernel/head_8xx.S | 56 +++--- arch/powerpc/mm/8xx_mmu.c

[PATCH v6 11/23] powerpc32: Remove useless/wrong MMU:setio progress message

2016-02-04 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 --- v2: no change v3: no change v4: no change v5: no change v6: no change arch/powerpc/mm/ini

[PATCH v6 12/23] powerpc32: remove ioremap_base

2016-02-04 Thread Christophe Leroy
ioremap_base is not initialised and is nowhere used so remove it Signed-off-by: Christophe Leroy --- v2: no change v3: fix comment as well v4: no change v5: no change v6: no change arch/powerpc/include/asm/nohash/32/pgtable.h | 2 +- arch/powerpc/mm/mmu_decl.h | 1 - arch

[PATCH v6 13/23] powerpc/8xx: Add missing SPRN defines into reg_8xx.h

2016-02-04 Thread Christophe Leroy
Add missing SPRN defines into reg_8xx.h Some of them are defined in mmu-8xx.h, so we include mmu-8xx.h in reg_8xx.h, for that we remove references to PAGE_SHIFT in mmu-8xx.h to have it self sufficient, as includers of reg_8xx.h don't all include asm/page.h Signed-off-by: Christophe Leroy -

[PATCH v6 14/23] powerpc/8xx: Handle CPU6 ERRATA directly in mtspr() macro

2016-02-04 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 --- v2: no change v3: no change v4: no change v5: no change v6: no c

[PATCH v6 15/23] powerpc/8xx: remove special handling of CPU6 errata in set_dec()

2016-02-04 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 --- v2: no change v3: no change v4: no change v5: no change v6: no change arch/powerpc/include/asm/time.h | 6 +- arch/powerpc/kernel/head_8xx.S

[PATCH v6 16/23] powerpc/8xx: rewrite set_context() in C

2016-02-04 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 --- v2: no change v3: no change v4: no change v5: no change v6: no change arch

[PATCH v6 17/23] powerpc/8xx: rewrite flush_instruction_cache() in C

2016-02-04 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 --- v2: no change v3: no change v4: no change v5: no

[PATCH v6 18/23] powerpc: add inline functions for cache related instructions

2016-02-04 Thread Christophe Leroy
This patch adds inline functions to use dcbz, dcbi, dcbf, dcbst from C functions Signed-off-by: Christophe Leroy --- v2: new v3: no change v4: no change v5: no change v6: no change arch/powerpc/include/asm/cache.h | 19 +++ 1 file changed, 19 insertions(+) diff --git a/arch

[PATCH v6 19/23] powerpc32: Remove clear_pages() and define clear_page() inline

2016-02-04 Thread Christophe Leroy
: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change v6: no change arch/powerpc/include/asm/page_32.h | 17 ++--- arch/powerpc/kernel/misc_32.S | 16 arch/powerpc/kernel/ppc_ksyms_32.c | 1 - 3 files changed, 14 insertions(+), 20 deletions

[PATCH v6 20/23] powerpc32: move xxxxx_dcache_range() functions inline

2016-02-04 Thread Christophe Leroy
calling them Signed-off-by: Christophe Leroy --- v2: new v3: no change v4: no change v5: no change v6: no change arch/powerpc/include/asm/cacheflush.h | 52 ++-- arch/powerpc/kernel/misc_32.S | 65 --- arch/powerpc/kernel/ppc_ksyms.c

[PATCH v6 21/23] powerpc: Simplify test in __dma_sync()

2016-02-04 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 --- v2: new v3: no change v4: no change v5: no change v6: no change arch/powerpc/mm/dma-noncoherent.c | 2 +- 1 file changed, 1 insertion

[PATCH v6 22/23] powerpc32: small optimisation in flush_icache_range()

2016-02-04 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 --- v2: new v3: no change v4: no change v5: no change v6: no change arch/powerpc/kernel/misc_32.S | 5 ++--- 1 file changed, 2 insertions(+), 3

[PATCH v6 23/23] powerpc32: Remove one insn in mulhdu

2016-02-04 Thread Christophe Leroy
Remove one instruction in mulhdu Signed-off-by: Christophe Leroy --- v2: new v3: no change v4: no change v5: no change v6: no change 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

Re: [PATCH v5 21/23] powerpc: Simplify test in __dma_sync()

2016-02-04 Thread Christophe Leroy
Le 04/02/2016 12:37, Denis Kirjanov a écrit : On 2/4/16, Christophe Leroy wrote: 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 --- v2: new v3: no change v4: no change v5: no change

Re: [PATCH v5 21/23] powerpc: Simplify test in __dma_sync()

2016-02-04 Thread Christophe Leroy
Le 05/02/2016 08:52, Denis Kirjanov a écrit : On 2/4/16, Christophe Leroy wrote: Le 04/02/2016 12:37, Denis Kirjanov a écrit : On 2/4/16, Christophe Leroy wrote: This simplification helps the compiler. We now have only one test instead of two, so it reduces the number of branches

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

2016-02-09 Thread Christophe Leroy
) Change in v7: * Don't include x_block_mapped() from compilation in arch/powerpc/mm/fsl_booke_mmu.c when CONFIG_FSL_BOOKE is not set (reported by kbuild test robot) Christophe Leroy (23): powerpc/8xx: Save r3 all the time in DTLB miss handler powerpc/8xx: Map linear kernel RAM with 8M pages po

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

2016-02-09 Thread Christophe Leroy
: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change v6: no change v7: no change arch/powerpc/kernel/head_8xx.S | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index e629e28

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

2016-02-09 Thread Christophe Leroy
increased to 313s and the overall time spent in DTLB miss handler is 6.3s, which represents 1% of the overall time and 2.2% of non-idle time. Signed-off-by: Christophe Leroy --- v2: using bt instead of bgt and named the label explicitly v3: no change v4: no change v5: removed use of pmd_val() as L-value

[PATCH v7 03/23] powerpc: Update documentation for noltlbs kernel parameter

2016-02-09 Thread Christophe Leroy
Now the noltlbs kernel parameter is also applicable to PPC8xx Signed-off-by: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change v6: no change v7: no change Documentation/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

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

2016-02-09 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 --- v2: no change v3: no change v4: no change v5: no change v6: no change v7: no change arch/powerpc/mm/8xx_mmu.c | 17 + arch/powerpc/mm/init_32.c | 19

[PATCH v7 05/23] powerpc32: Fix pte_offset_kernel() to return NULL for bad pages

2016-02-09 Thread Christophe Leroy
The fixmap related functions try to map kernel pages that are already mapped through Large TLBs. pte_offset_kernel() has to return NULL for LTLBs, otherwise the caller will try to access level 2 table which doesn't exist Signed-off-by: Christophe Leroy --- v3: new v4: no change v5: no chan

[PATCH v7 06/23] powerpc32: refactor x_mapped_by_bats() and x_mapped_by_tlbcam() together

2016-02-09 Thread Christophe Leroy
x_mapped_by_bats() and x_mapped_by_tlbcam() serve the same kind of purpose, and are never defined at the same time. So rename them x_block_mapped() and define them in the relevant places Signed-off-by: Christophe Leroy --- v2: no change v3: Functions are mutually exclusive so renamed iaw Scott

[PATCH v7 07/23] powerpc/8xx: Fix vaddr for IMMR early remap

2016-02-09 Thread Christophe Leroy
s at 0xfa20 which overlaps with VM ioremap area This patch fixes the virtual address for remapping IMMR with the fixmap regardless of the value of IMMR. The size of IMMR area is 256kbytes (CPM at offset 0, security engine at offset 128k) so a 512k page is enough Signed-off-by: Christophe L

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

2016-02-09 Thread Christophe Leroy
will be no speculative accesses. With this patch applied, the number of DTLB misses during the 10 min period is reduced to 11.8 millions for a duration of 5.8s, which represents 2% of the non-idle time hence yet another 10% reduction. Signed-off-by: Christophe Leroy --- v2: - using bt instead of blt

[PATCH v7 09/23] powerpc/8xx: CONFIG_PIN_TLB unneeded for CONFIG_PPC_EARLY_DEBUG_CPM

2016-02-09 Thread Christophe Leroy
IMMR is now mapped by page tables so it is not anymore necessary to PIN TLBs Signed-off-by: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change v6: no change v7: no change arch/powerpc/Kconfig.debug | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc

[PATCH v7 10/23] powerpc/8xx: map more RAM at startup when needed

2016-02-09 Thread Christophe Leroy
selected. Signed-off-by: Christophe Leroy --- v2: no change v3: Automatic detection of available/needed memory instead of allocating 16M for all. v4: no change v5: no change v6: no change v7: no change arch/powerpc/kernel/head_8xx.S | 56 +++--- arch/powerpc

[PATCH v7 11/23] powerpc32: Remove useless/wrong MMU:setio progress message

2016-02-09 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 --- v2: no change v3: no change v4: no change v5: no change v6: no change v7: no change arch/

[PATCH v7 12/23] powerpc32: remove ioremap_base

2016-02-09 Thread Christophe Leroy
ioremap_base is not initialised and is nowhere used so remove it Signed-off-by: Christophe Leroy --- v2: no change v3: fix comment as well v4: no change v5: no change v6: no change v7: no change arch/powerpc/include/asm/nohash/32/pgtable.h | 2 +- arch/powerpc/mm/mmu_decl.h

[PATCH v7 13/23] powerpc/8xx: Add missing SPRN defines into reg_8xx.h

2016-02-09 Thread Christophe Leroy
Add missing SPRN defines into reg_8xx.h Some of them are defined in mmu-8xx.h, so we include mmu-8xx.h in reg_8xx.h, for that we remove references to PAGE_SHIFT in mmu-8xx.h to have it self sufficient, as includers of reg_8xx.h don't all include asm/page.h Signed-off-by: Christophe Leroy -

[PATCH v7 14/23] powerpc/8xx: Handle CPU6 ERRATA directly in mtspr() macro

2016-02-09 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 --- v2: no change v3: no change v4: no change v5: no change v6: no c

[PATCH v7 15/23] powerpc/8xx: remove special handling of CPU6 errata in set_dec()

2016-02-09 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 --- v2: no change v3: no change v4: no change v5: no change v6: no change v7: no change arch/powerpc/include/asm/time.h | 6 +- arch/powerpc/kernel

[PATCH v7 16/23] powerpc/8xx: rewrite set_context() in C

2016-02-09 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 --- v2: no change v3: no change v4: no change v5: no change v6: no change v7: no

[PATCH v7 18/23] powerpc: add inline functions for cache related instructions

2016-02-09 Thread Christophe Leroy
This patch adds inline functions to use dcbz, dcbi, dcbf, dcbst from C functions Signed-off-by: Christophe Leroy --- v2: new v3: no change v4: no change v5: no change v6: no change v7: no change arch/powerpc/include/asm/cache.h | 19 +++ 1 file changed, 19 insertions(+) diff

[PATCH v7 20/23] powerpc32: move xxxxx_dcache_range() functions inline

2016-02-09 Thread Christophe Leroy
calling them Signed-off-by: Christophe Leroy --- v2: new v3: no change v4: no change v5: no change v6: no change v7: no change arch/powerpc/include/asm/cacheflush.h | 52 ++-- arch/powerpc/kernel/misc_32.S | 65 --- arch/powerpc/kernel

[PATCH v7 17/23] powerpc/8xx: rewrite flush_instruction_cache() in C

2016-02-09 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 --- v2: no change v3: no change v4: no change v5: no

[PATCH v7 19/23] powerpc32: Remove clear_pages() and define clear_page() inline

2016-02-09 Thread Christophe Leroy
: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change v6: no change v7: no change arch/powerpc/include/asm/page_32.h | 17 ++--- arch/powerpc/kernel/misc_32.S | 16 arch/powerpc/kernel/ppc_ksyms_32.c | 1 - 3 files changed, 14 insertions

[PATCH v7 21/23] powerpc: Simplify test in __dma_sync()

2016-02-09 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 --- v2: new v3: no change v4: no change v5: no change v6: no change v7: no change arch/powerpc/mm/dma-noncoherent.c | 2 +- 1 file changed, 1

[PATCH v7 22/23] powerpc32: small optimisation in flush_icache_range()

2016-02-09 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 --- v2: new v3: no change v4: no change v5: no change v6: no change v7: no change arch/powerpc/kernel/misc_32.S | 5 ++--- 1 file changed, 2

[PATCH v7 23/23] powerpc32: Remove one insn in mulhdu

2016-02-09 Thread Christophe Leroy
Remove one instruction in mulhdu Signed-off-by: Christophe Leroy --- v2: new v3: no change v4: no change v5: no change v6: no change v7: no change 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

Re: [PATCH v7 00/23] powerpc/8xx: Use large pages for RAM and IMMR and other improvments

2016-02-09 Thread Christophe Leroy
Le 09/02/2016 11:23, Christophe Leroy a écrit : 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 Change in v7: * Don't include x_block_mapped()

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

2016-02-09 Thread Christophe Leroy
) Change in v7: * No change (commit error) Change in v8: * Don't include x_block_mapped() from compilation in arch/powerpc/mm/fsl_booke_mmu.c when CONFIG_FSL_BOOKE is not set (reported by kbuild test robot) Christophe Leroy (23): powerpc/8xx: Save r3 all the time in DTLB miss handler powerp

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

2016-02-09 Thread Christophe Leroy
: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change v6: no change v8: no change arch/powerpc/kernel/head_8xx.S | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/arch/powerpc/kernel/head_8xx.S b/arch/powerpc/kernel/head_8xx.S index e629e28

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

2016-02-09 Thread Christophe Leroy
increased to 313s and the overall time spent in DTLB miss handler is 6.3s, which represents 1% of the overall time and 2.2% of non-idle time. Signed-off-by: Christophe Leroy --- v2: using bt instead of bgt and named the label explicitly v3: no change v4: no change v5: removed use of pmd_val() as L-value

[PATCH v8 03/23] powerpc: Update documentation for noltlbs kernel parameter

2016-02-09 Thread Christophe Leroy
Now the noltlbs kernel parameter is also applicable to PPC8xx Signed-off-by: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change v6: no change v8: no change Documentation/kernel-parameters.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

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

2016-02-09 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 --- v2: no change v3: no change v4: no change v5: no change v6: no change v8: no change arch/powerpc/mm/8xx_mmu.c | 17 + arch/powerpc/mm/init_32.c | 19

[PATCH v8 05/23] powerpc32: Fix pte_offset_kernel() to return NULL for bad pages

2016-02-09 Thread Christophe Leroy
The fixmap related functions try to map kernel pages that are already mapped through Large TLBs. pte_offset_kernel() has to return NULL for LTLBs, otherwise the caller will try to access level 2 table which doesn't exist Signed-off-by: Christophe Leroy --- v3: new v4: no change v5: no chan

[PATCH v8 06/23] powerpc32: refactor x_mapped_by_bats() and x_mapped_by_tlbcam() together

2016-02-09 Thread Christophe Leroy
x_mapped_by_bats() and x_mapped_by_tlbcam() serve the same kind of purpose, and are never defined at the same time. So rename them x_block_mapped() and define them in the relevant places Signed-off-by: Christophe Leroy --- v2: no change v3: Functions are mutually exclusive so renamed iaw Scott

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

2016-02-09 Thread Christophe Leroy
will be no speculative accesses. With this patch applied, the number of DTLB misses during the 10 min period is reduced to 11.8 millions for a duration of 5.8s, which represents 2% of the non-idle time hence yet another 10% reduction. Signed-off-by: Christophe Leroy --- v2: - using bt instead of blt

[PATCH v8 10/23] powerpc/8xx: map more RAM at startup when needed

2016-02-09 Thread Christophe Leroy
selected. Signed-off-by: Christophe Leroy --- v2: no change v3: Automatic detection of available/needed memory instead of allocating 16M for all. v4: no change v5: no change v6: no change v8: no change arch/powerpc/kernel/head_8xx.S | 56 +++--- arch/powerpc

[PATCH v8 11/23] powerpc32: Remove useless/wrong MMU:setio progress message

2016-02-09 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 --- v2: no change v3: no change v4: no change v5: no change v6: no change v8: no change arch/

[PATCH v8 12/23] powerpc32: remove ioremap_base

2016-02-09 Thread Christophe Leroy
ioremap_base is not initialised and is nowhere used so remove it Signed-off-by: Christophe Leroy --- v2: no change v3: fix comment as well v4: no change v5: no change v6: no change v8: no change arch/powerpc/include/asm/nohash/32/pgtable.h | 2 +- arch/powerpc/mm/mmu_decl.h

[PATCH v8 07/23] powerpc/8xx: Fix vaddr for IMMR early remap

2016-02-09 Thread Christophe Leroy
s at 0xfa20 which overlaps with VM ioremap area This patch fixes the virtual address for remapping IMMR with the fixmap regardless of the value of IMMR. The size of IMMR area is 256kbytes (CPM at offset 0, security engine at offset 128k) so a 512k page is enough Signed-off-by: Christophe L

[PATCH v8 13/23] powerpc/8xx: Add missing SPRN defines into reg_8xx.h

2016-02-09 Thread Christophe Leroy
Add missing SPRN defines into reg_8xx.h Some of them are defined in mmu-8xx.h, so we include mmu-8xx.h in reg_8xx.h, for that we remove references to PAGE_SHIFT in mmu-8xx.h to have it self sufficient, as includers of reg_8xx.h don't all include asm/page.h Signed-off-by: Christophe Leroy -

[PATCH v8 14/23] powerpc/8xx: Handle CPU6 ERRATA directly in mtspr() macro

2016-02-09 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 --- v2: no change v3: no change v4: no change v5: no change v6: no c

[PATCH v8 09/23] powerpc/8xx: CONFIG_PIN_TLB unneeded for CONFIG_PPC_EARLY_DEBUG_CPM

2016-02-09 Thread Christophe Leroy
IMMR is now mapped by page tables so it is not anymore necessary to PIN TLBs Signed-off-by: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change v6: no change v8: no change arch/powerpc/Kconfig.debug | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc

[PATCH v8 15/23] powerpc/8xx: remove special handling of CPU6 errata in set_dec()

2016-02-09 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 --- v2: no change v3: no change v4: no change v5: no change v6: no change v8: no change arch/powerpc/include/asm/time.h | 6 +- arch/powerpc/kernel

[PATCH v8 16/23] powerpc/8xx: rewrite set_context() in C

2016-02-09 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 --- v2: no change v3: no change v4: no change v5: no change v6: no change v8: no

[PATCH v8 17/23] powerpc/8xx: rewrite flush_instruction_cache() in C

2016-02-09 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 --- v2: no change v3: no change v4: no change v5: no

[PATCH v8 18/23] powerpc: add inline functions for cache related instructions

2016-02-09 Thread Christophe Leroy
This patch adds inline functions to use dcbz, dcbi, dcbf, dcbst from C functions Signed-off-by: Christophe Leroy --- v2: new v3: no change v4: no change v5: no change v6: no change v8: no change arch/powerpc/include/asm/cache.h | 19 +++ 1 file changed, 19 insertions(+) diff

[PATCH v8 19/23] powerpc32: Remove clear_pages() and define clear_page() inline

2016-02-09 Thread Christophe Leroy
: Christophe Leroy --- v2: no change v3: no change v4: no change v5: no change v6: no change v8: no change arch/powerpc/include/asm/page_32.h | 17 ++--- arch/powerpc/kernel/misc_32.S | 16 arch/powerpc/kernel/ppc_ksyms_32.c | 1 - 3 files changed, 14 insertions

[PATCH v8 20/23] powerpc32: move xxxxx_dcache_range() functions inline

2016-02-09 Thread Christophe Leroy
calling them Signed-off-by: Christophe Leroy --- v2: new v3: no change v4: no change v5: no change v6: no change v8: no change arch/powerpc/include/asm/cacheflush.h | 52 ++-- arch/powerpc/kernel/misc_32.S | 65 --- arch/powerpc/kernel

[PATCH v8 21/23] powerpc: Simplify test in __dma_sync()

2016-02-09 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 --- v2: new v3: no change v4: no change v5: no change v6: no change v8: no change arch/powerpc/mm/dma-noncoherent.c | 2 +- 1 file changed, 1

[PATCH v8 22/23] powerpc32: small optimisation in flush_icache_range()

2016-02-09 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 --- v2: new v3: no change v4: no change v5: no change v6: no change v8: no change arch/powerpc/kernel/misc_32.S | 5 ++--- 1 file changed, 2

[PATCH v8 23/23] powerpc32: Remove one insn in mulhdu

2016-02-09 Thread Christophe Leroy
Remove one instruction in mulhdu Signed-off-by: Christophe Leroy --- v2: new v3: no change v4: no change v5: no change v6: no change v8: no change 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

[PATCH] powerpc32: PAGE_EXEC required for inittext

2016-02-09 Thread Christophe Leroy
368b78 [0.00] ---[ end trace dc8fa200cb88537f ]--- Signed-off-by: Christophe Leroy --- This patch goes on top of the following serie: [PATCH v8 00/23] powerpc/8xx: Use large pages for RAM and IMMR and other improvments arch/powerpc/mm/pgtable_32.c | 5 +++-- 1 file changed, 3 insertions(+), 2 del

[PATCH v3] powerpc32: provide VIRT_CPU_ACCOUNTING

2016-02-10 Thread Christophe Leroy
n PPC32 and u64 on PPC64 Signed-off-by: Christophe Leroy --- Changes in v3: unlike previous version of the patch that was inspired from IA64 architecture, this new version tries to reuse as much as possible the PPC64 implementation. PPC32 doesn't have PACA and past discusion on v2 version

[PATCH v4] powerpc32: provide VIRT_CPU_ACCOUNTING

2016-02-10 Thread Christophe Leroy
n PPC32 and u64 on PPC64 Signed-off-by: Christophe Leroy --- Changes in v3: unlike previous version of the patch that was inspired from IA64 architecture, this new version tries to reuse as much as possible the PPC64 implementation. PPC32 doesn't have PACA and past discusion on v2 version

[PATCH v5] powerpc32: provide VIRT_CPU_ACCOUNTING

2016-02-11 Thread Christophe Leroy
n PPC32 and u64 on PPC64 Signed-off-by: Christophe Leroy --- Changes in v3: unlike previous version of the patch that was inspired from IA64 architecture, this new version tries to reuse as much as possible the PPC64 implementation. PPC32 doesn't have PACA and past discusion on v2 version

Re: [PATCH v5] powerpc32: provide VIRT_CPU_ACCOUNTING

2016-02-15 Thread Christophe Leroy
Le 14/02/2016 21:40, Denis Kirjanov a écrit : On 2/11/16, Christophe Leroy wrote: This patch provides VIRT_CPU_ACCOUTING to PPC32 architecture. PPC32 doesn't have the PACA structure, so we use the task_info structure to store the accounting data. In order to reuse on PPC32 the PPC64 func

[PATCH v6] powerpc32: provide VIRT_CPU_ACCOUNTING

2016-02-15 Thread Christophe Leroy
n PPC32 and u64 on PPC64 Signed-off-by: Christophe Leroy --- Changes in v3: unlike previous version of the patch that was inspired from IA64 architecture, this new version tries to reuse as much as possible the PPC64 implementation. PPC32 doesn't have PACA and past discusion on v2 version

[PATCH v7 03/11] powerpc/prom_init: don't use string functions from lib/

2019-02-25 Thread Christophe Leroy
prom_init is in __init section, it is freed after boot anyway. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/prom_init.c| 213 ++--- arch/powerpc/kernel/prom_init_check.sh | 2 +- 2 files changed, 173 insertions(+), 42 deletions(-) diff --git a/arch

[PATCH v7 02/11] powerpc: prepare string/mem functions for KASAN

2019-02-25 Thread Christophe Leroy
appers, we therefore have to fallback to the generic versions when KASAN is active, otherwise KASAN checks will be skipped. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/kasan.h | 15 +++ arch/powerpc/include/asm/string.h | 32 +--- ar

[PATCH v7 04/11] powerpc/mm: don't use direct assignation during early boot.

2019-02-25 Thread Christophe Leroy
In kernel/cputable.c, explicitly use memcpy() instead of *y = *x; This will allow GCC to replace it with __memcpy() when KASAN is selected. Acked-by: Dmitry Vyukov Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/cputable.c | 13 ++--- 1 file changed, 10 insertions(+), 3

[PATCH v7 01/11] powerpc/32: Move early_init() in a separate file

2019-02-25 Thread Christophe Leroy
In preparation of KASAN, move early_init() into a separate file in order to allow deactivation of KASAN for that function. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/Makefile | 2 +- arch/powerpc/kernel/early_32.c | 38 ++ arch/powerpc/kernel

[PATCH v7 00/11] KASAN for powerpc/32

2019-02-25 Thread Christophe Leroy
.h in asm/pgtable-types.h ==> might be fixed independently but not needed for this serie. Christophe Leroy (11): powerpc/32: Move early_init() in a separate file powerpc: prepare string/mem functions for KASAN powerpc/prom_init: don't use string functions from lib/ powerpc/

[PATCH v7 05/11] powerpc/32: use memset() instead of memset_io() to zero BSS

2019-02-25 Thread Christophe Leroy
Since commit 400c47d81ca38 ("powerpc32: memset: only use dcbz once cache is enabled"), memset() can be used before activation of the cache, so no need to use memset_io() for zeroing the BSS. Acked-by: Dmitry Vyukov Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/earl

[PATCH v7 09/11] powerpc/32: Add KASAN support

2019-02-25 Thread Christophe Leroy
in a previous patch. An early mapping is set as soon as the kernel code has been relocated at its definitive place. Then the definitive mapping is set once paging is initialised. For modules, the shadow area is allocated at module_alloc(). Signed-off-by: Christophe Leroy --- arch/powerpc

<    1   2   3   4   5   6   7   8   9   10   >