[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 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

[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 |

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, ); +    if (rc) +    return rc; Ignoring the

[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

[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

[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 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 +++--

[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 --

[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 -

[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

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 ---

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

[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

[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 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 --

[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 ++--

[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 ---

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

[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

[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

[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 13/13] powerpc/ptrace: move ptrace_triggered() into hw_breakpoint.c

2020-02-27 Thread Christophe Leroy
ptrace_triggered() is declared in asm/hw_breakpoint.h and only needed when CONFIG_HW_BREAKPOINT is set, so move it into hw_breakpoint.c Signed-off-by: Christophe Leroy --- v4: removing inclusing of hw_breakpoint.h now. Previously it was done too early. --- arch/powerpc/kernel/hw_breakpoint.c |

[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

[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

[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

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

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 *

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

[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

[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 +++

[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

[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-20200

[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 +

Re: [PATCH] powerpc/watchpoint: Don't call dar_within_range() for Book3S

2020-02-27 Thread Michael Ellerman
On Sat, 2020-02-22 at 08:20:49 UTC, Ravi Bangoria wrote: > DAR is set to the first byte of overlap between actual access and > watched range at DSI on Book3S processor. But actual access range > might or might not be within user asked range. So for Book3S, it > must not call dar_within_range(). >

[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

[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

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-27 Thread Michal Hocko
On Wed 26-02-20 22:45:52, Vlastimil Babka wrote: > On 2/26/20 7:41 PM, Michal Hocko wrote: > > On Wed 26-02-20 18:25:28, Cristopher Lameter wrote: > >> On Mon, 24 Feb 2020, Michal Hocko wrote: > >> > >>> Hmm, nasty. Is there any reason why kmalloc_node behaves differently > >>> from the page

[PATCH v4 12/13] powerpc/ptrace: create ppc_gethwdinfo()

2020-02-27 Thread Christophe Leroy
Create ippc_gethwdinfo() to handle PPC_PTRACE_GETHWDBGINFO and reduce ifdef mess Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/ptrace/ptrace-adv.c | 15 +++ arch/powerpc/kernel/ptrace/ptrace-decl.h | 1 + arch/powerpc/kernel/ptrace/ptrace-noadv.c | 20 ++

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-27 Thread Michal Hocko
On Wed 26-02-20 23:29:24, Vlastimil Babka wrote: > On 2/26/20 10:45 PM, Vlastimil Babka wrote: > > > > > > if (node == NUMA_NO_NODE) > > page = alloc_pages(flags, order); > > else > > page = __alloc_pages_node(node, flags, order); > > > > So yeah looks like SLUB's kmalloc_node() is

Re: [PATCH] powerpc: Include .BTF section

2020-02-27 Thread Michael Ellerman
On Thu, 2020-02-20 at 11:31:32 UTC, "Naveen N. Rao" wrote: > Selecting CONFIG_DEBUG_INFO_BTF results in the below warning from ld: > ld: warning: orphan section `.BTF' from `.btf.vmlinux.bin.o' being placed > in section `.BTF' > > Include .BTF section in vmlinux explicitly to fix the same. >

Re: [PATCH v3 07/14] powerpc/traps: Check for prefixed instructions in facility_unavailable_exception()

2020-02-27 Thread Nicholas Piggin
Jordan Niethe's on February 27, 2020 9:52 am: > On Wed, Feb 26, 2020 at 5:53 PM Nicholas Piggin wrote: >> >> Jordan Niethe's on February 26, 2020 2:07 pm: >> > If prefixed instructions are made unavailable by the [H]FSCR, attempting >> > to use them will cause a facility unavailable exception.

Re: [PATCH v3 11/14] powerpc/kprobes: Support kprobes on prefixed instructions

2020-02-27 Thread Nicholas Piggin
Nicholas Piggin's on February 28, 2020 11:47 am: > Jordan Niethe's on February 27, 2020 10:58 am: >> On Wed, Feb 26, 2020 at 6:18 PM Nicholas Piggin wrote: >> + >> +#define DEREF_PPC_INST_PTR(ptr)\ >> +({\ >> +ppc_inst __inst;\ >> +

Re: [PATCH v4 13/13] powerpc/ptrace: move ptrace_triggered() into hw_breakpoint.c

2020-02-27 Thread Andrew Donnellan
On 28/2/20 9:16 am, Michael Ellerman wrote: Christophe Leroy writes: Russel, Le 27/02/2020 à 12:49, Christophe Leroy a écrit : ptrace_triggered() is declared in asm/hw_breakpoint.h and only needed when CONFIG_HW_BREAKPOINT is set, so move it into hw_breakpoint.c My series v4 is definitely

Re: [PATCH 1/3] powerpc/of: split out new_property() for reusing

2020-02-27 Thread Andrew Donnellan
On 28/2/20 4:53 pm, Pingfan Liu wrote: Since new_property() is used in several calling sites, splitting it out for reusing. To ease the review, although the split out part has coding style issue, keeping it untouched and fixed in next patch. Signed-off-by: Pingfan Liu To:

Re: [PATCH 1/3] powerpc/of: split out new_property() for reusing

2020-02-27 Thread Pingfan Liu
On Fri, Feb 28, 2020 at 2:03 PM Andrew Donnellan wrote: > > On 28/2/20 4:53 pm, Pingfan Liu wrote: > > Since new_property() is used in several calling sites, splitting it out for > > reusing. > > > > To ease the review, although the split out part has coding style issue, > > keeping it untouched

Re: [PATCH v3 25/27] powerpc/powernv/pmem: Expose the serial number in sysfs

2020-02-27 Thread Greg Kroah-Hartman
On Fri, Feb 28, 2020 at 05:25:31PM +1100, Andrew Donnellan wrote: > On 21/2/20 2:27 pm, Alastair D'Silva wrote: > > +int ocxlpmem_sysfs_add(struct ocxlpmem *ocxlpmem) > > +{ > > + int i, rc; > > + > > + for (i = 0; i < ARRAY_SIZE(attrs); i++) { > > + rc = device_create_file(>dev,

Re: [PATCH v3 22/27] powerpc/powernv/pmem: Implement the heartbeat command

2020-02-27 Thread Andrew Donnellan
On 21/2/20 2:27 pm, Alastair D'Silva wrote: From: Alastair D'Silva The heartbeat admin command is a simple admin command that exercises the communication mechanisms within the controller. This patch issues a heartbeat command to the card during init to ensure we can communicate with the

Re: [PATCH v3 11/14] powerpc/kprobes: Support kprobes on prefixed instructions

2020-02-27 Thread Jordan Niethe
On Fri, Feb 28, 2020 at 12:48 PM Nicholas Piggin wrote: > > Jordan Niethe's on February 27, 2020 10:58 am: > > On Wed, Feb 26, 2020 at 6:18 PM Nicholas Piggin wrote: > >> > >> Jordan Niethe's on February 26, 2020 2:07 pm: > >> > @@ -136,11 +148,14 @@ int arch_prepare_kprobe(struct kprobe *p) >

[PATCH 1/1] powerpc/kernel: Enables memory hot-remove after reboot on pseries guests

2020-02-27 Thread Leonardo Bras
While providing guests, it's desirable to resize it's memory on demand. By now, it's possible to do so by creating a guest with a small base memory, hot-plugging all the rest, and using 'movable_node' kernel command-line parameter, which puts all hot-plugged memory in ZONE_MOVABLE, allowing it to

Re: [PATCH v3 25/27] powerpc/powernv/pmem: Expose the serial number in sysfs

2020-02-27 Thread Andrew Donnellan
On 21/2/20 2:27 pm, Alastair D'Silva wrote: +int ocxlpmem_sysfs_add(struct ocxlpmem *ocxlpmem) +{ + int i, rc; + + for (i = 0; i < ARRAY_SIZE(attrs); i++) { + rc = device_create_file(>dev, [i]); + if (rc) { + for (; --i >= 0;) +

Re: [PATCH 1/3] powerpc/of: split out new_property() for reusing

2020-02-27 Thread Christophe Leroy
Le 28/02/2020 à 06:53, Pingfan Liu a écrit : Since new_property() is used in several calling sites, splitting it out for reusing. To ease the review, although the split out part has coding style issue, keeping it untouched and fixed in next patch. The moved function fits in one screen. I

Re: [PATCH v3 2/4] ASoC: fsl_asrc: Move common definition to fsl_asrc_common

2020-02-27 Thread Shengjiu Wang
On Fri, Feb 28, 2020 at 2:41 AM Nicolin Chen wrote: > > On Thu, Feb 27, 2020 at 10:41:56AM +0800, Shengjiu Wang wrote: > > There is a new ASRC included in i.MX serial platform, there > > are some common definition can be shared with each other. > > So move the common definition to a separate

[PATCH 2/2] powerpc/powernv: Wire up OPAL address lookups

2020-02-27 Thread Nicholas Piggin
Use ARCH_HAS_ADDRESS_LOOKUP to look up the opal symbol table. This allows crashes and xmon debugging to print firmware symbols. Oops: System Reset, sig: 6 [#1] LE PAGE_SIZE=64K MMU=Radix SMP NR_CPUS=2048 NUMA PowerNV Modules linked in: CPU: 0 PID: 0 Comm: swapper/0 Not tainted

Re: [PATCH v3 11/14] powerpc/kprobes: Support kprobes on prefixed instructions

2020-02-27 Thread Nicholas Piggin
Jordan Niethe's on February 28, 2020 1:23 pm: > On Fri, Feb 28, 2020 at 12:48 PM Nicholas Piggin wrote: >> >> Jordan Niethe's on February 27, 2020 10:58 am: >> > On Wed, Feb 26, 2020 at 6:18 PM Nicholas Piggin wrote: >> >> >> >> Jordan Niethe's on February 26, 2020 2:07 pm: >> >> > @@ -136,11

Re: [PATCH v3 0/6] implement KASLR for powerpc/fsl_booke/64

2020-02-27 Thread Jason Yan
在 2020/2/28 13:53, Scott Wood 写道: On Wed, 2020-02-26 at 16:18 +0800, Jason Yan wrote: Hi Daniel, 在 2020/2/26 15:16, Daniel Axtens 写道: Hi Jason, This is a try to implement KASLR for Freescale BookE64 which is based on my earlier implementation for Freescale BookE32:

Re: [PATCH v3 1/4] ASoC: fsl_asrc: Change asrc_width to asrc_format

2020-02-27 Thread Shengjiu Wang
On Fri, Feb 28, 2020 at 2:40 PM Nicolin Chen wrote: > > On Fri, Feb 28, 2020 at 10:54:02AM +0800, Shengjiu Wang wrote: > > Hi > > > > On Fri, Feb 28, 2020 at 1:45 AM Nicolin Chen wrote: > > > > > > On Thu, Feb 27, 2020 at 01:10:19PM +0800, Shengjiu Wang wrote: > > > > On Thu, Feb 27, 2020 at

[PATCH v3 1/2] powerpc/perf: Implement a global lock to avoid races between trace, core and thread imc events.

2020-02-27 Thread Anju T Sudhakar
IMC(In-memory Collection Counters) does performance monitoring in two different modes, i.e accumulation mode(core-imc and thread-imc events), and trace mode(trace-imc events). A cpu thread can either be in accumulation-mode or trace-mode at a time and this is done via the LDBAR register in POWER

[PATCH v3 2/2] powerpc/powernv: Re-enable imc trace-mode in kernel

2020-02-27 Thread Anju T Sudhakar
commit <249fad734a25> ""powerpc/perf: Disable trace_imc pmu" disables IMC(In-Memory Collection) trace-mode in kernel, since frequent mode switching between accumulation mode and trace mode via the spr LDBAR in the hardware can trigger a checkstop(system crash). Patch to re-enable imc-trace mode

Re: [PATCH v3 11/14] powerpc/kprobes: Support kprobes on prefixed instructions

2020-02-27 Thread Nicholas Piggin
Jordan Niethe's on February 27, 2020 10:58 am: > On Wed, Feb 26, 2020 at 6:18 PM Nicholas Piggin wrote: >> >> Jordan Niethe's on February 26, 2020 2:07 pm: >> > @@ -136,11 +148,14 @@ int arch_prepare_kprobe(struct kprobe *p) >> > } >> > >> > if (!ret) { >> > -

Re: [PATCH v3 1/4] ASoC: fsl_asrc: Change asrc_width to asrc_format

2020-02-27 Thread Nicolin Chen
On Fri, Feb 28, 2020 at 10:54:02AM +0800, Shengjiu Wang wrote: > Hi > > On Fri, Feb 28, 2020 at 1:45 AM Nicolin Chen wrote: > > > > On Thu, Feb 27, 2020 at 01:10:19PM +0800, Shengjiu Wang wrote: > > > On Thu, Feb 27, 2020 at 11:43 AM Nicolin Chen > > > wrote: > > > > > > > > On Thu, Feb 27,

[PATCH] powerpc/perf: Use SIER_USER_MASK while updating SPRN_SIER for EBB events

2020-02-27 Thread Athira Rajeev
commit 330a1eb7775b ("powerpc/perf: Core EBB support for 64-bit book3s") defines user mask for SIER. But this is not used in ebb_switch_out while saving SPR's. Patch fixes this by updating SPRN_SIER with the user mask. Fixes: 330a1eb7775b ("powerpc/perf: Core EBB support for 64-bit book3s")

Re: [PATCH v3 01/14] powerpc: Enable Prefixed Instructions

2020-02-27 Thread Jordan Niethe
On Wed, Feb 26, 2020 at 5:50 PM Nicholas Piggin wrote: > > Jordan Niethe's on February 26, 2020 2:07 pm: > > From: Alistair Popple > > > > Prefix instructions have their own FSCR bit which needs to enabled via > > a CPU feature. The kernel will save the FSCR for problem state but it > > needs to

Re: [PATCH v3 1/4] ASoC: fsl_asrc: Change asrc_width to asrc_format

2020-02-27 Thread Shengjiu Wang
Hi On Fri, Feb 28, 2020 at 1:45 AM Nicolin Chen wrote: > > On Thu, Feb 27, 2020 at 01:10:19PM +0800, Shengjiu Wang wrote: > > On Thu, Feb 27, 2020 at 11:43 AM Nicolin Chen > > wrote: > > > > > > On Thu, Feb 27, 2020 at 10:41:55AM +0800, Shengjiu Wang wrote: > > > > asrc_format is more

[PATCH] Add OPAL_GET_SYMBOL / OPAL_LOOKUP_SYMBOL

2020-02-27 Thread Nicholas Piggin
These calls can be used by Linux to annotate BUG addresses with symbols, look up symbol addresses in xmon, etc. This is preferable over having Linux parse the OPAL symbol map itself, because OPAL's parsing code already exists for its own symbol printing, and it can support other code regions than

[PATCH 1/2] kallsyms: architecture specific symbol lookups

2020-02-27 Thread Nicholas Piggin
Provide CONFIG_ARCH_HAS_ADDRESS_LOOKUP which allows architectures to do their own symbol/address lookup if kernel and module lookups miss. powerpc will use this to deal with firmware symbols. Signed-off-by: Nicholas Piggin --- include/linux/kallsyms.h | 20

Re: [PATCH v4 13/13] powerpc/ptrace: move ptrace_triggered() into hw_breakpoint.c

2020-02-27 Thread Russell Currey
This was my fault, I should really test changes like these before they go live. Apologies for the confusion caused -- Russell Currey rus...@russell.cc On Fri, Feb 28, 2020, at 2:59 PM, Andrew Donnellan wrote: > On 28/2/20 9:16 am, Michael Ellerman wrote: > > Christophe Leroy writes: > >>

[PATCH 1/3] powerpc/of: split out new_property() for reusing

2020-02-27 Thread Pingfan Liu
Since new_property() is used in several calling sites, splitting it out for reusing. To ease the review, although the split out part has coding style issue, keeping it untouched and fixed in next patch. Signed-off-by: Pingfan Liu To: linuxppc-dev@lists.ozlabs.org Cc: Benjamin Herrenschmidt Cc:

[PATCH 3/3] pseries/scm: buffer pmem's bound addr in dt for kexec kernel

2020-02-27 Thread Pingfan Liu
At present, plpar_hcall(H_SCM_BIND_MEM, ...) takes a very long time, so if dumping to fsdax, it will take a very long time. Take a closer look, during the papr_scm initialization, the only configuration is through drc_pmem_bind()-> plpar_hcall(H_SCM_BIND_MEM, ...), which helps to set up the bound

[PATCH 2/3] powerpc/of: coding style cleanup

2020-02-27 Thread Pingfan Liu
Signed-off-by: Pingfan Liu To: linuxppc-dev@lists.ozlabs.org Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Michael Ellerman Cc: Hari Bathini Cc: Aneesh Kumar K.V Cc: Oliver O'Halloran Cc: Dan Williams Cc: ke...@lists.infradead.org --- arch/powerpc/kernel/of_property.c | 8 +--- 1

Re: [PATCH v3 21/27] powerpc/powernv/pmem: Add an IOCTL to request controller health & perf data

2020-02-27 Thread Andrew Donnellan
On 21/2/20 2:27 pm, Alastair D'Silva wrote: From: Alastair D'Silva When health & performance data is requested from the controller, it responds with an error log containing the requested information. This patch allows the request to me issued via an IOCTL. A better explanation would be good

Re: [PATCH v3 0/6] implement KASLR for powerpc/fsl_booke/64

2020-02-27 Thread Scott Wood
On Wed, 2020-02-26 at 16:18 +0800, Jason Yan wrote: > Hi Daniel, > > 在 2020/2/26 15:16, Daniel Axtens 写道: > > Hi Jason, > > > > > This is a try to implement KASLR for Freescale BookE64 which is based on > > > my earlier implementation for Freescale BookE32: > > >

Re: [PATCH v3 09/14] powerpc/xmon: Add initial support for prefixed instructions

2020-02-27 Thread Nicholas Piggin
Jordan Niethe's on February 28, 2020 10:37 am: > On Thu, Feb 27, 2020 at 6:14 PM Christophe Leroy > wrote: >> >> >> >> Le 27/02/2020 à 01:11, Jordan Niethe a écrit : >> > On Wed, Feb 26, 2020 at 6:10 PM Nicholas Piggin wrote: >> >> >> >> Jordan Niethe's on February 26, 2020 2:07 pm: >> >>> A

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

2020-02-27 Thread kbuild test robot
Hi Christophe, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on v5.6-rc3 next-20200227] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base

Re: [PATCH v3 01/14] powerpc: Enable Prefixed Instructions

2020-02-27 Thread Nicholas Piggin
Jordan Niethe's on February 28, 2020 12:52 pm: > On Wed, Feb 26, 2020 at 5:50 PM Nicholas Piggin wrote: >> >> Jordan Niethe's on February 26, 2020 2:07 pm: >> > From: Alistair Popple >> > >> > Prefix instructions have their own FSCR bit which needs to enabled via >> > a CPU feature. The kernel

Re: [PATCH 3/3] pseries/scm: buffer pmem's bound addr in dt for kexec kernel

2020-02-27 Thread Christophe Leroy
Le 28/02/2020 à 06:53, Pingfan Liu a écrit : At present, plpar_hcall(H_SCM_BIND_MEM, ...) takes a very long time, so if dumping to fsdax, it will take a very long time. Take a closer look, during the papr_scm initialization, the only configuration is through drc_pmem_bind()->

[PATCH, v2] powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems

2020-02-27 Thread Desnes A. Nunes do Rosario
PowerVM systems running compatibility mode on a few Power8 revisions are still vulnerable to the hardware defect that loses PMU exceptions arriving prior to a context switch. The software fix for this issue is enabled through the CPU_FTR_PMAO_BUG cpu_feature bit, nevertheless this bit also needs

[PATCH] selftest/lkdtm: Use local .gitignore

2020-02-27 Thread Christophe Leroy
Commit 68ca0fd272da ("selftest/lkdtm: Don't pollute 'git status'") introduced patterns for git to ignore files generated in tools/testing/selftests/lkdtm/ Use local .gitignore file instead of using the root one. Fixes: 68ca0fd272da ("selftest/lkdtm: Don't pollute 'git status'") Signed-off-by:

Re: [PATCH, v2] powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems

2020-02-27 Thread Leonardo Bras
On Thu, 2020-02-27 at 10:47 -0300, Desnes A. Nunes do Rosario wrote: > PowerVM systems running compatibility mode on a few Power8 revisions are > still vulnerable to the hardware defect that loses PMU exceptions arriving > prior to a context switch. > > The software fix for this issue is enabled

Re: [PATCH] powerpc: fix hardware PMU exception bug on PowerVM compatibility mode systems

2020-02-27 Thread Desnes Augusto Nunes do Rosario
Hello Leonardo, On 2/15/20 2:39 AM, Leonardo Bras wrote: Hello Desnes, thanks for the patch. "Desnes A. Nunes do Rosario" writes: PowerVM systems running compatibility mode on a few Power8 revisions are still vulnerable to the hardware defect that loses PMU exceptions arriving prior to a

[Bug 206669] Little-endian kernel crashing on POWER8 on heavy big-endian PowerKVM load

2020-02-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=206669 --- Comment #7 from John Paul Adrian Glaubitz (glaub...@physik.fu-berlin.de) --- I have set /sys/kernel/debug/tracing/tracing_on to "0" and /sys/kernel/debug/tracing/free_buffer to "1" and it seems I can no longer reproduce the issue. I will

Re: [PATCH] selftest/lkdtm: Use local .gitignore

2020-02-27 Thread Christophe Leroy
Le 27/02/2020 à 17:45, Shuah Khan a écrit : On 2/27/20 9:17 AM, Kees Cook wrote: On Thu, Feb 27, 2020 at 02:07:10PM +, Christophe Leroy wrote: Commit 68ca0fd272da ("selftest/lkdtm: Don't pollute 'git status'") introduced patterns for git to ignore files generated in

Re: [PATCH] selftests/vm: Fix map_hugetlb length used for testing read and write

2020-02-27 Thread Christophe Leroy
Shuah, Le 06/02/2020 à 09:42, Christophe Leroy a écrit : Commit fa7b9a805c79 ("tools/selftest/vm: allow choosing mem size and page size in map_hugetlb") added the possibility to change the size of memory mapped for the test, but left the read and write test using the default value. This is

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-27 Thread Vlastimil Babka
I would have expected. That seems to confirm my suspicion that the arch code doesn't set up the memoryless node 0 properly. > [0.005270] CPU: 12 PID: 0 Comm: swapper/12 Not tainted > 5.6.0-rc3-next-20200227-autotest+ #6 > [0.005271] Call Trace: > [0.005272] [c008b37dfe80

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

2020-02-27 Thread Dan Williams
On Thu, Feb 20, 2020 at 7:28 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. What are the admin commands? Any pointer to a

Re: [PATCH v4 13/13] powerpc/ptrace: move ptrace_triggered() into hw_breakpoint.c

2020-02-27 Thread Christophe Leroy
Russel, Le 27/02/2020 à 12:49, Christophe Leroy a écrit : ptrace_triggered() is declared in asm/hw_breakpoint.h and only needed when CONFIG_HW_BREAKPOINT is set, so move it into hw_breakpoint.c My series v4 is definitely buggy (I included ptrace_decl.h instead instead of ptrace-decl.h), how

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-27 Thread Sachin Sant
have also attached boot log with a kernel that include about change. I see the following o/p during boot: [0.005269] set_numa_mem 1 -> 1 [0.005270] CPU: 12 PID: 0 Comm: swapper/12 Not tainted 5.6.0-rc3-next-20200227-autotest+ #6 [0.005271] Call Trace: [0.005272] [c

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

2020-02-27 Thread Dan Williams
On Thu, Feb 20, 2020 at 7:28 PM Alastair D'Silva wrote: > > From: Alastair D'Silva > > Similar to the previous patch, this adds support for near storage commands. Similar comment as the last patch. This changelog does not give the reviewer any frame of reference to review the patch.

Re: [PATCH] selftest/lkdtm: Use local .gitignore

2020-02-27 Thread Kees Cook
On Thu, Feb 27, 2020 at 02:07:10PM +, Christophe Leroy wrote: > Commit 68ca0fd272da ("selftest/lkdtm: Don't pollute 'git status'") > introduced patterns for git to ignore files generated in > tools/testing/selftests/lkdtm/ > > Use local .gitignore file instead of using the root one. > >

Re: [PATCH] selftest/lkdtm: Use local .gitignore

2020-02-27 Thread Shuah Khan
On 2/27/20 9:17 AM, Kees Cook wrote: On Thu, Feb 27, 2020 at 02:07:10PM +, Christophe Leroy wrote: Commit 68ca0fd272da ("selftest/lkdtm: Don't pollute 'git status'") introduced patterns for git to ignore files generated in tools/testing/selftests/lkdtm/ Use local .gitignore file instead of

Re: [PATCH v3 0/7] Allow setting caching mode in arch_add_memory() for P2PDMA

2020-02-27 Thread Jason Gunthorpe
On Fri, Feb 21, 2020 at 11:24:56AM -0700, Logan Gunthorpe wrote: > Hi, > > This is v3 of the patchset which cleans up a number of minor issues > from the feedback of v2 and rebases onto v5.6-rc2. Additional feedback > is welcome. > > Thanks, > > Logan > > -- > > Changes in v3: > * Rebased

Re: [PATCH v3 10/27] powerpc: Add driver for OpenCAPI Persistent Memory

2020-02-27 Thread Frederic Barrat
Le 21/02/2020 à 04:27, Alastair D'Silva a écrit : From: Alastair D'Silva This driver exposes LPC memory on OpenCAPI pmem cards as an NVDIMM, allowing the existing nvram infrastructure to be used. Namespace metadata is stored on the media itself, so scm_reserve_metadata() maps 1 section's

Re: [PATCH v3 0/7] Allow setting caching mode in arch_add_memory() for P2PDMA

2020-02-27 Thread Jason Gunthorpe
On Thu, Feb 27, 2020 at 10:21:50AM -0700, Logan Gunthorpe wrote: > > > On 2020-02-27 10:17 a.m., Jason Gunthorpe wrote: > >> Instead of this, this series proposes a change to arch_add_memory() > >> to take the pgprot required by the mapping which allows us to > >> explicitly set pagetable

Re: [PATCH v3 1/4] ASoC: fsl_asrc: Change asrc_width to asrc_format

2020-02-27 Thread Nicolin Chen
On Thu, Feb 27, 2020 at 01:10:19PM +0800, Shengjiu Wang wrote: > On Thu, Feb 27, 2020 at 11:43 AM Nicolin Chen wrote: > > > > On Thu, Feb 27, 2020 at 10:41:55AM +0800, Shengjiu Wang wrote: > > > asrc_format is more inteligent variable, which is align > > > with the alsa definition

Re: [PATCH v3 0/7] Allow setting caching mode in arch_add_memory() for P2PDMA

2020-02-27 Thread Logan Gunthorpe
On 2020-02-27 10:17 a.m., Jason Gunthorpe wrote: >> Instead of this, this series proposes a change to arch_add_memory() >> to take the pgprot required by the mapping which allows us to >> explicitly set pagetable entries for P2PDMA memory to WC. > > Is there a particular reason why WC was

Re: [PATCH v3 0/7] Allow setting caching mode in arch_add_memory() for P2PDMA

2020-02-27 Thread Logan Gunthorpe
On 2020-02-27 10:43 a.m., Jason Gunthorpe wrote: > Hm, AFAIK WC memory is not compatible with the spinlocks/mutexs/etc in > Linux, so while it is true the memory has no side effects, there would > be surprising concurrency risks if anything in the kernel tried to > write to it. > > Not

Re: [5.6.0-rc2-next-20200218/powerpc] Boot failure on POWER9

2020-02-27 Thread Michal Hocko
slab allocator bebcause node_to_mem_node(0) for memory less node resolves to the memory less node http://lkml.kernel.org/r/dd450314-d428-6776-af07-f92c04c7b...@suse.cz. The original report is http://lkml.kernel.org/r/3381cd91-ab3d-4773-ba04-e7a072a63...@linux.vnet.ibm.com > > >

Re: [PATCH v3 2/4] ASoC: fsl_asrc: Move common definition to fsl_asrc_common

2020-02-27 Thread Nicolin Chen
On Thu, Feb 27, 2020 at 10:41:56AM +0800, Shengjiu Wang wrote: > There is a new ASRC included in i.MX serial platform, there > are some common definition can be shared with each other. > So move the common definition to a separate header file. > > And add fsl_asrc_pair_internal and

Re: [PATCH v3 0/7] Allow setting caching mode in arch_add_memory() for P2PDMA

2020-02-27 Thread Jason Gunthorpe
On Thu, Feb 27, 2020 at 09:55:04AM -0800, Dan Williams wrote: > On Thu, Feb 27, 2020 at 9:43 AM Jason Gunthorpe wrote: > > > > On Thu, Feb 27, 2020 at 10:21:50AM -0700, Logan Gunthorpe wrote: > > > > > > > > > On 2020-02-27 10:17 a.m., Jason Gunthorpe wrote: > > > >> Instead of this, this series

Re: [PATCH v3 0/7] Allow setting caching mode in arch_add_memory() for P2PDMA

2020-02-27 Thread Dan Williams
On Thu, Feb 27, 2020 at 10:03 AM Jason Gunthorpe wrote: > > On Thu, Feb 27, 2020 at 09:55:04AM -0800, Dan Williams wrote: > > On Thu, Feb 27, 2020 at 9:43 AM Jason Gunthorpe wrote: > > > > > > On Thu, Feb 27, 2020 at 10:21:50AM -0700, Logan Gunthorpe wrote: > > > > > > > > > > > > On 2020-02-27

  1   2   >