[PATCH v3] soc: fsl: qe: Add check for ioremap

2022-10-10 Thread Jiasheng Jiang
As ioremap can return NULL pointer, it should be better to check the return value return error if fails. Moreover, the return value of qe_reset should be checked by cascade. Fixes: 68f047e3d62e ("fsl/qe: add rx_sync and tx_sync for TDM mode") Suggested-by: Christophe Leroy Signed-off-by: Jiasheng

Re: [PATCH v2] soc: fsl: qe: Add check for ioremap

2022-10-10 Thread Christophe Leroy
Le 11/10/2022 à 08:32, Jiasheng Jiang a écrit : > As ioremap can return NULL pointer, it should > be better to check the return value return error > if fails. > Moreover, the return value of qe_reset should be > checked by cascade. > > Fixes: 68f047e3d62e ("fsl/qe: add rx_sync and tx_sync for TD

[PATCH v2] soc: fsl: qe: Add check for ioremap

2022-10-10 Thread Jiasheng Jiang
As ioremap can return NULL pointer, it should be better to check the return value return error if fails. Moreover, the return value of qe_reset should be checked by cascade. Fixes: 68f047e3d62e ("fsl/qe: add rx_sync and tx_sync for TDM mode") Suggested-by: Christophe Leroy Signed-off-by: Jiasheng

[PATCH] powerpc: Fix 85xx build

2022-10-10 Thread Joel Stanley
The merge of the kbuild tree dropped the renaming of the FSL_BOOKE kconfig option. Fixes: 8afc66e8d43b ("Merge tag 'kbuild-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild") Signed-off-by: Joel Stanley --- arch/powerpc/kernel/Makefile | 2 +- 1 file changed, 1 inser

RE: [PATCH v6 3/7] treewide: use get_random_{u8,u16}() when possible, part 1

2022-10-10 Thread Elliott, Robert (Servers)
> diff --git a/crypto/testmgr.c b/crypto/testmgr.c ... > @@ -944,7 +944,7 @@ static void generate_random_bytes(u8 *buf, size_t count) > default: > /* Fully random bytes */ > for (i = 0; i < count; i++) > - buf[i] = (u8)prandom_u32(); > +

Re: [PATCH v6 3/7] treewide: use get_random_{u8,u16}() when possible, part 1

2022-10-10 Thread Jason A. Donenfeld
On Tue, Oct 11, 2022 at 01:18:40AM +, Elliott, Robert (Servers) wrote: > > > diff --git a/crypto/testmgr.c b/crypto/testmgr.c > ... > > @@ -944,7 +944,7 @@ static void generate_random_bytes(u8 *buf, size_t count) > > default: > > /* Fully random bytes */ > > for (i

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-10 Thread Jason A. Donenfeld
On Tue, Oct 11, 2022 at 12:53:17PM +1100, Michael Ellerman wrote: > "Jason A. Donenfeld" writes: > > On Mon, Oct 10, 2022 at 01:25:25PM -0600, Jason A. Donenfeld wrote: > >> Hi Michael, > >> > >> On Sun, Oct 09, 2022 at 10:01:39PM +1100, Michael Ellerman wrote: > >> > powerpc updates for 6.1 > >>

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-10 Thread Jason A. Donenfeld
On Tue, Oct 11, 2022 at 12:44:20PM +1100, Michael Ellerman wrote: > "Jason A. Donenfeld" writes: > > Hi Andrew, > > > > On Tue, Oct 11, 2022 at 11:00:15AM +1100, Andrew Donnellan wrote: > >> Thanks for bisecting, this is interesting! Could you provide your > >> .config and the environment you're r

Re: [PATCH linux-next][RFC] powerpc: fix HOTPLUG error in rcutorture

2022-10-10 Thread Zhouyi Zhou
Thanks Michael for reviewing my patch On Mon, Oct 10, 2022 at 7:21 PM Michael Ellerman wrote: > > Zhouyi Zhou writes: > > I think we should avoid torture offline the cpu who do tick timer > > when nohz full is running. > > Can you tell us what the bug you're fixing is? > > Did you see a crash/oo

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-10 Thread Michael Ellerman
"Jason A. Donenfeld" writes: > On Mon, Oct 10, 2022 at 01:25:25PM -0600, Jason A. Donenfeld wrote: >> Hi Michael, >> >> On Sun, Oct 09, 2022 at 10:01:39PM +1100, Michael Ellerman wrote: >> > powerpc updates for 6.1 >> > >> > - Remove our now never-true definitions for pgd_huge() and p4d_leaf().

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-10 Thread Michael Ellerman
"Jason A. Donenfeld" writes: > Hi Andrew, > > On Tue, Oct 11, 2022 at 11:00:15AM +1100, Andrew Donnellan wrote: >> Thanks for bisecting, this is interesting! Could you provide your >> .config and the environment you're running in? Your reproducer doesn't >> seem to trigger it on my baremetal POWER

[PATCH v6 7/7] prandom: remove unused functions

2022-10-10 Thread Jason A. Donenfeld
With no callers left of prandom_u32() and prandom_bytes(), as well as get_random_int(), remove these deprecated wrappers, in favor of get_random_u32() and get_random_bytes(). Reviewed-by: Greg Kroah-Hartman Reviewed-by: Kees Cook Reviewed-by: Yury Norov Signed-off-by: Jason A. Donenfeld --- d

[PATCH v6 6/7] treewide: use get_random_bytes() when possible

2022-10-10 Thread Jason A. Donenfeld
The prandom_bytes() function has been a deprecated inline wrapper around get_random_bytes() for several releases now, and compiles down to the exact same code. Replace the deprecated wrapper with a direct call to the real function. This was done as a basic find and replace. Reviewed-by: Greg Kroah

[PATCH v6 5/7] treewide: use get_random_u32() when possible

2022-10-10 Thread Jason A. Donenfeld
The prandom_u32() function has been a deprecated inline wrapper around get_random_u32() for several releases now, and compiles down to the exact same code. Replace the deprecated wrapper with a direct call to the real function. The same also applies to get_random_int(), which is just a wrapper arou

[PATCH v6 4/7] treewide: use get_random_{u8,u16}() when possible, part 2

2022-10-10 Thread Jason A. Donenfeld
Rather than truncate a 32-bit value to a 16-bit value or an 8-bit value, simply use the get_random_{u8,u16}() functions, which are faster than wasting the additional bytes from a 32-bit value. This was done by hand, identifying all of the places where one of the random integer functions was used in

[PATCH v6 3/7] treewide: use get_random_{u8,u16}() when possible, part 1

2022-10-10 Thread Jason A. Donenfeld
Rather than truncate a 32-bit value to a 16-bit value or an 8-bit value, simply use the get_random_{u8,u16}() functions, which are faster than wasting the additional bytes from a 32-bit value. This was done mechanically with this coccinelle script: @@ expression E; identifier get_random_u32 =~ "ge

[PATCH v6 2/7] treewide: use prandom_u32_max() when possible, part 2

2022-10-10 Thread Jason A. Donenfeld
Rather than incurring a division or requesting too many random bytes for the given range, use the prandom_u32_max() function, which only takes the minimum required bytes from the RNG and avoids divisions. This was done by hand, covering things that coccinelle could not do on its own. Reviewed-by:

[PATCH v6 1/7] treewide: use prandom_u32_max() when possible, part 1

2022-10-10 Thread Jason A. Donenfeld
Rather than incurring a division or requesting too many random bytes for the given range, use the prandom_u32_max() function, which only takes the minimum required bytes from the RNG and avoids divisions. This was done mechanically with this coccinelle script: @basic@ expression E; type T; identif

[PATCH v6 0/7] treewide cleanup of random integer usage

2022-10-10 Thread Jason A. Donenfeld
Changes v5->v6: - Added a few missing conversions that weren't in my older tree, so now this should be ready to go, as well as a couple nits people had from v5. Barring something large and unforeseen, this is the "final version", as this is ready to ship. Thanks to everyone who reviewed thi

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-10 Thread Jason A. Donenfeld
Hi Andrew, On Tue, Oct 11, 2022 at 11:00:15AM +1100, Andrew Donnellan wrote: > Thanks for bisecting, this is interesting! Could you provide your > .config and the environment you're running in? Your reproducer doesn't > seem to trigger it on my baremetal POWER8 pseries_le_defconfig. Sure. .confi

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-10 Thread Andrew Donnellan
On Mon, 2022-10-10 at 16:26 -0600, Jason A. Donenfeld wrote: > > Bisected: > > 7e92e01b724526b98cbc7f03dd4afa0295780d56 is the first bad commit > commit 7e92e01b724526b98cbc7f03dd4afa0295780d56 > Author: Rohan McLure > Date:   Wed Sep 21 16:56:01 2022 +1000 > >     powerpc: Provide syscall wrap

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-10 Thread Jason A. Donenfeld
On Mon, Oct 10, 2022 at 02:03:09PM -0600, Jason A. Donenfeld wrote: > On Mon, Oct 10, 2022 at 01:25:25PM -0600, Jason A. Donenfeld wrote: > > Hi Michael, > > > > On Sun, Oct 09, 2022 at 10:01:39PM +1100, Michael Ellerman wrote: > > > powerpc updates for 6.1 > > > > > > - Remove our now never-tru

Re: [PATCH v2 4/4] powerpc/pseries: Move dtl scanning and steal time accounting to pseries platform

2022-10-10 Thread Guenter Roeck
On Fri, Sep 02, 2022 at 06:53:16PM +1000, Nicholas Piggin wrote: > dtl is the PAPR Dispatch Trace Log, which is entirely a pseries feature. > The pseries platform alrady has a file dealing with the dtl, so move > scanning for stolen time accounting there from kernel/time.c. > > Signed-off-by: Nich

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-10 Thread Jason A. Donenfeld
On Mon, Oct 10, 2022 at 01:25:25PM -0600, Jason A. Donenfeld wrote: > Hi Michael, > > On Sun, Oct 09, 2022 at 10:01:39PM +1100, Michael Ellerman wrote: > > powerpc updates for 6.1 > > > > - Remove our now never-true definitions for pgd_huge() and p4d_leaf(). > > > > - Add pte_needs_flush() and

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.1-1 tag

2022-10-10 Thread Jason A. Donenfeld
Hi Michael, On Sun, Oct 09, 2022 at 10:01:39PM +1100, Michael Ellerman wrote: > powerpc updates for 6.1 > > - Remove our now never-true definitions for pgd_huge() and p4d_leaf(). > > - Add pte_needs_flush() and huge_pmd_needs_flush() for 64-bit. > > - Add support for syscall wrappers. > >

[linux-next:master] BUILD REGRESSION cd9fd78f5c11b5e165d9317ef11e613f4aef4dd1

2022-10-10 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: cd9fd78f5c11b5e165d9317ef11e613f4aef4dd1 Add linux-next specific files for 20221010 Error/Warning reports: https://lore.kernel.org/linux-doc/202209201326.sy9kholm-...@intel.com https

Re: [PATCH] powerpc/kasan/book3s_64: warn when running with hash MMU

2022-10-10 Thread Christophe Leroy
Le 10/10/2022 à 16:10, Nathan Lynch a écrit : > Michael Ellerman writes: >> Christophe Leroy writes: >>> + KASAN list >>> >>> Le 06/10/2022 à 06:10, Michael Ellerman a écrit : Nathan Lynch writes: > kasan is known to crash at boot on book3s_64 with non-radix MMU. As > noted in com

[PATCH] powerpc/kernel: fix repeated words in comments

2022-10-10 Thread wangjianli
Delete the redundant word 'the'. Signed-off-by: wangjianli --- arch/powerpc/kernel/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c index 406d7ee9e322..7a6e54e4f1d8 100644 --- a/arch/powerpc/kernel/process

Re: [PATCH] powerpc/kasan/book3s_64: warn when running with hash MMU

2022-10-10 Thread Nathan Lynch
Michael Ellerman writes: > Christophe Leroy writes: >> + KASAN list >> >> Le 06/10/2022 à 06:10, Michael Ellerman a écrit : >>> Nathan Lynch writes: kasan is known to crash at boot on book3s_64 with non-radix MMU. As noted in commit 41b7a347bf14 ("powerpc: Book3S 64-bit outline-only >>

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

2022-10-10 Thread Naveen N. Rao
Sathvika Vasireddy wrote: This patchset enables and implements objtool --mcount option on powerpc. This applies atop powerpc/merge branch. Changelog: v4: * Patch 11/16 - Introduce a new config option CONFIG_HAVE_OBJTOOL_NOP_MCOUNT as a means for architectur

Re: [PATCH v4 11/16] objtool: Add --mnop as an option to --mcount

2022-10-10 Thread Naveen N. Rao
Sathvika Vasireddy wrote: Some architectures (powerpc) may not support ftrace locations being nop'ed out at build time. Introduce CONFIG_HAVE_OBJTOOL_NOP_MCOUNT for objtool, as a means for architectures to enable nop'ing of ftrace locations. Add --mnop as an option to objtool --mcount, to indicat

Re: [PATCH v4 03/16] powerpc: Fix objtool unannotated intra-function call warnings

2022-10-10 Thread Naveen N. Rao
Sathvika Vasireddy wrote: Objtool throws unannotated intra-function call warnings in the following assembly files: arch/powerpc/kernel/vector.o: warning: objtool: .text+0x53c: unannotated intra-function call arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0x60: unannotated in

Re: [PATCH linux-next][RFC] powerpc: fix HOTPLUG error in rcutorture

2022-10-10 Thread Michael Ellerman
Zhouyi Zhou writes: > I think we should avoid torture offline the cpu who do tick timer > when nohz full is running. Can you tell us what the bug you're fixing is? Did you see a crash/oops/hang etc? Or are you just proposing this as something that would be a good idea? > Tested on PPC VM of Ope

Re: [PATCH] perf: Rewrite core context handling

2022-10-10 Thread Ravi Bangoria
On 10-Oct-22 3:53 PM, Peter Zijlstra wrote: > On Tue, Sep 06, 2022 at 11:20:53AM +0530, Ravi Bangoria wrote: > >> This one was simple enough so I prepared a patch for this. Let >> me know if you see any issues with below diff. > > I've extraed this as a separate patch since it's not strictly requ

Re: [PATCH] perf: Rewrite core context handling

2022-10-10 Thread Ravi Bangoria
On 10-Oct-22 3:44 PM, Peter Zijlstra wrote: > On Wed, Sep 07, 2022 at 04:58:49PM +0530, Ravi Bangoria wrote: >>> -static void >>> -ctx_flexible_sched_in(struct perf_event_context *ctx, >>> - struct perf_cpu_context *cpuctx) >>> +/* XXX .busy thingy from Peter's patch */ >>> +static

Re: [PATCH] perf: Rewrite core context handling

2022-10-10 Thread Peter Zijlstra
On Tue, Sep 06, 2022 at 11:20:53AM +0530, Ravi Bangoria wrote: > This one was simple enough so I prepared a patch for this. Let > me know if you see any issues with below diff. I've extraed this as a separate patch since it's not strictly required for correctness and the patch is a quite large en

Re: [PATCH] perf: Rewrite core context handling

2022-10-10 Thread Peter Zijlstra
On Wed, Sep 07, 2022 at 04:58:49PM +0530, Ravi Bangoria wrote: > > -static void > > -ctx_flexible_sched_in(struct perf_event_context *ctx, > > - struct perf_cpu_context *cpuctx) > > +/* XXX .busy thingy from Peter's patch */ > > +static void ctx_flexible_sched_in(struct perf_event_c

Re: [PATCH v4 1/6] powerpc/code-patching: Implement generic text patching function

2022-10-10 Thread Andrew Donnellan
On Mon, 2022-10-10 at 15:45 +1100, Andrew Donnellan wrote: > On Mon, 2022-10-10 at 11:29 +1100, Benjamin Gray wrote: > > Adds a generic memory patching mechanism for patches of size int or > > long > > bytes. > > > > The patch_instruction function is reimplemented in terms of this > > more generic