Re: [PATCH v4 08/20] powerpc: Include all arch-specific syscall prototypes

2022-09-13 Thread Rohan McLure
> On 12 Sep 2022, at 8:33 pm, Nicholas Piggin wrote: > > On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: >> Forward declare all syscall handler prototypes where a generic prototype >> is not provided in either linux/syscalls.h or linux/compat.h in >> asm/syscalls.h. This is required

RE: Re: [PATCH 1/5] ASoC: dt-bindings: fsl_rpmsg: Add a property to assign platform driver name

2022-09-13 Thread Chancel Liu
> > Add a string property to assign ASoC platform driver name. It also > > represents the rpmsg channel this sound card sits on. This property > > can be omitted if there is only one sound card and it sits on > > "rpmsg-audio-channel". > > > > Signed-off-by: Chancel Liu > > --- > > .../devicetree

[PATCH 0/4] Remove unused macros from asm-offset

2022-09-13 Thread Disha Goel
There were commits which did code refactoring and converting some of kvm assembly routines to C. When doing it, many of the asm-offset macro definitions were missed to remove. Patchset here removes those. Patch1 removes usage of KVM_TLB_SETS macro from the asm-offset Patch2 removes KVM_RADIX macr

[PATCH 1/4] powerpc/asm-offset: Remove unused KVM_TLB_SETS macros

2022-09-13 Thread Disha Goel
Commit 2e1ae9cd56f8 ("KVM: PPC: Book3S HV: Implement radix prefetch workaround by disabling MMU") removed usage of KVM_TLB_SETS macro as part of fixing radix prefetch workaround. But the patch missed to remove the asm-offset macro definition which was used in the assembly files and now this is un-u

[PATCH 2/4] powerpc/asm-offset: Remove unused KVM_RADIX macros

2022-09-13 Thread Disha Goel
Commit 9769a7fd79b6 ("KVM: PPC: Book3S HV: Remove radix guest support from P7/8 path") removed the radix guest support from P7/8 path since the P9 path now supports of all the supported radix guest. But missed to remove KVM_RADIX from the asm-offset. Patch fixes by removing it. Fixes: 9769a7fd79b6

[PATCH 3/4] powerpc/kvm: Remove unused macros from asm-offset

2022-09-13 Thread Disha Goel
Commit fae5c9f3664b ("KVM: PPC: Book3S HV: remove ISA v3.0 and v3.1 support from P7/8 path") moved code path for the kvm guest entry/exit for p7/8 from aseembly to C. But the patch missed to remove the asm-offset macro definitions which were used in the assembly files and now they are un-used. Patc

[PATCH 4/4] powerpc/kvm: Remove unused references for MMCR3/SIER2/SIER3 registers

2022-09-13 Thread Disha Goel
From: Kajol Jain Commit 57dc0eed73ca ("KVM: PPC: Book3S HV P9: Implement PMU save/restore in C") removed the PMU save/restore functions from assembly code and implemented these functions in C, for power9 and later platforms. After the code refactoring, Performance Monitoring Unit (PMU) registers

Re: [PATCH] hmm-tests: Fix migrate_dirty_page test

2022-09-13 Thread David Hildenbrand
On 13.09.22 07:22, Alistair Popple wrote: As noted by John Hubbard the original test relied on side effects of the implementation of migrate_vma_setup() to detect if pages had been swapped to disk or not. This is subject to change in future so explicitly check for swap entries via pagemap instead

Re: [PATCH 0/4] Remove unused macros from asm-offset

2022-09-13 Thread Christophe Leroy
Le 13/09/2022 à 09:40, Disha Goel a écrit : > There were commits which did code refactoring and converting some of kvm > assembly routines to C. When doing it, many of the asm-offset macro > definitions were missed to remove. Patchset here removes those. > > Patch1 removes usage of KVM_TLB_SETS

Re: [PATCH] hmm-tests: Fix migrate_dirty_page test

2022-09-13 Thread Alistair Popple
David Hildenbrand writes: > On 13.09.22 07:22, Alistair Popple wrote: >> As noted by John Hubbard the original test relied on side effects of the >> implementation of migrate_vma_setup() to detect if pages had been >> swapped to disk or not. This is subject to change in future so >> explicitly

[PATCH] soc: fsl: qe: return platform_driver_register

2022-09-13 Thread Jiasheng Jiang
As platform_driver_register() can return error numbers, it should be better to return platform_driver_register() instead of return 0. Fixes: be7ecbd240b2 ("soc: fsl: qe: convert QE interrupt controller to platform_device") Signed-off-by: Jiasheng Jiang --- drivers/soc/fsl/qe/qe_ic.c | 3 +-- 1

Re: [PATCH] powerpc/pseries: add lparctl driver for platform-specific functions

2022-09-13 Thread Michal Suchánek
On Fri, Aug 12, 2022 at 02:14:21PM -0500, Nathan Lynch wrote: > Laurent Dufour writes: > > Le 30/07/2022 à 02:04, Nathan Lynch a écrit : > >> +static long lparctl_get_sysparm(struct lparctl_get_system_parameter > >> __user *argp) > >> +{ > >> + struct lparctl_get_system_parameter *gsp; > >> + l

Re: State of RFC PATCH Remove CONFIG_DCACHE_WORD_ACCESS

2022-09-13 Thread Christophe Leroy
Le 12/09/2022 à 17:22, Christophe Leroy a écrit : Le 12/09/2022 à 15:46, Lukas Bulwahn a écrit : Hi Joe, hi Ben, While reviewing some kernel config, I came across CONFIG_DCACHE_WORD_ACCESS and tried to understand its purpose. Then, I discovered this RFC patch from 2014 that seems never to

Re: [PATCH] hmm-tests: Fix migrate_dirty_page test

2022-09-13 Thread Mika Penttilä
On 13.9.2022 8.22, Alistair Popple wrote: As noted by John Hubbard the original test relied on side effects of the implementation of migrate_vma_setup() to detect if pages had been swapped to disk or not. This is subject to change in future so explicitly check for swap entries via pagemap inst

Re: [PATCH v3 16/16] objtool/powerpc: Add --mcount specific implementation

2022-09-13 Thread Christophe Leroy
Le 12/09/2022 à 10:20, Sathvika Vasireddy a écrit : > This patch enables objtool --mcount on powerpc, and adds implementation > specific to powerpc. > > Signed-off-by: Sathvika Vasireddy > --- > arch/powerpc/Kconfig | 1 + > tools/objtool/arch/powerpc/decode.c

Re: [PATCH v2] ppc64/kdump: Limit kdump base to 512MB

2022-09-13 Thread Sachin Sant
> On 12-Sep-2022, at 12:20 PM, Hari Bathini wrote: > > Since commit e641eb03ab2b0 ("powerpc: Fix up the kdump base cap to > 128M") memory for kdump kernel has been reserved at an offset of > 128MB. This held up well for a long time before running into boot > failure on LPARs having a lot of co

[PATCH 2/3] tools/perf/tests: Fix branch stack sampling test to include sanity check for branch filter

2022-09-13 Thread Athira Rajeev
commit b55878c90ab9 ("perf test: Add test for branch stack sampling") added test for branch stack sampling. There is a sanity check in the beginning to skip the test if the hardware doesn't support branch stack sampling. Snippet <<>> skip the test if the hardware doesn't support branch stack sampl

[PATCH 1/3] powerpc/perf: Fix branch_filter support for multiple filters in powerpc

2022-09-13 Thread Athira Rajeev
For PERF_SAMPLE_BRANCH_STACK sample type, different branch_sample_type ie branch filters are supported. The branch filters are requested via event attribute "branch_sample_type". Multiple branch filters can be passed in event attribute. Example: perf record -b -o- -B --branch-filter any,ind_call t

[PATCH 3/3] tools/testing/selftests/powerpc: Update the bhrb filter sampling test to test for multiple branch filters

2022-09-13 Thread Athira Rajeev
For PERF_SAMPLE_BRANCH_STACK sample type, different branch_sample_type, ie branch filters are supported. The testcase "bhrb_filter_map_test" tests the valid and invalid filter maps in different powerpc platforms. Update this testcase to include scenario to cover multiple branch filters at sametime.

[PATCH] tools/perf: Fix aggr_printout to display cpu field irrespective of core value

2022-09-13 Thread Athira Rajeev
perf stat includes option to specify aggr_mode to display per-socket, per-core, per-die, per-node counter details. Also there is option -A ( AGGR_NONE, -no-aggr ), where the counter values are displayed for each cpu along with "CPU" value in one field of the output. Each of the aggregate mode uses

[PATCH] tools/perf/tests: Fix perf probe error log check in skip_if_no_debuginfo

2022-09-13 Thread Athira Rajeev
The perf probe related tests like probe_vfs_getname.sh which is in "tools/perf/tests/shell" directory have dependency on debuginfo information in the kernel. Currently debuginfo check is handled by skip_if_no_debuginfo function in the file "lib/probe_vfs_getname.sh". skip_if_no_debuginfo function l

Re: [PATCH v3 02/16] powerpc: Override __ALIGN and __ALIGN_STR macros

2022-09-13 Thread Peter Zijlstra
On Mon, Sep 12, 2022 at 01:50:06PM +0530, Sathvika Vasireddy wrote: > In a subsequent patch, we would want to annotate powerpc assembly functions > with SYM_FUNC_START_LOCAL macro. This macro depends on __ALIGN macro. > > The default expansion of __ALIGN macro is: > #define __ALIGN .a

Re: [PATCH v3 02/16] powerpc: Override __ALIGN and __ALIGN_STR macros

2022-09-13 Thread Christophe Leroy
Le 13/09/2022 à 14:03, Peter Zijlstra a écrit : > On Mon, Sep 12, 2022 at 01:50:06PM +0530, Sathvika Vasireddy wrote: >> In a subsequent patch, we would want to annotate powerpc assembly functions >> with SYM_FUNC_START_LOCAL macro. This macro depends on __ALIGN macro. >> >> The default expansion

Re: Fragmented physical memory on powerpc/32

2022-09-13 Thread Christophe Leroy
Le 13/09/2022 à 08:11, Christophe Leroy a écrit : Le 12/09/2022 à 23:16, Pali Rohár a écrit : My guess would be that something went wrong in the linear map setup, but it won't hurt running with "memblock=debug" added to the kernel command line to see if there is anything suspicious ther

[PATCH] powerpc/64: Remove unused SYS_CALL_TABLE symbol

2022-09-13 Thread Michael Ellerman
In interrupt_64.S, formerly entry_64.S, there are two toc entries created for sys_call_table and compat_sys_call_table. These are no longer used, since the system call entry was converted from asm to C, so remove them. Fixes: 68b34588e202 ("powerpc/64/sycall: Implement syscall entry/exit logic in

Re: [PATCH kernel] KVM: PPC: Make KVM_CAP_IRQFD_RESAMPLE platform dependent

2022-09-13 Thread Alexey Kardashevskiy
Ping? It's been a while and probably got lost :-/ On 18/05/2022 16:27, Alexey Kardashevskiy wrote: On 5/4/22 17:48, Alexey Kardashevskiy wrote: When introduced, IRQFD resampling worked on POWER8 with XICS. However KVM on POWER9 has never implemented it - the compatibility mode code ("XICS-on-

Re: [PATCH v3 02/16] powerpc: Override __ALIGN and __ALIGN_STR macros

2022-09-13 Thread Peter Zijlstra
On Tue, Sep 13, 2022 at 12:21:51PM +, Christophe Leroy wrote: > > Like mentioned last time; I'm fixing this (but you're right to not wait > > on that), that said, would it make sense to write it like: > > > > #define __ALIGN .balign 4 > > #define __ALIGN_STR __stringify(__ALIGN) >

Re: [PATCH 2/3] powerpc: mm: add p{te,md,ud}_user_accessible_page helpers

2022-09-13 Thread Christophe Leroy
Le 12/09/2022 à 03:47, Rohan McLure a écrit : > Add the following helpers for detecting whether a page table entry > is a leaf and is accessible to user space. > > * pte_user_accessible_page > * pmd_user_accessible_page > * pud_user_accessible_page > > The heavy lifting is done by pte_use

Re: [PATCH v3 00/16] objtool: Enable and implement --mcount option on powerpc

2022-09-13 Thread Peter Zijlstra
On Mon, Sep 12, 2022 at 01:50:04PM +0530, Sathvika Vasireddy wrote: > Christophe Leroy (4): > objtool: Fix SEGFAULT > objtool: Use target file endianness instead of a compiled constant > objtool: Use target file class size instead of a compiled constant > Sathvika Vasireddy (12): > objtool

Re: [PATCH 3/3] powerpc: mm: support page table check

2022-09-13 Thread Christophe Leroy
Le 13/09/2022 à 03:21, Rohan McLure a écrit : > > >> On 12 Sep 2022, at 4:11 pm, Christophe Leroy >> wrote: >> >> >> >> Le 12/09/2022 à 03:47, Rohan McLure a écrit : >>> On creation and clearing of a page table mapping, instrument such calls >>> by invoking page_table_check_pte_set and page_t

Re: [PATCH] powerpc/pseries: add lparctl driver for platform-specific functions

2022-09-13 Thread Nathan Lynch
Michal Suchánek writes: > On Fri, Aug 12, 2022 at 02:14:21PM -0500, Nathan Lynch wrote: >> Laurent Dufour writes: >> > Le 30/07/2022 à 02:04, Nathan Lynch a écrit : >> >> +static long lparctl_get_sysparm(struct lparctl_get_system_parameter >> >> __user *argp) >> >> +{ >> >> + struct lparctl_get

Re: [PATCH] powerpc/pseries: add lparctl driver for platform-specific functions

2022-09-13 Thread Michal Suchánek
On Tue, Sep 13, 2022 at 10:59:56AM -0500, Nathan Lynch wrote: > Michal Suchánek writes: > > > On Fri, Aug 12, 2022 at 02:14:21PM -0500, Nathan Lynch wrote: > >> Laurent Dufour writes: > >> > Le 30/07/2022 à 02:04, Nathan Lynch a écrit : > >> >> +static long lparctl_get_sysparm(struct lparctl_get

Re: [PATCH] powerpc/pseries: add lparctl driver for platform-specific functions

2022-09-13 Thread Nathan Lynch
Michal Suchánek writes: > On Tue, Sep 13, 2022 at 10:59:56AM -0500, Nathan Lynch wrote: >> Michal Suchánek writes: >> >> > On Fri, Aug 12, 2022 at 02:14:21PM -0500, Nathan Lynch wrote: >> >> Laurent Dufour writes: >> >> > Le 30/07/2022 à 02:04, Nathan Lynch a écrit : >> >> >> +static long lparc

Re: [PATCH] Revert "powerpc/rtas: Implement reentrant rtas call"

2022-09-13 Thread Leonardo Brás
On Mon, 2022-09-12 at 14:58 -0500, Nathan Lynch wrote: > Leonardo Brás writes: > > On Fri, 2022-09-09 at 09:04 -0500, Nathan Lynch wrote: > > > Leonardo Brás writes: > > > > On Wed, 2022-09-07 at 17:01 -0500, Nathan Lynch wrote: > > > > > At the time this was submitted by Leonardo, I confirmed --

Re: [PATCH v5 0/8] phy: Add support for Lynx 10G SerDes

2022-09-13 Thread Vinod Koul
On 09-09-22, 11:05, Sean Anderson wrote: > > I noticed in patchwork [1] that this entire series is marked as "Changes > Requested," despite having received only automated feedback on one patch > in the series. I am concerned about this because last time this occurred > [2], the series received no

Re: [RFC] Objtool toolchain proposal: -fannotate-{jump-table,noreturn}

2022-09-13 Thread Josh Poimboeuf
On Mon, Sep 12, 2022 at 02:17:36PM +, Michael Matz wrote: > Hey, Hi Michael, Thanks for looking at this. > On Mon, 12 Sep 2022, Borislav Petkov wrote: > > > Micha, any opinions on the below are appreciated. > > > > On Fri, Sep 09, 2022 at 11:07:04AM -0700, Josh Poimboeuf wrote: > > > > di

Re: [RFC] Objtool toolchain proposal: -fannotate-{jump-table,noreturn}

2022-09-13 Thread Josh Poimboeuf
On Tue, Sep 13, 2022 at 03:51:44PM -0700, Indu Bhagat wrote: > Curious to know what all features of objtool rely on the need to reverse > engineer the control flow graph. Is it a larger set or it is only for ORC > generation ? Objtool features which rely on the CFG: - Frame pointer rule validatio

Re: [PATCH v3 00/16] objtool: Enable and implement --mcount option on powerpc

2022-09-13 Thread Josh Poimboeuf
On Tue, Sep 13, 2022 at 04:13:52PM +0200, Peter Zijlstra wrote: > On Mon, Sep 12, 2022 at 01:50:04PM +0530, Sathvika Vasireddy wrote: > > Christophe Leroy (4): > > objtool: Fix SEGFAULT > > objtool: Use target file endianness instead of a compiled constant > > objtool: Use target file class s

Re: [RFC] Objtool toolchain proposal: -fannotate-{jump-table,noreturn}

2022-09-13 Thread Indu Bhagat
Hi Josh, On 9/9/22 11:07, Josh Poimboeuf wrote: Hi, Here's a preview of what I'm planning to discuss at the LPC toolchains microconference. Feel free to start the discussion early :-) This is a proposal for some new minor GCC/Clang features which would help objtool greatly. Background -

[PATCH linux-next][RFC] powerpc: protect cpu offlining by RCU offline lock

2022-09-13 Thread Zhouyi Zhou
During the cpu offlining, the sub functions of xive_teardown_cpu will call __lock_acquire when CONFIG_LOCKDEP=y. The latter function will travel RCU protected list, so "WARNING: suspicious RCU usage" will be triggered. Try to protect cpu offlining by RCU offline lock. Tested on PPC VM of Open Sou

[PATCH linux-next][RFC] powerpc: protect cpu offlining by RCU offline lock

2022-09-13 Thread Zhouyi Zhou
From: Zhouyi Zhou During the cpu offlining, the sub functions of xive_teardown_cpu will call __lock_acquire when CONFIG_LOCKDEP=y. The latter function will travel RCU protected list, so "WARNING: suspicious RCU usage" will be triggered. Try to protect cpu offlining by RCU offline lock. Tested o