Re: [PATCH v2] powerpc: Fix irq_soft_mask_set() and irq_soft_mask_return() with sanitizer

2022-08-29 Thread Christophe Leroy
Le 30/08/2022 à 07:15, Nicholas Piggin a écrit : > On Wed Aug 24, 2022 at 2:39 AM AEST, Christophe Leroy wrote: >> In ppc, compiler based sanitizer will generate instrument instructions >> around statement WRITE_ONCE(local_paca->irq_soft_mask, mask): >> [...] >> >> If there is a context switch

Re: [PATCH v2] powerpc: Fix irq_soft_mask_set() and irq_soft_mask_return() with sanitizer

2022-08-29 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 2:39 AM AEST, Christophe Leroy wrote: > In ppc, compiler based sanitizer will generate instrument instructions > around statement WRITE_ONCE(local_paca->irq_soft_mask, mask): > >0xc0295cb0 <+0>: addis r2,r12,774 >0xc0295cb4 <+4>: addi

Re: [PATCH] Documentation: spufs: correct a duplicate word typo

2022-08-29 Thread Jeremy Kerr
Hi Randy, > Fix a typo of "or" which should be "of". Nice, people are still reading the spufs docs! :D Looks good to me, thanks for the patch. Reviewed-by: Jeremy Kerr Cheers, Jeremy

[PATCH] Documentation: spufs: correct a duplicate word typo

2022-08-29 Thread Randy Dunlap
Fix a typo of "or" which should be "of". Signed-off-by: Randy Dunlap Cc: Jeremy Kerr Cc: Arnd Bergmann Cc: linuxppc-dev@lists.ozlabs.org Cc: Jonathan Corbet --- Documentation/filesystems/spufs/spufs.rst |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---

Re: [PATCH] >>>>>>>>>>>>>>>>>>>>>>>>> BLURB <<<<<<<<<<<<<<<<<<

2022-08-29 Thread Randy Dunlap
Oops. I'll correct the Subject and resend. On 8/29/22 16:26, Randy Dunlap wrote: > Fix a typo of "or" which should be "of". > > Signed-off-by: Randy Dunlap > Cc: Jeremy Kerr > Cc: Arnd Bergmann > Cc: linuxppc-dev@lists.ozlabs.org > Cc: Jonathan Corbet > --- >

[PATCH] >>>>>>>>>>>>>>>>>>>>>>>>> BLURB <<<<<<<<<<<<<<<<<<

2022-08-29 Thread Randy Dunlap
Fix a typo of "or" which should be "of". Signed-off-by: Randy Dunlap Cc: Jeremy Kerr Cc: Arnd Bergmann Cc: linuxppc-dev@lists.ozlabs.org Cc: Jonathan Corbet --- Documentation/filesystems/spufs/spufs.rst |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---

[Bug 216427] OF fails to handle some PCI resources on a PowerMac G4 3,6 (e.g. OF: /pci@f2000000/mac-io@17/gpio@50/gpio5@6f: could not find phandle 1751474532)

2022-08-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216427 --- Comment #1 from Erhard F. (erhar...@mailbox.org) --- Created attachment 301699 --> https://bugzilla.kernel.org/attachment.cgi?id=301699=edit kernel .config (kernel 6.0-rc3, PowerMac G4 DP) -- You may reply to this email to add a comment.

[Bug 216427] New: OF fails to handle some PCI resources on a PowerMac G4 3,6 (e.g. OF: /pci@f2000000/mac-io@17/gpio@50/gpio5@6f: could not find phandle 1751474532)

2022-08-29 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216427 Bug ID: 216427 Summary: OF fails to handle some PCI resources on a PowerMac G4 3,6 (e.g. OF: /pci@f200/mac-io@17/gpio@50/gpio5@6f: could not find phandle

Re: [PATCH] soc: move from strlcpy with unused retval to strscpy

2022-08-29 Thread Bjorn Andersson
On Thu, Aug 18, 2022 at 11:01:06PM +0200, Wolfram Sang wrote: > Follow the advice of the below link and prefer 'strscpy' in this > subsystem. Conversion is 1:1 because the return value is not used. > Generated by a coccinelle script. > > Link: >

Re: [PATCH] perf: Rewrite core context handling

2022-08-29 Thread Peter Zijlstra
On Mon, Aug 29, 2022 at 02:04:33PM +0200, Peter Zijlstra wrote: > On Mon, Aug 29, 2022 at 05:03:47PM +0530, Ravi Bangoria wrote: > > @@ -12598,6 +12590,7 @@ EXPORT_SYMBOL_GPL(perf_event_create_kernel_counter); > > > > void perf_pmu_migrate_context(struct pmu *pmu, int src_cpu, int dst_cpu) > >

Re: [PATCH v2 02/16] powerpc: override __ALIGN() and __ALIGN_STR() macros

2022-08-29 Thread Sathvika Vasireddy
Hi Christophe, On 29/08/22 18:56, Christophe Leroy wrote: Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit : Powerpc instructions must be word-aligned. Currently, there is an alignment of 16 bytes (by default), and it is much more than what is required for powerpc (4 bytes). The default

RE: [PATCH v2 00/10] crypto: Kconfig - simplify menus and help text

2022-08-29 Thread Elliott, Robert (Servers)
> -Original Message- > From: Christophe Leroy > Sent: Monday, August 29, 2022 3:53 AM > To: Elliott, Robert (Servers) ; Nayna > ; Andrew Donnellan > Cc: linuxppc-dev@lists.ozlabs.org > Subject: Re: [PATCH v2 00/10] crypto: Kconfig - simplify menus and help > text > > Le 29/08/2022 à

Re: [PATCH v2 02/16] powerpc: override __ALIGN() and __ALIGN_STR() macros

2022-08-29 Thread Christophe Leroy
Le 29/08/2022 à 07:52, Sathvika Vasireddy a écrit : > Powerpc instructions must be word-aligned. Currently, > there is an alignment of 16 bytes (by default), and it is > much more than what is required for powerpc (4 bytes). > > The default expansion of __ALIGN() macro is: > #define __ALIGN

Re: [PATCH] powerpc/pseries/mce: Avoid instrumentation in realmode

2022-08-29 Thread Sachin Sant
> On 29-Aug-2022, at 5:02 PM, Sachin Sant wrote: > > > >> On 29-Aug-2022, at 1:15 PM, Ganesh Goudar wrote: >> >> Part of machine check error handling is done in realmode, >> As of now instrumentation is not possible for any code that >> runs in realmode. >> When MCE is injected on KASAN

[PATCH] perf: Rewrite core context handling

2022-08-29 Thread Ravi Bangoria
From: Peter Zijlstra There have been various issues and limitations with the way perf uses (task) contexts to track events. Most notable is the single hardware PMU task context, which has resulted in a number of yucky things (both proposed and merged). Notably: - HW breakpoint PMU - ARM

[PATCH 0/5] Create a new sound card to access MICFIL based on rpmsg channel

2022-08-29 Thread Chancel Liu
At a previous time, we have successfully created a virtual sound card based on rpmsg. The sound card works under this mechanism Cortex-A core tells the Cortex-M core the format, rate, channel, .etc configuration of the PCM parameters and Cortex-M controls real hardware devices such as SAI and DMA.

Re: [PATCH] perf: Rewrite core context handling

2022-08-29 Thread Peter Zijlstra
On Mon, Aug 29, 2022 at 05:03:47PM +0530, Ravi Bangoria wrote: > @@ -12598,6 +12590,7 @@ EXPORT_SYMBOL_GPL(perf_event_create_kernel_counter); > > void perf_pmu_migrate_context(struct pmu *pmu, int src_cpu, int dst_cpu) > { > +#if 0 // XXX buggered - cpu hotplug, who cares > struct

Re: [PATCH] powerpc/pseries/mce: Avoid instrumentation in realmode

2022-08-29 Thread Sachin Sant
> On 29-Aug-2022, at 1:15 PM, Ganesh Goudar wrote: > > Part of machine check error handling is done in realmode, > As of now instrumentation is not possible for any code that > runs in realmode. > When MCE is injected on KASAN enabled kernel, crash is > observed, Hence force inline or mark no

Re: [PATCH] powerpc: clean up binutils version check

2022-08-29 Thread Christophe Leroy
Le 27/08/2022 à 20:03, Masahiro Yamada a écrit : > On Sun, Aug 28, 2022 at 2:37 AM Christophe Leroy > wrote: >> >> >> >> Le 27/08/2022 à 18:40, Masahiro Yamada a écrit : >>> The checkbin in arch/powerpc/Makefile errors out if ld <= 2.24. >>> So, the requirement on PPC is binutils >= 2.25. It is

Re: [PATCH v3] powerpc/boot: Don't always pass -mcpu=powerpc when building 32-bit uImage

2022-08-29 Thread Pali Rohár
On Sunday 28 August 2022 17:43:53 Christophe Leroy wrote: > Le 28/08/2022 à 19:41, Pali Rohár a écrit : > > On Sunday 28 August 2022 17:39:25 Christophe Leroy wrote: > >> Le 28/08/2022 à 19:33, Christophe Leroy a écrit : > >>> > >>> > >>> Le 28/08/2022 à 11:56, Pali Rohár a écrit : > When

Re: [PATCH v2 00/10] crypto: Kconfig - simplify menus and help text

2022-08-29 Thread Christophe Leroy
Le 29/08/2022 à 02:05, Elliott, Robert (Servers) a écrit : > > >> -Original Message- >> From: Christophe Leroy >> Sent: Sunday, August 28, 2022 2:33 AM >> To: Elliott, Robert (Servers) ; Nayna >> ; Andrew Donnellan >> Cc: linuxppc-dev@lists.ozlabs.org >> Subject: Re: [PATCH v2 00/10]

Re: [PATCH v3 11/14] perf/hw_breakpoint: Reduce contention with large number of tasks

2022-08-29 Thread Peter Zijlstra
On Wed, Aug 17, 2022 at 03:14:54PM +0200, Marco Elver wrote: > On Wed, 17 Aug 2022 at 15:03, Peter Zijlstra wrote: > > > > On Mon, Jul 04, 2022 at 05:05:11PM +0200, Marco Elver wrote: > > > +static bool bp_constraints_is_locked(struct perf_event *bp) > > > +{ > > > + struct mutex *tsk_mtx =

[PATCH] powerpc/pseries/mce: Avoid instrumentation in realmode

2022-08-29 Thread Ganesh Goudar
Part of machine check error handling is done in realmode, As of now instrumentation is not possible for any code that runs in realmode. When MCE is injected on KASAN enabled kernel, crash is observed, Hence force inline or mark no instrumentation for functions which can run in realmode to avoid

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

2022-08-29 Thread Sathvika Vasireddy
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 | 22 +++

[PATCH v2 15/16] objtool/powerpc: Enable objtool to be built on ppc

2022-08-29 Thread Sathvika Vasireddy
This patch adds [stub] implementations for required functions, inorder to enable objtool build on powerpc. Signed-off-by: Sathvika Vasireddy [Christophe Leroy: powerpc: Add missing asm/asm.h for objtool] Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 1 +

[PATCH v2 14/16] objtool: Add arch specific function arch_ftrace_match()

2022-08-29 Thread Sathvika Vasireddy
Add architecture specific function to look for relocation records pointing to arch specific symbols. Suggested-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- tools/objtool/arch/x86/decode.c | 8 tools/objtool/check.c| 2 +-

[PATCH v2 13/16] objtool: Use macros to define arch specific reloc types

2022-08-29 Thread Sathvika Vasireddy
Make relocation types architecture specific. Signed-off-by: Sathvika Vasireddy --- tools/objtool/arch/x86/include/arch/elf.h | 2 ++ tools/objtool/check.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/objtool/arch/x86/include/arch/elf.h

[PATCH v2 12/16] objtool: Read special sections with alts only when specific options are selected

2022-08-29 Thread Sathvika Vasireddy
This patch reads special sections which have alternate instructions, only when stackval or orc or uaccess or noinstr options are passed to objtool. Signed-off-by: Sathvika Vasireddy --- tools/objtool/check.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git

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

2022-08-29 Thread Sathvika Vasireddy
Architectures can select HAVE_NOP_MCOUNT if they choose to nop out mcount call sites. If that config option is selected, then --mnop is passed as an option to objtool, along with --mcount. Also, make sure that --mnop can be passed as an option to objtool only when --mcount is passed.