[PATCH v2 2/2] KVM: PPC: Book3S PR: Disallow AIL != 0

2022-01-28 Thread Nicholas Piggin
KVM PR does not implement address translation modes on interrupt, so it must not allow H_SET_MODE to succeed. The behaviour change caused by this mode is architected and not advisory (interrupts *must* behave differently). QEMU does not deal with differences in AIL support in the host. The

[PATCH v2 1/2] KVM: PPC: Book3S PR: Disable SCV when AIL could be disabled

2022-01-28 Thread Nicholas Piggin
PR KVM does not support running with AIL enabled, and SCV does is not supported with AIL disabled. Fix this by ensuring the SCV facility is disabled with FSCR while a CPU could be running with AIL=0. The PowerNV host supports disabling AIL on a per-CPU basis, so SCV just needs to be disabled when

[PATCH v2 0/2] KVM: PPC: Book3S PR: Fixes for AIL and SCV

2022-01-28 Thread Nicholas Piggin
The first patch in this series fixes a KVM PR host crash due to a guest executing the scv instruction or with a pseries SMP host, the host CPUs executing the scv instruction while a PR guest is running. The second patch fixes unimplemented H_SET_MODE AIL modes by returning failure from the hcall

[PATCH] powerpc: platforms: 52xx: Fix a resource leak in an error handling path

2022-01-28 Thread Christophe JAILLET
The error handling path of mpc52xx_lpbfifo_probe() and a request_irq() is not balanced by a corresponding free_irq(). Add the missing call, as already done in the remove function. Fixes: 3c9059d79f5e ("powerpc/5200: add LocalPlus bus FIFO device driver") Signed-off-by: Christophe JAILLET ---

[PATCH] powerpc/fadump: Use swap() instead of open coding it

2022-01-28 Thread Jiapeng Chong
Clean the following coccicheck warning: ./arch/powerpc/kernel/fadump.c:1291:34-35: WARNING opportunity for swap(). Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/kernel/fadump.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git

[PATCH 3/3] powerpc/pseries/vas: Disable window open during migration

2022-01-28 Thread Haren Myneni
The current partition migration implementation does not freeze the user space and the user space can continue open VAS windows. So when migration_in_progress flag is enabled, VAS open window API returns -EBUSY. Signed-off-by: Haren Myneni --- arch/powerpc/platforms/pseries/vas.c | 13

[PATCH 2/3] powerpc/pseries/vas: Add VAS migration handler

2022-01-28 Thread Haren Myneni
Since the VAS windows belong to the VAS hardware resource, the hypervisor expects the partition to close them on source partition and reopen them after the partition migrated on the destination machine. This handler is called before pseries_suspend() to close these windows and again invoked

[PATCH 1/3] powerpc/pseries/vas: Modify reconfig open/close functions for migration

2022-01-28 Thread Haren Myneni
VAS is a hardware engine stays on the chip. So when the partition migrates, all VAS windows on the source system have to be closed and reopen them on the destination after migration. This patch make changes to the current reconfig_open/close_windows functions to support migration: - Set

[PATCH 0/3] powerpc/pseries/vas: VAS/NXGZIP support with LPM

2022-01-28 Thread Haren Myneni
Virtual Accelerator Switchboard (VAS) is an engine stays on the chip. So all windows opened on a specific engine belongs to VAS the chip. The hypervisor expects the partition to close all active windows on the sources system and reopen them after migration on the destination machine. This patch

Re: [PATCH] ftrace: Have architectures opt-in for mcount build time sorting

2022-01-28 Thread Steven Rostedt
On Fri, 28 Jan 2022 16:11:39 -0500 Joe Lawrence wrote: > The bisect finally landed on: > > 72b3942a173c387b27860ba1069636726e208777 is the first bad commit > commit 72b3942a173c387b27860ba1069636726e208777 > Author: Yinan Liu > Date: Sun Dec 12 19:33:58 2021 +0800 > > scripts:

Re: [PATCH] ftrace: Have architectures opt-in for mcount build time sorting

2022-01-28 Thread Joe Lawrence
On Thu, Jan 27, 2022 at 11:42:49AM -0500, Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > First S390 complained that the sorting of the mcount sections at build > time caused the kernel to crash on their architecture. Now PowerPC is > complaining about it too. And also ARM64 appears

Re: ftrace hangs waiting for rcu

2022-01-28 Thread Paul E. McKenney
On Fri, Jan 28, 2022 at 08:15:47AM -0800, Paul E. McKenney wrote: > On Fri, Jan 28, 2022 at 04:11:57PM +, Mark Rutland wrote: > > On Fri, Jan 28, 2022 at 05:08:48PM +0100, Sven Schnelle wrote: > > > Hi Mark, > > > > > > Mark Rutland writes: > > > > > > > On arm64 I bisected this down to: >

Re: ftrace hangs waiting for rcu

2022-01-28 Thread Sven Schnelle
Hi Mark, Mark Rutland writes: > On Fri, Jan 28, 2022 at 05:08:48PM +0100, Sven Schnelle wrote: >> We noticed the PR from Paul and are currently testing the fix. So far >> it's looking good. The configuration where we have seen the hang is a >> bit unusual: >> >> - 16 physical CPUs on the kvm

Re: ftrace hangs waiting for rcu

2022-01-28 Thread Paul E. McKenney
On Fri, Jan 28, 2022 at 04:11:57PM +, Mark Rutland wrote: > On Fri, Jan 28, 2022 at 05:08:48PM +0100, Sven Schnelle wrote: > > Hi Mark, > > > > Mark Rutland writes: > > > > > On arm64 I bisected this down to: > > > > > > 7a30871b6a27de1a ("rcu-tasks: Introduce ->percpu_enqueue_shift for

Re: ftrace hangs waiting for rcu

2022-01-28 Thread Mark Rutland
On Fri, Jan 28, 2022 at 05:08:48PM +0100, Sven Schnelle wrote: > Hi Mark, > > Mark Rutland writes: > > > On arm64 I bisected this down to: > > > > 7a30871b6a27de1a ("rcu-tasks: Introduce ->percpu_enqueue_shift for > > dynamic queue selection") > > > > Which was going wrong because ilog2()

Re: ftrace hangs waiting for rcu

2022-01-28 Thread Sven Schnelle
Hi Mark, Mark Rutland writes: > On arm64 I bisected this down to: > > 7a30871b6a27de1a ("rcu-tasks: Introduce ->percpu_enqueue_shift for dynamic > queue selection") > > Which was going wrong because ilog2() rounds down, and so the shift was wrong > for any nr_cpus that was not a

Re: ftrace hangs waiting for rcu (was: Re: [PATCH] ftrace: Have architectures opt-in for mcount build time sorting)

2022-01-28 Thread Mark Rutland
Hi Sven, On Thu, Jan 27, 2022 at 07:42:35PM +0100, Sven Schnelle wrote: > Mark Rutland writes: > > > * I intermittently see a hang when running the tests. I previously hit that > > when originally trying to bisect this issue (and IIRC that bisected down > > to > > some RCU changes, but I

Re: [PATCH v3] PCI hotplug: rpaphp: Error out on busy status from get-sensor-state

2022-01-28 Thread Mahesh J Salgaonkar
On 2021-12-09 09:02:51 Thu, Nathan Lynch wrote: > Mahesh Salgaonkar writes: > > To avoid this issue, fix the pci hotplug driver (rpaphp) to return an error > > if the slot presence state can not be detected immediately. Current > > implementation uses rtas_get_sensor() API which blocks the slot

[PATCH RFC v1] drivers/base/node: consolidate node device subsystem initialization in node_dev_init()

2022-01-28 Thread David Hildenbrand
... and call node_dev_init() after memory_dev_init() from driver_init(), so before any of the existing arch/subsys calls. All online nodes should be known at that point. This is in line with memory_dev_init(), which initializes the memory device subsystem and creates all memory block devices.

Re: [PATCHv3] powerpc: mm: radix_tlb: rearrange the if-else block

2022-01-28 Thread Nathan Chancellor
On Fri, Jan 28, 2022 at 02:17:13PM +0100, Anders Roxell wrote: > Clang warns: > > arch/powerpc/mm/book3s64/radix_tlb.c:1191:23: error: variable 'hstart' is > uninitialized when used here [-Werror,-Wuninitialized] > __tlbiel_va_range(hstart, hend, pid, >

Re: [PATCH v2 4/5] modules: Add CONFIG_ARCH_WANTS_MODULES_DATA_IN_VMALLOC

2022-01-28 Thread Daniel Thompson
On Thu, Jan 27, 2022 at 11:28:09AM +, Christophe Leroy wrote: > Add CONFIG_ARCH_WANTS_MODULES_DATA_IN_VMALLOC to allow architectures > to request having modules data in vmalloc area instead of module area. > > This is required on powerpc book3s/32 in order to set data non > executable,

Re: [BUG] mtd: cfi_cmdset_0002: write regression since v4.17-rc1

2022-01-28 Thread Ahmad Fatoum
Hello Tokunori-san, On 15.12.21 18:34, Tokunori Ikegami wrote: > Hi Ahmad-san, Thanks for your reply (and Thorsten for the reminder) and sorry for the delay. I had a lot of backlog after my time off. > Sorry for the regression issue by the change: dfeae1073583. > To make sure could you please

[PATCHv3] powerpc: mm: radix_tlb: rearrange the if-else block

2022-01-28 Thread Anders Roxell
Clang warns: arch/powerpc/mm/book3s64/radix_tlb.c:1191:23: error: variable 'hstart' is uninitialized when used here [-Werror,-Wuninitialized] __tlbiel_va_range(hstart, hend, pid, ^~

Re: [PATCHv2] powerpc: mm: radix_tlb: rearrange the if-else block

2022-01-28 Thread Anders Roxell
On Fri, 28 Jan 2022 at 11:14, Christophe Leroy wrote: > > > > Le 28/01/2022 à 11:08, Anders Roxell a écrit : > > Clang warns: > > > > arch/powerpc/mm/book3s64/radix_tlb.c:1191:23: error: variable 'hstart' is > > uninitialized when used here [-Werror,-Wuninitialized] > >

Re: [PATCH 2/2] powerpc/uprobes: Reject uprobe on a system call instruction

2022-01-28 Thread Naveen N. Rao
On 2022-01-27 13:14, Nicholas Piggin wrote: Excerpts from Michael Ellerman's message of January 25, 2022 9:45 pm: Nicholas Piggin writes: Per the ISA, a Trace interrupt is not generated for a system call [vectored] instruction. Reject uprobes on such instructions as we are not emulating a

Re: [PATCH 0/2] powerpc: Disable syscall emulation and stepping

2022-01-28 Thread Naveen N. Rao
On 2022-01-27 13:09, Nicholas Piggin wrote: Excerpts from naverao1's message of January 25, 2022 8:48 pm: On 2022-01-25 11:23, Christophe Leroy wrote: Le 25/01/2022 à 04:04, Nicholas Piggin a écrit : +Naveen (sorry missed cc'ing you at first) Excerpts from Christophe Leroy's message of

Re: [PATCH 0/2] powerpc: Disable syscall emulation and stepping

2022-01-28 Thread Naveen N. Rao
[Sorry if you receive this in duplicate. Resending since this message didn't hit the list] On 2022-01-25 11:23, Christophe Leroy wrote: Le 25/01/2022 à 04:04, Nicholas Piggin a écrit : +Naveen (sorry missed cc'ing you at first) Excerpts from Christophe Leroy's message of January 24, 2022

[PATCH V3 1/2] mm/migration: Add trace events for THP migrations

2022-01-28 Thread Anshuman Khandual
This adds two trace events for PMD based THP migration without split. These events closely follow the implementation details like setting and removing of PMD migration entries, which are essential operations for THP migration. This moves CREATE_TRACE_POINTS into generic THP from powerpc for these

Re: [PATCHv2] powerpc: mm: radix_tlb: rearrange the if-else block

2022-01-28 Thread Christophe Leroy
Le 28/01/2022 à 11:08, Anders Roxell a écrit : > Clang warns: > > arch/powerpc/mm/book3s64/radix_tlb.c:1191:23: error: variable 'hstart' is > uninitialized when used here [-Werror,-Wuninitialized] > __tlbiel_va_range(hstart, hend, pid, >

[PATCHv2] powerpc: mm: radix_tlb: rearrange the if-else block

2022-01-28 Thread Anders Roxell
Clang warns: arch/powerpc/mm/book3s64/radix_tlb.c:1191:23: error: variable 'hstart' is uninitialized when used here [-Werror,-Wuninitialized] __tlbiel_va_range(hstart, hend, pid, ^~

powerpc: Set crashkernel offset to mid of RMA region

2022-01-28 Thread Sourabh Jain
On large config LPARs (having 192 and more cores), Linux fails to boot due to insufficient memory in the first memblock. It is due to the memory reservation for the crash kernel which starts at 128MB offset of the first memblock. This memory reservation for the crash kernel doesn't leave enough