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

2022-01-30 Thread David Hildenbrand
On 31.01.22 07:23, Oscar Salvador wrote: > On Fri, Jan 28, 2022 at 04:15:40PM +0100, David Hildenbrand wrote: >> ... 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. >> >>

[Bug 215389] pagealloc: memory corruption at building glibc-2.33 and running its' testsuite

2022-01-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215389 --- Comment #10 from Christophe Leroy (christophe.le...@csgroup.eu) --- Thanks for the tests. I'm not surprised that the system doesn't poweroff or reboot without ADB_PMU because the PMU manages power. The "neverending build" is maybe because

[PATCH] powerpc/603: Clear C bit when PTE is read only

2022-01-30 Thread Christophe Leroy
On book3s/32 MMU, PP bits don't offer kernel RO protection, kernel pages are always RW. However, on the 603 a page fault is always generated when the C bit (change bit = dirty bit) is not set. Enforce kernel RO protection by clearing C bit in TLB miss handler when the page doesn't have _PAGE_RW

[PATCH] powerpc/603: Remove outdated comment

2022-01-30 Thread Christophe Leroy
Since commit 84de6ab0e904 ("powerpc/603: don't handle PAGE_ACCESSED in TLB miss handlers.") page table is not updated anymore by TLB miss handlers. Remove the comment. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/head_book3s_32.S | 8 1 file changed, 8 deletions(-) diff

[PATCH 5/5] compat: consolidate the compat_flock{,64} definition

2022-01-30 Thread Christoph Hellwig
Provide a single common definition for the compat_flock and compat_flock64 structures using the same tricks as for the native variants. Another extra define is added for the packing required on x86. Signed-off-by: Christoph Hellwig --- arch/arm64/include/asm/compat.h | 16

[PATCH 4/5] uapi: always define F_GETLK64/F_SETLK64/F_SETLKW64 in fcntl.h

2022-01-30 Thread Christoph Hellwig
The F_GETLK64/F_SETLK64/F_SETLKW64 fcntl opcodes are only implemented for the 32-bit syscall APIs, but are also needed for compat handling on 64-bit kernels. Consolidate them in unistd.h instead of definining the internal compat definitions in compat.h, which is rather errror prone (e.g. parisc

[PATCH 2/5] uapi: simplify __ARCH_FLOCK{,64}_PAD a little

2022-01-30 Thread Christoph Hellwig
Don't bother to define the symbols empty, just don't use them. That makes the intent a little more clear. Signed-off-by: Christoph Hellwig --- include/uapi/asm-generic/fcntl.h | 12 tools/include/uapi/asm-generic/fcntl.h | 12 2 files changed, 8 insertions(+),

[PATCH 3/5] uapi: merge the 32-bit mips struct flock into the generic one

2022-01-30 Thread Christoph Hellwig
Add a new __ARCH_FLOCK_EXTRA_SYSID macro following the style of __ARCH_FLOCK_PAD to avoid having a separate definition just for one architecture. Signed-off-by: Christoph Hellwig --- arch/mips/include/uapi/asm/fcntl.h | 26 +++--- include/uapi/asm-generic/fcntl.h |

[PATCH 1/5] uapi: remove the unused HAVE_ARCH_STRUCT_FLOCK64 define

2022-01-30 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/uapi/asm-generic/fcntl.h | 2 -- tools/include/uapi/asm-generic/fcntl.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/include/uapi/asm-generic/fcntl.h b/include/uapi/asm-generic/fcntl.h index ecd0f5bdfc1d6..caa482e3b01af 100644 ---

consolidate the compat fcntl definitions v2

2022-01-30 Thread Christoph Hellwig
Hi all, currenty the compat fcnt definitions are duplicate for all compat architectures, and the native fcntl64 definitions aren't even usable from userspace due to a bogus CONFIG_64BIT ifdef. This series tries to sort out all that. Changes since v1: - only make the F*64 defines uapi visible

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

2022-01-30 Thread Christophe Leroy
Le 31/01/2022 à 05:14, Alexey Kardashevskiy a écrit : > 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

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

2022-01-30 Thread Oscar Salvador
On Fri, Jan 28, 2022 at 04:15:40PM +0100, David Hildenbrand wrote: > ... 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. > > This is in line with memory_dev_init(), which

Re: microwatt booting linux-5.7 under verilator

2022-01-30 Thread lkcl
On January 31, 2022 3:31:41 AM UTC, Nicholas Piggin wrote: >Hi Luke, > >Interesting to read about the project, thanks for the post. no problem. it's been i think 18 years since i last did linux kernel work. >> i also had to fix a couple of things in the linux kernel source >>

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

2022-01-30 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: \#pragma GCC push_options \#pragma GCC

Re: microwatt booting linux-5.7 under verilator

2022-01-30 Thread Nicholas Piggin
Hi Luke, Interesting to read about the project, thanks for the post. Excerpts from Luke Kenneth Casson Leighton's message of January 3, 2022 10:45 am: > i am pleased to be able to announce the successful booting of microwatt-5.7 > linux buildroot... under a veriilator simulation of the

[Bug 215389] pagealloc: memory corruption at building glibc-2.33 and running its' testsuite

2022-01-30 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215389 --- Comment #9 from Erhard F. (erhar...@mailbox.org) --- Created attachment 300354 --> https://bugzilla.kernel.org/attachment.cgi?id=300354=edit dmesg (5.10-rc2 with ADB_PMU disabled, PowerMac G4 DP) Took a little time but I double checked the

[PATCH] powerpc/ptdump: Fix sparse warning in hashpagetable.c

2022-01-30 Thread Christophe Leroy
arch/powerpc/mm/ptdump/hashpagetable.c:264:29: warning: restricted __be64 degrades to integer arch/powerpc/mm/ptdump/hashpagetable.c:265:49: warning: restricted __be64 degrades to integer arch/powerpc/mm/ptdump/hashpagetable.c:267:36: warning: incorrect type in assignment (different base

Re: [patch V3 28/35] PCI/MSI: Simplify pci_irq_get_affinity()

2022-01-30 Thread Guenter Roeck
On Fri, Dec 10, 2021 at 11:19:26PM +0100, Thomas Gleixner wrote: > From: Thomas Gleixner > > Replace open coded MSI descriptor chasing and use the proper accessor > functions instead. > > Signed-off-by: Thomas Gleixner > Reviewed-by: Greg Kroah-Hartman > Reviewed-by: Jason Gunthorpe This

Re: [PATCH V4 08/17] riscv: compat: syscall: Add compat_sys_call_table implementation

2022-01-30 Thread Guo Ren
On Sun, Jan 30, 2022 at 7:32 PM Arnd Bergmann wrote: > > On Sun, Jan 30, 2022 at 6:54 AM Guo Ren wrote: > > On Sun, Jan 30, 2022 at 6:41 AM Arnd Bergmann wrote: > > > > > > I would make these endian-specific, and reverse them on big-endian > > > architectures. That way it > > > should be

Re: [PATCH] [Rebased for 4.19 and 4.14] powerpc/32: Fix boot failure with GCC latent entropy plugin

2022-01-30 Thread gre...@linuxfoundation.org
On Sun, Jan 30, 2022 at 09:45:10AM +, Christophe Leroy wrote: > This is backport for 4.19 and 4.14 > > (cherry picked from commit bba496656a73fc1d1330b49c7f82843836e9feb1) > > Boot fails with GCC latent entropy plugin enabled. All now queued up, thanks, greg k-h

Re: [PATCH] [Modified for 5.16 and 5.15] powerpc/32s: Fix kasan_init_region() for KASAN

2022-01-30 Thread gre...@linuxfoundation.org
On Sat, Jan 29, 2022 at 05:26:10PM +, Christophe Leroy wrote: > This is a backport for 5.16 and 5.15. > > To apply, it also requires commit 37eb7ca91b69 ("powerpc/32s: Allocate > one 256k IBAT instead of two consecutives 128k IBATs") Thanks for these, now queued up. greg k-h

Re: [PATCH V4 06/17] riscv: compat: Add basic compat date type implementation

2022-01-30 Thread Arnd Bergmann
On Sun, Jan 30, 2022 at 6:47 AM Guo Ren wrote: > > On Sun, Jan 30, 2022 at 5:56 AM Arnd Bergmann wrote: > > > > On Sat, Jan 29, 2022 at 1:17 PM wrote: > > > + > > > +#define COMPAT_RLIM_INFINITY 0x7fff > > > > > > +#define F_GETLK64 12 > > > +#define F_SETLK64 13 > > > +#define

Re: [PATCH V4 08/17] riscv: compat: syscall: Add compat_sys_call_table implementation

2022-01-30 Thread Arnd Bergmann
On Sun, Jan 30, 2022 at 6:54 AM Guo Ren wrote: > On Sun, Jan 30, 2022 at 6:41 AM Arnd Bergmann wrote: > > > > I would make these endian-specific, and reverse them on big-endian > > architectures. That way it > > should be possible to share them across all compat architectures > > without needing

[PATCH v4] PCI hotplug: rpaphp: Error out on busy status from get-sensor-state

2022-01-30 Thread Mahesh Salgaonkar
When certain PHB HW failure causes phyp to recover PHB, it marks the PE state as temporarily unavailable until recovery is complete. This also triggers an EEH handler in Linux which needs to notify drivers, and perform recovery. But before notifying the driver about the pci error it uses

[PATCH] powerpc/32s: Make pte_update() non atomic on 603 core

2022-01-30 Thread Christophe Leroy
On 603 core, TLB miss handler don't do any change to the page tables so pte_update() doesn't need to be atomic. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/32/pgtable.h | 37 1 file changed, 22 insertions(+), 15 deletions(-) diff --git

[PATCH] [Rebased for 5.4] powerpc/32: Fix boot failure with GCC latent entropy plugin

2022-01-30 Thread Christophe Leroy
This is backport for 5.4 (cherry picked from commit bba496656a73fc1d1330b49c7f82843836e9feb1) Boot fails with GCC latent entropy plugin enabled. This is due to early boot functions trying to access 'latent_entropy' global data while the kernel is not relocated at its final destination yet. As

[PATCH] [Rebased for 5.16 and 5.15] powerpc/32: Fix boot failure with GCC latent entropy plugin

2022-01-30 Thread Christophe Leroy
This is backport for 5.16 and 5.15 (cherry picked from commit bba496656a73fc1d1330b49c7f82843836e9feb1) Boot fails with GCC latent entropy plugin enabled. This is due to early boot functions trying to access 'latent_entropy' global data while the kernel is not relocated at its final destination

[PATCH] [Rebased for 5.10] powerpc/32: Fix boot failure with GCC latent entropy plugin

2022-01-30 Thread Christophe Leroy
This is backport for 5.10 (cherry picked from commit bba496656a73fc1d1330b49c7f82843836e9feb1) Boot fails with GCC latent entropy plugin enabled. This is due to early boot functions trying to access 'latent_entropy' global data while the kernel is not relocated at its final destination yet. As

[PATCH] [Rebased for 4.9] powerpc/32: Fix boot failure with GCC latent entropy plugin

2022-01-30 Thread Christophe Leroy
This is backport for 4.9 (cherry picked from commit bba496656a73fc1d1330b49c7f82843836e9feb1) Boot fails with GCC latent entropy plugin enabled. This is due to early boot functions trying to access 'latent_entropy' global data while the kernel is not relocated at its final destination yet. As

[PATCH] [Rebased for 4.19 and 4.14] powerpc/32: Fix boot failure with GCC latent entropy plugin

2022-01-30 Thread Christophe Leroy
This is backport for 4.19 and 4.14 (cherry picked from commit bba496656a73fc1d1330b49c7f82843836e9feb1) Boot fails with GCC latent entropy plugin enabled. This is due to early boot functions trying to access 'latent_entropy' global data while the kernel is not relocated at its final destination