Re: [PATCH v2 2/6] powerpc/smp: Enable Asym packing for cores on shared processor

2023-10-19 Thread Srikar Dronamraju
* Shrikanth Hegde [2023-10-19 21:26:56]: > > > On 10/18/23 10:07 PM, Srikar Dronamraju wrote: > > If there are shared processor LPARs, underlying Hypervisor can have more > > virtual cores to handle than actual physical cores. > > > > Starting with Power 9, a core has 2 nearly independent

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

2023-10-19 Thread Anup Patel
On Thu, Oct 19, 2023 at 1:27 PM Andrew Jones wrote: > > On Thu, Oct 12, 2023 at 10:45:04AM +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

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

2023-10-19 Thread Haren Myneni
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 window routine checks the migration flag, setup the window and then add it to the

Re: [linux-next:master] BUILD REGRESSION 2dac75696c6da3c848daa118a729827541c89d33

2023-10-19 Thread Philip Li
On Thu, Oct 19, 2023 at 05:32:05PM +0200, Heiko Carstens wrote: > On Thu, Oct 19, 2023 at 04:07:35AM +0800, kernel test robot wrote: > > arch/s390/include/asm/ctlreg.h:129:9: warning: array subscript 0 is outside > > array bounds of 'struct ctlreg[0]' [-Warray-bounds=] > >

[PATCH v2] powerpc/vas: Limit open window failure messages in log bufffer

2023-10-19 Thread Haren Myneni
The VAS open window call prints error message and returns -EBUSY after the migration suspend event initiated and until the resume event completed on the destination system. It can cause the log buffer filled with these error messages if the user space issues continuous open window calls. Similar

Re: [PATCH v2 2/6] powerpc/smp: Enable Asym packing for cores on shared processor

2023-10-19 Thread Shrikanth Hegde
On 10/18/23 10:07 PM, Srikar Dronamraju wrote: > If there are shared processor LPARs, underlying Hypervisor can have more > virtual cores to handle than actual physical cores. > > Starting with Power 9, a core has 2 nearly independent thread groups. > On a shared processors LPARs, it helps to

Re: [linux-next:master] BUILD REGRESSION 2dac75696c6da3c848daa118a729827541c89d33

2023-10-19 Thread Heiko Carstens
On Thu, Oct 19, 2023 at 04:07:35AM +0800, kernel test robot wrote: > arch/s390/include/asm/ctlreg.h:129:9: warning: array subscript 0 is outside > array bounds of 'struct ctlreg[0]' [-Warray-bounds=] > arch/s390/include/asm/ctlreg.h:80:9: warning: array subscript 0 is outside > array bounds of

Re: [PATCH v2 4/6] powerpc/smp: Disable MC domain for shared processor

2023-10-19 Thread Srikar Dronamraju
* Peter Zijlstra [2023-10-19 09:50:46]: > On Thu, Oct 19, 2023 at 03:48:48PM +1100, Michael Ellerman wrote: > > Srikar Dronamraju writes: > > > Like L2-cache info, coregroup information which is used to determine MC > > > sched domains is only present on dedicated LPARs. i.e PowerVM doesn't > >

Re: [PATCH v2 4/6] powerpc/smp: Disable MC domain for shared processor

2023-10-19 Thread Srikar Dronamraju
* Michael Ellerman [2023-10-19 15:48:48]: > Srikar Dronamraju writes: > > Like L2-cache info, coregroup information which is used to determine MC > > sched domains is only present on dedicated LPARs. i.e PowerVM doesn't > > export coregroup information for shared processor LPARs. Hence disable

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

2023-10-19 Thread Srikar Dronamraju
* 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, different scheduler/ topology flags may

Re: [PATCH v2 5/6] powerpc/smp: Add read_mostly attribute

2023-10-19 Thread Srikar Dronamraju
* Peter Zijlstra [2023-10-19 09:51:27]: > On Wed, Oct 18, 2023 at 10:07:45PM +0530, Srikar Dronamraju wrote: > > There are some variables that are only updated at boot time. > > So add read_mostly attribute to such variables > > You don't have __ro_after_init ? Michael also responded with the

Re: [PATCH v2 2/6] powerpc/smp: Enable Asym packing for cores on shared processor

2023-10-19 Thread Srikar Dronamraju
* Peter Zijlstra [2023-10-19 09:48:28]: > On Thu, Oct 19, 2023 at 03:38:40PM +1100, Michael Ellerman wrote: > > Srikar Dronamraju writes: > > > If there are shared processor LPARs, underlying Hypervisor can have more > > > virtual cores to handle than actual physical cores. > > > > > > Starting

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

2023-10-19 Thread Michael Ellerman
Kuan-Wei Chiu writes: > On Thu, Oct 19, 2023 at 12:41:45PM +1100, Michael Ellerman wrote: >> Kuan-Wei Chiu writes: >> > 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

[powerpc:fixes-test] BUILD SUCCESS f9bc9bbe8afdf83412728f0b464979a72a3b9ec2

2023-10-19 Thread kernel test robot
allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20231018 gcc arc randconfig-001-20231019 gcc arm

Re: [PATCH v2 2/6] powerpc/smp: Enable Asym packing for cores on shared processor

2023-10-19 Thread Michael Ellerman
Peter Zijlstra writes: > On Thu, Oct 19, 2023 at 03:38:40PM +1100, Michael Ellerman wrote: >> Srikar Dronamraju writes: >> > If there are shared processor LPARs, underlying Hypervisor can have more >> > virtual cores to handle than actual physical cores. >> > >> > Starting with Power 9, a core

[powerpc:next-test] BUILD SUCCESS 5ae7ca5d69bde653bb595edcc355850db66128b5

2023-10-19 Thread kernel test robot
allnoconfig gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-001-20231018 gcc arc randconfig-001-20231019 gcc arm

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

2023-10-19 Thread Shrikanth Hegde
On 10/18/23 10:07 PM, Srikar Dronamraju wrote: > 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, different scheduler/ topology flags may be > set based on the

Re: [RFC PATCH v6 09/11] media: uapi: Add audio rate controls support

2023-10-19 Thread Hans Verkuil
On 19/10/2023 12:44, Shengjiu Wang wrote: > On Wed, Oct 18, 2023 at 3:58 PM Hans Verkuil wrote: >> >> On 18/10/2023 09:40, Shengjiu Wang wrote: >>> On Wed, Oct 18, 2023 at 3:31 PM Hans Verkuil wrote: On 18/10/2023 09:23, Shengjiu Wang wrote: > On Wed, Oct 18, 2023 at 10:27 AM

Re: [RFC PATCH v6 09/11] media: uapi: Add audio rate controls support

2023-10-19 Thread Shengjiu Wang
On Wed, Oct 18, 2023 at 3:58 PM Hans Verkuil wrote: > > On 18/10/2023 09:40, Shengjiu Wang wrote: > > On Wed, Oct 18, 2023 at 3:31 PM Hans Verkuil wrote: > >> > >> On 18/10/2023 09:23, Shengjiu Wang wrote: > >>> On Wed, Oct 18, 2023 at 10:27 AM Shengjiu Wang > >>> wrote: > > On Tue,

Re: [PATCH v2 4/8] RISC-V: KVM: Forward SBI DBCN extension to user-space

2023-10-19 Thread Andrew Jones
On Thu, Oct 12, 2023 at 10:45:05AM +0530, Anup Patel wrote: > 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

[PATCH v4] powerpc/paravirt: Improve vcpu_is_preempted

2023-10-19 Thread Srikar Dronamraju
PowerVM Hypervisor dispatches on a whole core basis. In a shared LPAR, a CPU from a core that is CEDED or preempted may have a larger latency. In such a scenario, its preferable to choose a different CPU to run. If one of the CPUs in the core is active, i.e neither CEDED nor preempted, then

[PATCH v3] powerpc/paravirt: Improve vcpu_is_preempted

2023-10-19 Thread Srikar Dronamraju
PowerVM Hypervisor dispatches on a whole core basis. In a shared LPAR, a CPU from a core that is CEDED or preempted may have a larger latency. In such a scenario, its preferable to choose a different CPU to run. If one of the CPUs in the core is active, i.e neither CEDED nor preempted, then

Re: [PATCH v2 8/8] RISC-V: Enable SBI based earlycon support

2023-10-19 Thread Andrew Jones
On Thu, Oct 12, 2023 at 10:45:09AM +0530, 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 > --- > arch/riscv/configs/defconfig | 1 + >

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

2023-10-19 Thread Andrew Jones
On Thu, Oct 12, 2023 at 10:45:07AM +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 v2 5/8] RISC-V: Add inline version of sbi_console_putchar/getchar() functions

2023-10-19 Thread Andrew Jones
On Thu, Oct 12, 2023 at 10:45:06AM +0530, 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 > inline version of these functions to avoid "#ifdef" on user side. nit: Here and in the summary I'd

Re: [PATCH v2 4/8] RISC-V: KVM: Forward SBI DBCN extension to user-space

2023-10-19 Thread Andrew Jones
On Thu, Oct 12, 2023 at 10:45:05AM +0530, Anup Patel wrote: > 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

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

2023-10-19 Thread Andrew Jones
On Thu, Oct 12, 2023 at 10:45:04AM +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: [PATCH v2 5/6] powerpc/smp: Add read_mostly attribute

2023-10-19 Thread Peter Zijlstra
On Wed, Oct 18, 2023 at 10:07:45PM +0530, Srikar Dronamraju wrote: > There are some variables that are only updated at boot time. > So add read_mostly attribute to such variables You don't have __ro_after_init ?

Re: [PATCH v2 4/6] powerpc/smp: Disable MC domain for shared processor

2023-10-19 Thread Peter Zijlstra
On Thu, Oct 19, 2023 at 03:48:48PM +1100, Michael Ellerman wrote: > Srikar Dronamraju writes: > > Like L2-cache info, coregroup information which is used to determine MC > > sched domains is only present on dedicated LPARs. i.e PowerVM doesn't > > export coregroup information for shared processor

Re: [PATCH v2 2/6] powerpc/smp: Enable Asym packing for cores on shared processor

2023-10-19 Thread Peter Zijlstra
On Thu, Oct 19, 2023 at 03:38:40PM +1100, Michael Ellerman wrote: > Srikar Dronamraju writes: > > If there are shared processor LPARs, underlying Hypervisor can have more > > virtual cores to handle than actual physical cores. > > > > Starting with Power 9, a core has 2 nearly independent thread

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

2023-10-19 Thread Andrew Jones
On Thu, Oct 12, 2023 at 10:45:03AM +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

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

2023-10-19 Thread Andrew Jones
On Thu, Oct 12, 2023 at 10:45:02AM +0530, Anup Patel wrote: > 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

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

2023-10-19 Thread Haren Myneni
On 10/18/23 2:10 PM, Nathan Lynch wrote: 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 window routine

[PATCH v3] mtd: powernv_flash: check return value of devm_kasprintf()

2023-10-19 Thread Yi Yang
devm_kasprintf() returns a pointer to dynamically allocated memory which can be NULL upon failure. Ensure the allocation was successful by checking the pointer validity. Fixes: acfe63ec1c59 ("mtd: Convert to using %pOFn instead of device_node.name") Signed-off-by: Yi Yang --- v2:Change commit

Re: [PATCH 1/4] add generic builtin command line

2023-10-19 Thread Pratyush Brahma
On 17-10-2023 19:51, Daniel Walker (danielwa) wrote: On Tue, Oct 17, 2023 at 04:10:42PM +0530, Pratyush Brahma wrote: For such a usecase, the CONFIG_CMDLINE_PREPEND seems to be quite useful as it would help to stitch bootloader and the desired build variant's configs together. Can you please

Re: [PATCH v2] mtd: powernv_flash: check return value of devm_kasprintf()

2023-10-19 Thread Miquel Raynal
Hi Yi, yiyan...@huawei.com wrote on Thu, 19 Oct 2023 01:30:50 +: > devm_kasprintf() returns a pointer to dynamically allocated memory > which can be NULL upon failure. Ensure the allocation was successful by > checking the pointer validity. > > Fixes: acfe63ec1c59 ("mtd: Convert to using

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

2023-10-19 Thread Michael Ellerman
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 jit_subprogs, bpf_jit_free is called on some