Re: [PATCH] powerpc/boot: Fix crt0.S current address branch form

2023-04-11 Thread Michael Ellerman
Michael Ellerman writes: > Nicholas Piggin writes: >> Use the preferred form of branch-and-link for finding the current >> address so objtool doesn't think it is an unannotated intra-function >> call. > > We don't run objtool on this code in mainline AFAIK. Be

[PATCH] powerpc/corenet: Add PPC_QEMU_E500 to corenet configs

2023-04-11 Thread Michael Ellerman
by PPC_QEMU_E500 just defines another machine with a probe function that recognises qemu, so there should be no change when booting on actual hardware supported by CORENET_GENERIC. The increase in vmlinux size is less than 1KB. Signed-off-by: Michael Ellerman --- arch/powerpc/configs

Re: [PATCH] KVM: PPC: BOOK3S: book3s_hv_nested.c: improve branch prediction for k.alloc

2023-04-11 Thread Michael Ellerman
Kautuk Consul writes: > On 2023-04-07 09:01:29, Sean Christopherson wrote: >> On Fri, Apr 07, 2023, Bagas Sanjaya wrote: >> > On Fri, Apr 07, 2023 at 05:31:47AM -0400, Kautuk Consul wrote: >> > > I used the unlikely() macro on the return values of the k.alloc >> > > calls and found that it

Re: [PATCH] powerpc/boot: Fix crt0.S current address branch form

2023-04-07 Thread Michael Ellerman
Nicholas Piggin writes: > Use the preferred form of branch-and-link for finding the current > address so objtool doesn't think it is an unannotated intra-function > call. We don't run objtool on this code in mainline AFAIK. Because BOOTAS doesn't call it. Did you actually see a warning, or are

[PATCH 1/4] powerpc/64: Mark prep_irq_for_idle() __cpuidle

2023-04-06 Thread Michael Ellerman
Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/irq_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/irq_64.c b/arch/powerpc/kernel/irq_64.c index c788c55512ed..2ab0e8d84c1d 100644 --- a/arch/powerpc/kernel/irq_64.c +++ b/arch/powerpc/kernel/irq_64.c

[PATCH 2/4] powerpc/64: Don't call trace_hardirqs_on() in prep_irq_for_idle()

2023-04-06 Thread Michael Ellerman
Since commit a01353cf1896 ("cpuidle: Fix ct_idle_*() usage"), the cpuidle entry code calls trace_hardirqs_on() (actually trace_hardirqs_on_prepare()) in ct_cpuidle_enter() before calling into the cpuidle driver. Suggested-by: Peter Zijlstra Signed-off-by: Michael Ellerman --- ar

[PATCH 4/4] powerpc/pseries: Always inline functions called from cpuidle

2023-04-06 Thread Michael Ellerman
or tracing. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/idle.h | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/include/asm/idle.h b/arch/powerpc/include/asm/idle.h index accd1f50085a..00f360667391 100644 --- a/arch/powerpc/include/

[PATCH 3/4] cpuidle: pseries: Mark ->enter() functions as __cpuidle

2023-04-06 Thread Michael Ellerman
se. Reported-by: Sachin Sant Suggested-by: Peter Zijlstra Signed-off-by: Michael Ellerman --- drivers/cpuidle/cpuidle-pseries.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/cpuidle/cpuidle-pseries.c b/drivers/cpuidle/cpuidle-pseries.c index

[PATCH] powerpc/irq: Mark check_return_regs_valid() notrace

2023-04-06 Thread Michael Ellerman
check_return_regs_valid() is called from the middle of the irq exit handling, which is all notrace, so mark it notrace also. Rerported-by: Sachin Sant Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/interrupt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch

Re: [PATCH] powerpc: Use of_address_to_resource()

2023-04-06 Thread Michael Ellerman
Michael Ellerman writes: > On Sun, 19 Mar 2023 11:31:53 -0500, Rob Herring wrote: >> Replace open coded reading of "reg" or of_get_address()/ >> of_translate_address() calls with a single call to >> of_address_to_resource(). >> >> > >

Re: [PATCH] macintosh/windfarm_smu_sat: Add missing of_node_put()

2023-04-05 Thread Michael Ellerman
On Thu, 30 Mar 2023 11:35:58 +0800, Liang He wrote: > We call of_node_get() in wf_sat_probe() after sat is created, > so we need the of_node_put() before *kfree(sat)*. > > Applied to powerpc/next. [1/1] macintosh/windfarm_smu_sat: Add missing of_node_put()

Re: [PATCH v3] powerpc: Use of_address_to_resource()

2023-04-05 Thread Michael Ellerman
On Wed, 29 Mar 2023 17:03:36 -0500, Rob Herring wrote: > Replace open coded reading of "reg" or of_get_address()/ > of_translate_address() calls with a single call to > of_address_to_resource(). > > Applied to powerpc/next. [1/1] powerpc: Use of_address_to_resource()

Re: [PATCH] powerpc: xics: Use of_address_count()

2023-04-05 Thread Michael Ellerman
On Mon, 27 Mar 2023 17:30:56 -0500, Rob Herring wrote: > icp_native_init_one_node() only needs the number of entries in "reg". > Replace the open coded "reg" parsing with of_address_count() to get the > number of "reg" entries. > > Applied to powerpc/next. [1/1] powerpc: xics: Use

Re: [PATCH] powerpc: Use of_property_read_bool() for boolean properties

2023-04-05 Thread Michael Ellerman
On Fri, 10 Mar 2023 08:46:57 -0600, Rob Herring wrote: > It is preferred to use typed property access functions (i.e. > of_property_read_ functions) rather than low-level > of_get_property/of_find_property functions for reading properties. > Convert reading boolean properties to to

Re: [PATCH] powerpc: Use of_property_present() for testing DT property presence

2023-04-05 Thread Michael Ellerman
On Fri, 10 Mar 2023 08:46:56 -0600, Rob Herring wrote: > It is preferred to use typed property access functions (i.e. > of_property_read_ functions) rather than low-level > of_get_property/of_find_property functions for reading properties. As > part of this, convert

Re: [PATCH] powerpc: Use of_address_to_resource()

2023-04-05 Thread Michael Ellerman
On Sun, 19 Mar 2023 11:31:53 -0500, Rob Herring wrote: > Replace open coded reading of "reg" or of_get_address()/ > of_translate_address() calls with a single call to > of_address_to_resource(). > > Applied to powerpc/next. [1/1] powerpc: Use of_address_to_resource()

Re: [PATCH] powerpc: usbgecko: Use of_iomap()

2023-04-05 Thread Michael Ellerman
On Mon, 27 Mar 2023 17:31:09 -0500, Rob Herring wrote: > Replace of_get_property()+of_translate_address()+ioremap() with a call > to of_iomap() which does all those steps. > > Applied to powerpc/next. [1/1] powerpc: usbgecko: Use of_iomap()

Re: [PATCH] powerpc: isa-bridge: Remove open coded "ranges" parsing

2023-04-05 Thread Michael Ellerman
On Mon, 27 Mar 2023 17:30:45 -0500, Rob Herring wrote: > "ranges" is a standard property with common parsing functions. Users > shouldn't be implementing their own parsing of it. Reimplement the > ISA brige "ranges" parsing using the common ranges iterator functions. > > The common routines are

Re: [PATCH] powerpc: fsl_rio: Use of_iomap()

2023-04-05 Thread Michael Ellerman
On Mon, 27 Mar 2023 17:31:02 -0500, Rob Herring wrote: > Replace of_address_to_resource()+ioremap() with a call to of_iomap() > which does both of those steps. > > Applied to powerpc/next. [1/1] powerpc: fsl_rio: Use of_iomap()

Re: [PATCH] macintosh: Use of_property_present() for testing DT property presence

2023-04-05 Thread Michael Ellerman
On Fri, 10 Mar 2023 08:47:35 -0600, Rob Herring wrote: > It is preferred to use typed property access functions (i.e. > of_property_read_ functions) rather than low-level > of_get_property/of_find_property functions for reading properties. As > part of this, convert

Re: [PATCH v2] macintosh: via-pmu-led: requires ATA to be set

2023-04-05 Thread Michael Ellerman
On Wed, 22 Feb 2023 17:42:41 -0800, Randy Dunlap wrote: > LEDS_TRIGGER_DISK depends on ATA, so selecting LEDS_TRIGGER_DISK > when ATA is not set/enabled causes a Kconfig warning: > > WARNING: unmet direct dependencies detected for LEDS_TRIGGER_DISK > Depends on [n]: NEW_LEDS [=y] &&

Re: [PATCH] powerpc/atomics: Remove unused function

2023-04-05 Thread Michael Ellerman
On Fri, 24 Feb 2023 16:09:40 +0530, Nysal Jan K.A wrote: > Remove arch_atomic_try_cmpxchg_lock function as it is no longer used > since commit 9f61521c7a28 ("powerpc/qspinlock: powerpc qspinlock > implementation") > > Applied to powerpc/next. [1/1] powerpc/atomics: Remove unused function

Re: [PATCH v3] powerpc: Implement arch_within_stack_frames

2023-04-05 Thread Michael Ellerman
On Tue, 28 Feb 2023 05:43:55 +, Nicholas Miehlbradt wrote: > Walks the stack when copy_{to,from}_user address is in the stack to > ensure that the object being copied is entirely a single stack frame and > does not contain stack metadata. > > Substantially similar to the x86 implementation.

Re: [PATCH] powerpc/perf: Properly detect mpc7450 family

2023-04-05 Thread Michael Ellerman
On Mon, 27 Feb 2023 16:54:45 +0100, Christophe Leroy wrote: > Unlike PVR_POWER8, etc , PVR_7450 represents a full PVR > value and not a family value. > > To avoid confusion, do like E500 family and define the relevant > PVR_VER_ values for the 7450 family: > 0x8000 ==> 7450 > 0x8001

Re: (subset) [PATCH 0/8] RTAS changes for 6.4

2023-04-05 Thread Michael Ellerman
On Mon, 06 Mar 2023 15:33:39 -0600, Nathan Lynch wrote: > Proposed changes for the RTAS subsystem and client code. > > Fixes that are subject to backporting are at the front of the queue, > followed by documentation and cleanups, with enhancements at the end. > > Noteworthy changes: > * Change

Re: (subset) [PATCH 0/3] COVER: Remove memcpy_page_flushcache()

2023-04-05 Thread Michael Ellerman
On Wed, 15 Mar 2023 16:20:53 -0700, Ira Weiny wrote: > Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray > callbacks") removed the calls to memcpy_page_flushcache(). > > kmap_atomic() is deprecated and used in the x86 version of > memcpy_page_flushcache(). > > Remove the

Re: [PATCH] powerpc/pseries: Add spaces around / operator

2023-04-05 Thread Michael Ellerman
On Fri, 24 Mar 2023 23:00:41 +0100, Petr Vaněk wrote: > This is follow up change after 14b5d59a261b ("powerpc/pseries: Fix > formatting to make code look more beautiful") to conform to kernel > coding style. > > Applied to powerpc/next. [1/1] powerpc/pseries: Add spaces around / operator

Re: [PATCH 0/3] Clean up PowerPC selftest stderr output

2023-04-05 Thread Michael Ellerman
On Tue, 28 Feb 2023 11:07:06 +1100, Benjamin Gray wrote: > There are several messages being logged to stderr when building the PowerPC > selftests: > > $ make -j$(nproc) O=build -C tools/testing/selftests \ > INSTALL_PATH="$PWD"/out/selftests TARGETS=powerpc install > /dev/null > >

Re: [PATCH] KVM: PPC: Mark three local functions "static"

2023-04-05 Thread Michael Ellerman
On Wed, 08 Mar 2023 15:24:37 -0800, Sean Christopherson wrote: > Tag a few functions that are local and don't have a previous prototype as > "static". > > No functional change intended. > > Applied to powerpc/topic/ppc-kvm. [1/1] KVM: PPC: Mark three local functions "static"

Re: [PATCH 0/3] powerpc/kvm: Enable HV KVM guests to use prefixed instructions to access emulated MMIO

2023-04-05 Thread Michael Ellerman
On Wed, 08 Mar 2023 17:33:43 +1100, Paul Mackerras wrote: > This series changes the powerpc KVM code so that HV KVM can fetch > prefixed instructions from the guest in those situations where there > is a need to emulate an instruction, which for HV KVM means emulating > loads and stores to

Re: [PATCH v2 0/2] KVM: PPC: Book3S HV: Injected interrupt SRR1

2023-04-05 Thread Michael Ellerman
On Thu, 30 Mar 2023 20:32:22 +1000, Nicholas Piggin wrote: > I missed this in my earlier review and testing, but I think we need > these in the prefix instruction enablement series before the final patch > that enables HFSCR[PREFIX] for guests. > > Thanks, > Nick > > [...] Applied to

Re: [PATCH v2] KVM: PPC: BookE: Fix W=1 warnings

2023-04-05 Thread Michael Ellerman
On Mon, 03 Apr 2023 14:53:14 +1000, Michael Ellerman wrote: > Fix various W=1 warnings in booke.c: > > arch/powerpc/kvm/booke.c:1008:5: error: no previous prototype for > ‘kvmppc_handle_exit’ [-Werror=missing-prototypes] >1008 | int kvmppc_handle_exit(struct kvm_vcpu *vcp

Re: [PATCH v5] KVM: PPC: Book3S HV: kvmppc_hv_entry: remove .global scope

2023-04-05 Thread Michael Ellerman
On Mon, 27 Mar 2023 07:33:20 -0400, Kautuk Consul wrote: > kvmppc_hv_entry isn't called from anywhere other than > book3s_hv_rmhandlers.S itself. Removing .global scope for > this function and annotating it with SYM_CODE_START_LOCAL > and SYM_CODE_END. > > Applied to powerpc/topic/ppc-kvm.

Re: [PATCH] powerpc/mm: Fix false detection of read faults

2023-04-05 Thread Michael Ellerman
On Fri, 10 Mar 2023 16:08:34 +1100, Russell Currey wrote: > To support detection of read faults with Radix execute-only memory, the > vma_is_accessible() check in access_error() (which checks for PROT_NONE) > was replaced with a check to see if VM_READ was missing, and if so, > returns true to

Re: [PATCH v2] powerpc/pseries/vas: Ignore VAS update for DLPAR if copy/paste is not enabled

2023-04-05 Thread Michael Ellerman
On Mon, 20 Mar 2023 19:50:08 -0700, Haren Myneni wrote: > The hypervisor supports user-mode NX from Power10. pseries_vas_dlpar_cpu() > is called from lparcfg_write() to update VAS windows for DLPAR event in > shared processor mode and the kernel gets -ENOTSUPP for HCALLs if the > user-mode NX is

Re: [PATCH v2] powerpc/64s: Fix __pte_needs_flush() false positive warning

2023-04-05 Thread Michael Ellerman
On Fri, 03 Mar 2023 09:59:47 +1100, Benjamin Gray wrote: > Userspace PROT_NONE ptes set _PAGE_PRIVILEGED, triggering a false > positive debug assertion that __pte_flags_need_flush() is not called > on a kernel mapping. > > Detect when it is a userspace PROT_NONE page by checking the required >

Re: [PATCH] powerpc: don't try to copy ppc for task with NULL pt_regs

2023-04-05 Thread Michael Ellerman
On Sun, 26 Mar 2023 16:15:57 -0600, Jens Axboe wrote: > Powerpc sets up PF_KTHREAD and PF_IO_WORKER with a NULL pt_regs, which > from my (arguably very short) checking is not commonly done for other > archs. This is fine, except when PF_IO_WORKER's have been created and > the task does something

Re: [PATCH v2] powerpc/papr_scm: Update the NUMA distance table for the target node

2023-04-05 Thread Michael Ellerman
On Tue, 04 Apr 2023 09:44:33 +0530, Aneesh Kumar K.V wrote: > platform device helper routines won't update the NUMA distance table > while creating a platform device, even if the device is present on > a NUMA node that doesn't have memory or CPU. This is especially true > for pmem devices. If the

Re: Probing nvme disks fails on Upstream kernels on powerpc Maxconfig

2023-04-04 Thread Michael Ellerman
"Linux regression tracking (Thorsten Leemhuis)" writes: > [CCing the regression list, as it should be in the loop for regressions: > https://docs.kernel.org/admin-guide/reporting-regressions.html] > > On 23.03.23 10:53, Srikar Dronamraju wrote: >> >> I am unable to boot upstream kernels from

Re: [PATCH] powerpc/64: Always build with 128-bit long double

2023-04-04 Thread Michael Ellerman
Segher Boessenkool writes: > On Tue, Apr 04, 2023 at 08:28:47PM +1000, Michael Ellerman wrote: >> The amdgpu driver builds some of its code with hard-float enabled, >> whereas the rest of the kernel is built with soft-float. >> >> When building with 64-bit long dou

[PATCH] powerpc/64: Always build with 128-bit long double

2023-04-04 Thread Michael Ellerman
el.org/r/dab9cbd8-2626-4b99-8098-31fe76397...@app.fastmail.com Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig| 4 arch/powerpc/Makefile | 1 + drivers/gpu/drm/amd/display/Kconfig | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/a

[PATCH v2] KVM: PPC: BookE: Fix W=1 warnings

2023-04-02 Thread Michael Ellerman
-...@intel.com/ Signed-off-by: Michael Ellerman --- arch/powerpc/kvm/booke.c | 2 +- arch/powerpc/kvm/booke.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) v2: Rebased on my topic/ppc-kvm branch where I already had some of the fixes queued. diff --git a/arch/powerpc/kvm/booke.c b/arch

[PATCH] KVM: PPC: BookE: Fix W=1 warnings

2023-04-02 Thread Michael Ellerman
parameter or member 'exit_nr' not described in 'kvmppc_handle_exit' Reported-by: kernel test robot Link: https://lore.kernel.org/r/202304020827.3lez86wb-...@intel.com/ Signed-off-by: Michael Ellerman --- arch/powerpc/kvm/booke.c | 7 --- arch/powerpc/kvm/booke.h | 3 +++ 2 files changed, 7

[GIT PULL] Please pull powerpc/linux.git powerpc-6.3-4 tag

2023-04-02 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 6.3: The following changes since commit f2c7e3562b4c4f1699acc1538ebf3e75f5cced35: powerpc/mm: Fix false detection of read faults (2023-03-15 20:48:53 +1100) are available in the git repository

Re: [PATCH] drm/amdgpu: drop the long-double-128 powerpc check/hack

2023-03-31 Thread Michael Ellerman
"Daniel Kolesa" writes: > Commit c653c591789b ("drm/amdgpu: Re-enable DCN for 64-bit powerpc") > introduced this check as a workaround for the driver not building > with toolchains that default to 64-bit long double. ... > In mainline, this work is now fully done, so this check is fully >

Re: [PATCH v8 0/7] Support page table check

2023-03-30 Thread Michael Ellerman
Rohan McLure writes: > Anyone got time to review this one? I was planning to pick it up, but it's going to conflict badly with the set_ptes() series: https://lore.kernel.org/all/20230315051444.3229621-1-wi...@infradead.org/ I thought that series was likely to go in soon, but I see it's still

Re: [PATCH] arch/powerpc/kvm: kvmppc_core_vcpu_create_hv: check for kzalloc failure

2023-03-29 Thread Michael Ellerman
Kautuk Consul writes: > On 2023-03-28 23:02:09, Michael Ellerman wrote: >> Kautuk Consul writes: >> > On 2023-03-28 15:44:02, Kautuk Consul wrote: >> >> On 2023-03-28 20:44:48, Michael Ellerman wrote: >> >> > Kautuk Consul writes: >> >>

[PATCH] powerpc/64s: Move CPU -mtune options into Kconfig

2023-03-29 Thread Michael Ellerman
option, that gets messy in the Makefile. So move the determination of which -mtune option to use into Kconfig logic. Signed-off-by: Michael Ellerman --- arch/powerpc/Makefile | 4 +--- arch/powerpc/platforms/Kconfig.cputype | 7 +++ 2 files changed, 8 insertions(+), 3

Re: [PATCH 5/8] powerpc/rtas: rename va_rtas_call_unlocked() to va_rtas_call()

2023-03-29 Thread Michael Ellerman
Nathan Lynch via B4 Relay writes: > From: Nathan Lynch > > The function name va_rtas_call_unlocked() is confusing: it may be > called with or without rtas_lock held. Rename it to va_rtas_call(). I'm not sure about this one. The "unlocked" is meant to convey that it doesn't do any locking. The

Re: [PATCH 7/8] powerpc/rtas: warn on unsafe argument to rtas_call_unlocked()

2023-03-29 Thread Michael Ellerman
Nathan Lynch writes: > Nathan Lynch writes: >> >> aside: does anyone know if the display_status() code is worth keeping? >> It looks like it is used to drive the 16-character wide physical LCD I >> remember seeing on P4-era and older machines. Is it a vestige of >> non-LPAR pseries that should

[PATCH 1/2] powerpc/Makefile: Don't prefix archhelp commands with "@"

2023-03-29 Thread Michael Ellerman
It's not necessary to prefix every command in archhelp with "@" (to supress echoing the command), because that is done by the top level Makefile when it evaluates archhelp. Signed-off-by: Michael Ellerman --- arch/powerpc/Makefile | 38 +++--- 1 file c

[PATCH 2/2] powerpc/Makefile: Add generated defconfigs to help output

2023-03-29 Thread Michael Ellerman
- Build for amigaone Signed-off-by: Michael Ellerman --- arch/powerpc/Makefile | 41 +++-- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index b9bfa9ac3f06..0a99aa425326 100644 --- a/arch/powerpc/Make

Re: [powerpc:next-test] BUILD REGRESSION c827c932c00ccd231a73da9816a51ce2c2b557d6

2023-03-28 Thread Michael Ellerman
kernel test robot writes: > tree/branch: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test > branch HEAD: c827c932c00ccd231a73da9816a51ce2c2b557d6 powerpc: Use > of_address_to_resource() > > Error/Warning reports: > >

Re: [PATCH v3 4/4] of: address: Always use dma_default_coherent for default coherency

2023-03-28 Thread Michael Ellerman
select NEED_SG_DMA_LENGTH > select OF > - select OF_DMA_DEFAULT_COHERENT if !NOT_COHERENT_CACHE > select OF_EARLY_FLATTREE > select OLD_SIGACTIONif PPC32 > select OLD_SIGSUSPEND Acked-by: Michael Ellerman (powerpc) cheers

Re: Memory coherency issue with IO thread offloading?

2023-03-28 Thread Michael Ellerman
Jens Axboe writes: >>> Can the queueing cause the creation of an IO thread (if one does not >>> exist, or all blocked?) >> >> Yep >> >> Since writing this email, I've gone through a lot of different tests. >> Here's a rough listing of what I found: >> >> - Like using the hack patch, if I just

Re: Memory coherency issue with IO thread offloading?

2023-03-28 Thread Michael Ellerman
Daniel Black writes: > Thanks Jens, Nick, Christophe and Michael for your work so far. > > Apologies for the out of thread email. > > Confirming MariabD-10.6+ is required( when we added liburing), and > previous versions used libaio (which tested without incident as mpe > retested). Thanks! I

Re: [PATCH] arch/powerpc/kvm: kvmppc_core_vcpu_create_hv: check for kzalloc failure

2023-03-28 Thread Michael Ellerman
Kautuk Consul writes: > On 2023-03-28 15:44:02, Kautuk Consul wrote: >> On 2023-03-28 20:44:48, Michael Ellerman wrote: >> > Kautuk Consul writes: >> > > kvmppc_vcore_create() might not be able to allocate memory through >> > > kzalloc. In that

Re: [PATCH] powerpc: don't try to copy ppc for task with NULL pt_regs

2023-03-28 Thread Michael Ellerman
"Nicholas Piggin" writes: > On Mon Mar 27, 2023 at 8:26 PM AEST, Christophe Leroy wrote: ... >> >> Now that thread.regs doesn't change anymore at each interrupt, it would >> probably be worth dropping it and falling back to task_pt_regs() as >> defined on most architecture. >> Knowing whether a

Re: [PATCH] powerpc: don't try to copy ppc for task with NULL pt_regs

2023-03-28 Thread Michael Ellerman
Jens Axboe writes: > Powerpc sets up PF_KTHREAD and PF_IO_WORKER with a NULL pt_regs, which > from my (arguably very short) checking is not commonly done for other > archs. This is fine, except when PF_IO_WORKER's have been created and > the task does something that causes a coredump to be

Re: [PATCH] arch/powerpc/kvm: kvmppc_core_vcpu_create_hv: check for kzalloc failure

2023-03-28 Thread Michael Ellerman
Kautuk Consul writes: > kvmppc_vcore_create() might not be able to allocate memory through > kzalloc. In that case the kvm->arch.online_vcores shouldn't be > incremented. I agree that looks wrong. Have you tried to test what goes wrong if it fails? It looks like it will break the LPCR update,

Re: [PATCH 0/2] KVM: PPC: support kvm selftests

2023-03-28 Thread Michael Ellerman
"Nicholas Piggin" writes: > On Tue Mar 28, 2023 at 3:43 AM AEST, Sean Christopherson wrote: >> On Mon, Mar 27, 2023, Nicholas Piggin wrote: >> > On Thu Mar 23, 2023 at 3:41 AM AEST, Sean Christopherson wrote: ... >> > > >> > > What is the long term plan for KVM PPC maintenance? I was under the

Re: [PATCH] powerpc: don't try to copy ppc for task with NULL pt_regs

2023-03-27 Thread Michael Ellerman
"Nicholas Piggin" writes: > On Mon Mar 27, 2023 at 8:15 AM AEST, Jens Axboe wrote: >> Powerpc sets up PF_KTHREAD and PF_IO_WORKER with a NULL pt_regs, which >> from my (arguably very short) checking is not commonly done for other >> archs. This is fine, except when PF_IO_WORKER's have been

Re: Memory coherency issue with IO thread offloading?

2023-03-27 Thread Michael Ellerman
Jens Axboe writes: > On 3/24/23 6:42?PM, Michael Ellerman wrote: >> Jens Axboe writes: >>> I got a report sent to me from mariadb, in where 5.10.158 works fine and >>> 5.10.162 is broken. And in fact, current 6.3-rc also fails the test >>> case. Beware th

Re: Memory coherency issue with IO thread offloading?

2023-03-24 Thread Michael Ellerman
Jens Axboe writes: > Hi, Hi Jens, Thanks for the report. > I got a report sent to me from mariadb, in where 5.10.158 works fine and > 5.10.162 is broken. And in fact, current 6.3-rc also fails the test > case. Beware that this email is long, as I'm trying to include > everything that may be

Re: Memory coherency issue with IO thread offloading?

2023-03-24 Thread Michael Ellerman
Jens Axboe writes: > On 3/24/23 1:27?AM, Christophe Leroy wrote: >> Le 23/03/2023 ? 19:54, Jens Axboe a ?crit : >>> I got a report sent to me from mariadb, in where 5.10.158 works fine and >>> 5.10.162 is broken. And in fact, current 6.3-rc also fails the test >>> case. Beware that this email is

Re: [PATCH 4/9] powerpc/dexcr: Support userspace ROP protection

2023-03-23 Thread Michael Ellerman
Benjamin Gray writes: > The ISA 3.1B hashst and hashchk instructions use a per-cpu SPR HASHKEYR > to hold a key used in the hash calculation. This key should be different > for each process to make it harder for a malicious process to recreate > valid hash values for a victim process. > > Add

Re: [PATCH 8/8] powerpc/rtas: consume retry statuses in sys_rtas()

2023-03-23 Thread Michael Ellerman
Nathan Lynch via B4 Relay writes: > From: Nathan Lynch > > The kernel can handle retrying RTAS function calls in response to > -2/990x in the sys_rtas() handler instead of relaying the intermediate > status to user space. This looks good in general. One query ... > diff --git

Re: [PATCH v2 4/4] Add myself to MAINTAINERS for Power VFIO support

2023-03-22 Thread Michael Ellerman
On Mon, 6 Mar 2023 11:31:28 -0600 (CST), Timothy Pearson wrote: > Applied to powerpc/next. [4/4] Add myself to MAINTAINERS for Power VFIO support https://git.kernel.org/powerpc/c/a34d2f0d79ec890b9b1b156a90016b6330173b8a cheers

Re: [PATCH v2 3/4] powerpc/iommu: Add iommu_ops to report capabilities and

2023-03-22 Thread Michael Ellerman
On Mon, 6 Mar 2023 11:31:00 -0600 (CST), Timothy Pearson wrote: > allow blocking domains > > Up until now PPC64 managed to avoid using iommu_ops. The VFIO driver > uses a SPAPR TCE sub-driver and all iommu_ops uses were kept in > the Type1 VFIO driver. Recent development added 2 uses of

Re: [PATCH v2 2/4] powerpc/pci_64: Init pcibios subsys a bit later

2023-03-22 Thread Michael Ellerman
On Mon, 6 Mar 2023 11:30:42 -0600 (CST), Timothy Pearson wrote: > The following patches are going to add dependency/use of iommu_ops which > is initialized in subsys_initcall as well. > > This moves pciobios_init() to the next initcall level. > > This should not cause behavioral change. > >

Re: (subset) [PATCH 1/2] selftests/powerpc/pmu: Fix sample field check in the mmcra_thresh_marked_sample_test

2023-03-22 Thread Michael Ellerman
On Wed, 01 Mar 2023 22:39:17 +0530, Kajol Jain wrote: > The testcase verifies the setting of different fields in Monitor Mode > Control Register A (MMCRA). In the current code, EV_CODE_EXTRACT macro > is used to extract the "sample" field, which then needs to be further > processed to fetch

Re: [PATCH v2 1/4] powerpc/iommu: Add "borrowing" iommu_table_group_ops

2023-03-22 Thread Michael Ellerman
On Mon, 6 Mar 2023 11:30:20 -0600 (CST), Timothy Pearson wrote: > PPC64 IOMMU API defines iommu_table_group_ops which handles DMA windows > for PEs: control the ownership, create/set/unset a table the hardware > for dynamic DMA windows (DDW). VFIO uses the API to implement support > on POWER. > >

Re: [PATCH 0/3] Allow CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 with ld.lld 15+

2023-03-22 Thread Michael Ellerman
On Wed, 15 Feb 2023 11:41:14 -0700, Nathan Chancellor wrote: > Currently, CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 is not selectable with > ld.lld because of an explicit dependency on GNU ld, due to lack of > testing with LLVM. > > Erhard was kind enough to test this option on his hardware with LLVM

Re: [PATCH] selftests/powerpc: Increase timeout for vsx_signal test

2023-03-22 Thread Michael Ellerman
On Wed, 08 Mar 2023 08:36:14 +1100, Michael Neuling wrote: > On the max config P10 machine (1920 threads and 64TB) this test fails > with a timeout: > > Sending signals to all threads 10 times...!! killing vmx_signal > !! child died by signal 15 > failure: vmx_signal > > [...]

Re: [PATCH 0/2] ppc: simplify sysctl registration

2023-03-22 Thread Michael Ellerman
On Fri, 10 Mar 2023 15:28:48 -0800, Luis Chamberlain wrote: > We can simplify the way we do sysctl registration both by > reducing the number of lines and also avoiding calllers which > could do recursion. The docs are being updated to help reflect > this better [0]. > > [0] >

Re: [PATCH] powerpc: Fix some kernel-doc warnings

2023-03-22 Thread Michael Ellerman
On Mon, 31 Oct 2022 21:54:52 -0400, Bo Liu wrote: > The current code provokes some kernel-doc warnings: > arch/powerpc/kernel/process.c:1606: warning: This comment starts with > '/**', but isn't a kernel-doc comment. Refer > Documentation/doc-guide/kernel-doc.rst > > Applied to

Re: (subset) [PATCH v2 01/10] powerpc/machdep: Make machine name const

2023-03-22 Thread Michael Ellerman
On Sat, 18 Feb 2023 10:15:44 +0100, Christophe Leroy wrote: > Machine name in struct machdep_calls should never be modified. > > Mark it const. > > Patches 1-7 applied to powerpc/next. [01/10] powerpc/machdep: Make machine name const

Re: [PATCH v3 2/2] arch/powerpc/kvm: kvmppc_hv_entry: remove r4 argument

2023-03-22 Thread Michael Ellerman
Kautuk Consul writes: > kvmppc_hv_entry is called from only 2 locations within > book3s_hv_rmhandlers.S. Both of those locations set r4 > as HSTATE_KVM_VCPU(r13) before calling kvmppc_hv_entry. > So, shift the r4 load instruction to kvmppc_hv_entry and > thus modify the calling convention of this

Re: [PATCH v2 0/4] Reenable VFIO support on POWER systems

2023-03-21 Thread Michael Ellerman
Timothy Pearson writes: > - Original Message - >> From: "Michael Ellerman" >> To: "Timothy Pearson" , "Timothy Pearson" >> >> Cc: "kvm" , "linuxppc-dev" >> >> Sent: Tuesday, March 21, 2023 5:33

Re: [PATCH v2 0/4] Reenable VFIO support on POWER systems

2023-03-21 Thread Michael Ellerman
Timothy Pearson writes: > - Original Message - >> From: "Timothy Pearson" >> To: "Michael Ellerman" >> Cc: "Timothy Pearson" , "kvm" >> , "linuxppc-dev" >> >> Sent: Thursday, March

[GIT PULL] Please pull powerpc/linux.git powerpc-6.3-3 tag

2023-03-16 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 6.3: The following changes since commit eeac8ede17557680855031c6f305ece2378af326: Linux 6.3-rc2 (2023-03-12 16:36:44 -0700) are available in the git repository at:

Re: [PATCH 0/3] COVER: Remove memcpy_page_flushcache()

2023-03-16 Thread Michael Ellerman
Ira Weiny writes: > + Konstantin > > Michael Ellerman wrote: >> Ira Weiny writes: >> > Dave Hansen wrote: >> >> On 3/15/23 16:20, Ira Weiny wrote: >> >> > Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray >>

Re: [PATCH 0/2] KVM: PPC: support kvm selftests

2023-03-16 Thread Michael Ellerman
a tiny bit headers so > conflicts should be unlikely and trivial. > > I guess Paolo is the best point to merge these, if no comments > or objections? Yeah. If it helps: Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH 0/3] COVER: Remove memcpy_page_flushcache()

2023-03-16 Thread Michael Ellerman
Ira Weiny writes: > Dave Hansen wrote: >> On 3/15/23 16:20, Ira Weiny wrote: >> > Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray >> > callbacks") removed the calls to memcpy_page_flushcache(). >> > >> > kmap_atomic() is deprecated and used in the x86 version of >> >

Re: [PATCH] cpufreq: pmac32: Use of_property_read_bool() for boolean properties

2023-03-15 Thread Michael Ellerman
Signed-off-by: Rob Herring > --- > drivers/cpufreq/pmac32-cpufreq.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Michael Ellerman cheers > diff --git a/drivers/cpufreq/pmac32-cpufreq.c > b/drivers/cpufreq/pmac32-cpufreq.c > index 4b8ee2014da6.

Re: [PATCH] crypto: p10-aes-gcm - remove duplicate include header

2023-03-15 Thread Michael Ellerman
Herbert Xu writes: > On Tue, Mar 14, 2023 at 09:44:52PM +1100, Michael Ellerman wrote: >> >> Hmm. Seems none of them were ever Cc'ed to linuxppc-dev. So this is the >> first I've seen of them. > > Sorry, I didn't know that you weren't aware of this change. I > will

Re: [PATCH v2 2/2] arch/powerpc/kvm: kvmppc_hv_entry: remove r4 argument

2023-03-15 Thread Michael Ellerman
Michael Ellerman writes: > Kautuk Consul writes: >> On 2023-03-15 15:48:53, Michael Ellerman wrote: >>> Kautuk Consul writes: >>> > kvmppc_hv_entry is called from only 2 locations within >>> > book3s_hv_rmhandlers.S. Both of those locations set r4 &g

Re: [PATCH v2 2/2] arch/powerpc/kvm: kvmppc_hv_entry: remove r4 argument

2023-03-15 Thread Michael Ellerman
Kautuk Consul writes: > On 2023-03-15 15:48:53, Michael Ellerman wrote: >> Kautuk Consul writes: >> > kvmppc_hv_entry is called from only 2 locations within >> > book3s_hv_rmhandlers.S. Both of those locations set r4 >> > as HSTATE_KVM_VCPU(r13) before cal

Re: boot regression on ppc64 with linux 6.2

2023-03-15 Thread Michael Ellerman
Andrea Righi writes: > On Wed, Mar 15, 2023 at 02:30:53PM +1100, Michael Ellerman wrote: >> Andrea Righi writes: >> > I'm triggering the following bug when booting my qemu powerpc VM: >> >> I'm not seeing that here :/ >> >> Can you give a bit more det

Re: [PATCH v2 2/2] arch/powerpc/kvm: kvmppc_hv_entry: remove r4 argument

2023-03-14 Thread Michael Ellerman
Kautuk Consul writes: > kvmppc_hv_entry is called from only 2 locations within > book3s_hv_rmhandlers.S. Both of those locations set r4 > as HSTATE_KVM_VCPU(r13) before calling kvmppc_hv_entry. > So, shift the r4 load instruction to kvmppc_hv_entry and > thus modify the calling convention of this

Re: boot regression on ppc64 with linux 6.2

2023-03-14 Thread Michael Ellerman
Andrea Righi writes: > I'm triggering the following bug when booting my qemu powerpc VM: I'm not seeing that here :/ Can you give a bit more detail? - qemu version - qemu command line - what userspace are you using? - full dmesg of the failing case > event-sources: Unable to request

Re: [PATCH 14/36] powerpc/pseries: move to use bus_get_dev_root()

2023-03-14 Thread Michael Ellerman
Greg Kroah-Hartman writes: > Direct access to the struct bus_type dev_root pointer is going away soon > so replace that with a call to bus_get_dev_root() instead, which is what > it is there for. > > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Christophe Leroy >

Re: [RFC PATCH v1] powerpc: Add version to install filenames

2023-03-14 Thread Michael Ellerman
Nick Child writes: > Rather than replacing the versionless vmlinux and System.map files, > copy to files with the version info appended. > > Additionally, since executing the script is a last resort option, > inform the user about the missing `installkernel` command and the > location of the

Re: [PATCH v3] vdso: Improve cmd_vdso_check to check all dynamic relocations

2023-03-14 Thread Michael Ellerman
> arch/arm64/kernel/vdso32/Makefile | 3 --- > arch/csky/kernel/vdso/Makefile| 4 +--- > arch/loongarch/vdso/Makefile | 4 +--- > arch/mips/vdso/Makefile | 4 +--- > arch/powerpc/kernel/vdso/Makefile | 2 +- Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH] crypto: p10-aes-gcm - remove duplicate include header

2023-03-14 Thread Michael Ellerman
Herbert Xu writes: > On Tue, Mar 14, 2023 at 08:47:30AM +, Christophe Leroy wrote: >> >> Any reason for resending ? > > The p10 patches were reverted, and have only just been re-instated. Hmm. Seems none of them were ever Cc'ed to linuxppc-dev. So this is the first I've seen of them. We

Re: [PATCH] KVM: PPC: Mark three local functions "static"

2023-03-10 Thread Michael Ellerman
Sean Christopherson writes: > Tag a few functions that are local and don't have a previous prototype as > "static". > > No functional change intended. > > Reported-by: kernel test robot > Link: > https://lore.kernel.org/oe-kbuild-all/202303031630.ntviuyqo-...@intel.com > Signed-off-by: Sean

Re: [PATCH v2] hvc/xen: prevent concurrent accesses to the shared ring

2023-03-09 Thread Michael Ellerman
Roger Pau Monné writes: > On Mon, Dec 12, 2022 at 01:36:48PM +0100, Roger Pau Monné wrote: >> On Fri, Dec 02, 2022 at 12:40:05PM +0100, Roger Pau Monné wrote: >> > On Wed, Nov 30, 2022 at 05:08:06PM -0800, Stefano Stabellini wrote: >> > > On Wed, 30 Nov 2022, Roger Pau Monne wrote: >> > > > The

Re: [PATCH v4 3/4] arch/*/io.h: remove ioremap_uc in some architectures

2023-03-09 Thread Michael Ellerman
> --- > Documentation/driver-api/device-io.rst | 9 + > arch/alpha/include/asm/io.h| 1 - > arch/hexagon/include/asm/io.h | 3 --- > arch/m68k/include/asm/kmap.h | 1 - > arch/mips/include/asm/io.h | 1 - > arch/parisc/incl

Re: [PATCH v2 0/4] Reenable VFIO support on POWER systems

2023-03-09 Thread Michael Ellerman
Timothy Pearson writes: > This patch series reenables VFIO support on POWER systems. It > is based on Alexey Kardashevskiys's patch series, rebased and > successfully tested under QEMU with a Marvell PCIe SATA controller > on a POWER9 Blackbird host. > > Alexey Kardashevskiy (3): >

Re: [PATCH v2 0/4] Reenable VFIO support on POWER systems

2023-03-09 Thread Michael Ellerman
Alex Williamson writes: > On Mon, 6 Mar 2023 11:29:53 -0600 (CST) > Timothy Pearson wrote: > >> This patch series reenables VFIO support on POWER systems. It >> is based on Alexey Kardashevskiys's patch series, rebased and >> successfully tested under QEMU with a Marvell PCIe SATA controller >>

<    5   6   7   8   9   10   11   12   13   14   >