Re: [PATCH] powerpc/xive: Do not skip CPU-less nodes when creating the IPIs

2021-06-29 Thread Srikar Dronamraju
* C?dric Le Goater [2021-06-29 15:15:42]: > On PowerVM, CPU-less nodes can be populated with hot-plugged CPUs at > runtime. Today, the IPI is not created for such nodes, and hot-plugged > CPUs use a bogus IPI, which leads to soft lockups. > > We could create the node IPI on demand but it is a

[PATCH v2 9/9] powerpc/64s: move ret_from_fork etc above __end_soft_masked

2021-06-29 Thread Nicholas Piggin
Code which runs with interrupts enabled should be moved above __end_soft_masked where possible, because maskable interrupts that hit below there need to consult the soft mask table. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/interrupt_64.S | 52 +++--- 1 file

[PATCH v2 8/9] powerpc/64s/interrupt: clean up interrupt return labels

2021-06-29 Thread Nicholas Piggin
Normal kernel-interrupt exits can get interrupt_return_srr_user_restart in their backtrace, which is an unusual and notable function, and it is part of the user-interrupt exit path, which is doubly confusing. Add symmetric non-local labels for user and kernel interrupt exit cases to address this.

[PATCH v2 7/9] powerpc/64/interrupts: add missing kprobe annotations on interrupt exit symbols

2021-06-29 Thread Nicholas Piggin
If one interrupt exit symbol must not be kprobed, none of them can be, really. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/interrupt_64.S | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/powerpc/kernel/interrupt_64.S b/arch/powerpc/kernel/interrupt_64.S index

[PATCH v2 6/9] powerpc/64: enable MSR[EE] in irq replay pt_regs

2021-06-29 Thread Nicholas Piggin
Similar to 2b48e96be2f9f ("powerpc/64: fix irq replay pt_regs->softe value"), enable MSR_EE in pt_regs->msr, which makes the regs look a bit more normal and allows the extra debug checks to be added to interrupt handler entry. Signed-off-by: Nicholas Piggin ---

[PATCH v2 5/9] powerpc/64s/interrupt: preserve regs->softe for NMI interrupts

2021-06-29 Thread Nicholas Piggin
If an NMI interrupt hits in an implicit soft-masked region, regs->softe is modified to reflect that. This may not be necessary for correctness at the moment, but it is less surprising and it's unhelpful when debugging or adding checks. Make sure this is changed back to how it was found before

[PATCH v2 4/9] powerpc/64s: add a table of implicit soft-masked addresses

2021-06-29 Thread Nicholas Piggin
Commit 9d1988ca87dd ("powerpc/64: treat low kernel text as irqs soft-masked") ends up catching too much code, including ret_from_fork, and parts of interrupt and syscall return that do not expect to be interrupts to be soft-masked. If an interrupt gets marked pending, and then the code proceeds

[PATCH v2 3/9] powerpc/64e: remove implicit soft-masking and interrupt exit restart logic

2021-06-29 Thread Nicholas Piggin
The implicit soft-masking to speed up interrupt return was going to be used by 64e as well, but it was not ready in time. 64e always disables MSR[EE] when exiting from interrupt and syscall. Disable it for now. Fixes: 9d1988ca87dd ("powerpc/64: treat low kernel text as irqs soft-masked")

[PATCH v2 2/9] powerpc/64e: fix CONFIG_RELOCATABLE build

2021-06-29 Thread Nicholas Piggin
Commit 24d33ac5b8ff ("powerpc/64s: Make prom_init require RELOCATABLE") also made my 64e config require RELOCATABLE, which results in compile failures. Whether or not that's the right thing to do for prom_init for 64e, this fixes CONFIG_RELOCATABLE=y compile errors. That commit is marked as being

[PATCH v2 0/9] powerpc: fast interrupt exit bug and misc fixes

2021-06-29 Thread Nicholas Piggin
This is a bunch of fixes for powerpc next, mostly a nasty hole in fast interrupt exit code found by Sachin and some other bits along the way while looking at it. Since v1: - Fixed a bisection compile error due to a fix incorrectly going to a later patch. - Fixed the "add a table of implicit

[PATCH v2 1/9] powerpc/64s: fix hash page fault interrupt handler

2021-06-29 Thread Nicholas Piggin
The early bad fault or key fault test in do_hash_fault() ends up calling into ___do_page_fault without having gone through an interrupt handler wrapper (except the initial _RAW one). This can end up calling local irq functions while the interrupt has not been reconciled, which will likely cause

[PATCH] powerpc/xive: Do not skip CPU-less nodes when creating the IPIs

2021-06-29 Thread Cédric Le Goater
On PowerVM, CPU-less nodes can be populated with hot-plugged CPUs at runtime. Today, the IPI is not created for such nodes, and hot-plugged CPUs use a bogus IPI, which leads to soft lockups. We could create the node IPI on demand but it is a bit complex because this code would be called under

[PATCH v2] powerpc/4xx: Fix setup_kuep() on SMP

2021-06-29 Thread Christophe Leroy
On SMP, setup_kuep() is also called from start_secondary() since commit 86f46f343272 ("powerpc/32s: Initialise KUAP and KUEP in C"). start_secondary() is not an __init function. Remove the __init marker from setup_kuep() and bail out when not caller on the first CPU as the work is already done.

Re: [PATCH] powerpc/4xx: Fix setup_kuep() on SMP

2021-06-29 Thread Christophe Leroy
Le 29/06/2021 à 13:58, Michael Ellerman a écrit : Christophe Leroy writes: On SMP, setup_kuep() is also called from start_secondary() since commit 86f46f343272 ("powerpc/32s: Initialise KUAP and KUEP in C"). start_secondary() is not an __init function. Remove the __init marker from

Re: [PATCH] powerpc/4xx: Fix setup_kuep() on SMP

2021-06-29 Thread Michael Ellerman
Christophe Leroy writes: > On SMP, setup_kuep() is also called from start_secondary() since > commit 86f46f343272 ("powerpc/32s: Initialise KUAP and KUEP in C"). > > start_secondary() is not an __init function. > > Remove the __init marker from setup_kuep() and bail out when > not caller on the

Re: [PATCH] fpga: dfl: fme: Fix cpu hotplug issue in performance reporting

2021-06-29 Thread kajoljain
On 6/29/21 12:57 PM, Greg KH wrote: > On Tue, Jun 29, 2021 at 12:45:20PM +0530, kajoljain wrote: >> >> >> On 6/28/21 3:47 PM, Kajol Jain wrote: >>> The performance reporting driver added cpu hotplug >>> feature but it didn't add pmu migration call in cpu >>> offline function. >>> This can

Re: [PATCH] fpga: dfl: fme: Fix cpu hotplug issue in performance reporting

2021-06-29 Thread Greg KH
On Tue, Jun 29, 2021 at 12:45:20PM +0530, kajoljain wrote: > > > On 6/28/21 3:47 PM, Kajol Jain wrote: > > The performance reporting driver added cpu hotplug > > feature but it didn't add pmu migration call in cpu > > offline function. > > This can create an issue incase the current designated >

Re: [PATCH] fpga: dfl: fme: Fix cpu hotplug issue in performance reporting

2021-06-29 Thread kajoljain
On 6/28/21 3:47 PM, Kajol Jain wrote: > The performance reporting driver added cpu hotplug > feature but it didn't add pmu migration call in cpu > offline function. > This can create an issue incase the current designated > cpu being used to collect fme pmu data got offline, > as based on

Re: [RFC] fpga: dfl: fme: Fix cpu hotplug code

2021-06-29 Thread kajoljain
On 6/29/21 12:10 AM, Moritz Fischer wrote: > On Mon, Jun 28, 2021 at 12:45:46PM +0530, Kajol Jain wrote: >> Commit 724142f8c42a ("fpga: dfl: fme: add performance >> reporting support") added performance reporting support >> for FPGA management engine via perf. >> >> It also added cpu hotplug

Re: [PATCH] perf script python: Fix buffer size to report iregs in perf script

2021-06-29 Thread kajoljain
On 6/28/21 8:19 PM, Paul A. Clarke wrote: > On Mon, Jun 28, 2021 at 11:53:41AM +0530, Kajol Jain wrote: >> Commit 48a1f565261d ("perf script python: Add more PMU fields >> to event handler dict") added functionality to report fields like >> weight, iregs, uregs etc via perf report. >> That