[powerpc/perf] WARN_ONCE arch/powerpc/include/asm/interrupt.h:365 with perf tests

2022-02-03 Thread Sachin Sant
While running perftool [1] test against 5.17-rc2 booted on Power 9 LPAR following warning is seen: [ 442.002150] [ cut here ] [ 442.002164] WARNING: CPU: 7 PID: 76 at arch/powerpc/include/asm/interrupt.h:365 interrupt_nmi_exit_prepare+0x150/0x160 [ 442.002175] Modules

Re: [RFC V1 04/31] powerpc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-02-03 Thread Mike Rapoport
On Fri, Feb 04, 2022 at 08:27:37AM +0530, Anshuman Khandual wrote: > > On 2/3/22 11:45 PM, Mike Rapoport wrote: > > On Mon, Jan 24, 2022 at 06:26:41PM +0530, Anshuman Khandual wrote: > >> This defines and exports a platform specific custom vm_get_page_prot() via > >> subscribing

Re: [PATCH] powerpc/64s/hash: Make hash faults work in NMI context

2022-02-03 Thread Aneesh Kumar K.V
Nicholas Piggin writes: > Hash faults are not resoved in NMI context, instead causing the access > to fail. This is done because perf interrupts can get backtraces > including walking the user stack, and taking a hash fault on those could > deadlock on the HPTE lock if the perf interrupt hits

[PATCH] powerpc/64s/hash: Make hash faults work in NMI context

2022-02-03 Thread Nicholas Piggin
Hash faults are not resoved in NMI context, instead causing the access to fail. This is done because perf interrupts can get backtraces including walking the user stack, and taking a hash fault on those could deadlock on the HPTE lock if the perf interrupt hits while the same HPTE lock is being

[PATCH kernel v2] powerpc/64: Add UADDR64 relocation support

2022-02-03 Thread Alexey Kardashevskiy
When ld detects unaligned relocations, it emits R_PPC64_UADDR64 relocations instead of R_PPC64_RELATIVE. Currently R_PPC64_UADDR64 are detected by arch/powerpc/tools/relocs_check.sh and expected not to work. Below is a simple chunk to trigger this behaviour (this disables optimization for the

Re: [RFC V1 04/31] powerpc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-02-03 Thread Anshuman Khandual
On 2/3/22 11:45 PM, Mike Rapoport wrote: > On Mon, Jan 24, 2022 at 06:26:41PM +0530, Anshuman Khandual wrote: >> This defines and exports a platform specific custom vm_get_page_prot() via >> subscribing ARCH_HAS_VM_GET_PAGE_PROT. Subsequently all __SXXX and __PXXX >> macros can be dropped which

[PATCH AUTOSEL 5.10 12/25] powerpc/fixmap: Fix VM debug warning on unmap

2022-02-03 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit aec982603aa8cc0a21143681feb5f60ecc69d718 ] Unmapping a fixmap entry is done by calling __set_fixmap() with FIXMAP_PAGE_CLEAR as flags. Today, powerpc __set_fixmap() calls map_kernel_page(). map_kernel_page() is not happy when called a second time for

[PATCH AUTOSEL 5.15 22/41] powerpc/fixmap: Fix VM debug warning on unmap

2022-02-03 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit aec982603aa8cc0a21143681feb5f60ecc69d718 ] Unmapping a fixmap entry is done by calling __set_fixmap() with FIXMAP_PAGE_CLEAR as flags. Today, powerpc __set_fixmap() calls map_kernel_page(). map_kernel_page() is not happy when called a second time for

[PATCH AUTOSEL 5.16 22/52] powerpc/fixmap: Fix VM debug warning on unmap

2022-02-03 Thread Sasha Levin
From: Christophe Leroy [ Upstream commit aec982603aa8cc0a21143681feb5f60ecc69d718 ] Unmapping a fixmap entry is done by calling __set_fixmap() with FIXMAP_PAGE_CLEAR as flags. Today, powerpc __set_fixmap() calls map_kernel_page(). map_kernel_page() is not happy when called a second time for

Re: [PATCH v3 4/6] modules: Add CONFIG_ARCH_WANTS_MODULES_DATA_IN_VMALLOC

2022-02-03 Thread Luis Chamberlain
On Thu, Feb 03, 2022 at 07:05:13AM +, Christophe Leroy wrote: > > > Le 03/02/2022 à 01:01, Luis Chamberlain a écrit : > > On Sat, Jan 29, 2022 at 05:02:09PM +, Christophe Leroy wrote: > >> diff --git a/kernel/module.c b/kernel/module.c > >> index 11f51e17fb9f..f3758115ebaa 100644 > >>

Re: [RFC V1 04/31] powerpc/mm: Enable ARCH_HAS_VM_GET_PAGE_PROT

2022-02-03 Thread Mike Rapoport
On Mon, Jan 24, 2022 at 06:26:41PM +0530, Anshuman Khandual wrote: > This defines and exports a platform specific custom vm_get_page_prot() via > subscribing ARCH_HAS_VM_GET_PAGE_PROT. Subsequently all __SXXX and __PXXX > macros can be dropped which are no longer needed. While here, this also >

Re: [PATCH V2] mm: Merge pte_mkhuge() call into arch_make_huge_pte()

2022-02-03 Thread Catalin Marinas
On Thu, Feb 03, 2022 at 09:27:49AM +0530, Anshuman Khandual wrote: > Each call into pte_mkhuge() is invariably followed by arch_make_huge_pte(). > Instead arch_make_huge_pte() can accommodate pte_mkhuge() at the beginning. > This updates generic fallback stub for arch_make_huge_pte() and available

Re: [PATCH] mm: Merge pte_mkhuge() call into arch_make_huge_pte()

2022-02-03 Thread Catalin Marinas
On Wed, Feb 02, 2022 at 11:08:06AM +0530, Anshuman Khandual wrote: > Each call into pte_mkhuge() is invariably followed by arch_make_huge_pte(). > Instead arch_make_huge_pte() can accommodate pte_mkhuge() at the beginning. > This updates generic fallback stub for arch_make_huge_pte() and available

[Bug 210749] sysfs: cannot create duplicate filename '/bus/nvmem/devices/module-vpd'

2022-02-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=210749 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|ASSIGNED|RESOLVED

[Bug 215217] Kernel fails to boot at an early stage when built with GCC_PLUGIN_LATENT_ENTROPY=y (PowerMac G4 3,6)

2022-02-03 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215217 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Status|NEW |RESOLVED

Re: powerpc: Set crashkernel offset to mid of RMA region

2022-02-03 Thread Michael Ellerman
Sourabh Jain writes: > On 01/02/22 17:14, Michael Ellerman wrote: >> Sourabh Jain writes: >>> On large config LPARs (having 192 and more cores), Linux fails to boot >>> due to insufficient memory in the first memblock. It is due to the >>> memory reservation for the crash kernel which starts at

[PATCH v1] drivers/base/node: consolidate node device subsystem initialization in node_dev_init()

2022-02-03 Thread David Hildenbrand
... and call node_dev_init() after memory_dev_init() from driver_init(), so before any of the existing arch/subsys calls. All online nodes should be known at that point: early during boot, arch code determines node and zone ranges and sets the relevant nodes online; usually this happens in

Re: [PATCH v5 3/6] kexec_file: Don't opencode appended signature verification.

2022-02-03 Thread Michal Suchánek
Hello, thanks for the review. On Tue, Jan 25, 2022 at 12:15:56PM -0800, Luis Chamberlain wrote: > On Tue, Jan 11, 2022 at 12:37:45PM +0100, Michal Suchanek wrote: > > diff --git a/include/linux/verification.h b/include/linux/verification.h > > index a655923335ae..32db9287a7b0 100644 > > ---