Re: [PATCH] arch: powerpc: kernel: fixed some typos

2023-12-21 Thread Ghanshyam Agrawal
On Thu, Dec 21, 2023 at 4:55 PM Michael Ellerman wrote: > > Ghanshyam Agrawal writes: > > Fixed some typos > > > > Signed-off-by: Ghanshyam Agrawal > > --- > > arch/powerpc/kernel/eeh_pe.c | 6 +++--- > > 1 file changed, 3 insertions(+), 3 deletions(-) > > Please also fix the case in

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2023-12-21 Thread Kees Cook
On December 21, 2023 4:16:56 AM PST, Michael Ellerman wrote: >Cc +Kees > >Christophe Leroy writes: >> Declaring rodata_enabled and mark_rodata_ro() at all time >> helps removing related #ifdefery in C files. >> >> Signed-off-by: Christophe Leroy >> --- >> include/linux/init.h | 4 >>

Re: [PATCH 00/13] mm/gup: Unify hugetlb, part 2

2023-12-21 Thread Peter Xu
Copy Muchun, which I forgot since the start, sorry. -- Peter Xu

Re: [PATCH] powerpc/6xx: set High BAT Enable flag on G2 cores

2023-12-21 Thread Michael Ellerman
Matthias Schiffer writes: > MMU_FTR_USE_HIGH_BATS is set for G2-based cores (G2_LE, e300cX), but the > high BATs need to be enabled in HID2 to work. Add register definitions > and introduce a G2 variant of __setup_cpu_603. > > This fixes boot on CPUs like the MPC5200B with STRICT_KERNEL_RWX

Re: [PATCH v14 3/6] crash: add a new kexec flag for FDT update

2023-12-21 Thread Baoquan He
On 12/21/23 at 11:36am, Sourabh Jain wrote: .. > > > > diff --git a/include/uapi/linux/kexec.h b/include/uapi/linux/kexec.h > > > > index 3d5b3d757bed..df6a6505e267 100644 > > > > --- a/include/uapi/linux/kexec.h > > > > +++ b/include/uapi/linux/kexec.h > > > > @@ -13,7 +13,7 @@ > > > >

Re: [PATCH] powerpc: Split PAGE_SHIFT/SIZE into vdso/page.h

2023-12-21 Thread Michael Ellerman
Linus Walleij writes: > On Thu, Dec 21, 2023 at 1:04 PM Michael Ellerman wrote: > >> The VDSO needs PAGE_SHIFT/SIZE defined, so it includes asm/page.h. >> >> However when COMPAT=y the VDSO is built 32-bit, even though the kernel >> is 64-bit. That can lead to odd warnings because some kernel

Re: [PATCH] perf vendor events: Remove UTF-8 characters from cmn.json

2023-12-21 Thread Arnaldo Carvalho de Melo
Em Thu, Dec 21, 2023 at 02:03:13PM +0800, Jing Zhang escreveu: > cmn.json contains UTF-8 characters in brief description which > could break the perf build on some distros. > > Fix this issue by removing the UTF-8 characters from cmn.json. > > without the fix: > $find tools/perf/pmu-events/

Re: [RFC PATCH 6/9] powerpc/ftrace: Update and move function profile instructions out-of-line

2023-12-21 Thread Christophe Leroy
Le 21/12/2023 à 15:25, Steven Rostedt a écrit : > On Thu, 21 Dec 2023 10:46:08 + > Christophe Leroy wrote: > >>> To enable ftrace, the nop at function entry is changed to an >>> unconditional branch to 'tramp'. The call to ftrace_caller() may be >>> updated to ftrace_regs_caller()

Re: [PATCH v4 00/10] devm_led_classdev_register() usage problem

2023-12-21 Thread Lee Jones
On Thu, 14 Dec 2023, George Stark wrote: > This patch series fixes the problem of devm_led_classdev_register misusing. > > The basic problem is described in [1]. Shortly when > devm_led_classdev_register() > is used then led_classdev_unregister() called after driver's remove() > callback. >

Re: [RFC PATCH 6/9] powerpc/ftrace: Update and move function profile instructions out-of-line

2023-12-21 Thread Steven Rostedt
On Thu, 21 Dec 2023 10:46:08 + Christophe Leroy wrote: > > To enable ftrace, the nop at function entry is changed to an > > unconditional branch to 'tramp'. The call to ftrace_caller() may be > > updated to ftrace_regs_caller() depending on the registered ftrace ops. > > On 64-bit powerpc,

Re: [PATCH] powerpc/6xx: set High BAT Enable flag on G2 cores

2023-12-21 Thread Christophe Leroy
Le 21/12/2023 à 13:45, Matthias Schiffer a écrit : > MMU_FTR_USE_HIGH_BATS is set for G2-based cores (G2_LE, e300cX), but the > high BATs need to be enabled in HID2 to work. Add register definitions > and introduce a G2 variant of __setup_cpu_603. Well spotted. I have a mpc8321, hence e300c2.

[PATCH] powerpc/6xx: set High BAT Enable flag on G2 cores

2023-12-21 Thread Matthias Schiffer
MMU_FTR_USE_HIGH_BATS is set for G2-based cores (G2_LE, e300cX), but the high BATs need to be enabled in HID2 to work. Add register definitions and introduce a G2 variant of __setup_cpu_603. This fixes boot on CPUs like the MPC5200B with STRICT_KERNEL_RWX enabled. Fixes: e4d6654ebe6e

Re: [PATCH] powerpc: Split PAGE_SHIFT/SIZE into vdso/page.h

2023-12-21 Thread Linus Walleij
On Thu, Dec 21, 2023 at 1:04 PM Michael Ellerman wrote: > The VDSO needs PAGE_SHIFT/SIZE defined, so it includes asm/page.h. > > However when COMPAT=y the VDSO is built 32-bit, even though the kernel > is 64-bit. That can lead to odd warnings because some kernel constants > are 64-bit, but

Re: [PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2023-12-21 Thread Michael Ellerman
Cc +Kees Christophe Leroy writes: > Declaring rodata_enabled and mark_rodata_ro() at all time > helps removing related #ifdefery in C files. > > Signed-off-by: Christophe Leroy > --- > include/linux/init.h | 4 > init/main.c | 21 +++-- > 2 files changed, 7

Re: [PATCH 02/13] hvc: Fix use of uninitialized array in udbg_hvc_putc

2023-12-21 Thread Michael Ellerman
Christophe Leroy writes: > Le 14/12/2023 à 06:55, Nicholas Miehlbradt a écrit : >> All elements of bounce_buffer are eventually read and passed to the >> hypervisor so it should probably be fully initialized. > > should or shall ? > >> >> Signed-off-by: Nicholas Miehlbradt > > Should be a

[PATCH] powerpc: Split PAGE_SHIFT/SIZE into vdso/page.h

2023-12-21 Thread Michael Ellerman
The VDSO needs PAGE_SHIFT/SIZE defined, so it includes asm/page.h. However when COMPAT=y the VDSO is built 32-bit, even though the kernel is 64-bit. That can lead to odd warnings because some kernel constants are 64-bit, but unsigned long is 32-bit, for example: VDSO32C

[PATCH] soc: fsl: dpio: fix kcalloc() arguments order

2023-12-21 Thread Dmitry Antipov
When compiling with gcc version 14.0.0 20231220 (experimental) and W=1, I've noticed the following warning: drivers/soc/fsl/dpio/dpio-service.c: In function 'dpaa2_io_service_enqueue_multiple_desc_fq': drivers/soc/fsl/dpio/dpio-service.c:526:29: warning: 'kcalloc' sizes specified with 'sizeof'

Re: [PATCH] arch: powerpc: kernel: fixed some typos

2023-12-21 Thread Michael Ellerman
Ghanshyam Agrawal writes: > Fixed some typos > > Signed-off-by: Ghanshyam Agrawal > --- > arch/powerpc/kernel/eeh_pe.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Please also fix the case in arch/powerpc/include/asm/eeh.h The subject should use the correct prefix. You can

Re: powerpc: several early boot regressions on MPC52xx

2023-12-21 Thread Christophe Leroy
Le 21/12/2023 à 11:33, Matthias Schiffer a écrit : > [Vous ne recevez pas souvent de courriers de > matthias.schif...@ew.tq-group.com. Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > On Wed, 2023-12-20 at 14:55 +, Christophe Leroy wrote: >>>

Re: [PATCH 3/3] powerpc: ps3: Add missing set_freezable() for ps3_probe_thread()

2023-12-21 Thread Michael Ellerman
Geoff Levand writes: > Hi Kevin, > > On 12/21/23 13:45, Kevin Hao wrote: >> The kernel thread function ps3_probe_thread() invokes the try_to_freeze() >> in its loop. But all the kernel threads are non-freezable by default. >> So if we want to make a kernel thread to be freezable, we have to

Re: [PATCH] MAINTAINERS: powerpc: Add Aneesh & Naveen

2023-12-21 Thread Michael Ellerman
On Tue, 05 Dec 2023 16:11:05 +1100, Michael Ellerman wrote: > Aneesh and Naveen are helping out with some aspects of upstream > maintenance, add them as reviewers. > > Applied to powerpc/fixes. [1/1] MAINTAINERS: powerpc: Add Aneesh & Naveen

Re: [PATCH v5] powerpc/pseries/vas: Migration suspend waits for no in-progress open windows

2023-12-21 Thread Michael Ellerman
On Sat, 25 Nov 2023 15:51:04 -0800, Haren Myneni wrote: > The hypervisor returns migration failure if all VAS windows are not > closed. During pre-migration stage, vas_migration_handler() sets > migration_in_progress flag and closes all windows from the list. > The allocate VAS window routine

Re: [RFC PATCH 6/9] powerpc/ftrace: Update and move function profile instructions out-of-line

2023-12-21 Thread Christophe Leroy
Le 08/12/2023 à 17:30, Naveen N Rao a écrit : > Function profile sequence on powerpc includes two instructions at the > beginning of each function: > > mflrr0 > bl ftrace_caller > > The call to ftrace_caller() gets nop'ed out during kernel boot and is > patched in when

Re: [PATCH 00/12] KVM: PPC: Nested APIv2 : Performance improvements

2023-12-21 Thread Michael Ellerman
On Fri, 01 Dec 2023 18:56:05 +0530, Vaibhav Jain wrote: > This patch series introduces series of performance improvements to recently > added support for Nested APIv2 PPC64 Guests via [1]. Details for Nested > APIv2 for PPC64 Guests is available in Documentation/powerpc/kvm-nested.rst. > > This

Re: [PATCH v2 1/2] powerpc/book3s/hash: Drop _PAGE_PRIVILEGED from PAGE_NONE

2023-12-21 Thread Michael Ellerman
On Mon, 04 Dec 2023 15:06:37 +0530, aneesh.ku...@kernel.org wrote: > There used to be a dependency on _PAGE_PRIVILEGED with pte_savedwrite. > But that got dropped by > commit 6a56ccbcf6c6 ("mm/autonuma: use can_change_(pte|pmd)_writable() to > replace savedwrite") > > With the change in this

Re: [PATCH v5 0/5] powerpc/smp: Topology and shared processor optimizations

2023-12-21 Thread Michael Ellerman
On Thu, 14 Dec 2023 23:37:10 +0530, Srikar Dronamraju wrote: > PowerVM systems configured in shared processors mode have some unique > challenges. Some device-tree properties will be missing on a shared > processor. Hence some sched domains may not make sense for shared processor > systems. > >

Re: (subset) [RFC PATCH 0/9] powerpc: ftrace updates

2023-12-21 Thread Michael Ellerman
On Fri, 08 Dec 2023 22:00:39 +0530, Naveen N Rao wrote: > Early RFC. > > This series attempts to address couple of issues with the existing > support for ftrace on powerpc, with a view towards improving performance > when ftrace is not enabled. See patch 6 for more details. > > Patches 7 and 8

Re: [PATCH v6 00/13] powerpc/pseries: New character devices for system parameters and VPD

2023-12-21 Thread Michael Ellerman
On Tue, 12 Dec 2023 11:01:47 -0600, Nathan Lynch wrote: > Add character devices that expose PAPR-specific system parameters and > VPD to user space. > > The problem: important platform features are enabled on Linux VMs > through the powerpc-specific rtas() syscall in combination with > writeable

Re: [PATCH] MAINTAINERS: powerpc: Transfer PPC83XX to Christophe

2023-12-21 Thread Michael Ellerman
On Tue, 05 Dec 2023 16:12:39 +1100, Michael Ellerman wrote: > Christophe volunteered[1] to maintain PPC83XX. > > 1: > https://lore.kernel.org/all/7b1bf4dc-d09d-35b8-f4df-16bf00429...@csgroup.eu/ > > Applied to powerpc/next. [1/1] MAINTAINERS: powerpc: Transfer PPC83XX to Christophe

Re: [PATCH 1/5] selftests/powerpc: Fix error handling in FPU/VMX preemption tests

2023-12-21 Thread Michael Ellerman
On Wed, 29 Nov 2023 00:27:44 +1100, Michael Ellerman wrote: > The FPU & VMX preemption tests do not check for errors returned by the > low-level asm routines, preempt_fpu() / preempt_vsx() respectively. > That means any register corruption detected by the asm routines does not > result in a test

Re: [PATCH 1/4] powerpc/Makefile: Don't use $(ARCH) unnecessarily

2023-12-21 Thread Michael Ellerman
On Wed, 06 Dec 2023 22:55:45 +1100, Michael Ellerman wrote: > There's no need to use $(ARCH) for references to the arch directory in > the source tree, it is always arch/powerpc. > > Applied to powerpc/next. [1/4] powerpc/Makefile: Don't use $(ARCH) unnecessarily

Re: (subset) [PATCH 1/2] powerpc/hv-gpci: Add return value check in affinity_domain_via_partition_show function

2023-12-21 Thread Michael Ellerman
On Thu, 16 Nov 2023 17:50:32 +0530, Kajol Jain wrote: > To access hv-gpci kernel interface files data, the > "Enable Performance Information Collection" option has to be set > in hmc. Incase that option is not set and user try to read > the interface files, it should give error message as >

Re: [RESEND PATCH] powerpc/fsl: fix the schema check errors for fsl,tmu-calibration

2023-12-21 Thread Michael Ellerman
On Tue, 12 Dec 2023 19:44:58 +0100, David Heidelberg wrote: > fsl,tmu-calibration is in u32-matrix. Use matching property syntax. > No functional changes. Fixes warnings as: > ... > > [...] Applied to powerpc/next. [1/1] powerpc/fsl: fix the schema check errors for fsl,tmu-calibration

Re: [PATCH v3] powerpc/mm: Fix null-pointer dereference in pgtable_cache_add

2023-12-21 Thread Michael Ellerman
On Mon, 04 Dec 2023 10:32:23 +0800, Kunwu Chan wrote: > kasprintf() returns a pointer to dynamically allocated memory > which can be NULL upon failure. Ensure the allocation was successful > by checking the pointer validity. > > Applied to powerpc/next. [1/1] powerpc/mm: Fix null-pointer

Re: [PATCH] powerpc/powernv: Fix null pointer dereference in opal_powercap_init

2023-12-21 Thread Michael Ellerman
On Sun, 26 Nov 2023 17:57:39 +0800, Kunwu Chan wrote: > kasprintf() returns a pointer to dynamically allocated memory > which can be NULL upon failure. > > Applied to powerpc/next. [1/1] powerpc/powernv: Fix null pointer dereference in opal_powercap_init

Re: [PATCH] powerpc/powernv: Add a null pointer check to scom_debug_init_one

2023-12-21 Thread Michael Ellerman
On Fri, 08 Dec 2023 16:59:37 +0800, Kunwu Chan wrote: > kasprintf() returns a pointer to dynamically allocated memory > which can be NULL upon failure. > Add a null pointer check, and release 'ent' to avoid memory leaks. > > Applied to powerpc/next. [1/1] powerpc/powernv: Add a null pointer

Re: [PATCH] powerpc/powernv: Add a null pointer check in opal_event_init

2023-12-21 Thread Michael Ellerman
On Mon, 27 Nov 2023 11:07:55 +0800, Kunwu Chan wrote: > kasprintf() returns a pointer to dynamically allocated memory > which can be NULL upon failure. > > Applied to powerpc/next. [1/1] powerpc/powernv: Add a null pointer check in opal_event_init

Re: [PATCH] powerpc/imc-pmu: Fix null pointer dereference in update_events_in_group

2023-12-21 Thread Michael Ellerman
On Sun, 26 Nov 2023 17:37:19 +0800, Kunwu Chan wrote: > kasprintf() returns a pointer to dynamically allocated memory > which can be NULL upon failure. > > Applied to powerpc/next. [1/1] powerpc/imc-pmu: Fix null pointer dereference in update_events_in_group

Re: [PATCH] powerpc/sched: Cleanup vcpu_is_preempted()

2023-12-21 Thread Michael Ellerman
On Tue, 14 Nov 2023 12:42:19 +0530, Aneesh Kumar K.V wrote: > No functional change in this patch. A helper is added to find if > vcpu is dispatched by hypervisor. Use that instead of opencoding. > Also clarify some of the comments. > > Applied to powerpc/next. [1/1] powerpc/sched: Cleanup

Re: [PATCH v2 1/2] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo

2023-12-21 Thread Michael Ellerman
On Wed, 20 Sep 2023 16:27:05 +0530, Aditya Gupta wrote: > Since below commit, address mapping for vmemmap has changed for Radix > MMU, where address mapping is stored in kernel page table itself, > instead of earlier used 'vmemmap_list'. > > commit 368a0590d954 ("powerpc/book3s64/vmemmap:

Re: powerpc: several early boot regressions on MPC52xx

2023-12-21 Thread Matthias Schiffer
On Wed, 2023-12-20 at 14:55 +, Christophe Leroy wrote: > > Le 19/12/2023 à 14:34, Matthias Schiffer a écrit : > > > > [Vous ne recevez pas souvent de courriers de > > > > matthias.schif...@ew.tq-group.com. Découvrez pourquoi ceci est > > > > important à

[PATCH 3/3] powerpc: Simplify strict_kernel_rwx_enabled()

2023-12-21 Thread Christophe Leroy
Now that rodata_enabled is always declared, remove #ifdef and define a single version of strict_kernel_rwx_enabled(). Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/mmu.h | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/arch/powerpc/include/asm/mmu.h

[PATCH 2/3] modules: Remove #ifdef CONFIG_STRICT_MODULE_RWX around rodata_enabled

2023-12-21 Thread Christophe Leroy
Now that rodata_enabled is declared at all time, the #ifdef CONFIG_STRICT_MODULE_RWX can be removed. Signed-off-by: Christophe Leroy --- kernel/module/strict_rwx.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/kernel/module/strict_rwx.c b/kernel/module/strict_rwx.c

[PATCH 1/3] init: Declare rodata_enabled and mark_rodata_ro() at all time

2023-12-21 Thread Christophe Leroy
Declaring rodata_enabled and mark_rodata_ro() at all time helps removing related #ifdefery in C files. Signed-off-by: Christophe Leroy --- include/linux/init.h | 4 init/main.c | 21 +++-- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git