[PATCH] hmm-tests: Fix migrate_dirty_page test

2022-09-12 Thread Alistair Popple
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. Fix a spelling mistake while we're at it.

Re: [RFC PATCH 0/4] Out-of-line static calls for powerpc64 ELF V2

2022-09-12 Thread Benjamin Gray
On Thu, 2022-09-01 at 15:58 +1000, Benjamin Gray wrote: >     So not having a local entry point implies not using a TOC > pointer, which >     implies r2 is volatile if the trampoline does not guarantee that > it preserves >     r2. However experimenting with such a trampoline showed the > caller

Re: [PATCH v4 4/4] selftests/hmm-tests: Add test for dirty bits

2022-09-12 Thread Alistair Popple
John Hubbard writes: > On 9/7/22 04:13, Alistair Popple wrote: + /* + * Attempt to migrate memory to device, which should fail because + * hopefully some pages are backed by swap storage. + */ + ASSERT_TRUE(hmm_migrate_sys_to_dev(self->fd, buffer, npages)); >>>

Re: [PATCH v4 09/20] powerpc: Enable compile-time check for syscall handlers

2022-09-12 Thread Michael Ellerman
"Nicholas Piggin" writes: > On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: ... >> diff --git a/arch/powerpc/kernel/systbl.S b/arch/powerpc/kernel/systbl.c >> similarity index 59% >> rename from arch/powerpc/kernel/systbl.S >> rename to arch/powerpc/kernel/systbl.c >> index

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

2022-09-12 Thread Michael Matz
Hey, 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: > > difficult to ensure correctness. Also, due to kernel live patching, the > > kernel relies on 100% correctness of

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

2022-09-12 Thread Rohan McLure
> 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_table_check_pte_clear >> respectively. These calls serve

Re: [PATCH] net: ethernet: remove fs_mii_disconnect and fs_mii_connect declarations

2022-09-12 Thread Andrew Lunn
On Fri, Sep 09, 2022 at 02:29:59PM +0800, Gaosheng Cui wrote: > fs_mii_disconnect and fs_mii_connect have been removed since > commit 5b4b8454344a ("[PATCH] FS_ENET: use PAL for mii management"), > so remove them. > > Signed-off-by: Gaosheng Cui Reviewed-by: Andrew Lunn Andrew

Re: Fragmented physical memory on powerpc/32

2022-09-12 Thread Pali Rohár
On Monday 12 September 2022 15:48:05 Mike Rapoport wrote: > On Sat, Sep 10, 2022 at 09:39:20AM +, Christophe Leroy wrote: > > + Adding Mike who might help if the problem is around memblock. > > > > Le 08/09/2022 à 22:17, Pali Rohár a écrit : > > > On Thursday 08 September 2022 17:35:11 Pali

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

2022-09-12 Thread Nathan Lynch
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 -- or thought >> > > I had confirmed -- with PowerVM partition

Re: [PATCH v5 3/8] dt-bindings: clock: Add ids for Lynx 10g PLLs

2022-09-12 Thread Rob Herring
On Fri, 02 Sep 2022 17:37:16 -0400, Sean Anderson wrote: > This adds ids for the Lynx 10g SerDes's internal PLLs. These may be used > with assigned-clock* to specify a particular frequency to use. For > example, to set the second PLL (at offset 0x20)'s frequency, use > LYNX10G_PLLa(1). These are

Re: [PATCH v5 1/8] dt-bindings: phy: Add 2500BASE-X and 10GBASE-R

2022-09-12 Thread Rob Herring
On Fri, Sep 02, 2022 at 05:37:14PM -0400, Sean Anderson wrote: > This adds some modes necessary for Lynx 10G support. 2500BASE-X, also > known as 2.5G SGMII, is 1000BASE-X/SGMII overclocked to 3.125 GHz, with > autonegotiation disabled. 10GBASE-R, also known as XFI, is the protocol > spoken

Re: [PATCH v5 2/8] dt-bindings: phy: Add Lynx 10G phy binding

2022-09-12 Thread Rob Herring
On Fri, Sep 02, 2022 at 05:37:15PM -0400, Sean Anderson wrote: > This adds a binding for the SerDes module found on QorIQ processors. > Each phy is a subnode of the top-level device, possibly supporting > multiple lanes and protocols. This "thick" #phy-cells is used due to > allow for better

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

2022-09-12 Thread kernel test robot
Hi Sathvika, Thank you for the patch! Yet something to improve: [auto build test ERROR on powerpc/topic/ppc-kvm] [also build test ERROR on linus/master v6.0-rc5] [cannot apply to powerpc/next masahiroy-kbuild/for-next next-20220912] [If your patch is applied to the wrong git tree, kindly drop us

[Bug 208197] OF: /pci@f2000000/mac-io@17/gpio@50/...: could not find phandle

2022-09-12 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208197 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #290191|0 |1 is obsolete|

[Bug 208197] OF: /pci@f2000000/mac-io@17/gpio@50/...: could not find phandle

2022-09-12 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208197 --- Comment #11 from Erhard F. (erhar...@mailbox.org) --- Created attachment 301794 --> https://bugzilla.kernel.org/attachment.cgi?id=301794=edit dmesg (kernel 6.0-rc3, PowerMac G4 DP) -- You may reply to this email to add a comment. You are

Re: State of RFC PATCH Remove CONFIG_DCACHE_WORD_ACCESS

2022-09-12 Thread Christophe Leroy
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 have > been integrated: > >

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

2022-09-12 Thread Leonardo Brás
On Fri, 2022-09-09 at 09:04 -0500, Nathan Lynch wrote: > Hi Leonardo, > > (restoring the list to the cc, hope that's ok) > Sure, thanks for doing that.  I probably had some mail composer issue here. > Leonardo Brás writes: > > On Wed, 2022-09-07 at 17:01 -0500, Nathan Lynch wrote: > > > At

[Bug 208197] OF: /pci@f2000000/mac-io@17/gpio@50/...: could not find phandle

2022-09-12 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208197 --- Comment #10 from Erhard F. (erhar...@mailbox.org) --- *** Bug 216427 has been marked as a duplicate of this bug. *** -- You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the

[Bug 216427] [bisected] 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-09-12 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216427 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|NEW |RESOLVED

Re: Fragmented physical memory on powerpc/32

2022-09-12 Thread Mike Rapoport
On Sat, Sep 10, 2022 at 09:39:20AM +, Christophe Leroy wrote: > + Adding Mike who might help if the problem is around memblock. > > Le 08/09/2022 à 22:17, Pali Rohár a écrit : > > On Thursday 08 September 2022 17:35:11 Pali Rohár wrote: > >> On Thursday 08 September 2022 15:25:14 Christophe

State of RFC PATCH Remove CONFIG_DCACHE_WORD_ACCESS

2022-09-12 Thread Lukas Bulwahn
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 have been integrated: https://lore.kernel.org/all/1393964591.20435.58.camel@joe-AO722/ [RFC] Remove

Re: [PATCH v4 17/20] powerpc/64e: Clarify register saves and clears with {SAVE,ZEROIZE}_GPRS

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > The common interrupt handler prologue macro and the bad_stack > trampolines include consecutive sequences of register saves, and some > register clears. Neaten such instances by expanding use of the SAVE_GPRS > macro and employing the

Re: [PATCH v4 19/20] powerpc/64s: Clear gprs on interrupt routine entry in Book3S

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > Zero GPRS r0, r2-r11, r14-r31, on entry into the kernel for all > other interrupt sources to limit influence of user-space values > in potential speculation gadgets. The remaining gprs are overwritten by > entry macros to interrupt

Re: [PATCH v4 18/20] powerpc/64s: Fix comment on interrupt handler prologue

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > Interrupt handlers on 64s systems will often need to save register state > from the interrupted process to make space for loading special purpose > registers or for internal state. > > Fix a comment documenting a common code path macro in

Re: [PATCH v4 15/20] powerpc/64s: Use {ZEROIZE,SAVE,REST}_GPRS macros in sc, scv 0 handlers

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > Use the convenience macros for saving/clearing/restoring gprs in keeping > with syscall calling conventions. The plural variants of these macros > can store a range of registers for concision. > > This works well when the user gpr value

Re: [PATCH v4 14/20] powerpc/64s: Clear/restore caller gprs in syscall interrupt/return

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > Clear user state in gprs (assign to zero) to reduce the influence of user > registers on speculation within kernel syscall handlers. Clears occur > at the very beginning of the sc and scv 0 interrupt handlers, with > restores occurring

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

2022-09-12 Thread Segher Boessenkool
Hi! On Fri, Sep 09, 2022 at 11:07:04AM -0700, Josh Poimboeuf wrote: > 2) Noreturn functions: > >There's no reliable way to determine which functions are designated >by the compiler to be noreturn (either explictly via function >attribute, or implicitly via a static function which

Re: [PATCH v4 13/20] powerpc: Provide syscall wrapper

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > Implement syscall wrapper as per s390, x86, arm64. When enabled > cause handlers to accept parameters from a stack frame rather than > from user scratch register state. This allows for user registers to be > safely cleared in order to

Re: [PATCH v4 12/20] Revert "powerpc/syscall: Save r3 in regs->orig_r3"

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > This reverts commit 8875f47b7681aa4e4484a9b612577b044725f839. Can you use short hash and commit title format? Also it's no longer just reverting that patch, so maybe just come up with a new title for this patch and reference the two

Re: [PATCH v4 11/20] powerpc: Add ZEROIZE_GPRS macros for register clears

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > Macros for restoring and saving registers to and from the stack exist. > Provide macros with the same interface for clearing a range of gprs by > setting each register's value in that range to zero. Can I bikeshed this a bit more and ask

Re: [PATCH v4 02/20] powerpc: Use generic fallocate compatibility syscall

2022-09-12 Thread Arnd Bergmann
On Mon, Sep 12, 2022, at 1:00 PM, Christophe Leroy wrote: > Le 12/09/2022 à 11:57, Arnd Bergmann a écrit : >> On Mon, Sep 12, 2022, at 10:38 AM, Nicholas Piggin wrote: >> >> The powerpc difference is that in little-endian mode, only >> the 'len' argument is swapped but the 'offset' argument is >>

Re: [PATCH v4 02/20] powerpc: Use generic fallocate compatibility syscall

2022-09-12 Thread Christophe Leroy
Le 12/09/2022 à 11:57, Arnd Bergmann a écrit : > On Mon, Sep 12, 2022, at 10:38 AM, Nicholas Piggin wrote: >> On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: >>> The powerpc fallocate compat syscall handler is identical to the >>> generic implementation provided by commit 59c10c52f573f

Re: [PATCH v4 10/20] powerpc: Use common syscall handler type

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > Cause syscall handlers to be typed as follows when called indirectly > throughout the kernel. > > typedef long (*syscall_fn)(unsigned long, unsigned long, unsigned long, >unsigned long, unsigned long, unsigned

Re: [PATCH v4 09/20] powerpc: Enable compile-time check for syscall handlers

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > The table of syscall handlers and registered compatibility syscall > handlers has in past been produced using assembly, with function > references resolved at link time. This moves link-time errors to > compile-time, by rewriting systbl.S

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

2022-09-12 Thread Nicholas Piggin
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 for compile-time type-checking for > syscall handlers, which is

Re: [PATCH v4 07/20] powerpc: Adopt SYSCALL_DEFINE for arch-specific syscall handlers

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > Arch-specific implementations of syscall handlers are currently used > over generic implementations for the following reasons: > > 1. Semantics unique to powerpc > 2. Compatibility syscalls require 'argument padding' to comply with >

Re: [PATCH v4 02/20] powerpc: Use generic fallocate compatibility syscall

2022-09-12 Thread Arnd Bergmann
On Mon, Sep 12, 2022, at 10:38 AM, Nicholas Piggin wrote: > On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: >> The powerpc fallocate compat syscall handler is identical to the >> generic implementation provided by commit 59c10c52f573f ("riscv: >> compat: syscall: Add

Re: [PATCH v4 06/20] powerpc: Remove direct call to mmap2 syscall handlers

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > Syscall handlers should not be invoked internally by their symbol names, > as these symbols defined by the architecture-defined SYSCALL_DEFINE > macro. Move the compatibility syscall definition for mmap2 to > syscalls.c, so that all mmap

Re: [PATCH v4 05/20] powerpc: Remove direct call to personality syscall handler

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > Syscall handlers should not be invoked internally by their symbol names, > as these symbols defined by the architecture-defined SYSCALL_DEFINE > macro. Fortunately, in the case of ppc64_personality, its call to > sys_personality can be

Re: [PATCH v4 04/20] powerpc: Provide do_ppc64_personality helper

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > Avoid duplication in future patch that will define the ppc64_personality > syscall handler in terms of the SYSCALL_DEFINE and COMPAT_SYSCALL_DEFINE > macros, by extracting the common body of ppc64_personality into a helper > function. > >

Re: [PATCH v4 03/20] powerpc/32: Remove powerpc select specialisation

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > Syscall #82 has been implemented for 32-bit platforms in a unique way on > powerpc systems. This hack will in effect guess whether the caller is > expecting new select semantics or old select semantics. It does so via a > guess, based off

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

2022-09-12 Thread Rohan McLure
>> +static inline bool pmd_user_accessible_page(pmd_t pmd) >> +{ >> +return pmd_is_leaf(pmd) && pmd_present(pmd) >> +&& pte_user(pmd_pte(pmd)); > > The && goes on previous line. > By the way, there is a great tool that can help you : > > $

Re: [PATCH v4 02/20] powerpc: Use generic fallocate compatibility syscall

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > The powerpc fallocate compat syscall handler is identical to the > generic implementation provided by commit 59c10c52f573f ("riscv: > compat: syscall: Add compat_sys_call_table implementation"), and as > such can be removed in favour of

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

2022-09-12 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 v3 15/16] objtool/powerpc: Enable objtool to be built on ppc

2022-09-12 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 v3 16/16] objtool/powerpc: Add --mcount specific implementation

2022-09-12 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 v3 13/16] objtool: Use macros to define arch specific reloc types

2022-09-12 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 v3 14/16] objtool: Add arch specific function arch_ftrace_match()

2022-09-12 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 v3 12/16] objtool: Read special sections with alts only when specific options are selected

2022-09-12 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 v3 11/16] objtool: Add --mnop as an option to --mcount

2022-09-12 Thread Sathvika Vasireddy
Some architectures (powerpc) may not support ftrace locations being nop'ed out at build time. Introduce --mnop as an option to objtool for enabling nop'ing of ftrace locations. Re-purpose CONFIG_HAVE_NOP_MCOUNT as a means for architectures to indicate support for the same. Also, make sure that

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

2022-09-12 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 v3 10/16] objtool: Use target file class size instead of a compiled constant

2022-09-12 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 v3 08/16] objtool: Fix SEGFAULT

2022-09-12 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 v3 05/16] powerpc: Skip objtool from running on drivers/crypto/vmx/aesp8-ppc.o

2022-09-12 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 v3 09/16] objtool: Use target file endianness instead of a compiled constant

2022-09-12 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 v3 04/16] powerpc: Curb objtool unannotated intra-function warnings

2022-09-12 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 v3 03/16] powerpc: Fix objtool unannotated intra-function call warnings

2022-09-12 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 v3 02/16] powerpc: Override __ALIGN and __ALIGN_STR macros

2022-09-12 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 v3 01/16] powerpc: Fix __WARN_FLAGS() for use with Objtool

2022-09-12 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

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

2022-09-12 Thread Sathvika Vasireddy
This patchset enables and implements objtool --mcount option on powerpc. This applies atop powerpc/merge branch. Changelog: v3: * Patch 01/16 - Rework patch subject. - Rework changelog. - Add Reviewed-by tag from Christophe Leroy. * Patch 02/16 - Rework changelog to

Re: [PATCH v4 01/20] powerpc: Remove asmlinkage from syscall handler definitions

2022-09-12 Thread Nicholas Piggin
On Wed Aug 24, 2022 at 12:05 PM AEST, Rohan McLure wrote: > The asmlinkage macro has no special meaning in powerpc, and prior to > this patch is used sporadically on some syscall handler definitions. On > architectures that do not define asmlinkage, it resolves to extern "C" > for C++ compilers

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

2022-09-12 Thread Hari Bathini
On 12/09/22 10:54 am, Christophe Leroy wrote: Le 09/09/2022 à 19:40, Hari Bathini a écrit : 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

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

2022-09-12 Thread Hari Bathini
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 cores. Commit 7c5ed82b800d8 ("powerpc: Set crashkernel offset to

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

2022-09-12 Thread Christophe Leroy
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_table_check_pte_clear > respectively. These calls serve as a sanity check against illegal > mappings. > > Enable