Re: [RFC PATCH 5/5] powerpc/smp: Remap boot CPU onto core 0 if >= nr_cpu_ids

2024-02-14 Thread Michael Ellerman
Jiri Bohac writes: > On Tue, Jan 02, 2024 at 10:16:04AM +0530, Aneesh Kumar K.V wrote: >> Michael Ellerman writes: >> >> >> >> > #ifdef CONFIG_PPC64 >> > int boot_cpu_hwid = -1; >> > @@ -492,12 +493,26 @@ void __init

Re: [RFC PATCH 4/5] powerpc/smp: Factor out assign_threads()

2024-02-14 Thread Michael Ellerman
Aneesh Kumar K.V writes: > Michael Ellerman writes: > > > >> +static int assign_threads(unsigned cpu, unsigned int nthreads, bool avail, >> > > May be rename 'avail' to 'present' Yeah, will do. cheers >> +

Re: [PATCH] powerpc/iommu: Fix the missing iommu_group_put() during platform domain attach

2024-02-14 Thread Michael Ellerman
Venkat Rao Bagalkote writes: > Thanks for the patch. Applied this patch and verified and issue is fixed. > > This issue way originally reported in the below mail. > > https://marc.info/?l=linux-kernel&m=170737160630106&w=2 Please use lore for links, in this case: https://lore.kernel.org/all/274e

Re: [PATCH] powerpc: Add gpr1 and fpu save/restore functions

2024-02-12 Thread Michael Ellerman
Timothy Pearson writes: > - Original Message - >> From: "Segher Boessenkool" >> To: "Timothy Pearson" >> Cc: "linuxppc-dev" >> Sent: Monday, February 12, 2024 12:23:22 PM >> Subject: Re: [PATCH] powerpc: Add gpr1 and fpu save/restore functions > >> On Mon, Feb 12, 2024 at 12:07:03PM -06

Re: [PATCH] powerpc/ftrace: Ignore ftrace locations in exit text sections

2024-02-12 Thread Michael Ellerman
Christophe Leroy writes: > Le 09/02/2024 à 08:59, Naveen N Rao a écrit : >> Michael reported that we are seeing ftrace bug on bootup when KASAN is >> enabled, and if we are using -fpatchable-function-entry: >> ... >> diff --git a/arch/powerpc/include/asm/sections.h >> b/arch/powerpc/include/asm/

[PATCH] powerpc/kasan: Limit KASAN thread size increase to 32KB

2024-02-11 Thread Michael Ellerman
-by: Spoorthy Reported-by: Benjamin Gray Fixes: 18f14afe2816 ("powerpc/64s: Increase default stack size to 32KB") Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/thread_info.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/thread

Re: [PATCH 60/82] powerpc: Refactor intentional wrap-around test

2024-02-11 Thread Michael Ellerman
ing the wrap-around sanitizers in the future. > > Link: https://git.kernel.org/linus/68df3755e383e6fecf2354a67b08f92f18536594 > [1] > Link: https://github.com/KSPP/linux/issues/26 [2] > Link: https://github.com/KSPP/linux/issues/27 [3] > Link: https://github.com/KSPP/linux/issues/344 [4] >

Re: [PATCH v2] drivers/ps3: select VIDEO to provide cmdline functions

2024-02-08 Thread Michael Ellerman
gt;> Fixes: dae7fbf43fd0 ("driver/ps3: Include for mode >> parsing") >> Fixes: a3b6792e990d ("video/cmdline: Introduce CONFIG_VIDEO for video= >> parameter") >> Cc: Michael Ellerman >> Cc: Nicholas Piggin >> Cc: Christophe Leroy >

Re: [PATCH v2 1/2] powerpc: Add Power11 architected and raw mode

2024-02-06 Thread Michael Ellerman
Madhavan Srinivasan writes: > On 2/5/24 2:13 PM, Aneesh Kumar K.V wrote: >> Madhavan Srinivasan writes: >> >>> reg.h is updated with Power11 pvr. pvr_mask value of 0x0F07 >>> means we are arch v3.1 compliant. ... >>> diff --git a/arch/powerpc/kernel/cpu_setup_power.c >>> b/arch/powerpc/kerne

Re: [PATCH v3] KVM: PPC: Book3S HV: Fix L2 guest reboot failure due to empty 'arch_compat'

2024-02-06 Thread Michael Ellerman
Hi Amit, One comment below ... Amit Machhiwal writes: > Currently, rebooting a pseries nested qemu-kvm guest (L2) results in > below error as L1 qemu sends PVR value 'arch_compat' == 0 via > ppc_set_compat ioctl. This triggers a condition failure in > kvmppc_set_arch_compat() resulting in an EIN

Re: [PATCH] powerpc: add crtsavres.o to always-y instead of extra-y

2024-02-05 Thread Michael Ellerman
Jan Stancek writes: > On Tue, Nov 21, 2023 at 10:51:34AM +1000, Nicholas Piggin wrote: >>On Tue Nov 21, 2023 at 9:23 AM AEST, Masahiro Yamada wrote: >>> crtsavres.o is linked to modules. However, as explained in commit >>> d0e628cd817f ("kbuild: doc: clarify the difference between extra-y >>> and

Re: [PATCH] powerpc/64: Set LR to a non-NULL value in task pt_regs on scv entry

2024-02-01 Thread Michael Ellerman
Segher Boessenkool writes: > Hi! > > On Thu, Jan 25, 2024 at 05:12:28PM +0530, Naveen N Rao wrote: >> diff --git a/arch/powerpc/kernel/interrupt_64.S >> b/arch/powerpc/kernel/interrupt_64.S >> index bd863702d812..5cf3758a19d3 100644 >> --- a/arch/powerpc/kernel/interrupt_64.S >> +++ b/arch/powerp

[GIT PULL] Please pull powerpc/linux.git powerpc-6.8-1 tag

2023-12-31 Thread Michael Ellerman
3): misc: ocxl: context: Remove unnecessary (void*) conversions misc: ocxl: afu_irq: Remove unnecessary (void*) conversions misc: ocxl: link: Remove unnecessary (void*) conversions Masahiro Yamada (1): powerpc: add crtsavres.o to always-y instead of extra-y Michael Ellerman (2

Re: [PATCH] powerpc/hvcall: Reorder Nestedv2 hcall opcodes

2023-12-31 Thread Michael Ellerman
On Tue, 19 Dec 2023 14:52:36 +0530, Vaibhav Jain wrote: > This trivial patch reorders the newly introduced hcall opcodes for Nestedv2 > to follow the increasing-opcode-number convention followed in > 'hvcall.h'. The patch also updates the value for MAX_HCALL_OPCODE which is > at various places in a

Re: [PATCH] powerpc/86xx: Drop unused CONFIG_MPC8610

2023-12-31 Thread Michael Ellerman
On Thu, 23 Nov 2023 14:29:02 +1100, Michael Ellerman wrote: > The MPC8610 symbol used to be default y if MPC8610_HPCD, but since > MPC8610_HPCD was removed MPC8610 is now never used. Remove it. > > Applied to powerpc/next. [1/1] powerpc/86xx: Drop unused CONFIG_MPC8610

Re: [PATCH] powerpc/powernv: Add error handling to opal_prd_range_is_valid

2023-12-31 Thread Michael Ellerman
On Mon, 27 Nov 2023 06:41:08 -0800, Haoran Liu wrote: > In the opal_prd_range_is_valid function within opal-prd.c, > error handling was missing for the of_get_address call. > This patch adds necessary error checking, ensuring that the > function gracefully handles scenarios where of_get_address fai

Re: [PATCH 0/3] powerpc: Fixes and optimization for the freezable kthread

2023-12-31 Thread Michael Ellerman
On Thu, 21 Dec 2023 12:45:07 +0800, Kevin Hao wrote: > The main changes include: > - Invoke set_freezable() for the kthread which could be frozen > - Drop redundant try_to_freeze() invocation > > Kevin Hao (3): > powerpc: mpc83xx: Add the missing set_freezable() for > agent_thread_fn() >

Re: [PATCH] powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2

2023-12-31 Thread Michael Ellerman
On Sun, 24 Dec 2023 09:52:46 +0900, Geoff Levand wrote: > Commit 8c5fa3b5c4df3d071dab42b04b971df370d99354 (powerpc/64: Make ELFv2 the > default for big-endian builds), merged in Linux-6.5-rc1 changes the calling > ABI > in a way that is incompatible with the current code for the PS3's LV1 > hyper

Re: [PATCH][next] powerpc/selftests: Fix spelling mistake "EACCESS" -> "EACCES"

2023-12-31 Thread Michael Ellerman
On Fri, 15 Dec 2023 11:24:56 +, Colin Ian King wrote: > There is a spelling mistake of the EACCES error name, fix it. > > Applied to powerpc/next. [1/1] powerpc/selftests: Fix spelling mistake "EACCESS" -> "EACCES" https://git.kernel.org/powerpc/c/ba5b952ad5f52e58c0f288b9d5427ad734600

Re: [RFC PATCH 5/5] powerpc/smp: Remap boot CPU onto core 0 if >= nr_cpu_ids

2023-12-29 Thread Michael Ellerman
Michael Ellerman writes: > If nr_cpu_ids is too low to include the boot CPU, remap the boot CPU > onto logical core 0. Hi guys, I finally got time to look at this issue. I think this series should fix the problems that have been seen. I've tested this fairly thoroughly with a qemu

[RFC PATCH 5/5] powerpc/smp: Remap boot CPU onto core 0 if >= nr_cpu_ids

2023-12-29 Thread Michael Ellerman
This allows kdump kernels to be booted with low values for nr_cpu_ids to conserve memory, while also allowing the crashing/boot CPU to be any CPU. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/smp.h | 1 + arch/powerpc/kernel/prom.c | 16 +++- arch/powerpc/k

[RFC PATCH 4/5] powerpc/smp: Factor out assign_threads()

2023-12-29 Thread Michael Ellerman
Factor out the for loop that assigns CPU numbers to threads of a core. The function takes the next CPU number to use as input, and returns the next available CPU number after the threads has been assigned. This will allow a subsequent change to assign threads out of order. Signed-off-by: Michael

[RFC PATCH 2/5] powerpc/smp: Increase nr_cpu_ids to include the boot CPU

2023-12-29 Thread Michael Ellerman
If nr_cpu_ids is too low to include the boot CPU adjust nr_cpu_ids upward. Otherwise the kernel will BUG when trying to allocate a paca for the boot CPU and fail to boot. Cc: sta...@vger.kernel.org Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/prom.c | 6 ++ 1 file changed, 6

[RFC PATCH 3/5] powerpc/smp: Lookup avail once per device tree node

2023-12-29 Thread Michael Ellerman
The of_device_is_available() check only needs to be done once per device node, there's no need to repeat it for each thread. Move it out of the loop. Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/setup-common.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-)

[RFC PATCH 1/5] powerpc/smp: Adjust nr_cpu_ids to cover all threads of a core

2023-12-29 Thread Michael Ellerman
If nr_cpu_ids is too low to include at least all the threads of a single core adjust nr_cpu_ids upwards. This avoids triggering odd bugs in code that assumes all threads of a core are available. Cc: sta...@vger.kernel.org Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/prom.c | 6

Re: [PATCH v2 08/14] powerpc: Implement ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-27 Thread Michael Ellerman
3 insertions(+), 1 deletion(-) > create mode 100644 arch/powerpc/include/asm/fpu.h Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH] powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2

2023-12-26 Thread Michael Ellerman
Geoff Levand writes: > Commit 8c5fa3b5c4df3d071dab42b04b971df370d99354 (powerpc/64: Make ELFv2 the > default for big-endian builds), merged in Linux-6.5-rc1 changes the calling > ABI > in a way that is incompatible with the current code for the PS3's LV1 > hypervisor > calls. I'll take this for

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

2023-12-26 Thread Michael Ellerman
Ghanshyam Agrawal writes: > 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 |

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 enable

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 od

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 insert

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 Fixed:

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

2023-12-21 Thread Michael Ellerman
and help text. Fixes: 58b6fed89ab0 ("powerpc: Make virt_to_pfn() a static inline") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202311061940.4pbrm44u-...@intel.com/ Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/page.h

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 see

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 invoke

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 https://git.kern

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 check

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 pa

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 patc

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. > > Mo

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 im

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 m

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 PPC

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 >

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 > operati

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 http

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 derefe

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 https://git.kernel.org/powerpc/c/e

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 che

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 https://git.kernel.org/powerpc/c/8649829a

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 https://git.kernel.org/powerpc

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 vcpu_

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: swit

Re: Very unreliable booting (WARNING: CPU: 0 PID: 1 at kernel/context_tracking.c:215 ct_nmi_exit+0xa0/0xc0) with PPC_EARLY_DEBUG_G5 set on a PowerMac G5, kernel 6.7-rc6

2023-12-20 Thread Michael Ellerman
Erhard Furtner writes: > Greetings! > > I wanted to check whether there are any changes on issue > https://lore.kernel.org/all/20231114003721.4a9bfd37@yea/T/ on kernel > 6.7-rc. KCSAN enabled kernels still won't boot on this G5 it seems. > > What I also found out is that booting with an PPC_EARLY_

Re: [PATCH] powerpc/64s: Increase default stack size to 32KB

2023-12-19 Thread Michael Ellerman
Michael Ellerman writes: > There are reports of kernels crashing due to stack overflow while > running OpenShift (Kubernetes). The primary contributor to the stack > usage seems to be openvswitch, which is used by OVN-Kubernetes (based on > OVN (Open Virtual Network)), but NFS also co

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

2023-12-18 Thread Michael Ellerman
David Heidelberg writes: > On 13/12/2023 06:17, Michael Ellerman wrote: >> David Heidelberg writes: >>> fsl,tmu-calibration is in u32-matrix. Use matching property syntax. >>> No functional changes. Fixes warnings as: >>> $ make dtbs_check >>> ... >

Re: [PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure

2023-12-18 Thread Michael Ellerman
Aneesh Kumar K.V writes: > Luming Yu writes: > >> Before we have powerpc to use the generic entry infrastructure, >> the call to fire user return notifier is made temporarily in powerpc >> entry code. >> > > It is still not clear what will be registered as user return notifier. > Can you summariz

[GIT PULL] Please pull powerpc/linux.git powerpc-6.7-5 tag

2023-12-16 Thread Michael Ellerman
n Myneni - -- Haren Myneni (1): powerpc/pseries/vas: Migration suspend waits for no in-progress open windows Michael Ellerman (1): MAINTAINERS: powerpc: Add Aneesh & Naveen MAINTAINERS | 2 + arch/powerpc/platforms/pserie

[PATCH] powerpc/64s: Increase default stack size to 32KB

2023-12-15 Thread Michael Ellerman
the older systems like G5s, and the AmigaOne (pasemi) with a 16KB stack which should be sufficient on those machines. Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 6f105ee4f3cf

[PATCH v2 5/5] powerpc: Stop using of_root

2023-12-14 Thread Michael Ellerman
From: Christophe Leroy Replace all usages of of_root by of_find_node_by_path("/") Signed-off-by: Christophe Leroy Reviewed-by: Rob Herring Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/secure_boot.c| 8 ++-- arch/powerpc/kexec/ranges.c | 8

[PATCH v2 4/5] powerpc/machdep: Define 'compatibles' property in ppc_md and use it

2023-12-14 Thread Michael Ellerman
-by: Christophe Leroy Reviewed-by: Rob Herring Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/machdep.h| 1 + arch/powerpc/kernel/setup-common.c| 2 ++ arch/powerpc/platforms/40x/ppc40x_simple.c| 9 +++-- arch/powerpc/platforms/512x/mpc512x_generic.c

[PATCH v2 3/5] of: Reimplement of_machine_is_compatible() using of_machine_compatible_match()

2023-12-14 Thread Michael Ellerman
(). Suggested-by: Rob Herring Signed-off-by: Christophe Leroy Reviewed-by: Rob Herring Signed-off-by: Michael Ellerman --- drivers/of/base.c | 21 + include/linux/of.h | 14 +- 2 files changed, 14 insertions(+), 21 deletions(-) v2: Unchanged. diff --git a/drivers/of

[PATCH v2 2/5] of: Change of_machine_is_compatible() to return bool

2023-12-14 Thread Michael Ellerman
. Suggested-by: Rob Herring Signed-off-by: Michael Ellerman --- drivers/of/base.c | 5 ++--- include/linux/of.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) v2: New. diff --git a/drivers/of/base.c b/drivers/of/base.c index 9020be2eb4d5..c82c8b77badc 100644 --- a/drivers/of/base.c

[PATCH v2 1/5] of: Add of_machine_compatible_match()

2023-12-14 Thread Michael Ellerman
iewed-by: Rob Herring Signed-off-by: Michael Ellerman --- drivers/of/base.c | 21 + include/linux/of.h | 6 ++ 2 files changed, 27 insertions(+) v2: Unchanged. diff --git a/drivers/of/base.c b/drivers/of/base.c index 8d93cb6ea9cd..9020be2eb4d5 100644 --- a/drivers/of/b

Re: [RFC PATCH 10/12] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-13 Thread Michael Ellerman
Samuel Holland writes: > On 2023-12-11 6:23 AM, Michael Ellerman wrote: >> Hi Samuel, >> >> Thanks for trying to clean all this up. >> >> One problem below. >> >> Samuel Holland writes: >>> Now that all previously-supported architectures

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

2023-12-12 Thread Michael Ellerman
David Heidelberg writes: > fsl,tmu-calibration is in u32-matrix. Use matching property syntax. > No functional changes. Fixes warnings as: > $ make dtbs_check > ... > arch/arm64/boot/dts/freescale/imx8mq-librem5-r3.dt.yaml: tmu@3026: > fsl,tmu-calibration:0: Additional items are not allowed (

Re: [RFC PATCH 10/12] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT

2023-12-11 Thread Michael Ellerman
Hi Samuel, Thanks for trying to clean all this up. One problem below. Samuel Holland writes: > Now that all previously-supported architectures select > ARCH_HAS_KERNEL_FPU_SUPPORT, this code can depend on that symbol instead > of the existing list of architectures. It can also take advantage of

Re: [PATCH 1/2] powerpc/locking: implement this_cpu_cmpxchg local API

2023-12-11 Thread Michael Ellerman
Hi Luming Yu, Luming Yu writes: > ppc appears to have already supported cmpxchg-local atomic semantics > that is defined by the kernel convention of the feature. > Add this_cpu_cmpxchg ppc local for the performance benefit of arch > sepcific implementation than asm-generic c verison of the lockin

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

2023-12-11 Thread Michael Ellerman
Srikar Dronamraju writes: > * Srikar Dronamraju [2023-11-09 11:19:28]: > > Hi Michael, > >> 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 sh

Re: [PATCH 1/1] powerpc/debug: implement HAVE_USER_RETURN_NOTIFIER

2023-12-11 Thread Michael Ellerman
Luming Yu writes: > The support for user return notifier infrastructure > is hooked into powerpc architecture. > --- > arch/powerpc/Kconfig| 1 + > arch/powerpc/include/asm/entry-common.h | 16 > arch/powerpc/include/asm/thread_info.h | 2 ++ > arch/powerp

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

2023-12-09 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 6.7: The following changes since commit dc158d23b33df9033bcc8e7117e8591dd2f9d125: KVM: PPC: Book3S HV: Fix KVM_RUN clobbering FP/VEC user registers (2023-11-29 22:24:21 +1100) are available in

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

2023-12-07 Thread Michael Ellerman
Christophe Leroy writes: > Le 31/03/2023 à 12:53, Michael Ellerman a écrit : >> "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

Re: (subset) [PATCH 00/22] -Wmissing-prototype warning fixes

2023-12-07 Thread Michael Ellerman
On Wed, 08 Nov 2023 13:58:21 +0100, Arnd Bergmann wrote: > I slightly dropped the ball on this since last sending the series in > August, but a number of warning fixes have made it into the kernel in > the meantime, both from my earlier submission and from architecture > maintainers. > > I have no

Re: [PATCH] powerpc/ftrace: Fix stack teardown in ftrace_no_trace

2023-12-07 Thread Michael Ellerman
On Thu, 30 Nov 2023 12:29:47 +0530, Naveen N Rao wrote: > Commit 41a506ef71eb ("powerpc/ftrace: Create a dummy stackframe to fix > stack unwind") added use of a new stack frame on ftrace entry to fix > stack unwind. However, the commit missed updating the offset used while > tearing down the ftrace

Re: [PATCH] powerpc/lib: Validate size for vector operations

2023-12-07 Thread Michael Ellerman
On Thu, 23 Nov 2023 12:47:05 +0530, Naveen N Rao wrote: > Some of the fp/vmx code in sstep.c assume a certain maximum size for the > instructions being emulated. The size of those operations however is > determined separately in analyse_instr(). > > Add a check to validate the assumption on the ma

Re: [PATCH] misc: ocxl: link: Remove unnecessary (void*) conversions

2023-12-07 Thread Michael Ellerman
On Mon, 13 Nov 2023 09:45:33 +0800, Li zeming wrote: > The link pointer does not need to cast the type. > > Applied to powerpc/next. [1/1] misc: ocxl: link: Remove unnecessary (void*) conversions https://git.kernel.org/powerpc/c/220f3ced8e42b1efe9c6b84778fb0c77c0c56611 cheers

Re: [PATCH] misc: ocxl: context: Remove unnecessary (void*) conversions

2023-12-07 Thread Michael Ellerman
On Mon, 13 Nov 2023 09:15:43 +0800, Li zeming wrote: > The ctx pointer does not need to cast the type. > > Applied to powerpc/next. [1/1] misc: ocxl: context: Remove unnecessary (void*) conversions https://git.kernel.org/powerpc/c/82d30723d58fccbd2d7d707fab7649b541fafa1b cheers

Re: [PATCH] misc: ocxl: afu_irq: Remove unnecessary (void*) conversions

2023-12-07 Thread Michael Ellerman
On Mon, 13 Nov 2023 09:22:02 +0800, Li zeming wrote: > The irq pointer does not need to cast the type. > > Applied to powerpc/next. [1/1] misc: ocxl: afu_irq: Remove unnecessary (void*) conversions https://git.kernel.org/powerpc/c/84ba5d3675e23e6fa824a2268c5b6a04b52dde4d cheers

Re: [PATCH] powerpc/44x: select I2C for CURRITUCK

2023-12-07 Thread Michael Ellerman
On Thu, 30 Nov 2023 21:51:59 -0800, Randy Dunlap wrote: > Fix build errors when CURRITUCK=y and I2C is not builtin (=m or is > not set). Fixes these build errors: > > powerpc-linux-ld: arch/powerpc/platforms/44x/ppc476.o: in function > `avr_halt_system': > ppc476.c:(.text+0x58): undefined referen

Re: [PATCH] powerpc/rtas_pci: rename and properly expose config access APIs

2023-12-07 Thread Michael Ellerman
On Mon, 27 Nov 2023 18:40:09 -0600, Nathan Lynch wrote: > The rtas_read_config() and rtas_write_config() functions in > kernel/rtas_pci.c have external linkage and two users in arch/powerpc: > the rtas_pci code itself and the pseries platform's "enhanced error > handling" (EEH) support code. > > T

Re: [PATCH 0/7] powerpc/rtas: Trivial, coding style, and kernel-doc fixes

2023-12-07 Thread Michael Ellerman
On Mon, 06 Nov 2023 07:42:52 -0600, Nathan Lynch wrote: > * Fix recently introduced kernel-doc warnings. > * Make minor coding style adjustments for readability. > * Remove rtas_service_present() and an old call_rtas() declaration. > * Move a pseries-specific function prototype to pseries code. >

Re: [PATCH 0/3] powerpc/pseries/memhp: Fix minor bugs and improve error logging

2023-12-07 Thread Michael Ellerman
On Tue, 14 Nov 2023 11:01:52 -0600, Nathan Lynch wrote: > This includes a fix for an array bounds read overrun that can be > triggered when debug messages are enabled. > Patches 1 and 3 applied to powerpc/next. [1/3] powerpc/pseries/memhp: Fix access beyond end of drmem array https://git.k

Re: [PATCH] powerpc: Remove orphaned reg_a2.h

2023-12-07 Thread Michael Ellerman
On Mon, 13 Nov 2023 15:39:47 +1100, Michael Ellerman wrote: > Commit fb5a515704d7 ("powerpc: Remove platforms/wsp and associated > pieces") removed the A2 CPU support, but missed removal of reg_a2.h. > > None of the defines contained in it are used, with the exception of

Re: [PATCH] powerpc: Make cpu_spec __ro_after_init

2023-12-07 Thread Michael Ellerman
On Wed, 25 Oct 2023 12:24:52 +1100, Michael Ellerman wrote: > The cpu_spec is a struct holding various information about the CPU the > kernel is executing on. It's populated early in boot and must not change > after that. > > In particular the cpu_features and mmu_feat

Re: [PATCH] powerpc/lib: Avoid array bounds warnings in vec ops

2023-12-07 Thread Michael Ellerman
On Tue, 21 Nov 2023 10:54:36 +1100, Michael Ellerman wrote: > Building with GCC 13 (which has -array-bounds enabled) there are several > warnings in sstep.c along the lines of: > > In function ‘do_byte_reverse’, > inlined from ‘do_vec_load’ at arch/powerpc/li

Re: [PATCH] powerpc/configs/64s: Enable CONFIG_MEM_SOFT_DIRTY

2023-12-07 Thread Michael Ellerman
On Tue, 24 Oct 2023 22:27:25 +1100, Michael Ellerman wrote: > Enable CONFIG_MEM_SOFT_DIRTY to get some test coverage. Distros enable > it, and it has been broken previously. See commit 66b2ca086210 > ("powerpc/64s/radix: Fix soft dirty tracking"). > > Applied to pow

Re: [PATCH] powerpc/32: Drop unused grackle_set_stg()

2023-12-07 Thread Michael Ellerman
On Mon, 13 Nov 2023 16:19:29 +1100, Michael Ellerman wrote: > The call to grackle_set_stg() ("Store Gathering") has always been inside > an #ifdef 0, since the code was first merged in v2.3.43pre7. > > Apparently it was suspected of causing problems on some hardware so was

Re: [PATCH 1/5] powerpc/suspend: Add prototype for do_after_copyback()

2023-12-07 Thread Michael Ellerman
On Thu, 30 Nov 2023 00:19:15 +1100, Michael Ellerman wrote: > With HIBERNATION=y the build breaks with: > > arch/powerpc/kernel/swsusp_64.c:14:6: error: no previous prototype for > ‘do_after_copyback’ [-Werror=missing-prototypes] > 14 | void do_afte

Re: [PATCH 1/2] powerpc/mm: Fix build failures due to arch_reserved_kernel_pages()

2023-12-07 Thread Michael Ellerman
On Thu, 30 Nov 2023 22:44:32 +1100, Michael Ellerman wrote: > With NUMA=n and FA_DUMP=y or PRESERVE_FA_DUMP=y the build fails with: > > arch/powerpc/kernel/fadump.c:1739:22: error: no previous prototype for > ‘arch_reserved_kernel_pages’ [-Werror=missing-prototypes] > 1739

Re: [PATCH v2] powerpc: Add PVN support for HeXin C2000 processor

2023-12-07 Thread Michael Ellerman
On Wed, 29 Nov 2023 15:58:45 +0800, Zhao Ke wrote: > HeXin Tech Co. has applied for a new PVN from the OpenPower Community > for its new processor C2000. The OpenPower has assigned a new PVN > and this newly assigned PVN is 0x0066, add pvr register related > support for this PVN. > > Applied to

Re: [PATCH] powerpc: add crtsavres.o to always-y instead of extra-y

2023-12-07 Thread Michael Ellerman
On Tue, 21 Nov 2023 08:23:32 +0900, Masahiro Yamada wrote: > crtsavres.o is linked to modules. However, as explained in commit > d0e628cd817f ("kbuild: doc: clarify the difference between extra-y > and always-y"), 'make modules' does not build extra-y. > > For example, the following command fails:

Re: [PATCH] misc: ocxl: main: Remove unnecessary ‘0’ values from rc

2023-12-07 Thread Michael Ellerman
On Mon, 13 Nov 2023 09:52:29 +0800, Li kunyu wrote: > rc is assigned first, so it does not need to initialize the assignment. > > Applied to powerpc/next. [1/1] misc: ocxl: main: Remove unnecessary ‘0’ values from rc https://git.kernel.org/powerpc/c/29685ea5754f04c84ad443fd7c6869c68f636c2

Re: [PATCH] powerpc/85xx: Fix typo in code comment

2023-12-07 Thread Michael Ellerman
On Fri, 24 Nov 2023 11:02:37 +0100, Dario Binacchi wrote: > s/singals/signals/ > > Applied to powerpc/next. [1/1] powerpc/85xx: Fix typo in code comment https://git.kernel.org/powerpc/c/a9e1e4d6e8c77c732e8084b03bae0c78cafdceb0 cheers

Re: [PATCH] powerpc/xics: Check return value of kasprintf in icp_native_map_one_cpu

2023-12-07 Thread Michael Ellerman
On Wed, 22 Nov 2023 11:06:51 +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/xics: Check return value of

Re: [PATCH 4/4] powerpc/Makefile: Auto detect cross compiler

2023-12-06 Thread Michael Ellerman
Segher Boessenkool writes: > On Wed, Dec 06, 2023 at 10:55:48PM +1100, Michael Ellerman wrote: >> Look for various combinations, matching: >> powerpc(64(le)?)?(-unknown)?-linux(-gnu)?- >> >> There are more possibilities, but the above is known to find a compiler >

Re: [PATCH v4 05/13] powerpc/rtas: Facilitate high-level call sequences

2023-12-06 Thread Michael Ellerman
Nathan Lynch writes: > Nathan Lynch writes: >> Michael Ellerman writes: >>> Nathan Lynch writes: >>>> Michael Ellerman writes: >>>>> Nathan Lynch writes: >>>>>> Michael Ellerman writes: >>>>>>> Nathan Lynch

[PATCH 4/4] powerpc/Makefile: Auto detect cross compiler

2023-12-06 Thread Michael Ellerman
cross compilers (which use linux-). This allows cross compiling with simply: # Ubuntu $ sudo apt install gcc-powerpc-linux-gnu # Fedora $ sudo dnf install gcc-powerpc64-linux-gnu $ make ARCH=powerpc defconfig $ make ARCH=powerpc -j 4 Inspired by arch/parisc/Makefile. Signed-off-by: Michael

[PATCH 3/4] powerpc/Makefile: Default to ppc64le_defconfig when cross building

2023-12-06 Thread Michael Ellerman
oduce something useful for a user. Signed-off-by: Michael Ellerman --- arch/powerpc/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index b0bc17c35ed7..48c06f5a0dc1 100644 --- a/arch/powerpc/Makefile +++ b/arch/po

[PATCH 2/4] powerpc/vdso: No need to undef powerpc for 64-bit build

2023-12-06 Thread Michael Ellerman
The vdso Makefile adds -U$(ARCH) to CPPFLAGS for the vdso64.lds linker script. ARCH is always powerpc, so it becomes -Upowerpc, which means undefine the "powerpc" symbol. But the 64-bit compiler doesn't define powerpc in the first place, compare: $ gcc-5.1.0-nolibc/powerpc64-linux/bin/powerpc64

<    2   3   4   5   6   7   8   9   10   11   >