Re: [PATCH] treewide: Spelling fix in comment

2023-10-20 Thread Jakub Kicinski
On Fri, 20 Oct 2023 17:31:56 +0800 Kunwu Chan wrote: > reques -> request > > Fixes: 09dde54c6a69 ("PS3: gelic: Add wireless support for PS3") > Signed-off-by: Kunwu Chan Appears to have been applied to net, thank you!

[PATCH v2 1/3] hvc/xen: fix event channel handling for secondary consoles

2023-10-20 Thread David Woodhouse
From: David Woodhouse The xencons_connect_backend() function allocates a local interdomain event channel with xenbus_alloc_evtchn(), then calls bind_interdomain_evtchn_to_irq_lateeoi() to bind to that port# on the *remote* domain. That doesn't work very well: (qemu) device_add

[PATCH v2 3/3] hvc/xen: fix console unplug

2023-10-20 Thread David Woodhouse
From: David Woodhouse On unplug of a Xen console, xencons_disconnect_backend() unconditionally calls free_irq() via unbind_from_irqhandler(), causing a warning of freeing an already-free IRQ: (qemu) device_del con1 [ 32.050919] [ cut here ] [ 32.050942] Trying to

[PATCH v2 0/3] hvc/xen: Xen console fixes.

2023-10-20 Thread David Woodhouse
It started out relatively simple, fixing the fact that the secondary consoles didn't work at *all* due to bugs in the IRQ setup. There were one or two other simple fixes that I snuck into the same patch in v1. But it's much more broken than that, so split the fixes out, especially the last one

[PATCH v2 2/3] hvc/xen: fix error path in xen_hvc_init() to always register frontend driver

2023-10-20 Thread David Woodhouse
From: David Woodhouse The xen_hvc_init() function should always register the frontend driver, even when there's no primary console — as there may be secondary consoles. (Qemu can always add secondary consoles, but only the toolstack can add the primary because it's special.) Signed-off-by:

Re: [PATCH] hvc/xen: fix event channel handling for secondary consoles

2023-10-20 Thread David Woodhouse
On Fri, 2023-10-20 at 10:51 +0200, Juergen Gross wrote: > > > (qemu) device_del con1 > > [   32.050919] [ cut here ] > > [   32.050942] Trying to free already-free IRQ 33 > > [   32.050990] WARNING: CPU: 0 PID: 51 at kernel/irq/manage.c:1895 > > __free_irq+0x1d4/0x330 > >

Re: [PATCH v6 5/5] powerpc/bpf: use bpf_jit_binary_pack_[alloc|finalize|free]

2023-10-20 Thread Hari Bathini
On 19/10/23 11:41 am, Michael Ellerman wrote: Hari Bathini writes: Use bpf_jit_binary_pack_alloc in powerpc jit. The jit engine first writes the program to the rw buffer. When the jit is done, the program is copied to the final location with bpf_jit_binary_pack_finalize. With multiple

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

2023-10-20 Thread Hari Bathini
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, introduce patch_instructions() function that sets up the pte,

[PATCH v7 5/5] powerpc/bpf: use bpf_jit_binary_pack_[alloc|finalize|free]

2023-10-20 Thread Hari Bathini
Use bpf_jit_binary_pack_alloc in powerpc jit. The jit engine first writes the program to the rw buffer. When the jit is done, the program is copied to the final location with bpf_jit_binary_pack_finalize. With multiple jit_subprogs, bpf_jit_free is called on some subprograms that haven't got

[PATCH v7 3/5] powerpc/bpf: implement bpf_arch_text_invalidate for bpf_prog_pack

2023-10-20 Thread Hari Bathini
Implement bpf_arch_text_invalidate and use it to fill unused part of the bpf_prog_pack with trap instructions when a BPF program is freed. Signed-off-by: Hari Bathini Acked-by: Song Liu --- * No changes in v7. arch/powerpc/net/bpf_jit_comp.c | 15 +++ 1 file changed, 15

[PATCH v7 4/5] powerpc/bpf: rename powerpc64_jit_data to powerpc_jit_data

2023-10-20 Thread Hari Bathini
powerpc64_jit_data is a misnomer as it is meant for both ppc32 and ppc64. Rename it to powerpc_jit_data. Signed-off-by: Hari Bathini Acked-by: Song Liu --- * No changes in v7. arch/powerpc/net/bpf_jit_comp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH v7 2/5] powerpc/bpf: implement bpf_arch_text_copy

2023-10-20 Thread Hari Bathini
bpf_arch_text_copy is used to dump JITed binary to RX page, allowing multiple BPF programs to share the same page. Use the newly introduced patch_instructions() to implement it. Signed-off-by: Hari Bathini Acked-by: Song Liu --- * No changes in v7. arch/powerpc/net/bpf_jit_comp.c | 20

[PATCH v7 0/5] powerpc/bpf: use BPF prog pack allocator

2023-10-20 Thread Hari Bathini
Most BPF programs are small, but they consume a page each. For systems with busy traffic and many BPF programs, this may also add significant pressure on instruction TLB. High iTLB pressure usually slows down the whole system causing visible performance degradation for production workloads.

Re: [PATCH v3 8/9] tty: Add SBI debug console support to HVC SBI driver

2023-10-20 Thread Anup Patel
On Fri, Oct 20, 2023 at 4:16 PM Andrew Jones wrote: > > On Fri, Oct 20, 2023 at 12:51:39PM +0530, Anup Patel wrote: > > From: Atish Patra > > > > RISC-V SBI specification supports advanced debug console > > support via SBI DBCN extension. > > > > Extend the HVC SBI driver to support it. > > > >

Re: [PATCH] powerpc/smp: Dynamically build powerpc topology

2023-10-20 Thread Srikar Dronamraju
* Michael Ellerman [2023-10-20 23:10:55]: > Srikar Dronamraju writes: > > Currently there are four powerpc specific sched topologies. These are > > all statically defined. However not all these topologies are used by > > all powerpc systems. > > > > To avoid unnecessary degenerations by the

Re: [PATCH v2] powerpc: Enable generic cpu idle-loop

2023-10-20 Thread Michael Ellerman
Hi Vaibhav, Vaibhav Jain writes: > This minor patch enables config option GENERIC_IDLE_POLL_SETUP for arch > powerpc. This should add support for kernel param 'nohlt'. > > Powerpc kernel also supports another kernel boot-time param called > 'powersave' which can also be used to disable all cpu

Re: [PATCH] powerpc/smp: Dynamically build powerpc topology

2023-10-20 Thread Michael Ellerman
Srikar Dronamraju writes: > Currently there are four powerpc specific sched topologies. These are > all statically defined. However not all these topologies are used by > all powerpc systems. > > To avoid unnecessary degenerations by the scheduler , masks and flags > are compared. However if

Re: (subset) [PATCH 0/6] powerpc/qspinlock: Fix yield latency bug and other

2023-10-20 Thread Michael Ellerman
On Mon, 16 Oct 2023 22:42:59 +1000, Nicholas Piggin wrote: > This fixes a long-standing latency bug in the powerpc qspinlock > implementation that quite a few people have reported and helped > out with debugging. > > The first patch is a minimal fix that avoids the problem. The > other patches

Re: [PATCH] powerpc/64s/radix: Don't warn on copros in radix__tlb_flush()

2023-10-20 Thread Michael Ellerman
On Tue, 17 Oct 2023 23:15:27 +1100, Michael Ellerman wrote: > Sachin reported a warning when running the inject-ra-err selftest: > > # selftests: powerpc/mce: inject-ra-err > Disabling lock debugging due to kernel taint > MCE: CPU19: machine check (Severe) Real address Load/Store >

Re: [PATCH v3 0/9] RISC-V SBI debug console extension support

2023-10-20 Thread Anup Patel
On Fri, Oct 20, 2023 at 12:51 PM Anup Patel wrote: > > 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

Re: [PATCH] treewide: Spelling fix in comment

2023-10-20 Thread Geert Uytterhoeven
Hi Kunwu, Thanks for your patch! This is not a treewide change. Hence the oneline-summary should be something prefixed by "[net-next] ps3_gelic" On Fri, Oct 20, 2023 at 11:32 AM Kunwu Chan wrote: > reques -> request > > Fixes: 09dde54c6a69 ("PS3: gelic: Add wireless support for PS3") No need

Re: [PATCH v3 8/9] tty: Add SBI debug console support to HVC SBI driver

2023-10-20 Thread Andrew Jones
On Fri, Oct 20, 2023 at 12:51:39PM +0530, Anup Patel wrote: > 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 > --- >

Re: [PATCH v2 3/6] powerpc/smp: Move shared_processor static key to smp.h

2023-10-20 Thread Michael Ellerman
Srikar Dronamraju writes: > * Michael Ellerman [2023-10-19 15:41:40]: > >> Srikar Dronamraju writes: >> > The ability to detect if the system is running in a shared processor >> > mode is helpful in few more generic cases not just in >> > paravirtualization. >> > For example: At boot time,

[RFC PATCH v7 13/13] media: vim2m_audio: add virtual driver for audio memory to memory

2023-10-20 Thread Shengjiu Wang
Audio memory to memory virtual driver use video memory to memory virtual driver vim2m.c as example. The main difference is device type is VFL_TYPE_AUDIO and device cap type is V4L2_CAP_AUDIO_M2M. The device_run function is a dummy function, which is simply copy the data from input buffer to

[RFC PATCH v7 12/13] media: imx-asrc: Add memory to memory driver

2023-10-20 Thread Shengjiu Wang
Implement the ASRC memory to memory function using the v4l2 framework, user can use this function with v4l2 ioctl interface. User send the output and capture buffer to driver and driver store the converted data to the capture buffer. This feature can be shared by ASRC and EASRC drivers

[RFC PATCH v7 11/13] media: uapi: Add audio rate controls support

2023-10-20 Thread Shengjiu Wang
Add V4L2_CID_M2M_AUDIO_SOURCE_RATE and V4L2_CID_M2M_AUDIO_DEST_RATE new IDs for rate control. Add V4L2_CID_M2M_AUDIO_SOURCE_RATE_OFFSET and V4L2_CID_M2M_AUDIO_DEST_RATE_OFFSET for clock drift. Signed-off-by: Shengjiu Wang --- .../media/v4l/ext-ctrls-audio-m2m.rst | 18

[RFC PATCH v7 10/13] media: uapi: Add V4L2_CTRL_TYPE_FIXED_POINT

2023-10-20 Thread Shengjiu Wang
Fixed point controls are used by the user to configure a fixed point value in 64bits, which Q31.32 format. Signed-off-by: Shengjiu Wang --- Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst | 6 ++ .../userspace-api/media/videodev2.h.rst.exceptions | 1 +

[RFC PATCH v7 09/13] media: uapi: Add V4L2_CTRL_CLASS_M2M_AUDIO

2023-10-20 Thread Shengjiu Wang
The Audio M2M class includes controls for audio memory-to-memory use cases. The controls can be used for audio codecs, audio preprocessing, audio postprocessing. Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/common.rst| 1 + .../media/v4l/ext-ctrls-audio-m2m.rst

[RFC PATCH v7 08/13] media: uapi: define audio sample format fourcc type

2023-10-20 Thread Shengjiu Wang
The audio sample format definition is from alsa, the header file is include/uapi/sound/asound.h, but don't include this header file directly, because in user space, there is another copy in alsa-lib. There will be conflict in userspace for include videodev2.h & asound.h and asoundlib.h Here still

[RFC PATCH v7 07/13] media: v4l2: Add audio capture and output support

2023-10-20 Thread Shengjiu Wang
Audio signal processing has the requirement for memory to memory similar as Video. This patch is to add this support in v4l2 framework, defined new buffer type V4L2_BUF_TYPE_AUDIO_CAPTURE and V4L2_BUF_TYPE_AUDIO_OUTPUT, defined new format v4l2_audio_format for audio case usage. The created audio

[RFC PATCH v7 06/13] media: uapi: Add V4L2_CAP_AUDIO_M2M capability flag

2023-10-20 Thread Shengjiu Wang
V4L2_CAP_AUDIO_M2M is similar to V4L2_CAP_VIDEO_M2M flag. It is used for audio memory to memory case. Signed-off-by: Shengjiu Wang --- Documentation/userspace-api/media/v4l/vidioc-querycap.rst| 3 +++ Documentation/userspace-api/media/videodev2.h.rst.exceptions | 1 +

[RFC PATCH v7 05/13] ASoC: fsl_easrc: register m2m platform device

2023-10-20 Thread Shengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- sound/soc/fsl/fsl_easrc.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index

[RFC PATCH v7 04/13] ASoC: fsl_asrc: register m2m platform device

2023-10-20 Thread Shengjiu Wang
Register m2m platform device, that user can use M2M feature. Defined platform data structure and platform driver name. Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- include/sound/fsl_asrc_common.h | 23 +++ sound/soc/fsl/fsl_asrc.c| 18 ++ 2

[RFC PATCH v7 03/13] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2023-10-20 Thread Shengjiu Wang
Move fsl_asrc_common.h to include/sound that it can be included from other drivers. Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- {sound/soc/fsl => include/sound}/fsl_asrc_common.h | 0 sound/soc/fsl/fsl_asrc.h | 2 +- sound/soc/fsl/fsl_asrc_dma.c

[RFC PATCH v7 02/13] ASoC: fsl_easrc: define functions for memory to memory usage

2023-10-20 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage and export them as function pointer. Signed-off-by: Shengjiu Wang Acked-by: Mark Brown --- sound/soc/fsl/fsl_easrc.c | 214 ++ sound/soc/fsl/fsl_easrc.h | 4 + 2 files

[RFC PATCH v7 01/13] ASoC: fsl_asrc: define functions for memory to memory usage

2023-10-20 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage. m2m_prepare: prepare for the start step m2m_start: the start step m2m_unprepare: unprepare for stop step, optional m2m_stop: stop step m2m_check_format: check format is supported or not m2m_calc_out_len: calculate

[RFC PATCH v7 00/13] Add audio support in v4l2 framework

2023-10-20 Thread Shengjiu Wang
Audio signal processing also has the requirement for memory to memory similar as Video. This asrc memory to memory (memory ->asrc->memory) case is a non real time use case. User fills the input buffer to the asrc module, after conversion, then asrc sends back the output buffer to user. So it is

Re: [PATCH v3 8/9] tty: Add SBI debug console support to HVC SBI driver

2023-10-20 Thread Anup Patel
On Fri, Oct 20, 2023 at 3:25 PM Björn Töpel wrote: > > Anup Patel writes: > > > 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 > >

Re: [PATCH 0/6] powerpc/qspinlock: Fix yield latency bug and other

2023-10-20 Thread Nysal Jan K.A.
On Mon, Oct 16, 2023 at 10:42:59PM +1000, Nicholas Piggin wrote: > This fixes a long-standing latency bug in the powerpc qspinlock > implementation that quite a few people have reported and helped > out with debugging. > > The first patch is a minimal fix that avoids the problem. The > other

Re: [PATCH v3 8/9] tty: Add SBI debug console support to HVC SBI driver

2023-10-20 Thread Björn Töpel
Anup Patel writes: > 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 +- >

Re: [PATCH 2/6] powerpc/qspinlock: stop queued waiters trying to set lock sleepy

2023-10-20 Thread Nysal Jan K.A.
On Mon, Oct 16, 2023 at 10:43:01PM +1000, Nicholas Piggin wrote: > If a queued waiter notices the lock owner or the previous waiter has > been preempted, it attempts to mark the lock sleepy, but it does this > as a try-set operation using the original lock value it got when > queueing, which will

Re: [PATCH v2 1/6] powerpc/smp: Cache CPU has Asymmetric SMP

2023-10-20 Thread Srikar Dronamraju
* Michael Ellerman [2023-10-19 15:33:16]: > Srikar Dronamraju writes: > > Currently cpu feature flag is checked whenever powerpc_smt_flags gets > > called. This is an unnecessary overhead. CPU_FTR_ASYM_SMT is set based > > on the processor and all processors will either have this set or will >

Re: [PATCH] hvc/xen: fix event channel handling for secondary consoles

2023-10-20 Thread Juergen Gross
On 18.10.23 01:46, David Woodhouse wrote: From: David Woodhouse The xencons_connect_backend() function allocates a local interdomain event channel with xenbus_alloc_evtchn(), then calls bind_interdomain_evtchn_to_irq_lateeoi() to bind to that port# on the *remote* domain. That doesn't work

Re: [PATCH v3 5/9] KVM: riscv: selftests: Add SBI DBCN extension to get-reg-list test

2023-10-20 Thread Andrew Jones
On Fri, Oct 20, 2023 at 12:51:36PM +0530, Anup Patel wrote: > We have a new SBI debug console (DBCN) extension supported by in-kernel > KVM so let us add this extension to get-reg-list test. > > Signed-off-by: Anup Patel > --- > tools/testing/selftests/kvm/riscv/get-reg-list.c | 2 ++ > 1 file

Re: [PATCH v3 3/9] RISC-V: KVM: Allow some SBI extensions to be disabled by default

2023-10-20 Thread Andrew Jones
On Fri, Oct 20, 2023 at 12:51:34PM +0530, Anup Patel wrote: > Currently, all SBI extensions are enabled by default which is > problematic for SBI extensions (such as DBCN) which are forwarded > to the KVM user-space because we might have an older KVM user-space > which is not aware/ready to handle

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

2023-10-20 Thread Hari Bathini
On 18/10/23 1:51 pm, Pingfan Liu wrote: On Tue, Oct 17, 2023 at 6:39 PM Hari Bathini wrote: On 17/10/23 7:58 am, 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

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

2023-10-20 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 Reviewed-by: Andrew Jones --- arch/riscv/configs/defconfig | 1 + arch/riscv/configs/rv32_defconfig | 1 + 2 files changed, 2 insertions(+)

[PATCH v3 8/9] tty: Add SBI debug console support to HVC SBI driver

2023-10-20 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 | 82

[PATCH v3 7/9] tty/serial: Add RISC-V SBI debug console based earlycon

2023-10-20 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 --- drivers/tty/serial/Kconfig | 2 +- drivers/tty/serial/earlycon-riscv-sbi.c | 32 + 2 files

[PATCH v3 6/9] RISC-V: Add stubs for sbi_console_putchar/getchar()

2023-10-20 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

[PATCH v3 5/9] KVM: riscv: selftests: Add SBI DBCN extension to get-reg-list test

2023-10-20 Thread Anup Patel
We have a new SBI debug console (DBCN) extension supported by in-kernel KVM so let us add this extension to get-reg-list test. Signed-off-by: Anup Patel --- tools/testing/selftests/kvm/riscv/get-reg-list.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH v3 4/9] RISC-V: KVM: Forward SBI DBCN extension to user-space

2023-10-20 Thread Anup Patel
The frozen SBI v2.0 specification defines the SBI debug console (DBCN) extension which replaces the legacy SBI v0.1 console functions namely sbi_console_getchar() and sbi_console_putchar(). The SBI DBCN extension needs to be emulated in the KVM user-space (i.e. QEMU-KVM or KVMTOOL) so we forward

[PATCH v3 3/9] RISC-V: KVM: Allow some SBI extensions to be disabled by default

2023-10-20 Thread Anup Patel
Currently, all SBI extensions are enabled by default which is problematic for SBI extensions (such as DBCN) which are forwarded to the KVM user-space because we might have an older KVM user-space which is not aware/ready to handle newer SBI extensions. Ideally, the SBI extensions forwarded to the

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

2023-10-20 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 Reviewed-by: Andrew Jones --- arch/riscv/include/asm/kvm_vcpu_sbi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

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

2023-10-20 Thread Anup Patel
We add SBI debug console extension related defines/enum to the asm/sbi.h header. Signed-off-by: Anup Patel Reviewed-by: Andrew Jones --- 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

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

2023-10-20 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