Re: [PATCH v2] tty: hvc: Fix the RISC-V SBI driver for a refactoring

2024-01-19 Thread Palmer Dabbelt
On Fri, 19 Jan 2024 19:59:11 PST (-0800), a...@brainfault.org wrote: On Sat, Jan 20, 2024 at 4:15 AM Palmer Dabbelt wrote: From: Palmer Dabbelt I missed the int->size_t refactoring in f32fcbedbe92 ("tty: hvc: convert to u8 and size_t"), which causes the newly used ops in 88ead68e764c ("tty:

Re: [PATCH v5 0/5] RISC-V SBI debug console extension support

2024-01-19 Thread Anup Patel
On Sat, Jan 20, 2024 at 3:29 AM Palmer Dabbelt wrote: > > On Fri, 19 Jan 2024 02:09:18 PST (-0800), apa...@ventanamicro.com wrote: > > On Sat, Jan 13, 2024 at 12:00 AM Palmer Dabbelt wrote: > >> > >> On Thu, 11 Jan 2024 06:50:37 PST (-0800), > >> patchwork-bot+linux-ri...@kernel.org wrote: > >>

Re: [PATCH v2] tty: hvc: Fix the RISC-V SBI driver for a refactoring

2024-01-19 Thread Anup Patel
On Sat, Jan 20, 2024 at 4:15 AM Palmer Dabbelt wrote: > > From: Palmer Dabbelt > > I missed the int->size_t refactoring in f32fcbedbe92 ("tty: hvc: convert > to u8 and size_t"), which causes the newly used ops in 88ead68e764c > ("tty: Add SBI debug console support to HVC SBI driver") to fail to >

Re: [PATCH 1/1] PCI/DPC: Fix TLP Prefix register reading offset

2024-01-19 Thread Bjorn Helgaas
On Thu, Jan 18, 2024 at 01:08:15PM +0200, Ilpo Järvinen wrote: > The TLP Prefix Log Register consists of multiple DWORDs (PCIe r6.1 sec > 7.9.14.13) but the loop in dpc_process_rp_pio_error() keeps reading > from the first DWORD. Add the iteration count based offset calculation > into the config re

[PATCH v2] tty: hvc: Fix the RISC-V SBI driver for a refactoring

2024-01-19 Thread Palmer Dabbelt
From: Palmer Dabbelt I missed the int->size_t refactoring in f32fcbedbe92 ("tty: hvc: convert to u8 and size_t"), which causes the newly used ops in 88ead68e764c ("tty: Add SBI debug console support to HVC SBI driver") to fail to build due to a linux/drivers/tty/hvc/hvc_riscv_sbi.c:59:15: error:

Re: [PATCH] tty: hvc: Fix the RISC-V SBI driver for a refactoring

2024-01-19 Thread Palmer Dabbelt
On Fri, 19 Jan 2024 13:56:13 PST (-0800), Palmer Dabbelt wrote: From: Palmer Dabbelt I missed the int->size_t refactoring in f32fcbedbe92 ("tty: hvc: convert to u8 and size_t"), which causes the newly used ops in 88ead68e764c ("tty: Add SBI debug console support to HVC SBI driver") to fail to b

Re: [PATCH v5 0/5] RISC-V SBI debug console extension support

2024-01-19 Thread Palmer Dabbelt
On Fri, 19 Jan 2024 02:09:18 PST (-0800), apa...@ventanamicro.com wrote: On Sat, Jan 13, 2024 at 12:00 AM Palmer Dabbelt wrote: On Thu, 11 Jan 2024 06:50:37 PST (-0800), patchwork-bot+linux-ri...@kernel.org wrote: > Hello: > > This series was applied to riscv/linux.git (for-next) > by Palmer

[PATCH] tty: hvc: Fix the RISC-V SBI driver for a refactoring

2024-01-19 Thread Palmer Dabbelt
From: Palmer Dabbelt I missed the int->size_t refactoring in f32fcbedbe92 ("tty: hvc: convert to u8 and size_t"), which causes the newly used ops in 88ead68e764c ("tty: Add SBI debug console support to HVC SBI driver") to fail to build due to a linux/drivers/tty/hvc/hvc_riscv_sbi.c:59:15: error:

[PATCH 4/4] powerpc: dts: fsl: rename ifc node name to be memory-controller

2024-01-19 Thread Frank Li
From: Li Yang Update the node name to be align with binding document. Signed-off-by: Li Yang Signed-off-by: Frank Li --- arch/powerpc/boot/dts/fsl/bsc9131rdb.dts| 2 +- arch/powerpc/boot/dts/fsl/bsc9132qds.dts| 2 +- arch/powerpc/boot/dts/fsl/c293pcie.dts | 2 +- arch/powerpc/boo

[PATCH 3/4] powerpc: dts: mpc85xx: remove "simple-bus" compatible from ifc node

2024-01-19 Thread Frank Li
From: Li Yang Update dts to match dts binding document. Signed-off-by: Li Yang Signed-off-by: Frank Li --- arch/powerpc/boot/dts/fsl/b4si-post.dtsi | 2 +- arch/powerpc/boot/dts/fsl/bsc9131si-post.dtsi | 2 +- arch/powerpc/boot/dts/fsl/bsc9132si-post.dtsi | 2 +- arch/powerpc/boot/dts/fs

[PATCH 2/4] powerpc: dts: p1010rdb: fix INTx interrupt issue on P1010RDB-PB

2024-01-19 Thread Frank Li
From: Xiaowei Bao Due to the INTA is shared with the active-low PHY2 interrupt on P1010RDB-PA board, so configure P1010RDB-PA's INTA with polarity as active-low, the P1010RDB-PB board is used separately, so configure P1010RDB-PB's INTA with polarity as active-high. The INTX in P1010RDB-PB do not

[PATCH 1/4] powerpc: dts: add power management nodes to FSL chips

2024-01-19 Thread Frank Li
From: Ran Wang Enable Power Management feature on device tree, including MPC8536, MPC8544, MPC8548, MPC8572, P1010, P1020, P1021, P1022, P2020, P2041, P3041, T104X, T1024. Signed-off-by: Zhao Chenhui Signed-off-by: Ran Wang Signed-off-by: Frank Li --- arch/powerpc/boot/dts/fsl/mpc8536si-post

Re: [PATCH] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-01-19 Thread Yury Norov
On Fri, Jan 19, 2024 at 04:50:53PM +0800, Shijie Huang wrote: > > 在 2024/1/19 16:42, Mike Rapoport 写道: > > On Fri, Jan 19, 2024 at 02:46:16PM +0800, Shijie Huang wrote: > > > 在 2024/1/19 12:42, Yury Norov 写道: > > > > This adds another level of indirection, I think. Currently cpu_to_node > > > > is

Re: [PATCH] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-01-19 Thread kernel test robot
Hi Huang, kernel test robot noticed the following build errors: [auto build test ERROR on driver-core/driver-core-testing] [also build test ERROR on driver-core/driver-core-next driver-core/driver-core-linus akpm-mm/mm-everything linus/master v6.7 next-20240119] [If your patch is applied to

[PATCH v2 14/14] loongarch, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on loongarch with some adjustments. Here wrap up crash dumping codes with CONFIG_CRASH_DUMP ifdeffery, and use IS_ENABLED(CONFIG_CRASH_RESERVE) check to decide

[PATCH v2 13/14] riscv, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on risc-v with some adjustments. Here wrap up crash dumping codes with CONFIG_CRASH_DUMP ifdeffery, and use IS_ENABLED(CONFIG_CRASH_RESERVE) check to decide if

[PATCH v2 12/14] mips, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on mips with some adjustments. Here use IS_ENABLED(CONFIG_CRASH_RESERVE) check to decide if compiling in the crashkernel reservation code. Signed-off-by: Baoqu

[PATCH v2 11/14] arm, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on arm with some adjustments. Here use IS_ENABLED(CONFIG_CRASH_RESERVE) check to decide if compiling in the crashkernel reservation code. Signed-off-by: Baoqua

[PATCH v2 10/14] sh, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on SuperH with some adjustments. Here wrap up crashkernel reservation code inside CONFIG_CRASH_RESERVE ifdeffery scope. Signed-off-by: Baoquan He --- arch/sh

[PATCH v2 08/14] ppc, crash: enforce KEXEC and KEXEC_FILE to select CRASH_DUMP

2024-01-19 Thread Baoquan He
In PowerPC, the crash dumping and kexec reboot share code in arch_kexec_locate_mem_hole(), in which struct crash_mem is used. Here enfoce enforce KEXEC and KEXEC_FILE to select CRASH_DUMP for now. Signed-off-by: Baoquan He --- arch/powerpc/Kconfig | 5 + 1 file changed, 5 insertions(+) dif

[PATCH v2 09/14] s390, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on s390 with some adjustments. Here wrap up crash dumping codes with CONFIG_CRASH_DUMP ifdeffery. Signed-off-by: Baoquan He --- arch/s390/kernel/kexec_elf.c

[PATCH v2 07/14] arm64, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on arm64 with some adjustments. Here wrap up crash dumping codes with CONFIG_CRASH_DUMP ifdeffery. Signed-off-by: Baoquan He --- arch/arm64/include/asm/kexec

[PATCH v2 06/14] x86, crash: wrap crash dumping code into crash related ifdefs

2024-01-19 Thread Baoquan He
Now crash codes under kernel/ folder has been split out from kexec code, crash dumping can be separated from kexec reboot in config items on x86 with some adjustments. Here, also change some ifdefs or IS_ENABLED() check to more appropriate ones, e,g - #ifdef CONFIG_KEXEC_CORE -> #ifdef CONFIG_CRA

[PATCH v2 05/14] crash: clean up kdump related config items

2024-01-19 Thread Baoquan He
By splitting CRASH_RESERVE and VMCORE_INFO out from CRASH_CORE, cleaning up the dependency of FA_DMUMP on CRASH_DUMP, and moving crash codes from kexec_core.c to crash_core.c, now we can rearrange CRASH_DUMP to depend on KEXEC_CORE, and make CRASH_DUMP select CRASH_RESERVE and VMCORE_INFO. KEXEC_C

[PATCH v2 04/14] crash: split crash dumping code out from kexec_core.c

2024-01-19 Thread Baoquan He
Currently, KEXEC_CORE select CRASH_CORE automatically because crash codes need be built in to avoid compiling error when building kexec code even though the crash dumping functionality is not enabled. E.g CONFIG_CRASH_CORE=y CONFIG_KEXEC_CORE=y CONFIG_KEXEC=y CONFIG_KEXEC_FILE=

[PATCH v2 03/14] crash: remove dependency of FA_DUMP on CRASH_DUMP

2024-01-19 Thread Baoquan He
In kdump kernel, /proc/vmcore is an elf file mapping the crashed kernel's old memory content. Its elf header is constructed in 1st kernel and passed to kdump kernel via elfcorehdr_addr. Config CRASH_DUMP enables the code of 1st kernel's old memory accessing in different architectures. Currently, c

[PATCH v2 02/14] crash: split vmcoreinfo exporting code out from crash_core.c

2024-01-19 Thread Baoquan He
Now move the relevant codes into separate files: kernel/crash_reserve.c, include/linux/crash_reserve.h. And add config item CRASH_RESERVE to control its enabling. And also update the old ifdeffery of CONFIG_CRASH_CORE, including of and config item dependency on CRASH_CORE accordingly. And also

[PATCH v2 01/14] kexec: split crashkernel reservation code out from crash_core.c

2024-01-19 Thread Baoquan He
Both kdump and fa_dump of ppc rely on crashkernel reservation. Move the relevant codes into separate files: crash_reserve.c, include/linux/crash_reserve.h. And also add config item CRASH_RESERVE to control its enabling of the codes. And update config items which has relationship with crashkernel r

[PATCH v2 00/14] Split crash out from kexec and clean up related config items

2024-01-19 Thread Baoquan He
Motivation: = Previously, LKP reported a building error. When investigating, it can't be resolved reasonablly with the present messy kdump config items. https://lore.kernel.org/oe-kbuild-all/202312182200.ka7mzifq-...@intel.com/ The kdump (crash dumping) related config items could cau

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

2024-01-19 Thread Christophe Leroy
Le 19/01/2024 à 14:41, Matthias Schiffer a écrit : >> >> Thinking about it once more, can we do even more simple ? >> >> Why do we need that __setup_cpu_g2() at all ? >> >> You could just add the following into __set_cpu_603() >> >> diff --git a/arch/powerpc/kernel/cpu_setup_6xx.S >> b/arch/power

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

2024-01-19 Thread Matthias Schiffer
On Fri, 2023-12-22 at 18:41 +, Christophe Leroy wrote: > Le 22/12/2023 à 09:48, 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 ] > >

[PATCH] powerpc/kasan: Fix addr error caused by page alignment

2024-01-19 Thread Jiangfeng Xiao
In kasan_init_region, when k_start is not page aligned, at the begin of for loop, k_cur = k_start & PAGE_MASK is less than k_start, and then va = block + k_cur - k_start is less than block, the addr va is invalid, because the memory address space from va to block is not alloced by memblock_alloc, w

[PATCH v6 5/5] RISC-V: Enable SBI based earlycon support

2024-01-19 Thread Anup Patel
Let us enable SBI based earlycon support in defconfig for both RV32 and RV64 so that "earlycon=sbi" can be used again. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- arch/riscv/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/riscv/configs/defconfig b/arch/ris

[PATCH v6 4/5] tty: Add SBI debug console support to HVC SBI driver

2024-01-19 Thread Anup Patel
From: Atish Patra RISC-V SBI specification supports advanced debug console support via SBI DBCN extension. Extend the HVC SBI driver to support it. Signed-off-by: Atish Patra Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Acked-by: Greg Kroah-Hartman --- drivers/tty/hvc/Kconfig

[PATCH v6 3/5] tty/serial: Add RISC-V SBI debug console based earlycon

2024-01-19 Thread Anup Patel
We extend the existing RISC-V SBI earlycon support to use the new RISC-V SBI debug console extension. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones Acked-by: Greg Kroah-Hartman --- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/earlycon-riscv-sbi.c | 27 +

[PATCH v6 2/5] RISC-V: Add SBI debug console helper routines

2024-01-19 Thread Anup Patel
Let us provide SBI debug console helper routines which can be shared by serial/earlycon-riscv-sbi.c and hvc/hvc_riscv_sbi.c. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- arch/riscv/include/asm/sbi.h | 5 +++ arch/riscv/kernel/sbi.c | 66 2 f

[PATCH v6 1/5] RISC-V: Add stubs for sbi_console_putchar/getchar()

2024-01-19 Thread Anup Patel
The functions sbi_console_putchar() and sbi_console_getchar() are not defined when CONFIG_RISCV_SBI_V01 is disabled so let us add stub of these functions to avoid "#ifdef" on user side. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- arch/riscv/include/asm/sbi.h | 5 + 1 file change

[PATCH v6 0/5] RISC-V SBI debug console extension support

2024-01-19 Thread Anup Patel
The SBI v2.0 specification is now frozen. The SBI v2.0 specification defines SBI debug console (DBCN) extension which replaces the legacy SBI v0.1 functions sbi_console_putchar() and sbi_console_getchar(). (Refer v2.0-rc5 at https://github.com/riscv-non-isa/riscv-sbi-doc/releases) This series adds

[PATCH 3/4] powerpc/ps3: Make real stack frames for LV1 hcalls

2024-01-19 Thread Geoff Levand
The PS3 hcall assembly code makes ad-hoc stack frames that don't have a back-chain pointer or meet other requirements like minimum frame size. This probably confuses stack unwinders. Give all hcalls a real stack frame. Signed-off-by: Nicholas Piggin Signed-off-by: Geoff Levand --- arch/powerpc/

[PATCH 4/4] Revert "powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2"

2024-01-19 Thread Geoff Levand
Patches provided by Nicholas Piggin enable PS3 support for ELFv2. Signed-off-by: Geoff Levand --- arch/powerpc/configs/ps3_defconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index aa8bb0208bcc..2b175ddf82f0 100644

[PATCH 1/4] powerpc/ps3: Fix lv1 hcall assembly for ELFv2 calling convention

2024-01-19 Thread Geoff Levand
Stack-passed parameters begin at a different offset in the caller's stack in the ELFv2 ABI. Reported-by: Geoff Levand Fixes: 8c5fa3b5c4df ("powerpc/64: Make ELFv2 the default for big-endian builds") Signed-off-by: Nicholas Piggin Signed-off-by: Geoff Levand --- arch/powerpc/include/asm/ppc_asm

[PATCH 2/4] powerpc/ps3: lv1 hcall code use symbolic constant for LR save offset

2024-01-19 Thread Geoff Levand
The LRSAVE constant is required for assembly compiled for both 32-bit and 64-bit, because the value differs there. PS3 is 64-bit only so this is a noop, but it is nice to abstract stack frame offsets. Signed-off-by: Nicholas Piggin Signed-off-by: Geoff Levand --- arch/powerpc/platforms/ps3/hvca

[PATCH 0/4] powerpc/ps3 Add ELFv2 support

2024-01-19 Thread Geoff Levand
The following changes since commit 44a1aad2fe6c10bfe0589d8047057b10a4c18a19: Merge branch 'topic/ppc-kvm' into next (2023-12-29 15:30:45 +1100) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/geoff/ps3-linux.git for-merge-elfv2 for you to fetch changes

Re: [PATCH v5 0/5] RISC-V SBI debug console extension support

2024-01-19 Thread Anup Patel
On Sat, Jan 13, 2024 at 12:00 AM Palmer Dabbelt wrote: > > On Thu, 11 Jan 2024 06:50:37 PST (-0800), > patchwork-bot+linux-ri...@kernel.org wrote: > > Hello: > > > > This series was applied to riscv/linux.git (for-next) > > by Palmer Dabbelt : > > > > On Fri, 24 Nov 2023 12:39:00 +0530 you wrote:

Re: [PATCH] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-01-19 Thread Shijie Huang
在 2024/1/19 16:42, Mike Rapoport 写道: On Fri, Jan 19, 2024 at 02:46:16PM +0800, Shijie Huang wrote: 在 2024/1/19 12:42, Yury Norov 写道: This adds another level of indirection, I think. Currently cpu_to_node is a simple inliner. After the patch it would be a real function with all the associate o

Re: [PATCH] NUMA: Early use of cpu_to_node() returns 0 instead of the correct node id

2024-01-19 Thread Mike Rapoport
On Fri, Jan 19, 2024 at 02:46:16PM +0800, Shijie Huang wrote: > > 在 2024/1/19 12:42, Yury Norov 写道: > > This adds another level of indirection, I think. Currently cpu_to_node > > is a simple inliner. After the patch it would be a real function with > > all the associate overhead. Can you share a b