Re: [PATCH v7 24/30] net: wan: Add framer framework support

2023-10-10 Thread Herve Codina
Hi Jakub On Fri, 6 Oct 2023 15:08:10 -0700 Jakub Kicinski wrote: > On Thu, 28 Sep 2023 09:06:42 +0200 Herve Codina wrote: > > +menu "Framer Subsystem" > > + > > +config GENERIC_FRAMER > > + bool "Framer Core" > > + help > > + Generic Framer support. > > + A framer is a component in c

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-10 Thread Sourabh Jain
Hello Pingfan, With this patch series applied, the kdump kernel fails to boot on powerpc with nr_cpus=1. Console logs: --- [root]# echo c > /proc/sysrq-trigger [   74.783235] sysrq: Trigger a crash [   74.783244] Kernel panic - not syncing: sysrq triggered crash [   74.783252

Re: [PATCHv8 3/5] powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus

2023-10-10 Thread Hari Bathini
On 09/10/23 5:00 pm, Pingfan Liu wrote: If the boot_cpuid is smaller than nr_cpus, it requires extra effort to ensure the boot_cpu is in cpu_present_mask. This can be achieved by reserving the last quota for the boot cpu. Note: the restriction on nr_cpus will be lifted with more effort in the

Re: [PATCH v7 26/30] net: wan: framer: Add support for the Lantiq PEF2256 framer

2023-10-10 Thread Herve Codina
Hi Jakub, On Fri, 6 Oct 2023 15:02:52 -0700 Jakub Kicinski wrote: > On Thu, 28 Sep 2023 09:06:44 +0200 Herve Codina wrote: > > + for (i = 0; i < count; i++) { > > + (audio_devs + i)->name = "framer-codec"; > > + (audio_devs + i)->of_compatible = compatible; > > +

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-10 Thread Sourabh Jain
Hello Pingfan, With this patch series applied, the kdump kernel fails to boot on powerpc with nr_cpus=1. Console logs: --- [root]# echo c > /proc/sysrq-trigger [   74.783235] sysrq: Trigger a crash [   74.783244] Kernel panic - not syncing: sysrq triggered crash [   74.783252

Re: [PATCH v3 9/9] efi: move screen_info into efi init code

2023-10-10 Thread Catalin Marinas
On Mon, Oct 09, 2023 at 11:18:45PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > After the vga console no longer relies on global screen_info, there are > only two remaining use cases: > > - on the x86 architecture, it is used for multiple boot methods >(bzImage, EFI, Xen, kexec) to

Re: [PATCH v3 1/9] vgacon: rework Kconfig dependencies

2023-10-10 Thread Geert Uytterhoeven
Hi Arnd, On Mon, Oct 9, 2023 at 11:19 PM Arnd Bergmann wrote: > From: Arnd Bergmann > > The list of dependencies here is phrased as an opt-out, but this is missing > a lot of architectures that don't actually support VGA consoles, and some > of the entries are stale: > > - powerpc used to suppo

Re: [PATCHv8 2/5] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-10-10 Thread Hari Bathini
On 09/10/23 5:00 pm, Pingfan Liu wrote: *** Idea *** For kexec -p, the boot cpu can be not the cpu0, this causes the problem of allocating memory for paca_ptrs[]. However, in theory, there is no requirement to assign cpu's logical id as its present sequence in the device tree. But there is som

Re: [PATCH] powerpc/85xx: Fix math emulation exception

2023-10-10 Thread Michael Ellerman
Christophe Leroy writes: > Booting mpc85xx_defconfig kernel on QEMU leads to: What machine/CPU model are you using for that? I tried ppce500/e500 and that is working OK for me, ie. boots to userspace and I see math instructions being emulated via the emulated stats. cheers > Bad trap at PC: fe

Re: [PATCH] powerpc/85xx: Fix math emulation exception

2023-10-10 Thread Christophe Leroy
Le 10/10/2023 à 12:45, Michael Ellerman a écrit : > Christophe Leroy writes: >> Booting mpc85xx_defconfig kernel on QEMU leads to: > > What machine/CPU model are you using for that? If I remember correctly, it was machine mpc8544ds. Christophe > > I tried ppce500/e500 and that is working OK

Re: KUEP broken on FSP2?

2023-10-10 Thread Michael Ellerman
Eddie James writes: > On 10/9/23 08:14, Michael Ellerman wrote: >> Eddie James writes: >>> Hi, >>> >>> I'm attempting to run linux 6.1 on my FSP2, but my kernel crashes >>> attempting to get into userspace. The init script works, but the first >>> binary (mount) I run results in oops. Can anyone

Re: KUEP broken on FSP2?

2023-10-10 Thread Michael Ellerman
Christophe Leroy writes: > Le 09/10/2023 à 17:12, Eddie James a écrit : >> >> On 10/9/23 08:14, Michael Ellerman wrote: >>> Eddie James writes: Hi, I'm attempting to run linux 6.1 on my FSP2, but my kernel crashes attempting to get into userspace. The init script works, but t

Re: [net-next v3 3/5] netdev: replace napi_reschedule with napi_schedule

2023-10-10 Thread Tariq Toukan
On 09/10/2023 16:37, Christian Marangi wrote: Now that napi_schedule return a bool, we can drop napi_reschedule that does the same exact function. The function comes from a very old commit bfe13f54f502 ("ibm_emac: Convert to use napi_struct independent of struct net_device") and the purpose is

Re: [PATCH] tools/perf/arch/powerpc: Fix the CPU ID const char* value by adding 0x prefix

2023-10-10 Thread Disha Goel
On 09/10/23 10:30 am, Athira Rajeev wrote: Simple expression parser test fails in powerpc as below: 4: Simple expression parser test child forked, pid 170385 Using CPUID 004e2102 division by zero syntax error syntax error FAILED tests/expr.c:65 parse test fail

[PATCH] powerpc/47x: Fix 47x syscall return crash

2023-10-10 Thread Michael Ellerman
Eddie reported that newer kernels were crashing during boot on his 476 FSP2 system: kernel tried to execute user page (b7ee2000) - exploit attempt? (uid: 0) BUG: Unable to handle kernel instruction fetch Faulting instruction address: 0xb7ee2000 Oops: Kernel access of bad area, sig: 11 [#1]

Re: [PATCH v3 0/9] video: screen_info cleanups

2023-10-10 Thread Daniel Vetter
On Mon, Oct 09, 2023 at 11:18:36PM +0200, Arnd Bergmann wrote: > From: Arnd Bergmann > > v3 changelog > > No real changes, just rebased for context changes, and picked up the Acks. > > This now conflicts with the ia64 removal and introduces one new dependency > on IA64, but that is harmless and

[Bug 216156] [bisected] kmemleak: Not scanning unknown object at 0xc00000007f000000

2023-10-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216156 --- Comment #15 from Michael Ellerman (mich...@ellerman.id.au) --- Yeah, facepalm. Calling kmemleak_no_scan() later doesn't help, because it's the early allocation that is ignored, leading to the warning. So we can just drop the call to kmemleak_

Re: [PATCH v3 0/9] video: screen_info cleanups

2023-10-10 Thread Greg Kroah-Hartman
On Tue, Oct 10, 2023 at 01:48:07PM +0200, Daniel Vetter wrote: > On Mon, Oct 09, 2023 at 11:18:36PM +0200, Arnd Bergmann wrote: > > From: Arnd Bergmann > > > > v3 changelog > > > > No real changes, just rebased for context changes, and picked up the Acks. > > > > This now conflicts with the ia6

Re: [PATCH] powerpc/47x: Fix 47x syscall return crash

2023-10-10 Thread Christophe Leroy
Le 10/10/2023 à 13:47, Michael Ellerman a écrit : > Eddie reported that newer kernels were crashing during boot on his 476 > FSP2 system: > >kernel tried to execute user page (b7ee2000) - exploit attempt? (uid: 0) >BUG: Unable to handle kernel instruction fetch >Faulting instruction

Re: [PATCH v3 1/1] PCI: layerscape-ep: set 64-bit DMA mask

2023-10-10 Thread Frank Li
On Wed, Sep 27, 2023 at 02:46:21PM +0200, Manivannan Sadhasivam wrote: > On Tue, Sep 26, 2023 at 10:04:45AM -0400, Frank Li wrote: > > From: Guanhua Gao > > > > Set DMA mask and coherent DMA mask to enable 64-bit addressing. > > > > Signed-off-by: Guanhua Gao > > Signed-off-by: Hou Zhiqiang >

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-10 Thread Frank Li
On Wed, Oct 04, 2023 at 10:23:51AM -0400, Frank Li wrote: > On Fri, Sep 15, 2023 at 02:43:05PM -0400, Frank Li wrote: > > ls1021a add suspend/resume support. > > > > Signed-off-by: Frank Li > > --- > > ping > > Frank Ping Frank > > > drivers/pci/controller/dwc/pci-layerscape.c | 88 +++

Re: [PATCH v3 1/1] PCI: layerscape-ep: set 64-bit DMA mask

2023-10-10 Thread Lorenzo Pieralisi
On Tue, 26 Sep 2023 10:04:45 -0400, Frank Li wrote: > Set DMA mask and coherent DMA mask to enable 64-bit addressing. > > Read this: https://lore.kernel.org/linux-pci/20171026223701.ga25...@bhelgaas-glaptop.roam.corp.google.com Find the issue with the commit log (that I fixed). This does not a

Re: [PATCH 2/3] PCI: layerscape: add suspend/resume for ls1021a

2023-10-10 Thread Lorenzo Pieralisi
On Tue, Oct 10, 2023 at 10:20:12AM -0400, Frank Li wrote: > On Wed, Oct 04, 2023 at 10:23:51AM -0400, Frank Li wrote: > > On Fri, Sep 15, 2023 at 02:43:05PM -0400, Frank Li wrote: > > > ls1021a add suspend/resume support. > > > > > > Signed-off-by: Frank Li > > > --- > > > > ping > > > > Frank

Re: [PATCH v3 1/1] PCI: layerscape-ep: set 64-bit DMA mask

2023-10-10 Thread Frank Li
On Tue, Oct 10, 2023 at 05:44:23PM +0200, Lorenzo Pieralisi wrote: > On Tue, 26 Sep 2023 10:04:45 -0400, Frank Li wrote: > > Set DMA mask and coherent DMA mask to enable 64-bit addressing. > > > > > > Read this: > https://lore.kernel.org/linux-pci/20171026223701.ga25...@bhelgaas-glaptop.roam.cor

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

2023-10-10 Thread Anup Patel
This series adds support for SBI debug console extension in KVM RISC-V and Linux RISC-V. To try these patches with KVM RISC-V, use KVMTOOL from riscv_sbi_dbcn_v1 branch at: https://github.com/avpatel/kvmtool.git These patches can also be found in the riscv_sbi_dbcn_v1 branch at: https://github.co

[PATCH 1/6] RISC-V: Add defines for SBI debug console extension

2023-10-10 Thread Anup Patel
We add SBI debug console extension related defines/enum to the asm/sbi.h header. Signed-off-by: Anup Patel --- arch/riscv/include/asm/sbi.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/riscv/include/asm/sbi.h b/arch/riscv/include/asm/sbi.h index 5b4a1bf5f439..12dfda6bb924 1006

[PATCH 2/6] RISC-V: KVM: Change the SBI specification version to v2.0

2023-10-10 Thread Anup Patel
We will be implementing SBI DBCN extension for KVM RISC-V so let us change the KVM RISC-V SBI specification version to v2.0. Signed-off-by: Anup Patel --- arch/riscv/include/asm/kvm_vcpu_sbi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/riscv/include/asm/kvm_vcpu_sbi

[PATCH 3/6] RISC-V: KVM: Forward SBI DBCN extension to user-space

2023-10-10 Thread Anup Patel
The SBI DBCN extension needs to be emulated in user-space so let us forward console_puts() call to user-space. Signed-off-by: Anup Patel --- arch/riscv/include/asm/kvm_vcpu_sbi.h | 1 + arch/riscv/include/uapi/asm/kvm.h | 1 + arch/riscv/kvm/vcpu_sbi.c | 4 arch/riscv/kvm

[PATCH 4/6] tty/serial: Add RISC-V SBI debug console based earlycon

2023-10-10 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 --- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/earlycon-riscv-sbi.c | 35 ++--- 2 files changed, 32 insertions(+), 5 deleti

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

2023-10-10 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 --- drivers/tty/hvc/Kconfig | 2 +- drivers/tty/hvc/hvc_riscv_sbi.c | 80 +

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

2023-10-10 Thread Anup Patel
Let us enable SBI based earlycon support in defconfigs for both RV32 and RV64 so that "earlycon=sbi" can be used again. Signed-off-by: Anup Patel --- arch/riscv/configs/defconfig | 1 + arch/riscv/configs/rv32_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/riscv/config

Re: [PATCH 5/6] tty: Add SBI debug console support to HVC SBI driver

2023-10-10 Thread Greg Kroah-Hartman
On Tue, Oct 10, 2023 at 10:35:02PM +0530, Anup Patel wrote: > --- a/drivers/tty/hvc/hvc_riscv_sbi.c > +++ b/drivers/tty/hvc/hvc_riscv_sbi.c > @@ -15,6 +15,7 @@ > > #include "hvc_console.h" > > +#ifdef CONFIG_RISCV_SBI_V01 Please no #ifdef in a .c file, that's not a good style for Linux code a

Re: [PATCH 2/6] RISC-V: KVM: Change the SBI specification version to v2.0

2023-10-10 Thread Greg Kroah-Hartman
On Tue, Oct 10, 2023 at 10:34:59PM +0530, Anup Patel wrote: > We will be implementing SBI DBCN extension for KVM RISC-V so let > us change the KVM RISC-V SBI specification version to v2.0. > > Signed-off-by: Anup Patel > --- > arch/riscv/include/asm/kvm_vcpu_sbi.h | 2 +- > 1 file changed, 1 ins

Re: [PATCH 3/6] RISC-V: KVM: Forward SBI DBCN extension to user-space

2023-10-10 Thread Greg Kroah-Hartman
On Tue, Oct 10, 2023 at 10:35:00PM +0530, Anup Patel wrote: > The SBI DBCN extension needs to be emulated in user-space Why? > so let > us forward console_puts() call to user-space. What could go wrong! Why does userspace have to get involved in a console message? Why is this needed at all? T

Re: [PATCH 4/6] tty/serial: Add RISC-V SBI debug console based earlycon

2023-10-10 Thread Greg Kroah-Hartman
On Tue, Oct 10, 2023 at 10:35:01PM +0530, Anup Patel wrote: > We extend the existing RISC-V SBI earlycon support to use the new > RISC-V SBI debug console extension. > > Signed-off-by: Anup Patel > --- > drivers/tty/serial/Kconfig | 2 +- > drivers/tty/serial/earlycon-riscv-sbi.c |

Re: [PATCH v5 1/5] powerpc/code-patching: introduce patch_instructions()

2023-10-10 Thread Christophe Leroy
Le 28/09/2023 à 21:48, Hari Bathini a écrit : > patch_instruction() entails setting up pte, patching the instruction, > clearing the pte and flushing the tlb. If multiple instructions need > to be patched, every instruction would have to go through the above > drill unnecessarily. Instead, introd

[Bug 216156] [bisected] kmemleak: Not scanning unknown object at 0xc00000007f000000

2023-10-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216156 --- Comment #16 from Erhard F. (erhar...@mailbox.org) --- Your newest patch fixes the issue. Thanks! -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.

Re: [PATCH RESEND 0/5] ASoC: DT matching and header cleanups

2023-10-10 Thread Mark Brown
On Tue, 03 Oct 2023 13:13:09 -0500, Rob Herring wrote: > (Got a bunch of bounces on the first try. Something weird going on with > the To header best I can tell. Retrying with git-send-email instead of > b4.) > > This is a series is part of ongoing clean-ups related to device > matching and DT rel

Re: [PATCH v2 0/5] ASoC: DT matching and header cleanups

2023-10-10 Thread Mark Brown
On Wed, 04 Oct 2023 10:58:04 -0500, Rob Herring wrote: > (trimmed the recipient list due to bounces on v1) > > This is a series is part of ongoing clean-ups related to device > matching and DT related implicit includes. Essentially of_device.h has > a bunch of implicit includes and generally isn't

Re: [PATCH v3 0/5] ASoC: DT matching and header cleanups

2023-10-10 Thread Mark Brown
On Fri, 06 Oct 2023 15:09:09 -0500, Rob Herring wrote: > (trimmed the recipient list due to bounces on v1) > > This is a series is part of ongoing clean-ups related to device > matching and DT related implicit includes. Essentially of_device.h has > a bunch of implicit includes and generally isn't

[PATCH] scsi: ibmvfc: Use 'unsigned int' for single-bit bitfields in 'struct ibmvfc_host'

2023-10-10 Thread Nathan Chancellor
_passthru:1; + unsigned int scan_complete:1; int scan_timeout; int events_to_log; #define IBMVFC_AE_LINKUP 0x0001 --- base-commit: b6f2e063017b92491976a40c32a0e4b3c13e7d2f change-id: 20231010-ibmvfc-fix-bitfields-type-971a07c64ec6 Best regards, -- Nathan Chancellor

Re: [PATCH] scsi: ibmvfc: Use 'unsigned int' for single-bit bitfields in 'struct ibmvfc_host'

2023-10-10 Thread Nick Desaulniers
d int do_enquiry:1; > + unsigned int aborting_passthru:1; > + unsigned int scan_complete:1; > int scan_timeout; > int events_to_log; > #define IBMVFC_AE_LINKUP 0x0001 > > --- > base-commit: b6f2e063017b92491976a40c32a0e4b3c13e7d2f > change-id: 20231010-ibmvfc-fix-bitfields-type-971a07c64ec6 > > Best regards, > -- > Nathan Chancellor > > -- Thanks, ~Nick Desaulniers

Re: [PATCH 5/7] powerpc/pseries/papr-sysparm: expose chardev API to user space

2023-10-10 Thread kernel test robot
: eddc90ea2af5933249ea1a78119f2c8ef8d07156 patch link: https://lore.kernel.org/r/20231006-papr-sys_rtas-vs-lockdown-v1-5-3a36bfb66e2e%40linux.ibm.com patch subject: [PATCH 5/7] powerpc/pseries/papr-sysparm: expose chardev API to user space config: powerpc64-randconfig-002-20231010 (https://download.01.org

Re: [PATCH v3 1/3] powerpc: make fadump resilient with memory add/remove events

2023-10-10 Thread kernel test robot
Hi Sourabh, kernel test robot noticed the following build errors: [auto build test ERROR on powerpc/next] [also build test ERROR on powerpc/fixes linus/master v6.6-rc5 next-20231010] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to

Re: [PATCH v3 0/7] sysctl: Remove sentinel elements from arch

2023-10-10 Thread Luis Chamberlain
On Mon, Oct 02, 2023 at 01:30:35PM +0200, Joel Granados via B4 Relay wrote: > V3: > * Removed the ia64 patch to avoid conflicts with the ia64 removal > * Rebased onto v6.6-rc4 > * Kept/added the trailing comma for the ctl_table arrays. This was a comment > that we received "drivers/*" patch set.

Re: [PATCH v2 00/15] sysctl: Remove sentinel elements from drivers

2023-10-10 Thread Luis Chamberlain
On Mon, Oct 02, 2023 at 10:55:17AM +0200, Joel Granados via B4 Relay wrote: > Changes in v2: > - Left the dangling comma in the ctl_table arrays. > - Link to v1: > https://lore.kernel.org/r/20230928-jag-sysctl_remove_empty_elem_drivers-v1-0-e59120fca...@samsung.com Thanks! Pushed onto sysctl-next

Re: [PATCH] ibmvnic: replace deprecated strncpy with strscpy

2023-10-10 Thread Kees Cook
On Mon, Oct 09, 2023 at 11:19:57PM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings > [1] and as such we should prefer more robust and less ambiguous string > interfaces. > > NUL-padding is not required as the buffer is already memset to 0: > |

Re: [PATCHv8 1/5] powerpc/setup : Enable boot_cpu_hwid for PPC32

2023-10-10 Thread Pingfan Liu
On Tue, Oct 10, 2023 at 02:38:40PM +0530, Sourabh Jain wrote: > Hello Pingfan, > > > > > With this patch series applied, the kdump kernel fails to boot on > > powerpc with nr_cpus=1. > > > > Console logs: > > --- > > [root]# echo c > /proc/sysrq-trigger > > [   74.783235] sysrq:

Re: [PATCHv8 3/5] powerpc/setup: Handle the case when boot_cpuid greater than nr_cpus

2023-10-10 Thread Pingfan Liu
On Tue, Oct 10, 2023 at 01:56:13PM +0530, Hari Bathini wrote: > > > On 09/10/23 5:00 pm, Pingfan Liu wrote: > > If the boot_cpuid is smaller than nr_cpus, it requires extra effort to > > ensure the boot_cpu is in cpu_present_mask. This can be achieved by > > reserving the last quota for the boot

Re: [PATCHv8 2/5] powerpc/setup: Loosen the mapping between cpu logical id and its seq in dt

2023-10-10 Thread Pingfan Liu
On Tue, Oct 10, 2023 at 04:07:00PM +0530, Hari Bathini wrote: > > > On 09/10/23 5:00 pm, Pingfan Liu wrote: > > *** Idea *** > > For kexec -p, the boot cpu can be not the cpu0, this causes the problem > > of allocating memory for paca_ptrs[]. However, in theory, there is no > > requirement to ass

[powerpc:merge] BUILD SUCCESS b8b05bc6d83c86e15b6d55a4c70c206eb74f840d

2023-10-10 Thread kernel test robot
gcc arc allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20231010 gcc arm allmodconfig

[PATCH 02/12] powerpc/pseries: Restructure hvc_get_chars() endianness

2023-10-10 Thread Benjamin Gray
Sparse reports an endian mismatch in hvc_get_chars(). At first it seemed like the retbuf should be __be64[], but actually retbuf holds serialized registers returned by the hypervisor call, so it's correctly CPU endian typed. Instead, it is the be64_to_cpu() that's misleading. The intent is to do

[PATCH 03/12] powerpc: Explicitly reverse bytes when checking for byte reversal

2023-10-10 Thread Benjamin Gray
Sparse reports an invalid endian cast here. The code is written for big endian platforms, so le32_to_cpu() acts as a byte reversal. This file is checked by sparse on a little endian build though, so replace the reverse function with the dedicated swab32() function to better express the intent of t

[PATCH 01/12] powerpc/xive: Fix endian conversion size

2023-10-10 Thread Benjamin Gray
Sparse reports a size mismatch in the endian swap. The Opal implementation[1] passes the value as a __be64, and the receiving variable out_qsize is a u64, so the use of be32_to_cpu() appears to be an error. [1]: https://github.com/open-power/skiboot/blob/80e2b1dc73/hw/xive.c#L3854 Fixes: 88ec6b93

[PATCH 00/12] Miscellaneous Sparse fixes

2023-10-10 Thread Benjamin Gray
There are many Sparse warnings in the kernel, including the powerpc directory. This series provides fixes for some low-hanging fruit found when trying to triage the warnings earlier this year. It addresses about 100 warnings (many have the same root cause). I know there's concerns about making it

[PATCH 04/12] powerpc: Use NULL instead of 0 for null pointers

2023-10-10 Thread Benjamin Gray
Sparse reports several uses of 0 for pointer arguments and comparisons. Replace with NULL to better convey the intent. Remove entirely if a comparison to follow the kernel style of implicit boolean conversions. Signed-off-by: Benjamin Gray --- arch/powerpc/kernel/setup_64.c| 2 +- arch/p

[PATCH 05/12] powerpc: Remove extern from function implementations

2023-10-10 Thread Benjamin Gray
Sparse reports several function implementations annotated with extern. This is clearly incorrect, likely just copied from an actual extern declaration in another file. Fix the sparse warnings by removing extern. Signed-off-by: Benjamin Gray --- arch/powerpc/kernel/iommu.c | 8 arc

[PATCH 08/12] powerpc/opal: Annotate out param endianness

2023-10-10 Thread Benjamin Gray
Sparse reports an endian mismatch with args to opal_int_get_xirr(). Checking the skiboot source[1] shows the function takes a __be32* (as expected), so update the function declaration to reflect this. [1]: https://github.com/open-power/skiboot/blob/80e2b1dc73/hw/xive.c#L3479 Signed-off-by: Benjam

[PATCH 10/12] powerpc: Cast away __iomem in low level IO routines

2023-10-10 Thread Benjamin Gray
Sparse reports dereferencing an __iomem pointer. These routines are clearly low level handlers for IO memory, so force cast away the __iomem annotation to tell sparse the dereferences are safe. Signed-off-by: Benjamin Gray --- arch/powerpc/kernel/io.c | 12 ++-- 1 file changed, 6 inserti

[PATCH 11/12] powerpc/eeh: Remove unnecessary cast

2023-10-10 Thread Benjamin Gray
Sparse reports a warning when casting to an int. There is no need to cast in the first place, so drop them. Signed-off-by: Benjamin Gray --- arch/powerpc/kernel/eeh_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/ke

[PATCH 09/12] powerpc/uaccess: Cast away __user annotation after verification

2023-10-10 Thread Benjamin Gray
Sparse reports dereference of a __user pointer. copy_mc_to_user() takes a __user pointer, verifies it, then calls the generic copy routine copy_mc_generic(). As we have verified the pointer, cast out the __user annotation when passing to copy_mc_generic(). Signed-off-by: Benjamin Gray --- arch/

[PATCH 12/12] powerpc/fadump: Annotate endianness cast with __force

2023-10-10 Thread Benjamin Gray
Sparse reports an endianness error with the else case of val = (cpu_endian ? be64_to_cpu(reg_entry->reg_val) : (u64)(reg_entry->reg_val)); This is a safe operation because the code is explicitly working with dynamic endianness, so add the __force annotation to tell Sparse to ignore it.

[PATCH 07/12] powerpc/kvm: Force cast endianness of KVM shared regs

2023-10-10 Thread Benjamin Gray
Sparse reports endianness mismatches in the KVM shared regs getter and setter helpers. This code has dynamic endianness behind a safe interface, so a force is warranted here to tell sparse this is OK. Signed-off-by: Benjamin Gray --- arch/powerpc/include/asm/kvm_ppc.h | 8 1 file chang

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

2023-10-10 Thread Haren Myneni
On 10/9/23 1:09 PM, Nathan Lynch wrote: Hi Haren, Haren Myneni writes: 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 windo

Re: [PATCH 5/6] tty: Add SBI debug console support to HVC SBI driver

2023-10-10 Thread Anup Patel
On Tue, Oct 10, 2023 at 10:42 PM Greg Kroah-Hartman wrote: > > On Tue, Oct 10, 2023 at 10:35:02PM +0530, Anup Patel wrote: > > --- a/drivers/tty/hvc/hvc_riscv_sbi.c > > +++ b/drivers/tty/hvc/hvc_riscv_sbi.c > > @@ -15,6 +15,7 @@ > > > > #include "hvc_console.h" > > > > +#ifdef CONFIG_RISCV_SBI_V0

Re: [PATCH 4/6] tty/serial: Add RISC-V SBI debug console based earlycon

2023-10-10 Thread Anup Patel
On Tue, Oct 10, 2023 at 10:46 PM Greg Kroah-Hartman wrote: > > On Tue, Oct 10, 2023 at 10:35:01PM +0530, Anup Patel wrote: > > We extend the existing RISC-V SBI earlycon support to use the new > > RISC-V SBI debug console extension. > > > > Signed-off-by: Anup Patel > > --- > > drivers/tty/seria

[PATCH v8 00/30] Add support for QMC HDLC, framer infrastructure and PEF2256 framer

2023-10-10 Thread Herve Codina
Hi, I have a system where I need to handle an HDLC interface and some audio data. The HDLC data are transferred using a TDM bus on which a PEF2256 (E1/T1 framer) is present. The PEF2256 transfers data from/to the TDM bus to/from the E1 line. This PEF2256 is connected to a PowerQUICC SoC for the c

[PATCH v8 02/30] soc: fsl: cpm1: qmc: Fix __iomem addresses declaration

2023-10-10 Thread Herve Codina
Running sparse (make C=1) on qmc.c raises a lot of warning such as: ... warning: incorrect type in assignment (different address spaces) expected struct cpm_buf_desc [usertype] *[noderef] __iomem bd got struct cpm_buf_desc [noderef] [usertype] __iomem *txbd_free ... Indeed, some va

[PATCH v8 01/30] soc: fsl: cpm1: tsa: Fix __iomem addresses declaration

2023-10-10 Thread Herve Codina
Running sparse (make C=1) on tsa.c raises a lot of warning such as: --- 8< --- warning: incorrect type in assignment (different address spaces) expected void *[noderef] si_regs got void [noderef] __iomem * --- 8< --- Indeed, some variable were declared 'type *__iomem var' instead o

[PATCH v8 03/30] soc: fsl: cpm1: qmc: Fix rx channel reset

2023-10-10 Thread Herve Codina
The qmc_chan_reset_rx() set the is_rx_stopped flag. This leads to an inconsistent state in the following sequence. qmc_chan_stop() qmc_chan_reset() Indeed, after the qmc_chan_reset() call, the channel must still be stopped. Only a qmc_chan_start() call can move the channel from stopped stat

[PATCH v8 04/30] soc: fsl: cpm1: qmc: Extend the API to provide Rx status

2023-10-10 Thread Herve Codina
In HDLC mode, some status flags related to the data read transfer can be set by the hardware and need to be known by a QMC consumer for further analysis. Extend the API in order to provide these transfer status flags at the read complete() call. In TRANSPARENT mode, these flags have no meaning. K

[PATCH v8 05/30] soc: fsl: cpm1: qmc: Remove inline function specifiers

2023-10-10 Thread Herve Codina
The inline function specifier is present on some functions but it is better to let the compiler decide inlining or not these functions. Remove inline specifiers. Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC") Signed-off-by: Herve Codina Suggested-by: Andrew Lunn Reviewed-by: Christ

[PATCH v8 06/30] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Fix example property name

2023-10-10 Thread Herve Codina
The given example mentions the 'fsl,mode' property whereas the correct property name, the one described, is 'fsl,operational-mode'. Fix the example to use the correct property name. Fixes: a9b121327c93 ("dt-bindings: soc: fsl: cpm_qe: Add QMC controller") Signed-off-by: Herve Codina Acked-by: Co

[PATCH v8 07/30] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Add 'additionalProperties: false' in child nodes

2023-10-10 Thread Herve Codina
Additional properties in child node should not be allowed. Prevent them adding 'additionalProperties: false' Signed-off-by: Herve Codina Acked-by: Conor Dooley Acked-by: Rob Herring --- .../devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml | 1 + 1 file changed, 1 insertion(+) dif

[PATCH v8 08/30] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Add support for QMC HDLC

2023-10-10 Thread Herve Codina
The QMC (QUICC mutichannel controller) is a controller present in some PowerQUICC SoC such as MPC885. The QMC HDLC uses the QMC controller to transfer HDLC data. Additionally, a framer can be connected to the QMC HDLC. If present, this framer is the interface between the TDM bus used by the QMC HD

[PATCH v8 09/30] soc: fsl: cpm1: qmc: Add support for child devices

2023-10-10 Thread Herve Codina
QMC child devices support is needed to avoid orphan DT nodes that use a simple DT phandle to reference a QMC channel. Allow to instantiate child devices and also extend the API to get the qmc_chan using a child device. Signed-off-by: Herve Codina --- drivers/soc/fsl/qe/qmc.c | 91 ++

[PATCH v8 10/30] net: wan: Add support for QMC HDLC

2023-10-10 Thread Herve Codina
The QMC HDLC driver provides support for HDLC using the QMC (QUICC Multichannel Controller) to transfer the HDLC data. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- drivers/net/wan/Kconfig| 12 + drivers/net/wan/Makefile | 1 + drivers/net/wan/fsl_qmc_hdlc.c | 4

[PATCH v8 11/30] MAINTAINERS: Add the Freescale QMC HDLC driver entry

2023-10-10 Thread Herve Codina
After contributing the driver, add myself as the maintainer for the Freescale QMC HDLC driver. Signed-off-by: Herve Codina --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 90f13281d297..8b987f2c8633 100644 --- a/MAINTAINERS +++ b/MAINTAIN

[PATCH v8 12/30] soc: fsl: cpm1: qmc: Introduce available timeslots masks

2023-10-10 Thread Herve Codina
Available timeslots masks define timeslots available for the related channel. These timeslots are defined by the QMC binding. Timeslots used are initialized to available timeslots but can be a subset of available timeslots. This prepares the dynamic timeslots management (ie. changing timeslots at

[PATCH v8 13/30] soc: fsl: cpm1: qmc: Rename qmc_setup_tsa* to qmc_init_tsa*

2023-10-10 Thread Herve Codina
qmc_setup_tsa* are called once at initialisation. They initialize the QMC TSA table. In order to introduce setup function later on for dynamic timeslots management, rename the function to avoid later confusion. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc

[PATCH v8 14/30] soc: fsl: cpm1: qmc: Introduce qmc_chan_setup_tsa*

2023-10-10 Thread Herve Codina
Introduce the qmc_chan_setup_tsa* functions to setup entries related to the given channel. Use them during QMC channels setup. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 161 ++- 1 file changed, 125 insertions(+),

[PATCH v8 15/30] soc: fsl: cpm1: qmc: Remove no more needed checks from qmc_check_chans()

2023-10-10 Thread Herve Codina
The newly introduced qmc_chan_setup_tsa* functions check that the channel entries are not already used. These checks are also performed by qmc_check_chans() and are no more needed. Remove them from qmc_check_chans(). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- drivers/soc/fsl

[PATCH v8 16/30] soc: fsl: cpm1: qmc: Check available timeslots in qmc_check_chans()

2023-10-10 Thread Herve Codina
The timeslots checked in qmc_check_chans() are the timeslots used. With the introduction of the available timeslots, the used timeslots are a subset of the available timeslots. The timeslots checked during the qmc_check_chans() call should be the available ones. Simply update and check the availab

[PATCH v8 17/30] soc: fsl: cpm1: qmc: Add support for disabling channel TSA entries

2023-10-10 Thread Herve Codina
In order to allow runtime timeslot route changes, disabling channel TSA entries needs to be supported. Add support for this new feature. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletio

[PATCH v8 18/30] soc: fsl: cpm1: qmc: Split Tx and Rx TSA entries setup

2023-10-10 Thread Herve Codina
The Tx and Rx entries for a given channel are set in one function. In order to modify Rx entries and Tx entries independently of one other, split this function in one for the Rx part and one for the Tx part. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c

[PATCH v8 19/30] soc: fsl: cpm1: qmc: Introduce is_tsa_64rxtx flag

2023-10-10 Thread Herve Codina
In order to support runtime timeslot route changes, some operations will be different according the routing table used (common Rx and Tx table or one table for Rx and one for Tx). The is_tsa_64rxtx flag is introduced to avoid extra computation to determine the table format each time we need it. It

[PATCH v8 20/30] soc: fsl: cpm1: qmc: Handle timeslot entries at channel start() and stop()

2023-10-10 Thread Herve Codina
In order to support runtime timeslot route changes, enable the channel timeslot entries at channel start() and disable them at channel stop(). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 175 --- 1 file changed, 16

[PATCH v8 21/30] soc: fsl: cpm1: qmc: Remove timeslots handling from setup_chan()

2023-10-10 Thread Herve Codina
Timeslots setting is done at channel start() and stop(). There is no more need to do that during setup_chan(). Simply remove timeslot setting from setup_chan(). Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 28 1 file chan

[PATCH v8 22/30] soc: fsl: cpm1: qmc: Introduce functions to change timeslots at runtime

2023-10-10 Thread Herve Codina
Introduce qmc_chan_{get,set}_ts_info() function to allow timeslots modification at runtime. The modification is provided using qmc_chan_set_ts_info() and will be applied on next qmc_chan_start(). qmc_chan_set_ts_info() must be called with the channel rx and/or tx stopped. Signed-off-by: Herve Cod

[PATCH v8 23/30] wan: qmc_hdlc: Add runtime timeslots changes support

2023-10-10 Thread Herve Codina
QMC channels support runtime timeslots changes but nothing is done at the QMC HDLC driver to handle these changes. Use existing IFACE ioctl in order to configure the timeslots to use. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- drivers/net/wan/fsl_qmc_hdlc.c | 169 +++

[PATCH v8 24/30] net: wan: Add framer framework support

2023-10-10 Thread Herve Codina
A framer is a component in charge of an E1/T1 line interface. Connected usually to a TDM bus, it converts TDM frames to/from E1/T1 frames. It also provides information related to the E1/T1 line. The framer framework provides a set of APIs for the framer drivers (framer provider) to create/destroy

[PATCH v8 25/30] dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer

2023-10-10 Thread Herve Codina
The Lantiq PEF2256 is a framer and line interface component designed to fulfill all required interfacing between an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Reviewed-by: Rob Herring --- .../bindings/net/lantiq,

[PATCH v8 26/30] net: wan: framer: Add support for the Lantiq PEF2256 framer

2023-10-10 Thread Herve Codina
The Lantiq PEF2256 is a framer and line interface component designed to fulfill all required interfacing between an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy Reviewed-by: Linus Walleij --- drivers/net/wan/framer

[PATCH v8 27/30] pinctrl: Add support for the Lantic PEF2256 pinmux

2023-10-10 Thread Herve Codina
The Lantiq PEF2256 is a framer and line interface component designed to fulfill all required interfacing between an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. This kind of component can be found in old telecommunication system. It was used to digital transmission of many si

[PATCH v8 28/30] MAINTAINERS: Add the Lantiq PEF2256 driver entry

2023-10-10 Thread Herve Codina
After contributing the driver, add myself as the maintainer for the Lantiq PEF2256 driver. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8b987f2c8633..d8f2433e326e 100644 ---

[PATCH v8 29/30] ASoC: codecs: Add support for the framer codec

2023-10-10 Thread Herve Codina
The framer codec interacts with a framer. It allows to use some of the framer timeslots as audio channels to transport audio data over the framer E1/T1/J1 lines. It also reports line carrier detection events through the ALSA jack detection feature. Signed-off-by: Herve Codina Reviewed-by: Christo

[PATCH v8 30/30] net: wan: fsl_qmc_hdlc: Add framer support

2023-10-10 Thread Herve Codina
Add framer support in the fsl_qmc_hdlc driver in order to be able to signal carrier changes to the network stack based on the framer status Also use this framer to provide information related to the E1/T1 line interface on IF_GET_IFACE and configure the line interface according to IF_IFACE_{E1,T1}

Re: [PATCH 2/6] RISC-V: KVM: Change the SBI specification version to v2.0

2023-10-10 Thread Anup Patel
On Tue, Oct 10, 2023 at 10:43 PM Greg Kroah-Hartman wrote: > > On Tue, Oct 10, 2023 at 10:34:59PM +0530, Anup Patel wrote: > > We will be implementing SBI DBCN extension for KVM RISC-V so let > > us change the KVM RISC-V SBI specification version to v2.0. > > > > Signed-off-by: Anup Patel > > ---

[PATCH] powerpc: Remove cpm_dp...() macros

2023-10-10 Thread Christophe Leroy
Since commit d3c511ac1d72 ("powerpc/cpm: Remove !CONFIG_PPC_CPM_NEW_BINDING code") cpm_dp...() macros have no added value anymore. Last user of those macros were fixed by commit 5e6cb39a256d ("net: fs_enet: Use cpm_muram_xxx() functions instead of cpm_dpxxx() macros") Remove them. Signed-off-by:

Re: [PATCH 3/6] RISC-V: KVM: Forward SBI DBCN extension to user-space

2023-10-10 Thread Anup Patel
On Tue, Oct 10, 2023 at 10:45 PM Greg Kroah-Hartman wrote: > > On Tue, Oct 10, 2023 at 10:35:00PM +0530, Anup Patel wrote: > > The SBI DBCN extension needs to be emulated in user-space > > Why? The SBI debug console is similar to a console port available to KVM Guest so the KVM user space tool (i

  1   2   >