Re: [PATCH V3 2/2] tools/perf/tests: Fix object code reading to skip address that falls out of text section

2023-09-14 Thread Athira Rajeev
> On 15-Sep-2023, at 10:56 AM, Adrian Hunter wrote: > > On 15/09/23 08:24, Athira Rajeev wrote: >> The testcase "Object code reading" fails in somecases >> for "fs_something" sub test as below: >> >>Reading object code for memory address: 0xc00807f0142c >>File is:

[PATCH V4 1/2] tools/perf: Add text_end to "struct dso" to save .text section size

2023-09-14 Thread Athira Rajeev
Update "struct dso" to include new member "text_end". This new field will represent the offset for end of text section for a dso. For elf, this value is derived as: sh_size (Size of section in byes) + sh_offset (Section file offst) of the elf header for text. For bfd, this value is derived as: 1.

[PATCH V4 2/2] tools/perf/tests: Fix object code reading to skip address that falls out of text section

2023-09-14 Thread Athira Rajeev
The testcase "Object code reading" fails in somecases for "fs_something" sub test as below: Reading object code for memory address: 0xc00807f0142c File is: /lib/modules/6.5.0-rc3+/kernel/fs/xfs/xfs.ko On file address is: 0x1114cc Objdump command is: objdump -z -d

Re: [PATCH] hwmon: (ibmpowernv) refactor deprecated strncpy

2023-09-14 Thread Guenter Roeck
On 9/14/23 22:24, Kees Cook wrote: On Thu, Sep 14, 2023 at 11:21:06PM +, Justin Stitt wrote: `strncpy` is deprecated for use on NUL-terminated destination strings [1]. We should prefer more robust and less ambiguous string interfaces. A suitable replacement is `strscpy` [2] due to the

Re: [PATCH V3 2/2] tools/perf/tests: Fix object code reading to skip address that falls out of text section

2023-09-14 Thread Adrian Hunter
On 15/09/23 08:24, Athira Rajeev wrote: > The testcase "Object code reading" fails in somecases > for "fs_something" sub test as below: > > Reading object code for memory address: 0xc00807f0142c > File is: /lib/modules/6.5.0-rc3+/kernel/fs/xfs/xfs.ko > On file address is: 0x1114cc

Re: [PATCH] hwmon: (ibmpowernv) refactor deprecated strncpy

2023-09-14 Thread Kees Cook
. Imagine a name input of "fan#2-data". "buf" wants to get "2". copy_len is 1, and strscpy would eat it. :) -Kees > > err = kstrtou32(buf, 10, index); > if (err) > > --- > base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec > change-id: 20230914-strncpy-drivers-hwmon-ibmpowernv-c-80a03f16d93a > > Best regards, > -- > Justin Stitt > -- Kees Cook

[PATCH V3 2/2] tools/perf/tests: Fix object code reading to skip address that falls out of text section

2023-09-14 Thread Athira Rajeev
The testcase "Object code reading" fails in somecases for "fs_something" sub test as below: Reading object code for memory address: 0xc00807f0142c File is: /lib/modules/6.5.0-rc3+/kernel/fs/xfs/xfs.ko On file address is: 0x1114cc Objdump command is: objdump -z -d

[PATCH V3 1/2] tools/perf: Add text_end to "struct dso" to save .text section size

2023-09-14 Thread Athira Rajeev
Update "struct dso" to include new member "text_end". This new field will represent the offset for end of text section for a dso. For elf, this value is derived as: sh_size (Size of section in byes) + sh_offset (Section file offst) of the elf header for text. For bfd, this value is derived as: 1.

Re: [V2 2/2] tools/perf/tests: Fix object code reading to skip address that falls out of text section

2023-09-14 Thread Athira Rajeev
> On 14-Sep-2023, at 11:54 PM, Adrian Hunter wrote: > > On 7/09/23 19:45, Athira Rajeev wrote: >> The testcase "Object code reading" fails in somecases >> for "fs_something" sub test as below: >> >>Reading object code for memory address: 0xc00807f0142c >>File is:

Re: [V2 1/2] tools/perf: Add text_end to "struct dso" to save .text section size

2023-09-14 Thread Athira Rajeev
> On 14-Sep-2023, at 11:49 PM, Adrian Hunter wrote: > > On 7/09/23 19:45, Athira Rajeev wrote: >> Update "struct dso" to include new member "text_end". >> This new field will represent the offset for end of text >> section for a dso. For elf, this value is derived as: >> sh_size (Size of

Re: [PATCH] powerpc/82xx: Select FSL_SOC

2023-09-14 Thread Christophe Leroy
Le 15/09/2023 à 02:43, Michael Ellerman a écrit : > Christophe Leroy writes: >> It used to be impossible to select CONFIG_CPM2 without selecting >> CONFIG_FSL_SOC at the same time because CONFIG_CPM2 was dependent >> on CONFIG_8260 and CONFIG_8260 was selecting CONFIG_FSL_SOC. >> >> But after

[PATCH v2] powerpc/dexcr: Move HASHCHK trap handler

2023-09-14 Thread Benjamin Gray
Syzkaller reported a sleep in atomic context bug relating to the HASHCHK handler logic BUG: sleeping function called from invalid context at arch/powerpc/kernel/traps.c:1518 in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 25040, name: syz-executor preempt_count: 0, expected: 0

[PATCH v2 1/1] powerpc: fix a memory leak

2023-09-14 Thread Yuanjun Gong
When one of the methods xive_native_alloc_irq_on_chip, irq_create_mapping or irq_get_handler_data fails, the function will directly return without disposing vinst->name and vinst. Fix it. Fixes: c20e1e299d93 ("powerpc/vas: Alloc and setup IRQ and trigger port address") Signed-off-by: Yuanjun

Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo

2023-09-14 Thread Michael Ellerman
Sachin Sant writes: >> On 14-Sep-2023, at 6:52 PM, Michael Ellerman wrote: >> >> Sachin Sant writes: On 11-Sep-2023, at 2:44 PM, Aditya Gupta wrote: Presently, while reading a vmcore, makedumpfile uses `cur_cpu_spec.mmu_features` to decide whether the crashed system had

Re: [PATCH 1/1] powerpc: fix a memory leak

2023-09-14 Thread Michael Ellerman
Tyrel Datwyler writes: > On 9/14/23 02:46, Yuanjun Gong wrote: >> When one of the methods xive_native_alloc_irq_on_chip, irq_create_mapping >> or irq_get_handler_data fails, the function will directly return without >> disposing vinst->name and vinst. Fix it. >> >> Fixes: c20e1e299d93

Re: [PATCH] powerpc/82xx: Select FSL_SOC

2023-09-14 Thread Michael Ellerman
Christophe Leroy writes: > It used to be impossible to select CONFIG_CPM2 without selecting > CONFIG_FSL_SOC at the same time because CONFIG_CPM2 was dependent > on CONFIG_8260 and CONFIG_8260 was selecting CONFIG_FSL_SOC. > > But after commit eb5aa2137275 ("powerpc/82xx: Remove CONFIG_8260 > and

Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-09-14 Thread Sean Christopherson
On Thu, Sep 14, 2023, Ackerley Tng wrote: > Sean Christopherson writes: > > > On Mon, Aug 28, 2023, Ackerley Tng wrote: > >> Sean Christopherson writes: > >> >> If we track struct kvm with the inode, then I think (a), (b) and (c) can > >> >> be independent of the refcounting method. What do you

[PATCH] hwmon: (ibmpowernv) refactor deprecated strncpy

2023-09-14 Thread Justin Stitt
10, index); if (err) --- base-commit: 3669558bdf354cd352be955ef2764cde6a9bf5ec change-id: 20230914-strncpy-drivers-hwmon-ibmpowernv-c-80a03f16d93a Best regards, -- Justin Stitt

Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-09-14 Thread Ackerley Tng
Sean Christopherson writes: > On Mon, Aug 28, 2023, Ackerley Tng wrote: >> Sean Christopherson writes: >> >> If we track struct kvm with the inode, then I think (a), (b) and (c) can >> >> be independent of the refcounting method. What do you think? >> > >> > No go. Because again, the inode

Re: [PATCH v2] arch: Reserve map_shadow_stack() syscall number for all architectures

2023-09-14 Thread Edgecombe, Rick P
On Thu, 2023-09-14 at 18:58 +, Sohil Mehta wrote: > commit c35559f94ebc ("x86/shstk: Introduce map_shadow_stack syscall") > recently added support for map_shadow_stack() but it is limited to > x86 > only for now. There is a possibility that other architectures > (namely, > arm64 and RISC-V),

Re: [PATCH tty v1 00/74] serial: wrappers for uart port lock

2023-09-14 Thread Maciej W. Rozycki
On Thu, 14 Sep 2023, John Ogness wrote: > Patches 2-74 switch all uart port locking call sites to use the new > wrappers. These patches were automatically generated using coccinelle. Hmm, no need to do this for drivers/tty/serial/zs.c? Maciej

[PATCH v2] arch: Reserve map_shadow_stack() syscall number for all architectures

2023-09-14 Thread Sohil Mehta
commit c35559f94ebc ("x86/shstk: Introduce map_shadow_stack syscall") recently added support for map_shadow_stack() but it is limited to x86 only for now. There is a possibility that other architectures (namely, arm64 and RISC-V), that are implementing equivalent support for shadow stacks, might

[PATCH tty v1 00/74] serial: wrappers for uart port lock

2023-09-14 Thread John Ogness
When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, e.g. getty, termios, are interference points for the kernel console. So far this has been ignored and the printk output is based on the principle of hope. The

Re: [PATCH v3 1/3] powerpc/config: Cleanup pmac32_defconfig

2023-09-14 Thread Yuan Tan
Hi Michael On 9/14/2023 9:10 PM, Michael Ellerman wrote: Yuan Tan writes: Use 'make savedefconfig' to cleanup pmac32_defconfig, based on Linux 7.6-rc1 Thanks but I don't like doing these updates in a single commit like this, it's easy to accidentally lose a symbol. Yeah I have the same

Re: [PATCH 2/2] arch: Reserve map_shadow_stack() syscall number for all architectures

2023-09-14 Thread Michael Ellerman
"Edgecombe, Rick P" writes: > On Mon, 2023-09-11 at 18:02 +, Sohil Mehta wrote: >> diff --git a/arch/powerpc/kernel/syscalls/syscall.tbl >> b/arch/powerpc/kernel/syscalls/syscall.tbl >> index 20e50586e8a2..2767b8a42636 100644 >> --- a/arch/powerpc/kernel/syscalls/syscall.tbl >> +++

Re: [V2 2/2] tools/perf/tests: Fix object code reading to skip address that falls out of text section

2023-09-14 Thread Disha Goel
On 07/09/23 10:15 pm, Athira Rajeev wrote: The testcase "Object code reading" fails in somecases for "fs_something" sub test as below: Reading object code for memory address: 0xc00807f0142c File is: /lib/modules/6.5.0-rc3+/kernel/fs/xfs/xfs.ko On file address is: 0x1114cc

Re: [PATCH] powerpc: Export kvm_guest static key, for bcachefs six locks

2023-09-14 Thread Kent Overstreet
On Thu, Sep 14, 2023 at 12:26:53PM +1000, Michael Ellerman wrote: > Kent Overstreet writes: > > bcachefs's six locks need kvm_guest, via > > ower_on_cpu() -> vcpu_is_preempted() -> is_kvm_guest() > > > > Signed-off-by: Kent Overstreet > > Cc: linuxppc-dev@lists.ozlabs.org > > --- > >

Re: [PATCH] powerpc/82xx: Select FSL_SOC

2023-09-14 Thread Randy Dunlap
On 9/14/23 08:23, Christophe Leroy wrote: > It used to be impossible to select CONFIG_CPM2 without selecting > CONFIG_FSL_SOC at the same time because CONFIG_CPM2 was dependent > on CONFIG_8260 and CONFIG_8260 was selecting CONFIG_FSL_SOC. > > But after commit eb5aa2137275 ("powerpc/82xx:

Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-09-14 Thread Sean Christopherson
On Mon, Aug 28, 2023, Elliot Berman wrote: > I had a 3rd question that's related to how to wire the gmem up to a virtual > machine: > > I learned of a usecase to implement copy-on-write for gmem. The premise > would be to have a "golden copy" of the memory that multiple virtual > machines can map

[PATCH tty v1 47/74] serial: pmac_zilog: Use port lock wrappers

2023-09-14 Thread John Ogness
From: Thomas Gleixner When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, e.g. getty, termios, are interference points for the kernel console. So far this has been ignored and the printk output is based on the

[PATCH tty v1 72/74] serial: ucc_uart: Use port lock wrappers

2023-09-14 Thread John Ogness
From: Thomas Gleixner When a serial port is used for kernel console output, then all modifications to the UART registers which are done from other contexts, e.g. getty, termios, are interference points for the kernel console. So far this has been ignored and the printk output is based on the

Re: [V2 2/2] tools/perf/tests: Fix object code reading to skip address that falls out of text section

2023-09-14 Thread Adrian Hunter
On 7/09/23 19:45, Athira Rajeev wrote: > The testcase "Object code reading" fails in somecases > for "fs_something" sub test as below: > > Reading object code for memory address: 0xc00807f0142c > File is: /lib/modules/6.5.0-rc3+/kernel/fs/xfs/xfs.ko > On file address is: 0x1114cc

Re: [V2 1/2] tools/perf: Add text_end to "struct dso" to save .text section size

2023-09-14 Thread Adrian Hunter
On 7/09/23 19:45, Athira Rajeev wrote: > Update "struct dso" to include new member "text_end". > This new field will represent the offset for end of text > section for a dso. For elf, this value is derived as: > sh_size (Size of section in byes) + sh_offset (Section file > offst) of the elf header

Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-09-14 Thread Sean Christopherson
On Mon, Aug 28, 2023, Ackerley Tng wrote: > Sean Christopherson writes: > >> If we track struct kvm with the inode, then I think (a), (b) and (c) can > >> be independent of the refcounting method. What do you think? > > > > No go. Because again, the inode (physical memory) is coupled to the > >

Re: [V2 2/2] tools/perf/tests: Fix object code reading to skip address that falls out of text section

2023-09-14 Thread Athira Rajeev
> On 14-Sep-2023, at 5:47 PM, Disha Goel wrote: > > On 07/09/23 10:15 pm, Athira Rajeev wrote: >> The testcase "Object code reading" fails in somecases >> for "fs_something" sub test as below: >> >> Reading object code for memory address: 0xc00807f0142c >> File is:

Re: [PATCH V3] tools/perf: Add includes for detected configs in Makefile.perf

2023-09-14 Thread Athira Rajeev
> On 13-Sep-2023, at 1:06 AM, Arnaldo Carvalho de Melo wrote: > > Em Tue, Sep 12, 2023 at 07:00:00AM -0700, Ian Rogers escreveu: >> On Mon, Sep 11, 2023 at 11:38 PM Athira Rajeev >> wrote: >>> >>> Makefile.perf uses "CONFIG_*" checks in the code. Example the config >>> for libtraceevent is

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

2023-09-14 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 CONFIG_SHELLCHECK check is added to avoid build

[PATCH 1/2] tools/perf: Add new CONFIG_SHELLCHECK for detecting shellcheck binary

2023-09-14 Thread Athira Rajeev
shellcheck tool can detect coding/formatting issues on shell scripts. In perf directory "tests/shell", there are lot of shell test scripts and this tool can detect coding/formatting issues on these scripts. Example to use shellcheck for severity level for errors and warnings, below command is

[PATCH 3/3] skiboot: Update IMC PMU node names for power10

2023-09-14 Thread Athira Rajeev
The nest IMC (In Memory Collection) Performance Monitoring Unit(PMU) node names are saved as "struct nest_pmus_struct" in the "hw/imc.c" IMC code. Not all the IMC PMUs listed in the device tree may be available. Nest IMC PMU names along with their bit values is represented in imc availability

[PATCH 2/3] skiboot: Update IMC code to use dt_find_by_name_before_addr for checking dt nodes

2023-09-14 Thread Athira Rajeev
The nest IMC (In Memory Collection) Performance Monitoring Unit(PMU) node names are saved in nest_pmus[] array in the "hw/imc.c" IMC code. Not all the IMC PMUs listed in the device tree may be available. Nest IMC PMU names along with their bit values is represented in imc availability vector. The

[PATCH 1/3] core/device: Add function to return child node using name at substring "@"

2023-09-14 Thread Athira Rajeev
Add a function dt_find_by_name_before_addr() that returns the child node if it matches till first occurrence at "@" of a given name, otherwise NULL. This is helpful for cases with node name like: "name@addr". In scenarios where nodes are added with "name@addr" format and if the value of "addr" is

Re: [PATCH 1/1] powerpc: fix a memory leak

2023-09-14 Thread Tyrel Datwyler
On 9/14/23 02:46, Yuanjun Gong wrote: > When one of the methods xive_native_alloc_irq_on_chip, irq_create_mapping > or irq_get_handler_data fails, the function will directly return without > disposing vinst->name and vinst. Fix it. > > Fixes: c20e1e299d93 ("powerpc/vas: Alloc and setup IRQ and

[PATCH] powerpc/82xx: Select FSL_SOC

2023-09-14 Thread Christophe Leroy
It used to be impossible to select CONFIG_CPM2 without selecting CONFIG_FSL_SOC at the same time because CONFIG_CPM2 was dependent on CONFIG_8260 and CONFIG_8260 was selecting CONFIG_FSL_SOC. But after commit eb5aa2137275 ("powerpc/82xx: Remove CONFIG_8260 and CONFIG_8272") CONFIG_CPM2 depends on

Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo

2023-09-14 Thread Sachin Sant
> On 14-Sep-2023, at 6:52 PM, Michael Ellerman wrote: > > Sachin Sant writes: >>> On 11-Sep-2023, at 2:44 PM, Aditya Gupta wrote: >>> >>> Presently, while reading a vmcore, makedumpfile uses >>> `cur_cpu_spec.mmu_features` to decide whether the crashed system had >>> RADIX MMU or not. >>>

Re: [PATCH v2] ASoC: imx-rpmsg: Set ignore_pmdown_time for dai_link

2023-09-14 Thread Mark Brown
On Wed, 13 Sep 2023 18:26:56 +0800, Chancel Liu wrote: > i.MX rpmsg sound cards work on codec slave mode. MCLK will be disabled > by CPU DAI driver in hw_free(). Some codec requires MCLK present at > power up/down sequence. So need to set ignore_pmdown_time to power down > codec immediately before

Re: [RFC PATCH v12 02/33] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-09-14 Thread Sean Christopherson
On Thu, Sep 14, 2023, Binbin Wu wrote: > > On 9/14/2023 9:55 AM, Sean Christopherson wrote: > > +void kvm_mmu_invalidate_end(struct kvm *kvm) > > { > > /* > > * This sequence increase will notify the kvm page fault that > > @@ -833,6 +848,13 @@ void kvm_mmu_invalidate_end(struct kvm

Re: [PATCH] powerpc/dexcr: Move HASHCHK trap handler

2023-09-14 Thread Michael Ellerman
Benjamin Gray writes: > To determine if a trap was caused by a HASHCHK instruction, we inspect > the user instruction that triggered the trap. However this may sleep > if the page needs to be faulted in. It would be good to include the output from the might_sleep() check that failed. And I

Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo

2023-09-14 Thread Michael Ellerman
Sachin Sant writes: >> On 11-Sep-2023, at 2:44 PM, Aditya Gupta wrote: >> >> Presently, while reading a vmcore, makedumpfile uses >> `cur_cpu_spec.mmu_features` to decide whether the crashed system had >> RADIX MMU or not. >> >> Currently, makedumpfile fails to get the `cur_cpu_spec` symbol

Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo

2023-09-14 Thread Michael Ellerman
Aditya Gupta writes: > Presently, while reading a vmcore, makedumpfile uses > `cur_cpu_spec.mmu_features` to decide whether the crashed system had > RADIX MMU or not. > > Currently, makedumpfile fails to get the `cur_cpu_spec` symbol (unless > a vmlinux is passed with the `-x` flag to

Re: [PATCH v3 1/3] powerpc/config: Cleanup pmac32_defconfig

2023-09-14 Thread Michael Ellerman
Yuan Tan writes: > Use 'make savedefconfig' to cleanup pmac32_defconfig, based on Linux > 7.6-rc1 Thanks but I don't like doing these updates in a single commit like this, it's easy to accidentally lose a symbol. I prefer an explanation for what's changing for each symbol. See 1ce7fda142af

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-09-14 Thread Erhard Furtner
On Thu, 14 Sep 2023 04:54:17 + Christophe Leroy wrote: > Le 12/09/2023 à 19:39, Christophe Leroy a écrit : > > > > > > Le 12/09/2023 à 17:59, Erhard Furtner a écrit : > >> > >> printk: bootconsole [udbg0] enabled > >> Total memory = 2048MB; using 4096kB for hash table > >> mapin_ram:125

Re: [PATCH v7 3/3 RESEND] powerpc/pseries: PLPKS SED Opal keystore support

2023-09-14 Thread Michael Ellerman
Michal Suchánek writes: > Hello, > > On Thu, Sep 14, 2023 at 02:13:32PM +1000, Michael Ellerman wrote: >> Nathan Chancellor writes: >> > Hi Greg, >> > >> > On Fri, Sep 08, 2023 at 10:30:56AM -0500, gjo...@linux.vnet.ibm.com wrote: >> >> From: Greg Joyce >> >> >> >> Define operations for SED

Re: [PATCH v7 3/3 RESEND] powerpc/pseries: PLPKS SED Opal keystore support

2023-09-14 Thread Michal Suchánek
Hello, On Thu, Sep 14, 2023 at 02:13:32PM +1000, Michael Ellerman wrote: > Nathan Chancellor writes: > > Hi Greg, > > > > On Fri, Sep 08, 2023 at 10:30:56AM -0500, gjo...@linux.vnet.ibm.com wrote: > >> From: Greg Joyce > >> > >> Define operations for SED Opal to read/write keys > >> from POWER

Re: [RFC PATCH v3 6/9] media: v4l2: Add audio capture and output support

2023-09-14 Thread Sakari Ailus
Hi Shenjiu, Thanks for the update. On Thu, Sep 14, 2023 at 01:54:02PM +0800, Shengjiu Wang wrote: > 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

[PATCH v3 3/3] powerpc/config: Simplify pmac32_defconfig

2023-09-14 Thread Yuan Tan
Simplify pmac32_defconfig with POWER_RESET dependences. Regenerate pmac32_defconfig with 'make savedefconfig'. Suggested-by: Philippe Mathieu-Daudé Suggested-by: Christophe Leroy Signed-off-by: Yuan Tan --- arch/powerpc/configs/pmac32_defconfig | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v3 2/3] Kconfig: Add dependencies of POWER_RESET for pmac32

2023-09-14 Thread Yuan Tan
pmac32's power off depends on ADB_CUDA to work. Enable it when POWER_RESET is set for convenience. Suggested-by: Zhangjin Wu Signed-off-by: Yuan Tan --- arch/powerpc/platforms/powermac/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/platforms/powermac/Kconfig

[PATCH v3 1/3] powerpc/config: Cleanup pmac32_defconfig

2023-09-14 Thread Yuan Tan
Use 'make savedefconfig' to cleanup pmac32_defconfig, based on Linux 7.6-rc1 Suggested-by: Philippe Mathieu-Daudé Suggested-by: Christophe Leroy Signed-off-by: Yuan Tan --- arch/powerpc/configs/pmac32_defconfig | 44 --- 1 file changed, 19 insertions(+), 25

[PATCH v3 0/3] Kconfig: Add dependencies of POWER_RESET for pmac32

2023-09-14 Thread Yuan Tan
These patches are to add dependencies of POWER_RESET for pmac32. As I have to use "savedefconfig" on the latest branch of different architectures, I am sending separate patches for each architecture in v3. To simplify the enablement of the poweroff support, selecting the required options for

[PATCH 1/1] powerpc: fix a memory leak

2023-09-14 Thread Yuanjun Gong
When one of the methods xive_native_alloc_irq_on_chip, irq_create_mapping or irq_get_handler_data fails, the function will directly return without disposing vinst->name and vinst. Fix it. Fixes: c20e1e299d93 ("powerpc/vas: Alloc and setup IRQ and trigger port address") Signed-off-by: Yuanjun

Re: [PATCH v4 8/8] bpf ppc32: Access only if addr is kernel address

2023-09-14 Thread Hari Bathini
On 14/09/23 11:48 am, Christophe Leroy wrote: Hi, Hi Christophe, Le 29/09/2021 à 13:18, Hari Bathini a écrit : With KUAP enabled, any kernel code which wants to access userspace needs to be surrounded by disable-enable KUAP. But that is not happening for BPF_PROBE_MEM load instruction.

Re: [PATCH v2 1/3] kconfig: add dependencies of POWER_RESET for mips malta

2023-09-14 Thread Yuan Tan
On 9/4/2023 6:51 PM, Philippe Mathieu-Daudé wrote: On 4/9/23 11:24, Yuan Tan wrote: Hi, On 9/4/2023 3:40 PM, Philippe Mathieu-Daudé wrote: Hi, On 1/9/23 04:42, Yuan Tan wrote: MIPS Malta's power off depends on PCI, PCI_QUIRKS, and POWER_RESET_PIIX4_POWEROFF to work. Enable them when

[RFC PATCH v3 9/9] media: imx-asrc: Add memory to memory driver

2023-09-14 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 v3 8/9] media: audm2m: add virtual driver for audio memory to memory

2023-09-14 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 v3 7/9] media: uapi: Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control

2023-09-14 Thread Shengjiu Wang
The input clock and output clock may not be the accurate rate as the sample rate, there is some drift, so the convert ratio of i.MX ASRC module need to be changed according to actual clock rate. Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control for user to adjust the ratio. Signed-off-by: Shengjiu

[RFC PATCH v3 6/9] media: v4l2: Add audio capture and output support

2023-09-14 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. Defined

[RFC PATCH v3 5/9] ASoC: fsl_easrc: register m2m platform device

2023-09-14 Thread Shengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 13 + 1 file changed, 13 insertions(+) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index f517b407672d..b719d517f9b4 100644 ---

[RFC PATCH v3 4/9] ASoC: fsl_asrc: register m2m platform device

2023-09-14 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 | 12 sound/soc/fsl/fsl_asrc.c| 12 2 files changed, 24 insertions(+) diff

[RFC PATCH v3 3/9] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2023-09-14 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 v3 1/9] ASoC: fsl_asrc: define functions for memory to memory usage

2023-09-14 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage. m2m_start_part_one: first part of the start steps m2m_start_part_two: second part of the start steps m2m_stop_part_one: first part of stop steps m2m_stop_part_two: second part of stop steps, optional

[RFC PATCH v3 2/9] ASoC: fsl_easrc: define functions for memory to memory usage

2023-09-14 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 | 226 ++ sound/soc/fsl/fsl_easrc.h | 6 + 2 files changed, 232 insertions(+)

[RFC PATCH v3 0/9] Add audio support in v4l2 framework

2023-09-14 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 v4 8/8] bpf ppc32: Access only if addr is kernel address

2023-09-14 Thread Christophe Leroy
Hi, Le 29/09/2021 à 13:18, Hari Bathini a écrit : > With KUAP enabled, any kernel code which wants to access userspace > needs to be surrounded by disable-enable KUAP. But that is not > happening for BPF_PROBE_MEM load instruction. Though PPC32 does not > support read protection, considering the

Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo

2023-09-14 Thread Aditya Gupta
Hello Sachin, On Wed, Sep 13, 2023 at 06:19:11PM +0530, Sachin Sant wrote: > > > > On 11-Sep-2023, at 2:44 PM, Aditya Gupta wrote: > > > > Presently, while reading a vmcore, makedumpfile uses > > `cur_cpu_spec.mmu_features` to decide whether the crashed system had > > RADIX MMU or not. > > >