[PATCH] powerpc/perf: Optimize find_alternatives_list() using binary search

2023-10-13 Thread Kuan-Wei Chiu
This patch improves the performance of event alternative lookup by replacing the previous linear search with a more efficient binary search. This change reduces the time complexity for the search process from O(n) to O(log(n)). A pre-sorted table of event values and their corresponding indices has

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

2023-10-13 Thread Jakub Kicinski
On Wed, 11 Oct 2023 08:14:04 +0200 Herve Codina wrote: > Compare to the previous iteration > > https://lore.kernel.org/linux-kernel/20230928070652.330429-1-herve.cod...@bootlin.com/ > This v8 series: > - Fixes a race condition > - Uses menuconfig instead of menu and hides

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

2023-10-13 Thread Jakub Kicinski
On Wed, 11 Oct 2023 08:14:30 +0200 Herve Codina wrote: > 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. Acked-by: Jakub Kicinski

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

2023-10-13 Thread Jakub Kicinski
On Wed, 11 Oct 2023 08:14:28 +0200 Herve Codina wrote: > 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

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

2023-10-13 Thread Jakub Kicinski
On Wed, 11 Oct 2023 08:14:27 +0200 Herve Codina wrote: > 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:

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

2023-10-13 Thread Jakub Kicinski
On Wed, 11 Oct 2023 08:14:14 +0200 Herve Codina wrote: > 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 Acked-by: Jakub Kicinski

[PATCH v2 7/7] powerpc/selftests: add test for papr-sysparm

2023-10-13 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Consistently testing system parameter access is a bit difficult by nature -- the set of parameters available depends on the model and system configuration, and updating a parameter should be considered a destructive operation reserved for the admin. So we validate some of the

[PATCH v2 2/7] powerpc/pseries: papr-vpd char driver for VPD retrieval

2023-10-13 Thread Nathan Lynch via B4 Relay
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 device, where the programming model is: struct papr_location_code plc = { .str = "", }; /* obtain

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

2023-10-13 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Until now the papr_sysparm APIs have been kernel-internal. But user space needs access to PAPR system parameters too. The only method available to user space today to get or set system parameters is using sys_rtas() and /dev/mem to pass RTAS-addressable buffers between user

[PATCH v2 4/7] powerpc/pseries/papr-sysparm: validate buffer object lengths

2023-10-13 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch The ability to get and set system parameters will be exposed to user space, so let's get a little more strict about malformed papr_sysparm_buf objects. * Create accessors for the length field of struct papr_sysparm_buf. The length is always stored in MSB order and this is

[PATCH v2 1/7] powerpc/uapi: export papr-miscdev.h header

2023-10-13 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Allocate one identifying code (the first column of the ioctl-number table) for the collection of PAPR miscdev drivers to share. Signed-off-by: Nathan Lynch --- arch/powerpc/include/uapi/asm/papr-miscdev.h | 9 + 1 file changed, 9 insertions(+) diff --git

[PATCH v2 6/7] powerpc/selftests: add test for papr-vpd

2023-10-13 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Add selftests for /dev/papr-vpd, exercising the common expected use cases: * Retrieve all VPD by passing an empty location code. * Retrieve the "system VPD" by passing a location code derived from DT root node properties, as done by the vpdupdate command. The tests also

[PATCH v2 3/7] powerpc/rtas: serialize ibm,get-vpd service with papr-vpd sequences

2023-10-13 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Take the papr-vpd driver's internal mutex when sys_rtas performs ibm,get-vpd calls. This prevents sys_rtas(ibm,get-vpd) calls from interleaving with sequences performed by the driver, ensuring that such sequences are not disrupted. However, it cannot prevent the driver from

[PATCH v2 0/7] powerpc/pseries: new character devices for system parameters and VPD

2023-10-13 Thread Nathan Lynch via B4 Relay
Add character devices that expose PAPR-specific system parameters and VPD to user space. The problem: important platform features are enabled on Linux VMs through the powerpc-specific rtas() syscall in combination with writeable mappings of /dev/mem. In typical usage, this is encapsulated behind

Re: [PATCH mm-unstable v9 14/31] s390: Convert various pgalloc functions to use ptdescs

2023-10-13 Thread Vishal Moola
On Thu, Oct 12, 2023 at 12:25 AM Heiko Carstens wrote: > > On Mon, Aug 07, 2023 at 04:04:56PM -0700, Vishal Moola (Oracle) wrote: > > As part of the conversions to replace pgtable constructor/destructors with > > ptdesc equivalents, convert various page table functions to use ptdescs. > > > >

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

2023-10-13 Thread Haren Myneni
On 10/11/23 1:36 PM, Nathan Lynch wrote: Haren Myneni writes: 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

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

2023-10-13 Thread Martin K. Petersen
Nathan, > Clang warns (or errors with CONFIG_WERROR=y) several times along the > lines of: > > drivers/scsi/ibmvscsi/ibmvfc.c:650:17: warning: implicit truncation from > 'int' to a one-bit wide bit-field changes value from 1 to -1 > [-Wsingle-bit-bitfield-constant-conversion] > 650 |

Re: [PATCH] [RFC] wireless: move obsolete drivers to staging

2023-10-13 Thread Johannes Berg
On Fri, 2023-10-13 at 17:44 +0200, Arnd Bergmann wrote: > On Thu, Oct 12, 2023, at 18:36, Geoff Levand wrote: > > On 10/12/23 17:41, Johannes Berg wrote: > > > But seriously - is it worth to try to keep a wireless driver for it if > > > we don't even know anyone using a PS3 at all? > > > > There

Re: [PATCH v11 1/4] powerpc/kexec: turn some static helper functions public

2023-10-13 Thread Sourabh Jain
Hello Christophe, On 13/10/23 18:59, Christophe Leroy wrote: Le 19/06/2023 à 04:49, Sourabh Jain a écrit : Move update_cpus_node and get_crash_memory_ranges functions from kexec/file_load_64.c to kexec/core_64.c to make these functions usable by other kexec components. Later in the series,

[powerpc:fixes-test] BUILD SUCCESS 2205457db4855a3984b477c3e5daba2feff02cbc

2023-10-13 Thread kernel test robot
allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20231012 gcc arc randconfig-001-20231013 gcc arm

Re: [PATCH] [RFC] wireless: move obsolete drivers to staging

2023-10-13 Thread Arnd Bergmann
On Thu, Oct 12, 2023, at 18:36, Geoff Levand wrote: > On 10/12/23 17:41, Johannes Berg wrote: >> But seriously - is it worth to try to keep a wireless driver for it if >> we don't even know anyone using a PS3 at all? > > There is still a considerable user base for the PS3, so we > must keep the

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

2023-10-13 Thread Anup Patel
On Thu, Oct 12, 2023 at 5:08 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: [RFC PATCH v6 05/11] ASoC: fsl_easrc: register m2m platform device

2023-10-13 Thread Mark Brown
On Fri, Oct 13, 2023 at 04:30:59PM +0800, Shengjiu Wang wrote: > Register m2m platform device,that user can > use M2M feature. Acked-by: Mark Brown signature.asc Description: PGP signature

Re: [PATCH v11 1/4] powerpc/kexec: turn some static helper functions public

2023-10-13 Thread Christophe Leroy
Le 19/06/2023 à 04:49, Sourabh Jain a écrit : > Move update_cpus_node and get_crash_memory_ranges functions from > kexec/file_load_64.c to kexec/core_64.c to make these functions usable > by other kexec components. > > Later in the series, these functions are utilized to do in-kernel update >

Re: [RFC PATCH v6 04/11] ASoC: fsl_asrc: register m2m platform device

2023-10-13 Thread Mark Brown
On Fri, Oct 13, 2023 at 04:30:58PM +0800, Shengjiu Wang wrote: > Register m2m platform device, that user can > use M2M feature. > > Defined platform data structure and platform > driver name. Acked-by: Mark Brown signature.asc Description: PGP signature

Re: [RFC PATCH v6 03/11] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2023-10-13 Thread Mark Brown
On Fri, Oct 13, 2023 at 04:30:57PM +0800, Shengjiu Wang wrote: > Move fsl_asrc_common.h to include/sound that it can be > included from other drivers. Acked-by: Mark Brown signature.asc Description: PGP signature

Re: [RFC PATCH v6 02/11] ASoC: fsl_easrc: define functions for memory to memory usage

2023-10-13 Thread Mark Brown
On Fri, Oct 13, 2023 at 04:30:56PM +0800, Shengjiu Wang wrote: > ASRC can be used on memory to memory case, define several > functions for m2m usage and export them as function pointer. Acked-by: Mark Brown signature.asc Description: PGP signature

Re: [RFC PATCH v6 01/11] ASoC: fsl_asrc: define functions for memory to memory usage

2023-10-13 Thread Mark Brown
On Fri, Oct 13, 2023 at 04:30:55PM +0800, Shengjiu Wang wrote: > ASRC can be used on memory to memory case, define several > functions for m2m usage. Acked-by: Mark Brown signature.asc Description: PGP signature

Re: [PATCH] lazy tlb: consolidate lazy tlb mm switching fix

2023-10-13 Thread Christophe Leroy
Le 07/06/2023 à 02:56, Nicholas Piggin a écrit : > Fix an upstream powerpc bug that was discovered with a WARN_ON added in > "lazy tlb: consolidate lazy tlb mm switching": > > Switching mm and tinkering with current->active_mm should be done with > irqs disabled. There is a path where

Re: [PATCH] powerpc/powernv: use appropiate error code

2023-10-13 Thread Christophe Leroy
Le 01/09/2023 à 20:03, Immad Mir a écrit : > > On 01/09/23 11:10 pm, Christophe Leroy wrote: >> >> Le 01/09/2023 à 19:19, mirim...@outlook.com a écrit : >>> [Vous ne recevez pas souvent de courriers de mirim...@outlook.com. >>> Découvrez pourquoi ceci est important à >>>

Re: [PATCH v8 0/7] Support page table check

2023-10-13 Thread Christophe Leroy
Le 16/02/2023 à 00:11, Rohan McLure a écrit : > Support the page table check sanitiser on all PowerPC platforms. This > sanitiser works by serialising assignments, reassignments and clears of > page table entries at each level in order to ensure that anonymous > mappings have at most one

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

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller : On Mon, 09 Oct 2023 23:19:57 + you 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. > >

Re: [PATCH net-next] net: ethernet: Use device_get_match_data()

2023-10-13 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller : On Mon, 9 Oct 2023 12:28:58 -0500 you wrote: > Use preferred device_get_match_data() instead of of_match_device() to > get the driver match data. With this, adjust the includes to explicitly > include the correct

[RFC PATCH v6 11/11] media: viaudm2m: add virtual driver for audio memory to memory

2023-10-13 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 v6 10/11] media: imx-asrc: Add memory to memory driver

2023-10-13 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 v6 09/11] media: uapi: Add audio rate controls support

2023-10-13 Thread Shengjiu Wang
Fixed point controls are used by the user to configure the audio sample rate to driver. Add V4L2_CID_ASRC_SOURCE_RATE and V4L2_CID_ASRC_DEST_RATE new IDs for ASRC rate control. Signed-off-by: Shengjiu Wang --- .../userspace-api/media/v4l/common.rst| 1 +

[RFC PATCH v6 08/11] media: uapi: define audio sample format fourcc type

2023-10-13 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 v6 07/11] media: v4l2: Add audio capture and output support

2023-10-13 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 v6 06/11] media: uapi: Add V4L2_CAP_AUDIO_M2M capability flag

2023-10-13 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 v6 05/11] ASoC: fsl_easrc: register m2m platform device

2023-10-13 Thread Shengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang --- 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 dc603bb383e2..8ba6f045f425 100644 ---

[RFC PATCH v6 04/11] ASoC: fsl_asrc: register m2m platform device

2023-10-13 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 --- include/sound/fsl_asrc_common.h | 23 +++ sound/soc/fsl/fsl_asrc.c| 18 ++ 2 files changed, 41

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

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

[RFC PATCH v6 02/11] ASoC: fsl_easrc: define functions for memory to memory usage

2023-10-13 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 --- sound/soc/fsl/fsl_easrc.c | 193 ++ sound/soc/fsl/fsl_easrc.h | 4 + 2 files changed, 197 insertions(+)

[RFC PATCH v6 01/11] ASoC: fsl_asrc: define functions for memory to memory usage

2023-10-13 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 v6 00/11] Add audio support in v4l2 framework

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

[PATCH V3] tools/perf: Add perf binary dependent rule for shellcheck log in Makefile.perf

2023-10-13 Thread Athira Rajeev
Add rule in new Makefile "tests/Makefile.tests" for running shellcheck on shell test scripts. This automates below shellcheck into the build. $ for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do shellcheck -S warning $F; done Condition for shellcheck is added in Makefile.perf to

[PATCH V2 0/3] Fix for shellcheck issues with latest scripts in tests/shell

2023-10-13 Thread Athira Rajeev
shellcheck was run on perf tool shell scripts as a pre-requisite to include a build option for shellcheck discussed here: https://www.spinics.net/lists/linux-perf-users/msg25553.html And fixes were added for the coding/formatting issues in two patchsets:

[PATCH V2 2/3] tools/perf/tests: Fix shellcheck warning in record_sideband.sh test

2023-10-13 Thread Athira Rajeev
Running shellcheck on record_sideband.sh throws below warning: In tests/shell/record_sideband.sh line 25: if ! perf record -o ${perfdata} -BN --no-bpf-event -C $1 true 2>&1 >/dev/null ^--^ SC2069: To redirect stdout+stderr, 2>&1 must be last (or use '{ cmd > file;

[PATCH V2 1/3] tools/perf/tests Ignore the shellcheck SC2046 warning in lock_contention

2023-10-13 Thread Athira Rajeev
Running shellcheck on lock_contention.sh generates below warning In tests/shell/lock_contention.sh line 36: if [ `nproc` -lt 4 ]; then ^-^ SC2046: Quote this to prevent word splitting. Here since nproc will generate a single word output and there is no

[PATCH V2 3/3] tools/perf/tests/shell: Fix shellcheck warning SC2112 with stat_all_metricgroups

2023-10-13 Thread Athira Rajeev
Running shellcheck on stat_all_metricgroups.sh reports below warning: In ./tests/shell/stat_all_metricgroups.sh line 7: function ParanoidAndNotRoot() ^-- SC2112: 'function' keyword is non-standard. Delete it. As per the format, "function" is a non-standard keyword that can be used to declare

[PATCH] arch: powerpc: net: bpf_jit_comp32.c: Fixed 'instead' typo

2023-10-13 Thread Muhammad Muzammil
Fixed 'instead' typo Signed-off-by: Muhammad Muzammil --- arch/powerpc/net/bpf_jit_comp32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/net/bpf_jit_comp32.c b/arch/powerpc/net/bpf_jit_comp32.c index 7f91ea064c08..bc7f92ec7f2d 100644 ---