[PATCH v4 11/13] powerpc/ptrace: create ptrace_get_debugreg()

2020-02-27 Thread Christophe Leroy
Create ptrace_get_debugreg() to handle PTRACE_GET_DEBUGREG and reduce ifdef mess Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/ptrace-adv.c | 9 + arch/powerpc/kernel/ptrace/ptrace-decl.h | 2 ++ arch/powerpc/kernel/ptrace/ptrace-noadv.c | 13 + arch/pow

[PATCH v4 10/13] powerpc/ptrace: split out ADV_DEBUG_REGS related functions.

2020-02-27 Thread Christophe Leroy
Move ADV_DEBUG_REGS functions out of ptrace.c, into ptrace-adv.c and ptrace-noadv.c Signed-off-by: Christophe Leroy --- v4: Leave hw_breakpoint.h for ptrace.c --- arch/powerpc/kernel/ptrace/Makefile | 4 + arch/powerpc/kernel/ptrace/ptrace-adv.c | 468 arch/powerpc/ker

[PATCH v4 08/13] powerpc/ptrace: split out TRANSACTIONAL_MEM related functions.

2020-02-27 Thread Christophe Leroy
Move TRANSACTIONAL_MEM functions out of ptrace.c, into ptrace-tm.c Signed-off-by: Christophe Leroy --- v4: leave asm-prototypes.h --- arch/powerpc/kernel/ptrace/Makefile | 1 + arch/powerpc/kernel/ptrace/ptrace-decl.h | 89 +++ arch/powerpc/kernel/ptrace/ptrace-tm.c | 851 +

[PATCH v4 09/13] powerpc/ptrace: move register viewing functions out of ptrace.c

2020-02-27 Thread Christophe Leroy
Create a dedicated ptrace-view.c file. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/Makefile | 4 +- arch/powerpc/kernel/ptrace/ptrace-decl.h | 43 + arch/powerpc/kernel/ptrace/ptrace-view.c | 904 + arch/powerpc/kernel/ptrace/ptrace.c | 966 ---

[PATCH v4 07/13] powerpc/ptrace: split out SPE related functions.

2020-02-27 Thread Christophe Leroy
Move CONFIG_SPE functions out of ptrace.c, into ptrace-spe.c Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/Makefile | 1 + arch/powerpc/kernel/ptrace/ptrace-decl.h | 9 arch/powerpc/kernel/ptrace/ptrace-spe.c | 66 arch/powerpc/kernel/ptrace

[PATCH v4 06/13] powerpc/ptrace: split out ALTIVEC related functions.

2020-02-27 Thread Christophe Leroy
Move CONFIG_ALTIVEC functions out of ptrace.c, into ptrace-altivec.c Signed-off-by: Christophe Leroy --- v4: add missing ptrace_decl.h --- arch/powerpc/kernel/ptrace/Makefile | 1 + arch/powerpc/kernel/ptrace/ptrace-altivec.c | 128 arch/powerpc/kernel/ptrace/ptrac

[PATCH v4 05/13] powerpc/ptrace: split out VSX related functions.

2020-02-27 Thread Christophe Leroy
Move CONFIG_VSX functions out of ptrace.c, into ptrace-vsx.c and ptrace-novsx.c Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/Makefile | 4 + arch/powerpc/kernel/ptrace/ptrace-decl.h | 26 arch/powerpc/kernel/ptrace/ptrace-novsx.c | 57 +++ arch/powerpc/kerne

[PATCH v4 04/13] powerpc/ptrace: drop PARAMETER_SAVE_AREA_OFFSET

2020-02-27 Thread Christophe Leroy
PARAMETER_SAVE_AREA_OFFSET is not used, drop it. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/ptrace.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/arch/powerpc/kernel/ptrace/ptrace.c b/arch/powerpc/kernel/ptrace/ptrace.c index 3dd94c296ac7..22826c942eae 1006

[PATCH v4 03/13] powerpc/ptrace: drop unnecessary #ifdefs CONFIG_PPC64

2020-02-27 Thread Christophe Leroy
Drop a bunch of #ifdefs CONFIG_PPC64 that are not vital. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/ptrace.h | 2 ++ arch/powerpc/kernel/ptrace/ptrace.c | 18 +++--- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/arch/powerpc/include/asm/ptrace.h

[PATCH v4 02/13] powerpc/ptrace: remove unused header includes

2020-02-27 Thread Christophe Leroy
Remove unused header includes in ptrace.c and ptrace32.c Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/ptrace.c | 19 ++- arch/powerpc/kernel/ptrace/ptrace32.c | 11 --- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/arch/powerpc/kernel

[PATCH v4 00/13] Reduce ifdef mess in ptrace

2020-02-27 Thread Christophe Leroy
The purpose of this series is to reduce the amount of #ifdefs in ptrace.c Link: https://github.com/linuxppc/issues/issues/128 Tentatively build checked on kisskb allthough kisskb seems overloaded and failing to complete the tests. See http://kisskb.ellerman.id.au/kisskb/branch/chleroy/head/ff12

[PATCH v4 01/13] powerpc: move ptrace into a subdirectory.

2020-02-27 Thread Christophe Leroy
In order to allow splitting of ptrace depending on the different CONFIG_ options, create a subdirectory dedicated to ptrace and move ptrace.c and ptrace32.c into it. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/Makefile| 7 +++ arch/powerpc/kernel/ptrace/Makefile

Re: [PATCH] mm/debug: Add tests validating arch page table helpers for core features

2020-02-27 Thread Christophe Leroy
patch must be applied on linux-next (next-20200227) after this patch 2. https://patchwork.kernel.org/patch/11407715/ mm/debug_vm_pgtable.c | 310 +- 1 file changed, 309 insertions(+), 1 deletion(-) diff --git a/mm/debug_vm_pgtable.c b/mm/debug_vm_pgtab

Re: [PATCH 00/18] genirq: Remove setup_irq()

2020-02-27 Thread afzal mohammed
Hi Thomas, On Thu, Feb 27, 2020 at 11:31:15AM +0100, Thomas Gleixner wrote: > Vs. merging this series, I suggest the following approach: > >- Resubmit the individual changes as single patches or small series > to the relevant maintainers and subsystem mailing lists. They have > no

Re: [PATCH] mm/debug: Add tests validating arch page table helpers for core features

2020-02-27 Thread Christophe Leroy
Le 27/02/2020 à 11:33, Anshuman Khandual a écrit : This adds new tests validating arch page table helpers for these following core memory features. These tests create and test specific mapping types at various page table levels. * SPECIAL mapping * PROTNONE mapping * DEVMAP mapping * SOFTDIRT

[PATCH] mm/debug: Add tests validating arch page table helpers for core features

2020-02-27 Thread Anshuman Khandual
ied on all current enabling platforms for the test i.e s390, ppc32, arc etc. This patch must be applied on v5.6-rc3 after these patches 1. https://patchwork.kernel.org/patch/11385057/ 2. https://patchwork.kernel.org/patch/11407715/ OR This patch must be applied on linux-next (next-20200227)

Re: [PATCH 00/18] genirq: Remove setup_irq()

2020-02-27 Thread Thomas Gleixner
Afzal, afzal mohammed writes: > While trying to understand internals of irq handling, came across a > thread [1] in which tglx was referring to avoid usage of setup_irq(). > Existing callers of setup_irq() reached mostly via 'init_IRQ()' & > 'time_init()', while memory allocators are ready by 'm

[PATCH v3 14/14] mm: remove __ARCH_HAS_5LEVEL_HACK and include/asm-generic/5level-fixup.h

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport There are no architectures that use include/asm-generic/5level-fixup.h therefore it can be removed along with __ARCH_HAS_5LEVEL_HACK define and the code it surrounds Signed-off-by: Mike Rapoport --- include/asm-generic/5level-fixup.h | 58 -- inc

[PATCH v3 13/14] asm-generic: remove pgtable-nop4d-hack.h

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport No architecture defines __ARCH_USE_5LEVEL_HACK and therefore pgtable-nop4d-hack.h will be never actually included. Remove it. Signed-off-by: Mike Rapoport --- include/asm-generic/pgtable-nop4d-hack.h | 64 include/asm-generic/pgtable-nopud.h |

[PATCH v3 12/14] unicore32: remove __ARCH_USE_5LEVEL_HACK

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport The unicore32 architecture has 2 level page tables and asm-generic/pgtable-nopmd.h and explicit casts from pud_t to pgd_t for page table folding. Add p4d walk in the only place that actually unfolds the pud level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapopor

[PATCH v3 11/14] sh: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/sh/include/asm/pgtable-2level.h | 1 - arch/sh/include/asm/pgtable-3level.h | 1 - arch/sh/

[PATCH v3 10/14] sh: drop __pXd_offset() macros that duplicate pXd_index() ones

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport The __pXd_offset() macros are identical to the pXd_index() macros and there is no point to keep both of them. All architectures define and use pXd_index() so let's keep only those to make mips consistent with the rest of the kernel. Signed-off-by: Mike Rapoport --- arch/sh/

[PATCH v3 09/14] sh: fault: Modernize printing of kernel messages

2020-02-27 Thread Mike Rapoport
From: Geert Uytterhoeven - Convert from printk() to pr_*(), - Add missing continuations, - Use "%llx" to format u64, - Join multiple prints in show_fault_oops() into a single print. Signed-off-by: Geert Uytterhoeven Signed-off-by: Mike Rapoport --- arch/sh/mm/fault.c | 39

[PATCH v3 08/14] powerpc: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and replace 5level-fixup.h with pgtable-nop4d.h. Signed-off-by: Mike Rapoport Tested-by: Christophe Leroy # 8xx and 83xx --- arch/powerpc/include/asm/book3s/32/pgtable.h |

[PATCH v3 07/14] powerpc/32: drop get_pteptr()

2020-02-27 Thread Mike Rapoport
From: Christophe Leroy Commit 8d30c14cab30 ("powerpc/mm: Rework I$/D$ coherency (v3)") and commit 90ac19a8b21b ("[POWERPC] Abolish iopa(), mm_ptov(), io_block_mapping() from arch/powerpc") removed the use of get_pteptr() outside of mm/pgtable_32.c In mm/pgtable_32.c, the only user of get_pteptr(

[PATCH v3 06/14] openrisc: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/openrisc/include/asm/pgtable.h | 1 - arch/openrisc/mm/fault.c| 10 -- a

[PATCH v3 05/14] nios2: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate and remove usage of __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --- arch/nios2/include/asm/pgtable.h | 3 +-- arch/nios2/mm/fault.c| 9 +++-- arch/nio

[PATCH v3 04/14] ia64: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, remove usage of __ARCH_USE_5LEVEL_HACK and replace 5level-fixup.h with pgtable-nop4d.h Signed-off-by: Mike Rapoport --- arch/ia64/include/asm/pgalloc.h | 4 ++-- arch/ia64/i

[PATCH v3 03/14] hexagon: remove __ARCH_USE_5LEVEL_HACK

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport The hexagon architecture has 2 level page tables and as such most of the page table folding is already implemented in asm-generic/pgtable-nopmd.h. Fixup the only place in arch/hexagon to unfold the p4d level and remove __ARCH_USE_5LEVEL_HACK. Signed-off-by: Mike Rapoport --

[PATCH v3 02/14] h8300: remove usage of __ARCH_USE_5LEVEL_HACK

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport h8300 is a nommu architecture and does not require fixup for upper layers of the page tables because it is already handled by the generic nommu implementation. Remove definition of __ARCH_USE_5LEVEL_HACK in arch/h8300/include/asm/pgtable.h Signed-off-by: Mike Rapoport ---

[PATCH v3 01/14] arm/arm64: add support for folded p4d page tables

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Implement primitives necessary for the 4th level folding, add walks of p4d level where appropriate, replace 5level-fixup.h with pgtable-nop4d.h and remove __ARCH_USE_5LEVEL_HACK. Since arm and arm64 share kvm memory management bits, make the conversion for both variants at on

[PATCH v3 00/14] mm: remove __ARCH_HAS_5LEVEL_HACK

2020-02-27 Thread Mike Rapoport
From: Mike Rapoport Hi, These patches convert several architectures to use page table folding and remove __ARCH_HAS_5LEVEL_HACK along with include/asm-generic/5level-fixup.h and include/asm-generic/pgtable-nop4d-hack.h. With that we'll have a single and consistent way of dealing with page table

Re: [PATCH v3 15/27] powerpc/powernv/pmem: Add support for near storage commands

2020-02-27 Thread Andrew Donnellan
On 21/2/20 2:27 pm, Alastair D'Silva wrote:> +int ns_response_handled(const struct ocxlpmem *ocxlpmem) +{ + return ocxl_global_mmio_set64(ocxlpmem->ocxl_afu, GLOBAL_MMIO_CHIC, + OCXL_LITTLE_ENDIAN, GLOBAL_MMIO_CHI_NSCRA); +} Same comment as on the last

Re: [PATCH v3 14/27] powerpc/powernv/pmem: Add support for Admin commands

2020-02-27 Thread Andrew Donnellan
On 27/2/20 7:22 pm, Andrew Donnellan wrote: +int admin_command_request(struct ocxlpmem *ocxlpmem, u8 op_code) +{ +    u64 val; +    int rc = ocxl_global_mmio_read64(ocxlpmem->ocxl_afu, GLOBAL_MMIO_CHI, + OCXL_LITTLE_ENDIAN, &val); +    if (rc) +    return rc; Ignoring

Re: [PATCH v3 14/27] powerpc/powernv/pmem: Add support for Admin commands

2020-02-27 Thread Andrew Donnellan
On 21/2/20 2:27 pm, Alastair D'Silva wrote: From: Alastair D'Silva This patch requests the metadata required to issue admin commands, as well as some helper functions to construct and check the completion of the commands. Signed-off-by: Alastair D'Silva --- arch/powerpc/platforms/powernv/pm

<    1   2