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

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

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

2022-10-02 Thread Christophe Leroy
Le 02/10/2022 à 12:42, Sathvika Vasireddy a écrit : > Call add_special_section_alts() only when stackval or orc or uaccess or > noinstr options are passed to objtool. > > Signed-off-by: Sathvika Vasireddy Reviewed-by: Christophe Leroy > --- > tools/objtool/check.c | 8 +--- > 1 file

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

2022-10-02 Thread Christophe Leroy
Le 02/10/2022 à 12:42, Sathvika Vasireddy a écrit : > 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 .align 4,0x90

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

2022-10-02 Thread Christophe Leroy
Le 02/10/2022 à 12:42, Sathvika Vasireddy a écrit : > 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

Re: [PATCH v2] i2c/pasemi: PASemi I2C controller IRQ enablement

2022-10-02 Thread Christian Zigotzky
On 02 October 2022 at 00:25 am, Arminder Singh wrote: Hello, This is v2 of the PASemi I2C controller IRQ enablement patch. This patch adds IRQ support to the PASemi I2C controller driver to increase the performace of I2C transactions on platforms with PASemi I2C controllers. While the patch is

Re: [PATCH v2] i2c-pasemi: PASemi I2C controller IRQ enablement

2022-10-02 Thread Sven Peter
Hi, On Sun, Oct 2, 2022, at 16:07, Arminder Singh wrote: > Hi, > >> #define REG_MTXFIFO 0x00 >> #define REG_MRXFIFO 0x04 >> #define REG_SMSTA 0x14 >> +#define REG_IMASK 0x18 > >> This doesn't seem to be aligned correctly, this file seems to use a tab >> to separate the register name and

Re: [PATCH v2] i2c-pasemi: PASemi I2C controller IRQ enablement

2022-10-02 Thread Arminder Singh
Hi, > #define REG_MTXFIFO 0x00 > #define REG_MRXFIFO 0x04 > #define REG_SMSTA0x14 > +#define REG_IMASK 0x18 > This doesn't seem to be aligned correctly, this file seems to use a tab > to separate the register name and the offset and you used spaces here. > @@ -15,7 +16,11 @@ struct

[PATCH v2] i2c/pasemi: PASemi I2C controller IRQ enablement

2022-10-02 Thread Arminder Singh
Hello, This is v2 of the PASemi I2C controller IRQ enablement patch. This patch adds IRQ support to the PASemi I2C controller driver to increase the performace of I2C transactions on platforms with PASemi I2C controllers. While the patch is primarily intended for Apple silicon platforms, this

Re: [PATCH v2] i2c/pasemi: PASemi I2C controller IRQ enablement

2022-10-02 Thread Sven Peter
Hi, Looks almost good to me, just a few minor things: On Sun, Oct 2, 2022, at 00:25, Arminder Singh wrote: > Hello, > > This is v2 of the PASemi I2C controller IRQ enablement patch. This shouldn't be inside the commit description. > > This patch adds IRQ support to the PASemi I2C controller

Re: [PATCH v2] i2c/pasemi: PASemi I2C controller IRQ enablement

2022-10-02 Thread Wolfram Sang
Hi, some comments from me. Thanks for the patch and review! > > This version of the patch has been tested on an M1 Ultra Mac Studio, > > as well as an M1 MacBook Pro, and userspace launches successfully > > while using the IRQ path for I2C transactions. > > > > Tested-by: Arminder Singh > > I

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

2022-10-02 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 | 16

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

2022-10-02 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, Use local variables for type and imm in arch_decode_instruction(), Adapt len for prefixed

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

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

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

2022-10-02 Thread Sathvika Vasireddy
Make relocation types architecture specific. Acked-by: Peter Zijlstra (Intel) Reviewed-by: Christophe Leroy 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(-)

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

2022-10-02 Thread Sathvika Vasireddy
Call add_special_section_alts() 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 a/tools/objtool/check.c b/tools/objtool/check.c

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

2022-10-02 Thread Sathvika Vasireddy
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 indicate support for the same.

[PATCH v4 10/16] objtool: Use target file class size instead of a compiled constant

2022-10-02 Thread Sathvika Vasireddy
From: Christophe Leroy In order to allow using objtool on cross-built kernels, determine size of long from elf data instead of using sizeof(long) at build time. For the time being this covers only mcount. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy [Sathvika Vasireddy:

[PATCH v4 09/16] objtool: Use target file endianness instead of a compiled constant

2022-10-02 Thread Sathvika Vasireddy
From: Christophe Leroy Some architectures like powerpc support both endianness, it's therefore not possible to fix the endianness via arch/endianness.h because there is no easy way to get the target endianness at build time. Use the endianness recorded in the file objtool is working on.

[PATCH v4 08/16] objtool: Fix SEGFAULT

2022-10-02 Thread Sathvika Vasireddy
From: Christophe Leroy find_insn() will return NULL in case of failure. Check insn in order to avoid a kernel Oops for NULL pointer dereference. Acked-by: Peter Zijlstra (Intel) Signed-off-by: Christophe Leroy --- tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH v4 07/16] powerpc: Skip objtool from running on VDSO files

2022-10-02 Thread Sathvika Vasireddy
Do not run objtool on VDSO files, by using OBJECT_FILES_NON_STANDARD. Suggested-by: Christophe Leroy Reviewed-by: Christophe Leroy Signed-off-by: Sathvika Vasireddy --- arch/powerpc/kernel/vdso/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/kernel/vdso/Makefile

[PATCH v4 06/16] powerpc: Fix objtool unannotated intra-function call warnings on PPC32

2022-10-02 Thread Sathvika Vasireddy
From: Christophe Leroy Fix several annotations in assembly files on PPC32. Signed-off-by: Christophe Leroy [Sathvika Vasireddy: Changed subject line from "objtool/powerpc: Activate objtool on PPC32" to "powerpc: Fix objtool unannotated intra-function call warnings on PPC32", and removed

[PATCH v4 05/16] powerpc: Skip objtool from running on drivers/crypto/vmx/aesp8-ppc.o

2022-10-02 Thread Sathvika Vasireddy
With objtool enabled, below warnings are seen when trying to build: drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: aes_p8_set_encrypt_key+0x44: unannotated intra-function call drivers/crypto/vmx/aesp8-ppc.o: warning: objtool: .text+0x2448: unannotated intra-function call

[PATCH v4 04/16] powerpc: Curb objtool unannotated intra-function warnings

2022-10-02 Thread Sathvika Vasireddy
objtool throws the following unannotated intra-function call warnings: arch/powerpc/kernel/entry_64.o: warning: objtool: .text+0x4: unannotated intra-function call arch/powerpc/kvm/book3s_hv_rmhandlers.o: warning: objtool: .text+0xe64: unannotated intra-function call

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

2022-10-02 Thread Sathvika Vasireddy
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 intra-function call

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

2022-10-02 Thread Sathvika Vasireddy
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 .align 4,0x90 So, override __ALIGN and __ALIGN_STR macros to use the same

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

2022-10-02 Thread Sathvika Vasireddy
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 architectures to enable nop'ing ftrace

[PATCH v4 01/16] powerpc: Fix __WARN_FLAGS() for use with Objtool

2022-10-02 Thread Sathvika Vasireddy
Commit 1e688dd2a3d675 ("powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto") updated __WARN_FLAGS() to use asm goto, and added a call to 'unreachable()' after the asm goto for optimal code generation. With CONFIG_OBJTOOL enabled, 'annotate_unreachable()' statement in

[6.0.0-rc7-next-20220930] kernel BUG at arch/powerpc/kernel/exceptions-64s.S:2831!

2022-10-02 Thread Sachin Sant
With recent versions of linux-next I am observing kernel crashes on Power server. I saw this crash once just after boot. I also saw similar crash while compiling a Kernel or during a git clone of kernel source. Seem to occur at random times. [ 175.165592] [ cut here ] [