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

2020-03-26 Thread Zi Yan
On 25 Mar 2020, at 22:18, Anshuman Khandual wrote: > External email: Use caution opening links or attachments > > > On 03/24/2020 06:59 PM, Zi Yan wrote: >> On 24 Mar 2020, at 1:22, Anshuman Khandual wrote: >> >>> This adds new tests validating arch page table helpers for these following >>> core

[PATCH v4] powerpc/pseries: Handle UE event for memcpy_mcsafe

2020-03-26 Thread Ganesh Goudar
memcpy_mcsafe has been implemented for power machines which is used by pmem infrastructure, so that an UE encountered during memcpy from pmem devices would not result in panic instead a right error code is returned. The implementation expects machine check handler to ignore the event and set nip

[PATCH] Fix 4 "[v3, 28/32] powerpc/64s: interrupt implement exit logic in C"

2020-03-26 Thread Nicholas Piggin
The return-to-kernel path has to replay any soft-pending interrupts if it is returning to a context that had interrupts soft-enabled. It has to do this carefully and avoid plain enabling interrupts if this is an irq context, which can cause multiple nesting of interrupts on the stack, and other

Re: [PATCH v2] mm/sparse: Fix kernel crash with pfn_section_valid check

2020-03-26 Thread Pankaj Gupta
> > Fixes the below crash > > BUG: Kernel NULL pointer dereference on read at 0x > Faulting instruction address: 0xc0c3447c > Oops: Kernel access of bad area, sig: 11 [#1] > LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries > CPU: 11 PID: 7519 Comm: lt-ndctl Not tainted

[PATCH] powerpc/64: Fix section mismatch warnings.

2020-03-26 Thread Michal Suchanek
Fixes the following warnings: WARNING: vmlinux.o(.text+0x2d24): Section mismatch in reference from the variable __boot_from_prom to the function .init.text:prom_init() The function __boot_from_prom() references the function __init prom_init(). This is often because __boot_from_prom lacks a

Re: [PATCH] powerpc/64: Fix section mismatch warnings.

2020-03-26 Thread Naveen N. Rao
Michal Suchanek wrote: Fixes the following warnings: WARNING: vmlinux.o(.text+0x2d24): Section mismatch in reference from the variable __boot_from_prom to the function .init.text:prom_init() The function __boot_from_prom() references the function __init prom_init(). This is often because

Re: [powerpc] Intermittent crashes ( link_path_walk) with linux-next

2020-03-26 Thread Sachin Sant
walk(), it's handle_dots() > ignoring an error returned by step_into(). > > commit 5e3c3570ec97 is the broken one; commit 20971012f63e is its variant > with the > fix folded in. So next-20200325 has the bug and next-20200326 should have it > fixed. Could you check the current -

Re: [PATCH v2 12/12] powerpc/64s: system reset do not trace

2020-03-26 Thread Naveen N. Rao
Nicholas Piggin wrote: Similarly to the previous patch, do not trace system reset. This code is used when there is a crash or hang, and tracing disturbs the system more and has been known to crash in the crash handling path. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/traps.c | 5

Re: [RFC PATCH 1/1] ppc/smp: Replace unnecessary 'while' by 'if'

2020-03-26 Thread Paul Mackerras
On Thu, Mar 26, 2020 at 05:37:52PM -0300, Leonardo Bras wrote: > spin_until_cond() will wait until nmi_ipi_busy == false, and > nmi_ipi_lock_start() does not seem to change nmi_ipi_busy, so there is > no way this while will ever repeat. > > Replace this 'while' by an 'if', so it does not look

Re: [PATCH v2] powerpc/boot: Delete unneeded .globl _zimage_start

2020-03-26 Thread Segher Boessenkool
On Wed, Mar 25, 2020 at 09:42:57AM -0700, Fangrui Song wrote: > .globl sets the symbol binding to STB_GLOBAL while .weak sets the > binding to STB_WEAK. GNU as let .weak override .globl since binutils-gdb > 5ca547dc2399a0a5d9f20626d4bf5547c3ccfddd (1996). Clang integrated > assembler let the last

Re: [RFC 00/11] perf: Enhancing perf to export processor hazard information

2020-03-26 Thread Kim Phillips
On 3/26/20 5:19 AM, maddy wrote: > > > On 3/18/20 11:05 PM, Kim Phillips wrote: >> Hi Maddy, >> >> On 3/17/20 1:50 AM, maddy wrote: >>> On 3/13/20 4:08 AM, Kim Phillips wrote: On 3/11/20 11:00 AM, Ravi Bangoria wrote: > On 3/6/20 3:36 AM, Kim Phillips wrote: >>> On 3/3/20 3:55

[RFC PATCH 1/1] ppc/smp: Replace unnecessary 'while' by 'if'

2020-03-26 Thread Leonardo Bras
spin_until_cond() will wait until nmi_ipi_busy == false, and nmi_ipi_lock_start() does not seem to change nmi_ipi_busy, so there is no way this while will ever repeat. Replace this 'while' by an 'if', so it does not look like it can repeat. Signed-off-by: Leonardo Bras ---

[PATCH 1/1] ppc/crash: Skip spinlocks during crash

2020-03-26 Thread Leonardo Bras
During a crash, there is chance that the cpus that handle the NMI IPI are holding a spin_lock. If this spin_lock is needed by crashing_cpu it will cause a deadlock. (rtas_lock and printk logbuf_log as of today) This is a problem if the system has kdump set up, given if it crashes for any reason

Re: [PATCH] powerpc/64: Fix section mismatch warnings.

2020-03-26 Thread Michal Suchánek
On Thu, Mar 26, 2020 at 11:22:03PM +0530, Naveen N. Rao wrote: > Michal Suchanek wrote: > > Fixes the following warnings: > > > > WARNING: vmlinux.o(.text+0x2d24): Section mismatch in reference from the > > variable __boot_from_prom to the function .init.text:prom_init() > > The function

Re: [PATCH 1/4] hugetlbfs: add arch_hugetlb_valid_size

2020-03-26 Thread Mike Kravetz
On 3/18/20 4:36 PM, Dave Hansen wrote: > On 3/18/20 3:52 PM, Mike Kravetz wrote: >> Sounds good. I'll incorporate those changes into a v2, unless someone >> else with has a different opinion. >> >> BTW, this patch should not really change the way the code works today. >> It is mostly a movement

Re: [RFC PATCH 1/1] ppc/smp: Replace unnecessary 'while' by 'if'

2020-03-26 Thread Leonardo Bras
On Fri, 2020-03-27 at 08:40 +1100, Paul Mackerras wrote: > On Thu, Mar 26, 2020 at 05:37:52PM -0300, Leonardo Bras wrote: > > spin_until_cond() will wait until nmi_ipi_busy == false, and > > nmi_ipi_lock_start() does not seem to change nmi_ipi_busy, so there is > > no way this while will ever

Re: [PATCH 1/4] hugetlbfs: add arch_hugetlb_valid_size

2020-03-26 Thread Dave Hansen
On 3/26/20 2:56 PM, Mike Kravetz wrote: > Perhaps it would be best to check hugepages_supported() when parsing > hugetlb command line options. If not enabled, throw an error. This > will be much easier to do after moving all command line parsing to > arch independent code. Yeah, that sounds

[PATCH v2] powerpc xmon: use `dcbf` inplace of `dcbi` instruction for 64bit Book3S

2020-03-26 Thread Balamuruhan S
Data Cache Block Invalidate (dcbi) instruction was implemented back in PowerPC architecture version 2.03. It is obsolete and attempt to use of this illegal instruction results in a hypervisor emulation assistance interrupt. So, ifdef it out the option `i` in xmon for 64bit Book3S. 0:mon> fi cpu

[PATCH] selftests/eeh: Skip ahci adapters

2020-03-26 Thread Michael Ellerman
The ahci driver doesn't support error recovery, and if your root filesystem is attached to it the eeh-basic.sh test will likely kill your machine. So skip any device we see using the ahci driver. Signed-off-by: Michael Ellerman --- tools/testing/selftests/powerpc/eeh/eeh-basic.sh | 5 + 1

Re: [Intel-gfx] [PATCH v7 00/12] Introduce CAP_PERFMON to secure system performance monitoring and observability

2020-03-26 Thread James Morris
On Sun, 1 Mar 2020, Serge Hallyn wrote: > Thanks, this looks good to me, in keeping with the CAP_SYSLOG break. > > Acked-by: Serge E. Hallyn > > for the set. > > James/Ingo/Peter, if noone has remaining objections, whose branch > should these go in through? > > thanks, > -serge > > On Tue,

Re: [PATCH v2 05/12] powerpc/pseries/ras: FWNMI_VALID off by one

2020-03-26 Thread Mahesh J Salgaonkar
On 2020-03-25 20:34:03 Wed, Nicholas Piggin wrote: > This was discovered developing qemu fwnmi sreset support. This > off-by-one bug means the last 16 bytes of the rtas area can not > be used for a 16 byte save area. > > It's not a serious bug, and QEMU implementation has to retain a > workaround

Re: [PATCH v2 04/12] powerpc/pseries/ras: avoid calling rtas_token in NMI paths

2020-03-26 Thread Mahesh J Salgaonkar
On 2020-03-25 20:34:02 Wed, Nicholas Piggin wrote: > In the interest of reducing code and possible failures in the > machine check and system reset paths, grab the "ibm,nmi-interlock" > token at init time. > > Signed-off-by: Nicholas Piggin Reviewed-by: Mahesh Salgaonkar Thanks, -Mahesh. >

Re: [PATCH v2 08/12] powerpc/pseries: limit machine check stack to 4GB

2020-03-26 Thread Mahesh J Salgaonkar
On 2020-03-25 20:34:06 Wed, Nicholas Piggin wrote: > This allows rtas_args to be put on the machine check stack, which > avoids a lot of complications with re-entrancy deadlocks. > > Signed-off-by: Nicholas Piggin > --- > arch/powerpc/kernel/setup_64.c | 15 ++- > 1 file changed, 14

[powerpc:merge] BUILD SUCCESS c6624071c338732402e8c726df6a4074473eaa0e

2020-03-26 Thread kbuild test robot
randconfig-a002-20200326 i386 randconfig-a001-20200326 x86_64 randconfig-a002-20200326 x86_64 randconfig-a001-20200326 i386 randconfig-a003-20200326 x86_64 randconfig-a003-20200326 mips randconfig-a001-20200326 nds32

Re: [PATCH 1/1] ppc/crash: Skip spinlocks during crash

2020-03-26 Thread Leonardo Bras
oops, forgot to EXPORT_SYMBOL. arch_spin_lock*() is used on modules. Sending v2. On Thu, 2020-03-26 at 19:28 -0300, Leonardo Bras wrote: > During a crash, there is chance that the cpus that handle the NMI IPI > are holding a spin_lock. If this spin_lock is needed by crashing_cpu it > will cause

Re: [PATCH v2 01/12] powerpc/64s/exceptions: Fix in_mce accounting in unrecoverable path

2020-03-26 Thread Mahesh J Salgaonkar
On 2020-03-25 20:33:59 Wed, Nicholas Piggin wrote: > Signed-off-by: Nicholas Piggin > --- > arch/powerpc/kernel/exceptions-64s.S | 4 > 1 file changed, 4 insertions(+) > > diff --git a/arch/powerpc/kernel/exceptions-64s.S > b/arch/powerpc/kernel/exceptions-64s.S > index

[powerpc:next] BUILD SUCCESS 7074695ac6fb965d478f373b95bc5c636e9f21b0

2020-03-26 Thread kbuild test robot
fuloong2e_defconfig mips malta_kvm_defconfig pariscallnoconfig parisc allyesconfig pariscgeneric-32bit_defconfig pariscgeneric-64bit_defconfig x86_64 randconfig-a001-20200326 x86_64

Re: [PATCH v2 1/1] ppc/crash: Skip spinlocks during crash

2020-03-26 Thread Michael Ellerman
Hi Leonardo, Leonardo Bras writes: > During a crash, there is chance that the cpus that handle the NMI IPI > are holding a spin_lock. If this spin_lock is needed by crashing_cpu it > will cause a deadlock. (rtas_lock and printk logbuf_log as of today) Please give us more detail on how those

[PATCH v2 1/1] ppc/crash: Skip spinlocks during crash

2020-03-26 Thread Leonardo Bras
During a crash, there is chance that the cpus that handle the NMI IPI are holding a spin_lock. If this spin_lock is needed by crashing_cpu it will cause a deadlock. (rtas_lock and printk logbuf_log as of today) This is a problem if the system has kdump set up, given if it crashes for any reason

Re: [PATCH] x86: Alias memset to __builtin_memset.

2020-03-26 Thread Michael Ellerman
Clement Courbet writes: > I discussed with the original authors who added freestanding to our > build. It turns out that it was added globally but this was just to > to workaround powerpc not compiling under clang, but they felt the > fix was appropriate globally. > > Now Nick has dug up

Re: [PATCH v2] mm/sparse: Fix kernel crash with pfn_section_valid check

2020-03-26 Thread Wei Yang
On Thu, Mar 26, 2020 at 07:02:35PM +0530, Aneesh Kumar K.V wrote: >Fixes the below crash > >BUG: Kernel NULL pointer dereference on read at 0x >Faulting instruction address: 0xc0c3447c >Oops: Kernel access of bad area, sig: 11 [#1] >LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA

[PATCH v6 1/4] Self Save: Introducing Support for SPR Self Save

2020-03-26 Thread Pratik Rajesh Sampat
From: Prem Shanker Jha The commit is a merger of commits that makes the following changes: 1. Commit fixes some issues with code found during integration test - replacement of addi with xor instruction during self save API. - fixing instruction generation for MFMSR during self save -

[PATCH v6 2/3] powerpc/powernv: Introduce support and parsing for self-save API

2020-03-26 Thread Pratik Rajesh Sampat
This commit introduces and leverages the Self save API. The difference between self-save and self-restore is that the value to be saved for the SPR does not need to be passed to the call. Add the new Self Save OPAL API call in the list of OPAL calls. Implement the self saving of the SPRs based on

[PATCH v6 3/3] powerpc/powernv: Preference optimization for SPRs with constant values

2020-03-26 Thread Pratik Rajesh Sampat
There are SPRs whose values don't tend to change over time and invoking self-save on them, where the values are gotten each time may turn out to be inefficient. In that case calling a self-restore where passing the value makes more sense as, if the value is same the memory location is not updated.

Re: [PATCH v2] powerpc/XIVE: SVM: share the event-queue page with the Hypervisor.

2020-03-26 Thread Cédric Le Goater
On 3/26/20 9:38 AM, Ram Pai wrote: > XIVE interrupt controller use an Event Queue (EQ) to enqueue event The XIVE interrupt controller uses ... (my bad) > notifications when an exception occurs. The EQ is a single memory page > provided by the O/S defining a circular buffer, one per server and >

[PATCH v6 4/4] Advertise the self-save and self-restore attributes in the device tree

2020-03-26 Thread Pratik Rajesh Sampat
Support for self save and self restore interface is advertised in the device tree, along with the list of SPRs it supports for each. The Special Purpose Register identification is encoded in a 2048 bitmask structure, where each bit signifies the identification key of that SPR which is consistent

[PATCH v2] powerpc/XIVE: SVM: share the event-queue page with the Hypervisor.

2020-03-26 Thread Ram Pai
XIVE interrupt controller use an Event Queue (EQ) to enqueue event notifications when an exception occurs. The EQ is a single memory page provided by the O/S defining a circular buffer, one per server and priority couple. On baremetal, the EQ page is configured with an OPAL call. On pseries, an

Re: [PATCH] mm/sparse: Fix kernel crash with pfn_section_valid check

2020-03-26 Thread Aneesh Kumar K.V
On 3/26/20 3:10 PM, Michal Hocko wrote: On Wed 25-03-20 08:49:14, Aneesh Kumar K.V wrote: Fixes the below crash BUG: Kernel NULL pointer dereference on read at 0x Faulting instruction address: 0xc0c3447c Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash

[PATCH v6 0/4] Support for Self Save API in OPAL

2020-03-26 Thread Pratik Rajesh Sampat
v5:https://lists.ozlabs.org/pipermail/skiboot/2020-March/016538.html Changelog v5 --> v6 Updated background, motivation and illuminated potential design choices Background == The power management framework on POWER systems include core idle states that lose context. Deep idle states

[PATCH v6 2/4] Self save API integration

2020-03-26 Thread Pratik Rajesh Sampat
The commit makes the self save API available outside the firmware by defining an OPAL wrapper. This wrapper has a similar interface to that of self restore and expects the cpu pir, SPR number, minus the value of that SPR to be passed in its paramters and returns OPAL_SUCCESS on success. The commit

[PATCH v6 0/3] powerpc/powernv: Introduce interface for self-restore support

2020-03-26 Thread Pratik Rajesh Sampat
v5: https://lkml.org/lkml/2020/3/17/944 Changelog v5-->v6 1. Updated background, motivation and illuminated potential design choices 2. Re-organization of patch-set a. Split introducing preference for optimization from 1/1 to patch 3/3 b. Merge introducing self-save API and parsing the

Re: [PATCHv3] powerpc/crashkernel: take "mem=" option into account

2020-03-26 Thread Hari Bathini
Hello Pingfan, Thanks for the patch.. On 19/02/20 7:48 PM, Pingfan Liu wrote: > 'mem=" option is an easy way to put high pressure on memory during some > test. Hence after applying the memory limit, instead of total mem, the > actual usable memory should be considered when reserving mem for >

Re: [PATCH] mm/sparse: Fix kernel crash with pfn_section_valid check

2020-03-26 Thread Michal Hocko
On Wed 25-03-20 08:49:14, Aneesh Kumar K.V wrote: > Fixes the below crash > > BUG: Kernel NULL pointer dereference on read at 0x > Faulting instruction address: 0xc0c3447c > Oops: Kernel access of bad area, sig: 11 [#1] > LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries >

[PATCH v6 3/4] API to verify the STOP API and image compatibility

2020-03-26 Thread Pratik Rajesh Sampat
From: Prem Shanker Jha Commit defines a new API primarily intended for OPAL to determine cpu register save API's compatibility with HOMER layout and self save restore. It can help OPAL determine if version of API integrated with OPAL is different from hostboot. Change-Id:

[PATCH -next] usb: gadget: fsl: remove unused variable 'driver_desc'

2020-03-26 Thread YueHaibing
drivers/usb/gadget/udc/fsl_udc_core.c:56:19: warning: 'driver_desc' defined but not used [-Wunused-const-variable=] It is never used, so remove it. Reported-by: Hulk Robot Signed-off-by: YueHaibing --- drivers/usb/gadget/udc/fsl_udc_core.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH v6 1/3] powerpc/powernv: Introduce interface for self-restore support

2020-03-26 Thread Pratik Rajesh Sampat
Introduces an interface that helps determine support for the self-restore API. The commit is isomorphic to the original interface of declaring SPRs to self-restore. Signed-off-by: Pratik Rajesh Sampat --- arch/powerpc/platforms/powernv/idle.c | 200 +++--- 1 file changed,

[powerpc] Intermittent crashes ( link_path_walk) with linux-next

2020-03-26 Thread Sachin Sant
I am running into intermittent crashes with linux-next on POWER 9 PowerVM LPAR First it was against next-20200324 while running LTP tests. With next-20200325 I ran into similar crash (a different stack trace but same failure point — link_path_walk) while running sosreport command. BUG: Kernel

Re: [PATCH -next] usb: gadget: fsl: remove unused variable 'driver_desc'

2020-03-26 Thread Peter Chen
On 20-03-26 15:14:19, YueHaibing wrote: > drivers/usb/gadget/udc/fsl_udc_core.c:56:19: > warning: 'driver_desc' defined but not used [-Wunused-const-variable=] > > It is never used, so remove it. > > Reported-by: Hulk Robot > Signed-off-by: YueHaibing > --- >

Re: [PATCH] mm/sparse: Fix kernel crash with pfn_section_valid check

2020-03-26 Thread Michal Hocko
On Thu 26-03-20 15:26:22, Aneesh Kumar K.V wrote: > On 3/26/20 3:10 PM, Michal Hocko wrote: > > On Wed 25-03-20 08:49:14, Aneesh Kumar K.V wrote: > > > Fixes the below crash > > > > > > BUG: Kernel NULL pointer dereference on read at 0x > > > Faulting instruction address:

Re: [PATCH] mm/sparse: Fix kernel crash with pfn_section_valid check

2020-03-26 Thread Michal Hocko
On Thu 26-03-20 11:16:33, Michal Hocko wrote: > On Thu 26-03-20 15:26:22, Aneesh Kumar K.V wrote: > > On 3/26/20 3:10 PM, Michal Hocko wrote: > > > On Wed 25-03-20 08:49:14, Aneesh Kumar K.V wrote: > > > > Fixes the below crash > > > > > > > > BUG: Kernel NULL pointer dereference on read at

Re: [powerpc] Intermittent crashes ( link_path_walk) with linux-next

2020-03-26 Thread Michael Ellerman
Sachin Sant writes: > I am running into intermittent crashes with linux-next on POWER 9 PowerVM LPAR > First it was against next-20200324 while running LTP tests. With next-20200325 > I ran into similar crash (a different stack trace but same failure point — > link_path_walk) > while running

Re: [PATCH] selftests/powerpc: Add a test of sigreturn vs VDSO

2020-03-26 Thread Michael Ellerman
Nathan Lynch writes: > Nathan Lynch writes: >> Michael Ellerman writes: >>> +static int search_proc_maps(char *needle, unsigned long *low, unsigned >>> long *high) >> >>^^ const? Sorry I meant to do this but then forgot. >>> +{ >>> + unsigned long start,

Re: [PATCH v2] powerpc/kprobes: Remove redundant code

2020-03-26 Thread Michael Ellerman
On Wed, 2020-02-19 at 08:05:57 UTC, Christophe Leroy wrote: > At the time being we have something like > > if (something) { > p = get(); > if (p) { > if (something_wrong) > goto out; > ...

Re: [PATCH] powerpc/kuap: PPC_KUAP_DEBUG should depend on PPC_KUAP

2020-03-26 Thread Michael Ellerman
On Sun, 2020-03-01 at 11:17:38 UTC, Michael Ellerman wrote: > Currently you can enable PPC_KUAP_DEBUG when PPC_KUAP is disabled, > even though the former has not effect without the latter. > > Fix it so that PPC_KUAP_DEBUG can only be enabled when PPC_KUAP is > enabled, not when the platform

[PATCH v2] macintosh: convert to i2c_new_scanned_device

2020-03-26 Thread Wolfram Sang
Move from the deprecated i2c_new_probed_device() to the new i2c_new_scanned_device(). No functional change for this driver because it doesn't check the return code anyhow. Signed-off-by: Wolfram Sang Acked-by: Michael Ellerman --- Change since v1: rebased on top of v5.6-rc7

Re: [PATCH v3 2/3] selftests/powerpc: Add tm-signal-pagefault test

2020-03-26 Thread Michael Ellerman
On Tue, 2020-02-11 at 03:38:30 UTC, Gustavo Luiz Duarte wrote: > This test triggers a TM Bad Thing by raising a signal in transactional state > and forcing a pagefault to happen in kernelspace when the kernel signal > handling code first touches the user signal stack. > > This is inspired by the

Re: [PATCH] powerpc/64s: Fix section mismatch warnings from boot code

2020-03-26 Thread Michael Ellerman
On Tue, 2020-02-25 at 03:13:28 UTC, Michael Ellerman wrote: > We currently have two section mismatch warnings: > > The function __boot_from_prom() references > the function __init prom_init(). > > The function start_here_common() references > the function __init start_kernel(). > > The

Re: [PATCH] selftests/powerpc: Add a test of sigreturn vs VDSO

2020-03-26 Thread Michael Ellerman
On Wed, 2020-03-04 at 11:04:02 UTC, Michael Ellerman wrote: > There's two different paths through the sigreturn code, depending on > whether the VDSO is mapped or not. We recently discovered a bug in the > unmapped case, because it's not commonly used these days. > > So add a test that sends

Re: [PATCH v2] powerpc/XIVE: SVM: share the event-queue page with the Hypervisor.

2020-03-26 Thread Greg Kurz
On Thu, 26 Mar 2020 01:38:47 -0700 Ram Pai wrote: > XIVE interrupt controller use an Event Queue (EQ) to enqueue event > notifications when an exception occurs. The EQ is a single memory page > provided by the O/S defining a circular buffer, one per server and > priority couple. > > On

Re: [PATCH 2/3] soc: fsl: dpio: QMAN performance improvement. Function pointer indirection.

2020-03-26 Thread Arnd Bergmann
On Thu, Dec 12, 2019 at 6:02 PM Youri Querry wrote: > > We are making the access decision in the initialization and > setting the function pointers accordingly. > > Signed-off-by: Youri Querry > --- > drivers/soc/fsl/dpio/qbman-portal.c | 451 > +++- >

Re: [RFC 00/11] perf: Enhancing perf to export processor hazard information

2020-03-26 Thread maddy
On 3/18/20 11:05 PM, Kim Phillips wrote: Hi Maddy, On 3/17/20 1:50 AM, maddy wrote: On 3/13/20 4:08 AM, Kim Phillips wrote: On 3/11/20 11:00 AM, Ravi Bangoria wrote: On 3/6/20 3:36 AM, Kim Phillips wrote: On 3/3/20 3:55 AM, Kim Phillips wrote: On 3/2/20 2:21 PM, Stephane Eranian wrote:

Re: [PATCH v3 3/3] selftests/powerpc: Don't rely on segfault to rerun the test

2020-03-26 Thread Michael Ellerman
On Tue, 2020-02-11 at 03:38:31 UTC, Gustavo Luiz Duarte wrote: > The test case tm-signal-context-force-tm expects a segfault to happen on > returning from signal handler, and then does a setcontext() to run the test > again. However, the test doesn't always segfault, causing the test to run a >

Re: [PATCH] powerpc/xmon: Lower limits on nidump and ndump

2020-03-26 Thread Michael Ellerman
On Wed, 2020-02-19 at 11:00:07 UTC, Michael Ellerman wrote: > In xmon we have two variables that are used by the dump commands. > There's ndump which is the number of bytes to dump using 'd', and > nidump which is the number of instructions to dump using 'di'. > > ndump starts as 64 and nidump

Re: [PATCH v3] powerpc/kprobes: Ignore traps that happened in real mode

2020-03-26 Thread Michael Ellerman
On Tue, 2020-02-18 at 19:38:27 UTC, Christophe Leroy wrote: > When a program check exception happens while MMU translation is > disabled, following Oops happens in kprobe_handler() in the following > code: > > } else if (*addr != BREAKPOINT_INSTRUCTION) { > > [ 33.098554] BUG:

Re: [PATCH v2 1/6] powerpc/eeh: Add sysfs files in late probe

2020-03-26 Thread Michael Ellerman
On Fri, 2020-03-06 at 07:38:59 UTC, Oliver O'Halloran wrote: > Move creating the EEH specific sysfs files into eeh_add_device_late() > rather than being open-coded all over the place. Calling the function is > generally done immediately after calling eeh_add_device_late() anyway. This > is also a

Re: [PATCHv2] selftests/powerpc: Turn off timeout setting for benchmarks, dscr, signal, tm

2020-03-26 Thread Michael Ellerman
On Wed, 2020-03-18 at 06:00:04 UTC, Po-Hsu Lin wrote: > Some specific tests in powerpc can take longer than the default 45 > seconds that added in commit 852c8cbf34d3 ("selftests/kselftest/runner.sh: > Add 45 second timeout per test") to run, the following test result was > collected across 2

Re: [PATCH] powerpc/maple: Fix declaration made after definition

2020-03-26 Thread Michael Ellerman
On Mon, 2020-03-23 at 22:27:29 UTC, Nathan Chancellor wrote: > When building ppc64 defconfig, Clang errors (trimmed for brevity): > > arch/powerpc/platforms/maple/setup.c:365:1: error: attribute declaration > must precede definition [-Werror,-Wignored-attributes] > machine_device_initcall(maple,

Re: [PATCH v6 1/2] powerpc/64: Setup a paca before parsing device tree etc.

2020-03-26 Thread Michael Ellerman
On Fri, 2020-03-20 at 03:21:15 UTC, Michael Ellerman wrote: > From: Daniel Axtens > > Currently we set up the paca after parsing the device tree for CPU > features. Prior to that, r13 contains random data, which means there > is random data in r13 while we're running the generic dt parsing code.

[PATCH v2] mm/sparse: Fix kernel crash with pfn_section_valid check

2020-03-26 Thread Aneesh Kumar K.V
Fixes the below crash BUG: Kernel NULL pointer dereference on read at 0x Faulting instruction address: 0xc0c3447c Oops: Kernel access of bad area, sig: 11 [#1] LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries CPU: 11 PID: 7519 Comm: lt-ndctl Not tainted 5.6.0-rc7-autotest

Re: [powerpc] Intermittent crashes ( link_path_walk) with linux-next

2020-03-26 Thread Al Viro
commit 20971012f63e is its variant with the fix folded in. So next-20200325 has the bug and next-20200326 should have it fixed. Could you check the current -next and see if you still observe that crap?

Re: [PATCH v2] mm/sparse: Fix kernel crash with pfn_section_valid check

2020-03-26 Thread Michal Hocko
On Thu 26-03-20 19:02:35, Aneesh Kumar K.V wrote: > Fixes the below crash > > BUG: Kernel NULL pointer dereference on read at 0x > Faulting instruction address: 0xc0c3447c > Oops: Kernel access of bad area, sig: 11 [#1] > LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries >

[RFC PATCH] powerpc/lib: Fixing use a temporary mm for code patching

2020-03-26 Thread Christophe Leroy
This patch fixes the RFC series identified below. It fixes three points: - Failure with CONFIG_PPC_KUAP - Failure to write do to lack of DIRTY bit set on the 8xx - Inadequaly complex WARN post verification However, it has an impact on the CPU load. Here is the time needed on an 8xx to run the

Re: [PATCH v4] powerpc: Replace setup_irq() by request_irq()

2020-03-26 Thread Michael Ellerman
On Thu, 2020-03-12 at 06:42:55 UTC, afzal mohammed wrote: > request_irq() is preferred over setup_irq(). Invocations of setup_irq() > occur after memory allocators are ready. > > Per tglx[1], setup_irq() existed in olden days when allocators were not > ready by the time early interrupts were

Re: [PATCH kernel] powerpc/prom_init: Pass the "os-term" message to hypervisor

2020-03-26 Thread Michael Ellerman
On Thu, 2020-03-12 at 07:44:04 UTC, Alexey Kardashevskiy wrote: > The "os-term" RTAS calls has one argument with a message address of > OS termination cause. rtas_os_term() already passes it but the recently > added prom_init's version of that missed it; it also does not fill args > correctly. >

Re: [PATCH] cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_work_fn

2020-03-26 Thread Michael Ellerman
On Mon, 2020-03-16 at 13:57:43 UTC, Pratik Rajesh Sampat wrote: > The patch avoids allocating cpufreq_policy on stack hence fixing frame > size overflow in 'powernv_cpufreq_work_fn' > > Fixes: 227942809b52 ("cpufreq: powernv: Restore cpu frequency to policy->cur > on unthrottling") >

Re: [PATCH] powerpc/pseries: avoid harmless preempt warning

2020-03-26 Thread Michael Ellerman
On Fri, 2020-03-20 at 15:24:36 UTC, Nicholas Piggin wrote: > Signed-off-by: Nicholas Piggin Applied to powerpc next, thanks. https://git.kernel.org/powerpc/c/adde8715cf0571878d37fcb20595aad57b923bab cheers

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

2020-03-26 Thread Christophe Leroy
Le 24/03/2020 à 07:23, Michael Ellerman a écrit : Christophe Leroy writes: On 03/20/2020 02:12 AM, Michael Ellerman wrote: Christophe Leroy writes: Move ADV_DEBUG_REGS functions out of ptrace.c, into ptrace-adv.c and ptrace-noadv.c Signed-off-by: Christophe Leroy --- v4: Leave

Re: [PATCH v2] mm/sparse: Fix kernel crash with pfn_section_valid check

2020-03-26 Thread Baoquan He
On 03/26/20 at 07:02pm, Aneesh Kumar K.V wrote: > Fixes the below crash > > BUG: Kernel NULL pointer dereference on read at 0x > Faulting instruction address: 0xc0c3447c > Oops: Kernel access of bad area, sig: 11 [#1] > LE PAGE_SIZE=64K MMU=Hash SMP NR_CPUS=2048 NUMA pSeries >

Re: [PATCH] powerpc/kasan: Fix kasan_remap_early_shadow_ro()

2020-03-26 Thread Michael Ellerman
On Fri, 2020-03-06 at 15:09:40 UTC, Christophe Leroy wrote: > At the moment kasan_remap_early_shadow_ro() does nothing, because > k_end is 0 and k_cur < 0 is always true. > > Change the test to k_cur != k_end, as done in > kasan_init_shadow_page_tables() > > Signed-off-by: Christophe Leroy >

Re: [PATCH] powerpc/pseries: fix of_read_drc_info_cell() to point at next record

2020-03-26 Thread Michael Ellerman
On Sat, 2020-03-07 at 02:45:47 UTC, Tyrel Datwyler wrote: > The expectation is that when calling of_read_drc_info_cell() > repeatedly to parse multiple drc-info records that the in/out curval > parameter points at the start of the next record on return. However, > the current behavior has curval

Re: [PATCH -next 017/491] CELL BROADBAND ENGINE ARCHITECTURE: Use fallthrough;

2020-03-26 Thread Michael Ellerman
On Wed, 2020-03-11 at 04:51:31 UTC, Joe Perches wrote: > Convert the various uses of fallthrough comments to fallthrough; > > Done via script > Link: > https://lore.kernel.org/lkml/b56602fcf79f849e733e7b521bb0e17895d390fa.1582230379.git.joe.com/ > > Signed-off-by: Joe Perches Applied to

Re: [PATCH v3] powerpc/32s: reorder Linux PTE bits to better match Hash PTE bits.

2020-03-26 Thread Michael Ellerman
On Tue, 2020-03-10 at 17:29:12 UTC, Christophe Leroy wrote: > Reorder Linux PTE bits to (almost) match Hash PTE bits. > > RW Kernel : PP = 00 > RO Kernel : PP = 00 > RW User : PP = 01 > RO User : PP = 11 > > So naturally, we should have > _PAGE_USER = 0x001 > _PAGE_RW = 0x002 > > Today

Re: [PATCH v2] powerpc test_emulate_step: fix DS operand in ld encoding to appropriate value

2020-03-26 Thread Michael Ellerman
On Wed, 2020-03-11 at 10:24:05 UTC, Balamuruhan S wrote: > ld instruction should have 14 bit immediate field (DS) concatenated with > 0b00 on the right, encode it accordingly. Introduce macro `IMM_DS()` > to encode DS form instructions with 14 bit immediate field. > > Fixes: 4ceae137bdab

Re: [PATCH -next] PCI: rpaphp: remove set but not used variable 'value'

2020-03-26 Thread Michael Ellerman
On Thu, 2020-03-12 at 14:04:12 UTC, Chen Zhou wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/pci/hotplug/rpaphp_core.c: In function is_php_type: > drivers/pci/hotplug/rpaphp_core.c:291:16: warning: > variable value set but not used [-Wunused-but-set-variable] > >

Re: [PATCH] powerpc/book3s/hash64/devmap: Use H_PAGE_THP_HUGE when setting up huge devmap pte entries

2020-03-26 Thread Michael Ellerman
On Fri, 2020-03-13 at 09:48:42 UTC, "Aneesh Kumar K.V" wrote: > H_PAGE_THP_HUGE is used to differentiate between a THP hugepage and hugetlb > hugepage entries. The difference is w.r.t how we handle hash fault on these > address. THP address enables MPSS in segments. We want to manage devmap >

Re: [PATCH] powerpc/prom_init: Remove leftover comment

2020-03-26 Thread Michael Ellerman
On Tue, 2020-03-24 at 18:29:12 UTC, Fabiano Rosas wrote: > The if statement that this comment referred to was removed in > commit 11fdb309341c ("powerpc/prom_init: Remove support for OPAL v2"). > > Signed-off-by: Fabiano Rosas Applied to powerpc next, thanks.

Re: [PATCH V2 0/3] mm/debug: Add more arch page table helper tests

2020-03-26 Thread Christophe Leroy
Le 26/03/2020 à 03:23, Anshuman Khandual a écrit : On 03/24/2020 10:52 AM, Anshuman Khandual wrote: This series adds more arch page table helper tests. The new tests here are either related to core memory functions and advanced arch pgtable helpers. This also creates a documentation file