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

2023-11-21 Thread Zhao Ke 赵 可
Hi Michael, On 2023/11/22 9:46, Michael Ellerman wrote: Zhao Ke writes: 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.

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

2023-11-21 Thread Michael Ellerman
Aneesh Kumar K V writes: ... > > I am not sure whether we need to add all the complexity to enable supporting > different fadump kernel > version. Is that even a possible use case with fadump? Can't we always assume > that with fadump the > crash kernel and fadump kernel will be same version?

Re: [PATCH] powerpc: Restrict ARCH_HIBERNATION_POSSIBLE to supported configurations

2023-11-21 Thread Michael Ellerman
Vishal Chourasia writes: > On 17/11/23 4:52 am, Michael Ellerman wrote: >> Vishal Chourasia writes: >>> On 15/11/23 5:46 pm, Aneesh Kumar K V wrote: On 11/15/23 5:23 PM, Vishal Chourasia wrote: > On 15/11/23 1:39 pm, Aneesh Kumar K.V wrote: >> Vishal Chourasia writes: >>

Re: [PATCH v2] powerpc: Don't clobber fr0/vs0 during fp|altivec register save

2023-11-21 Thread Michael Ellerman
Timothy Pearson writes: > ... > > So a little more detail on this, just to put it to rest properly vs. > assuming hand analysis caught every possible pathway. :) > > The debugging that generates this stack trace also verifies the following in > __giveup_fpu(): > > 1.) tsk->thread.fp_state.fpr

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

2023-11-21 Thread Michael Ellerman
Naveen N Rao writes: > On Tue, Nov 21, 2023 at 10:54:36AM +1100, Michael Ellerman wrote: >> Building with GCC 13 (which has -array-bounds enabled) there are several > > Thanks, gcc13 indeed helps reproduce the warnings. Actually that part is no longer true since 0da6e5fd6c37 ("gcc: disable

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

2023-11-21 Thread Masahiro Yamada
On Tue, Nov 21, 2023 at 6:55 PM Aneesh Kumar K.V wrote: > > "Nicholas Piggin" writes: > > > 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 >

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

2023-11-21 Thread Kunwu Chan
kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Signed-off-by: Kunwu Chan --- arch/powerpc/sysdev/xics/icp-native.c | 2 ++ 1 file changed, 2 insertions(+) diff --git

[PATCH] KVM: PPC: Book3S HV: Fix KVM_RUN clobbering FP/VEC user registers

2023-11-21 Thread Nicholas Piggin
Before running a guest, the host process (e.g., QEMU) FP/VEC registers are saved if they were being used, similarly to when the kernel uses FP registers. The guest values are then be loaded into regs, and the host process registers will be restored lazily when it uses FP/VEC. KVM HV has a bug

[PATCH] ASoC: fsl_xcvr: Enable 2 * TX bit clock for spdif only case

2023-11-21 Thread Shengjiu Wang
The bit 10 in TX_DPTH_CTRL register controls the TX clock rate. If this bit is set, TX datapath clock should be = 2* TX bit rate. If this bit is not set, TX datapath clock should be 10* TX bit rate. As the spdif only case, we always use 2 * TX bit clock, so this bit need to be set.

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

2023-11-21 Thread Michael Ellerman
Zhao Ke writes: > 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. > > Signed-off-by: Zhao Ke > Link: >

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

2023-11-21 Thread Samuel Holland
Hi Anup, On 2023-11-17 9:38 PM, Anup Patel wrote: > 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 + >

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

2023-11-21 Thread Samuel Holland
Hi Anup, On 2023-11-17 9:38 PM, Anup Patel wrote: > 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 > --- > arch/riscv/include/asm/sbi.h | 5 + > arch/riscv/kernel/sbi.c | 43

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

2023-11-21 Thread Samuel Holland
Hi Anup, On 2023-11-17 9:38 PM, 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 > Reviewed-by: Andrew Jones > --- > drivers/tty/serial/Kconfig | 2 +- >

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

2023-11-21 Thread Samuel Holland
Hi Anup, On 2023-11-17 9:38 PM, Anup Patel wrote: > 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

[PATCH 12/14] tools/perf: Update tools's copy of powerpc syscall table

2023-11-21 Thread Namhyung Kim
tldr; Just FYI, I'm carrying this on the perf tools tree. Full explanation: There used to be no copies, with tools/ code using kernel headers directly. From time to time tools/perf/ broke due to legitimate kernel hacking. At some point Linus complained about such direct usage. Then we adopted

Re: [PATCH 20/22] usb: fsl-mph-dr-of: mark fsl_usb2_mpc5121_init() static

2023-11-21 Thread Greg Kroah-Hartman
On Wed, Nov 08, 2023 at 01:58:41PM +0100, Arnd Bergmann wrote: > From: Arnd Bergmann > > This function is only called locally and should always have been static: > > drivers/usb/host/fsl-mph-dr-of.c:291:5: error: no previous prototype for > 'fsl_usb2_mpc5121_init' [-Werror=missing-prototypes]

[PATCH][next] powerpc/crypto: Avoid -Wstringop-overflow warnings

2023-11-21 Thread Gustavo A. R. Silva
The compiler doesn't know that `32` is an offset into the Hash table: 56 struct Hash_ctx { 57 u8 H[16]; /* subkey */ 58 u8 Htable[256]; /* Xi, Hash table(offset 32) */ 59 }; So, it legitimately complains about a potential out-of-bounds issue if `256 bytes` are accessed

Re: [PATCH v5 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend

2023-11-21 Thread Mark Brown
On Tue, 21 Nov 2023 13:25:11 +0800, Chancel Liu wrote: > Add a property to list audio sound widgets which are marked ignoring > system suspend. Paths between these endpoints are still active over > suspend of the main application processor that the current operating > system is running. > >

Re: [PATCH 34/34] KVM: selftests: Add a memory region subtest to validate invalid flags

2023-11-21 Thread Paolo Bonzini
On Mon, Nov 20, 2023 at 3:09 PM Mark Brown wrote: > > On Wed, Nov 08, 2023 at 05:08:01PM -0800, Anish Moorthy wrote: > > Applying [1] and [2] reveals that this also breaks non-x86 builds- the > > MEM_REGION_GPA/SLOT definitions are guarded behind an #ifdef > > __x86_64__, while the usages

Re: [PATCH v9 00/27] Add support for QMC HDLC, framer infrastructure and PEF2256 framer

2023-11-21 Thread Jakub Kicinski
On Tue, 21 Nov 2023 08:43:30 +0100 Herve Codina wrote: > I plan to send the v10 with the patch 23 fixed. > Based on that v10, some patches (21 to 25 at least) could be applied and > I will remove them for the future v11. > I think it will be easier to follow if I iterate on the series removing >

Re: [PATCH RFC 06/12] mm/gup: Drop folio_fast_pin_allowed() in hugepd processing

2023-11-21 Thread Peter Xu
On Mon, Nov 20, 2023 at 12:26:24AM -0800, Christoph Hellwig wrote: > On Wed, Nov 15, 2023 at 08:29:02PM -0500, Peter Xu wrote: > > Hugepd format is only used in PowerPC with hugetlbfs. In commit > > a6e79df92e4a ("mm/gup: disallow FOLL_LONGTERM GUP-fast writing to > > file-backed mappings"), we

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

2023-11-21 Thread Naveen N Rao
On Tue, Nov 21, 2023 at 10:54:36AM +1100, Michael Ellerman wrote: > Building with GCC 13 (which has -array-bounds enabled) there are several Thanks, gcc13 indeed helps reproduce the warnings. > warnings in sstep.c along the lines of: > > In function ‘do_byte_reverse’, > inlined from

Re: Potential config regression after 89cde455 ("kexec: consolidate kexec and crash options into kernel/Kconfig.kexec")

2023-11-21 Thread Baoquan He
On 11/21/23 at 07:53am, Ignat Korchagin wrote: > On Tue, Nov 21, 2023 at 1:50 AM Baoquan He wrote: > > > > Eric DeVolder's Oracle mail address is not available anymore, add his > > current mail address he told me. > > Thank you! > > > On 11/20/23 at 10:52pm, Ignat Korchagin wrote: > > > Good

Re: Potential config regression after 89cde455 ("kexec: consolidate kexec and crash options into kernel/Kconfig.kexec")

2023-11-21 Thread Ignat Korchagin
On Tue, Nov 21, 2023 at 7:53 AM Ignat Korchagin wrote: > > On Tue, Nov 21, 2023 at 1:50 AM Baoquan He wrote: > > > > Eric DeVolder's Oracle mail address is not available anymore, add his > > current mail address he told me. > > Thank you! > > > On 11/20/23 at 10:52pm, Ignat Korchagin wrote: > >

Re: [PATCH v10 00/14] Add audio support in v4l2 framework

2023-11-21 Thread Hans Verkuil
On 11/21/23 11:03, Shengjiu Wang wrote: > On Tue, Nov 21, 2023 at 5:22 PM Hans Verkuil wrote: >> >> On 21/11/2023 08:37, Shengjiu Wang wrote: >>> Audio signal processing also has the requirement for memory to >>> memory similar as Video. >>> >>> This asrc memory to memory (memory ->asrc->memory)

Re: [PATCH v10 13/14] media: imx-asrc: Add memory to memory driver

2023-11-21 Thread Shengjiu Wang
On Tue, Nov 21, 2023 at 5:20 PM Hans Verkuil wrote: > > On 21/11/2023 08:37, Shengjiu Wang wrote: > > 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

Re: [PATCH v10 00/14] Add audio support in v4l2 framework

2023-11-21 Thread Shengjiu Wang
On Tue, Nov 21, 2023 at 5:22 PM Hans Verkuil wrote: > > On 21/11/2023 08:37, Shengjiu Wang wrote: > > 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. > > >

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

2023-11-21 Thread IBM
"Nicholas Piggin" writes: > 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 always-y"), 'make modules' does not build extra-y. >> >> For

[PATCH 11/17] tty: hvc_console: use flexible array for outbuf

2023-11-21 Thread Jiri Slaby (SUSE)
This means: * move outbuf to the end of struct hvc_struct and convert from pointer to flexible array (the structure is smaller now) * use struct_size() at the allocation site * align outbuf in the struct instead of ALIGN() at kzalloc() And apart from the above, use u8 instead of char (which are

[PATCH 07/17] tty: ehv_bytecha: use memcpy_and_pad() in local_ev_byte_channel_send()

2023-11-21 Thread Jiri Slaby (SUSE)
There is a helper for memcpy(buffer)+memset(the_rest). Use it for simplicity. And add a comment why we are doing the copy in the first place. Signed-off-by: Jiri Slaby (SUSE) Cc: Laurentiu Tudor Cc: linuxppc-dev@lists.ozlabs.org --- drivers/tty/ehv_bytechan.c | 7 +-- 1 file changed, 5

[PATCH 00/17] tty: small cleanups and fixes

2023-11-21 Thread Jiri Slaby (SUSE)
This is a series to fix/clean up some obvious issues I revealed during u8+size_t conversions (to be posted later). Cc: "David S. Miller" Cc: Eric Dumazet Cc: Ivan Kokshaysky Cc: Jakub Kicinski Cc: Jan Kara Cc: Laurentiu Tudor Cc: linux-al...@vger.kernel.org Cc: linuxppc-dev@lists.ozlabs.org

Re: [PATCH v10 00/14] Add audio support in v4l2 framework

2023-11-21 Thread Hans Verkuil
On 21/11/2023 08:37, Shengjiu Wang wrote: > 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,

Re: [PATCH v10 13/14] media: imx-asrc: Add memory to memory driver

2023-11-21 Thread Hans Verkuil
On 21/11/2023 08:37, Shengjiu Wang wrote: > 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

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

2023-11-21 Thread Atish Kumar Patra
On Sun, Nov 19, 2023 at 11:16 PM Jiri Slaby wrote: > > On 18. 11. 23, 4:38, Anup Patel wrote: > > diff --git a/drivers/tty/hvc/hvc_riscv_sbi.c > > b/drivers/tty/hvc/hvc_riscv_sbi.c > > index 31f53fa77e4a..697c981221b5 100644 > > --- a/drivers/tty/hvc/hvc_riscv_sbi.c > > +++

Re: Potential config regression after 89cde455 ("kexec: consolidate kexec and crash options into kernel/Kconfig.kexec")

2023-11-21 Thread Ignat Korchagin
On Tue, Nov 21, 2023 at 1:50 AM Baoquan He wrote: > > Eric DeVolder's Oracle mail address is not available anymore, add his > current mail address he told me. Thank you! > On 11/20/23 at 10:52pm, Ignat Korchagin wrote: > > Good day! > > > > We have recently started to evaluate Linux 6.6 and

Re: [PATCH v4 09/13] powerpc/pseries: Add papr-vpd character driver for VPD retrieval

2023-11-21 Thread Michal Suchánek
Hello, On Fri, Nov 17, 2023 at 11:14:27PM -0600, Nathan Lynch via B4 Relay wrote: > From: Nathan Lynch > > PowerVM LPARs may retrieve Vital Product Data (VPD) for system > components using the ibm,get-vpd RTAS function. > > We can expose this to user space with a /dev/papr-vpd character >

[PATCH v10 14/14] media: vim2m-audio: add virtual driver for audio memory to memory

2023-11-21 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

[PATCH v10 13/14] media: imx-asrc: Add memory to memory driver

2023-11-21 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

[PATCH v10 12/14] media: uapi: Add an entity type for audio resampler

2023-11-21 Thread Shengjiu Wang
Add and document a media entity type for audio resampler. It is MEDIA_ENT_F_PROC_AUDIO_RESAMPLER. Signed-off-by: Shengjiu Wang --- Documentation/userspace-api/media/mediactl/media-types.rst | 6 ++ include/uapi/linux/media.h | 1 + 2 files changed, 7

[PATCH v10 11/14] media: uapi: Declare interface types for Audio

2023-11-21 Thread Shengjiu Wang
Declare the interface types that will be used by Audio. The type is MEDIA_INTF_T_V4L_AUDIO. Signed-off-by: Shengjiu Wang --- .../userspace-api/media/mediactl/media-types.rst| 5 + drivers/media/v4l2-core/v4l2-dev.c | 4 drivers/media/v4l2-core/v4l2-mem2mem.c

[PATCH v10 10/14] media: uapi: Add audio rate controls support

2023-11-21 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 | 20

[PATCH v10 09/14] media: uapi: Add V4L2_CTRL_CLASS_M2M_AUDIO

2023-11-21 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

[PATCH v10 08/14] media: uapi: Define audio sample format fourcc type

2023-11-21 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

[PATCH v10 07/14] media: v4l2: Add audio capture and output support

2023-11-21 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

[PATCH v10 06/14] media: uapi: Add V4L2_CAP_AUDIO_M2M capability flag

2023-11-21 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 +

[PATCH v10 04/14] ASoC: fsl_asrc: register m2m platform device

2023-11-21 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

[PATCH v10 05/14] ASoC: fsl_easrc: register m2m platform device

2023-11-21 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

[PATCH v10 03/14] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2023-11-21 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

[PATCH v10 01/14] ASoC: fsl_asrc: define functions for memory to memory usage

2023-11-21 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

[PATCH v10 02/14] ASoC: fsl_easrc: define functions for memory to memory usage

2023-11-21 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

[PATCH v10 00/14] Add audio support in v4l2 framework

2023-11-21 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