Re: [PATCH] powerpc/32s: Allocate one 256k IBAT instead of two consecutives 128k IBATs

2021-12-02 Thread Michael Ellerman
Christophe Leroy writes: > Today we have the following IBATs allocated: > > ---[ Instruction Block Address Translation ]--- > 0: 0xc000-0xc03f 0x 4M Kernel x m > 1: 0xc040-0xc05f 0x0040 2M Kernel x m > 2:

[PATCH V2 1/2] tools/perf: Include global and local variants for p_stage_cyc sort key

2021-12-02 Thread Athira Rajeev
Sort key p_stage_cyc is used to present the latency cycles spend in pipeline stages. perf tool has local p_stage_cyc sort key to display this info. There is no global variant available for this sort key. local variant shows latency in a sinlge sample, whereas, global value will be useful to

[PATCH V2 2/2] tools/perf: Update global/local variants for p_stage_cyc in powerpc

2021-12-02 Thread Athira Rajeev
Update the arch_support_sort_key() function in powerpc to enable presenting local and global variants of sort key: p_stage_cyc. Update the "se_header" strings for these in arch_perf_header_entry() function along with instruction latency. Signed-off-by: Athira Rajeev Reported-by: Namhyung Kim

Re: [PATCH] of: unmap memory regions in /memreserve node

2021-12-02 Thread Michael Ellerman
Mark Rutland writes: > On Tue, Nov 30, 2021 at 04:43:31PM -0600, Rob Herring wrote: >> +linuxppc-dev Sorry missed this until now ... >> On Wed, Nov 24, 2021 at 09:33:47PM +0800, Calvin Zhang wrote: >> > Reserved memory regions in /memreserve node aren't and shouldn't >> > be referenced

Re: bug: usb: gadget: FSL_UDC_CORE Corrupted request list leads to unrecoverable loop.

2021-12-02 Thread Joakim Tjernlund
On Thu, 2021-12-02 at 20:35 +, Leo Li wrote: > > > -Original Message- > > From: Joakim Tjernlund > > Sent: Wednesday, December 1, 2021 8:19 AM > > To: regressi...@leemhuis.info; Leo Li ; > > eugene_bordenkirc...@selinc.com; linux-...@vger.kernel.org; linuxppc- > >

Re: [PATCH v2 3/3] soc: fsl: Replace kernel.h with the necessary inclusions

2021-12-02 Thread Li Yang
On Thu, Dec 2, 2021 at 3:30 PM Andy Shevchenko wrote: > > On Thu, Dec 02, 2021 at 08:01:54PM +, Leo Li wrote: > > > From: Andy Shevchenko > > > Sent: Thursday, December 2, 2021 3:33 AM > > > On Wed, Dec 01, 2021 at 01:41:16PM -0600, Li Yang wrote: > > > > On Tue, Nov 23, 2021 at 10:32 AM

Re: [PATCH v2 3/3] soc: fsl: Replace kernel.h with the necessary inclusions

2021-12-02 Thread Andy Shevchenko
On Thu, Dec 02, 2021 at 08:01:54PM +, Leo Li wrote: > > From: Andy Shevchenko > > Sent: Thursday, December 2, 2021 3:33 AM > > On Wed, Dec 01, 2021 at 01:41:16PM -0600, Li Yang wrote: > > > On Tue, Nov 23, 2021 at 10:32 AM Andy Shevchenko > > > wrote: ... > > > The build test is good. I

[PATCH] soc/fsl/qman: test: Make use of the helper function kthread_run_on_cpu()

2021-12-02 Thread Cai Huoqing
Replace kthread_create/kthread_bind/wake_up_process() with kthread_run_on_cpu() to simplify the code. Signed-off-by: Cai Huoqing --- drivers/soc/fsl/qbman/qman_test_stash.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/soc/fsl/qbman/qman_test_stash.c

RE: bug: usb: gadget: FSL_UDC_CORE Corrupted request list leads to unrecoverable loop.

2021-12-02 Thread Leo Li
> -Original Message- > From: Joakim Tjernlund > Sent: Wednesday, December 1, 2021 8:19 AM > To: regressi...@leemhuis.info; Leo Li ; > eugene_bordenkirc...@selinc.com; linux-...@vger.kernel.org; linuxppc- > d...@lists.ozlabs.org > Cc: gre...@linuxfoundation.org; ba...@kernel.org >

RE: [PATCH v2 3/3] soc: fsl: Replace kernel.h with the necessary inclusions

2021-12-02 Thread Leo Li
> -Original Message- > From: Andy Shevchenko > Sent: Thursday, December 2, 2021 3:33 AM > To: Leo Li > Cc: linuxppc-dev@lists.ozlabs.org; linux-ker...@vger.kernel.org; linux-arm- > ker...@lists.infradead.org; Qiang Zhao > Subject: Re: [PATCH v2 3/3] soc: fsl: Replace kernel.h with

Re: [patch 11/22] x86/hyperv: Refactor hv_msi_domain_free_irqs()

2021-12-02 Thread Wei Liu
On Sat, Nov 27, 2021 at 02:18:51AM +0100, Thomas Gleixner wrote: > No point in looking up things over and over. Just look up the associated > irq data and work from there. > > No functional change. > > Signed-off-by: Thomas Gleixner Acked-by: Wei Liu

Re: [PATCH v6 17/18] powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU

2021-12-02 Thread Fabiano Rosas
Nicholas Piggin writes: > Compiling out hash support code when CONFIG_PPC_64S_HASH_MMU=n saves > 128kB kernel image size (90kB text) on powernv_defconfig minus KVM, > 350kB on pseries_defconfig minus KVM, 40kB on a tiny config. > > Signed-off-by: Nicholas Piggin Tested this series on a P9.

[PATCH v1 08/11] powerpc/code-patching: Move patch_exception() outside code-patching.c

2021-12-02 Thread Christophe Leroy
patch_exception() is dedicated to book3e/64 is nothing more than a normal use of patch_branch(), so move it into a place dedicated to book3e/64. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/code-patching.h | 7 --- arch/powerpc/include/asm/exception-64e.h | 4

[PATCH v1 10/11] powerpc/code-patching: Move code patching selftests in its own file

2021-12-02 Thread Christophe Leroy
Code patching selftests are half of code-patching.c. As they are guarded by CONFIG_CODE_PATCHING_SELFTESTS, they'd be better in their own file. Also add a missing __init for instr_is_branch_to_addr() Signed-off-by: Christophe Leroy --- arch/powerpc/lib/Makefile | 2 +

[PATCH v1 09/11] powerpc/code-patching: Move instr_is_branch_{i/b}form() in code-patching.h

2021-12-02 Thread Christophe Leroy
To enable moving selftests in their own C file in following patch, move instr_is_branch_iform() and instr_is_branch_bform() to code-patching.h Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/code-patching.h | 15 +++ arch/powerpc/lib/code-patching.c | 15

[PATCH v1 05/11] powerpc/code-patching: Reorganise do_patch_instruction() to ease error handling

2021-12-02 Thread Christophe Leroy
Split do_patch_instruction() in two functions, the caller doing the spin locking and the callee doing everything else. And remove a few unnecessary initialisations and intermediate variables. This allows the callee to return from anywhere in the function. Signed-off-by: Christophe Leroy ---

[PATCH v1 07/11] powerpc/code-patching: Use test_trampoline for prefixed patch test

2021-12-02 Thread Christophe Leroy
Use the dedicated test_trampoline function for testing prefixed patching like other tests and remove the hand coded assembly stuff. Signed-off-by: Christophe Leroy --- arch/powerpc/lib/Makefile | 2 +- arch/powerpc/lib/code-patching.c | 24 +---

[PATCH v1 01/11] powerpc/code-patching: Remove pr_debug()/pr_devel() messages and fix check()

2021-12-02 Thread Christophe Leroy
code-patching has been working for years now, time has come to remove debugging messages. Change useful message to KERN_INFO and remove other ones. Also add KERN_ERR to check() macro and change it into a do/while to make checkpatch happy. Signed-off-by: Christophe Leroy --- This series applies

[PATCH v1 02/11] powerpc/code-patching: Remove init_mem_is_free

2021-12-02 Thread Christophe Leroy
A new state has been added by commit d2635f2012a4 ("mm: create a new system state and fix core_kernel_text()"). That state tells when initmem is about to be released and is redundant with init_mem_is_free. Remove init_mem_is_free. Signed-off-by: Christophe Leroy ---

[PATCH v1 06/11] powerpc/code-patching: Fix patch_branch() return on out-of-range failure

2021-12-02 Thread Christophe Leroy
Do not silentely ignore a failure of create_branch() in patch_branch(). Return -ERANGE. Signed-off-by: Christophe Leroy --- arch/powerpc/lib/code-patching.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/lib/code-patching.c b/arch/powerpc/lib/code-patching.c

[PATCH v1 03/11] powerpc/code-patching: Fix error handling in do_patch_instruction()

2021-12-02 Thread Christophe Leroy
Use real errors instead of using -1 as error, so that errors returned by callees can be used towards callers. Signed-off-by: Christophe Leroy --- arch/powerpc/lib/code-patching.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/arch/powerpc/lib/code-patching.c

[PATCH v1 04/11] powerpc/code-patching: Fix unmap_patch_area() error handling

2021-12-02 Thread Christophe Leroy
pXd_offset() doesn't return NULL. When the base is NULL, it still adds the offset. Use pXd_none() to check validity instead. It also improves performance by folding out none existing levels as pXd_none() always returns 0 in that case. Such an error is unexpected, use WARN_ON() so that the caller

[PATCH v1 11/11] powerpc/code-patching: Replace patch_instruction() by ppc_inst_write() in selftests

2021-12-02 Thread Christophe Leroy
The purpose of selftests is to check that instructions are properly formed. Not to check that they properly run. For that test it uses normal memory, not special test memory. In preparation of a future patch enforcing patch_instruction() to be used only on valid text areas, implement a

Re: [PATCH v2 3/3] soc: fsl: Replace kernel.h with the necessary inclusions

2021-12-02 Thread Andy Shevchenko
On Wed, Dec 01, 2021 at 01:41:16PM -0600, Li Yang wrote: > On Tue, Nov 23, 2021 at 10:32 AM Andy Shevchenko > wrote: > > > > On Tue, Nov 16, 2021 at 11:38:01AM +0200, Andy Shevchenko wrote: > > > On Mon, Nov 15, 2021 at 10:24:36PM +, Leo Li wrote: > > > > > From: Andy Shevchenko > > > > >

Re: [PATCH] of: unmap memory regions in /memreserve node

2021-12-02 Thread Mark Rutland
On Tue, Nov 30, 2021 at 04:43:31PM -0600, Rob Herring wrote: > +linuxppc-dev > > On Wed, Nov 24, 2021 at 09:33:47PM +0800, Calvin Zhang wrote: > > Reserved memory regions in /memreserve node aren't and shouldn't > > be referenced elsewhere. So mark them no-map to skip direct mapping > > for them.