Re: [PATCH] tty: hvc-iucv: fix function pointer casts

2024-02-13 Thread Jiri Slaby
On 13. 02. 24, 11:17, Arnd Bergmann wrote: From: Arnd Bergmann clang warns about explicitly casting between incompatible function pointers: drivers/tty/hvc/hvc_iucv.c:1100:23: error: cast from 'void (*)(const void *)' to 'void (*)(struct device *)' converts to incompatible function type

Re: [PATCH] powerpc/iommu: Fix the missing iommu_group_put() during platform domain attach

2024-02-13 Thread Venkat Rao Bagalkote
Thanks for the patch. Applied this patch and verified and issue is fixed. This issue way originally reported in the below mail. https://marc.info/?l=linux-kernel=170737160630106=2 Tested-by: Venkat Rao Bagalkote On 13/02/24 10:51 pm, Jason Gunthorpe wrote: On Tue, Feb 13, 2024 at

Re: [PATCH 0/2] PCI endpoint BAR hardware description cleanup

2024-02-13 Thread Kishon Vijay Abraham I
Hi Niklas, On 2/10/2024 6:56 AM, Niklas Cassel wrote: The series is based on top of: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git/log/?h=endpoint Hello all, This series cleans up the hardware description for PCI endpoint BARs. The problems with the existing hardware

Re: [DMARC error][SPF error] Re: [PATCH v4 00/10] devm_led_classdev_register() usage problem

2024-02-13 Thread George Stark
Hello Andy On 2/13/24 13:55, Andy Shevchenko wrote: On Tue, Feb 13, 2024 at 2:14 AM George Stark wrote: Hello Andy On 2/12/24 12:53, Andy Shevchenko wrote: On Mon, Feb 12, 2024 at 1:52 AM George Stark wrote: I haven't lose hope for the devm_mutex thing and keep pinging those guys from

RE: [RFC PATCH 5/5] powerpc/smp: Remap boot CPU onto core 0 if >= nr_cpu_ids

2024-02-13 Thread Wen Xiong
>>And loop in Wen Xiong and Ming Lei, who care for this issue too. Hi Pingfan, Thanks for your email! Hi Michael, Thanks for your new patchset! In past month, Our several test team have modified /etc/sysconfig/kdump file with nr_cpus=1, triggered kdump over the following IO devices and

Re: [PATCH] i2c: pasemi: split driver into two separate modules

2024-02-13 Thread Sven Peter
> > On 12. Feb 2024, at 12:19, Arnd Bergmann wrote: > > From: Arnd Bergmann > > On powerpc, it is possible to compile test both the new apple (arm) and > old pasemi (powerpc) drivers for the i2c hardware at the same time, > which leads to a warning about linking the same object file twice:

Re: [PATCH] tty: hvc-iucv: fix function pointer casts

2024-02-13 Thread Segher Boessenkool
On Tue, Feb 13, 2024 at 11:17:49AM +0100, Arnd Bergmann wrote: > clang warns about explicitly casting between incompatible function > pointers: > > drivers/tty/hvc/hvc_iucv.c:1100:23: error: cast from 'void (*)(const void *)' > to 'void (*)(struct device *)' converts to incompatible function

Re: [PATCH v5 25/25] arm64/mm: Automatically fold contpte mappings

2024-02-13 Thread Ryan Roberts
On 13/02/2024 17:44, Mark Rutland wrote: > On Fri, Feb 02, 2024 at 08:07:56AM +, Ryan Roberts wrote: >> There are situations where a change to a single PTE could cause the >> contpte block in which it resides to become foldable (i.e. could be >> repainted with the contiguous bit). Such

[PATCH v2] powerpc/ftrace: Ignore ftrace locations in exit text sections

2024-02-13 Thread Naveen N Rao
Michael reported that we are seeing ftrace bug on bootup when KASAN is enabled, and if we are using -fpatchable-function-entry: ftrace: allocating 47780 entries in 18 pages ftrace-powerpc: 0xc20b3d5c: No module provided for non-kernel address [ ftrace bug

Re: [PATCH v5 25/25] arm64/mm: Automatically fold contpte mappings

2024-02-13 Thread Mark Rutland
On Fri, Feb 02, 2024 at 08:07:56AM +, Ryan Roberts wrote: > There are situations where a change to a single PTE could cause the > contpte block in which it resides to become foldable (i.e. could be > repainted with the contiguous bit). Such situations arise, for example, > when user space

Re: [PATCH] powerpc/iommu: Fix the missing iommu_group_put() during platform domain attach

2024-02-13 Thread Jason Gunthorpe
On Tue, Feb 13, 2024 at 10:05:22AM -0600, Shivaprasad G Bhat wrote: > The function spapr_tce_platform_iommu_attach_dev() is missing to call > iommu_group_put() when the domain is already set. This refcount leak > shows up with BUG_ON() during DLPAR remove operation as, > > KernelBug: Kernel bug

Re: [PATCH v5 24/25] arm64/mm: __always_inline to improve fork() perf

2024-02-13 Thread Mark Rutland
On Fri, Feb 02, 2024 at 08:07:55AM +, Ryan Roberts wrote: > As set_ptes() and wrprotect_ptes() become a bit more complex, the > compiler may choose not to inline them. But this is critical for fork() > performance. So mark the functions, along with contpte_try_unfold() > which is called by

Re: [PATCH v5 23/25] arm64/mm: Implement pte_batch_hint()

2024-02-13 Thread Mark Rutland
On Fri, Feb 02, 2024 at 08:07:54AM +, Ryan Roberts wrote: > When core code iterates over a range of ptes and calls ptep_get() for > each of them, if the range happens to cover contpte mappings, the number > of pte reads becomes amplified by a factor of the number of PTEs in a > contpte block.

Re: [PATCH v5 21/25] arm64/mm: Implement new [get_and_]clear_full_ptes() batch APIs

2024-02-13 Thread Mark Rutland
On Tue, Feb 13, 2024 at 04:48:50PM +, Ryan Roberts wrote: > On 13/02/2024 16:43, Mark Rutland wrote: > > On Fri, Feb 02, 2024 at 08:07:52AM +, Ryan Roberts wrote: > >> +static inline void __clear_full_ptes(struct mm_struct *mm, unsigned long > >> addr, > >> +

Re: [PATCH v5 21/25] arm64/mm: Implement new [get_and_]clear_full_ptes() batch APIs

2024-02-13 Thread Ryan Roberts
On 13/02/2024 16:43, Mark Rutland wrote: > On Fri, Feb 02, 2024 at 08:07:52AM +, Ryan Roberts wrote: >> Optimize the contpte implementation to fix some of the >> exit/munmap/dontneed performance regression introduced by the initial >> contpte commit. Subsequent patches will solve it entirely.

Re: [PATCH v5 21/25] arm64/mm: Implement new [get_and_]clear_full_ptes() batch APIs

2024-02-13 Thread Mark Rutland
On Fri, Feb 02, 2024 at 08:07:52AM +, Ryan Roberts wrote: > Optimize the contpte implementation to fix some of the > exit/munmap/dontneed performance regression introduced by the initial > contpte commit. Subsequent patches will solve it entirely. > > During exit(), munmap() or

Re: [PATCH v5 20/25] arm64/mm: Implement new wrprotect_ptes() batch API

2024-02-13 Thread Ryan Roberts
On 13/02/2024 16:31, Mark Rutland wrote: > On Fri, Feb 02, 2024 at 08:07:51AM +, Ryan Roberts wrote: >> Optimize the contpte implementation to fix some of the fork performance >> regression introduced by the initial contpte commit. Subsequent patches >> will solve it entirely. >> >> During

Re: [PATCH v5 20/25] arm64/mm: Implement new wrprotect_ptes() batch API

2024-02-13 Thread Mark Rutland
On Fri, Feb 02, 2024 at 08:07:51AM +, Ryan Roberts wrote: > Optimize the contpte implementation to fix some of the fork performance > regression introduced by the initial contpte commit. Subsequent patches > will solve it entirely. > > During fork(), any private memory in the parent must be

[PATCH] powerpc/iommu: Fix the missing iommu_group_put() during platform domain attach

2024-02-13 Thread Shivaprasad G Bhat
The function spapr_tce_platform_iommu_attach_dev() is missing to call iommu_group_put() when the domain is already set. This refcount leak shows up with BUG_ON() during DLPAR remove operation as, KernelBug: Kernel bug in state 'None': kernel BUG at arch/powerpc/platforms/pseries/iommu.c:100!

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread Ryan Roberts
On 12/02/2024 16:24, David Hildenbrand wrote: > On 12.02.24 16:34, Ryan Roberts wrote: >> On 12/02/2024 15:26, David Hildenbrand wrote: >>> On 12.02.24 15:45, Ryan Roberts wrote: On 12/02/2024 13:54, David Hildenbrand wrote: >>> If so, I wonder if we could instead do that comparison

Re: [PATCH v2] powerpc: Add gpr1 and fpu save/restore functions

2024-02-13 Thread Christophe Leroy
Le 12/02/2024 à 18:14, Timothy Pearson a écrit : > When building the kernel in size optimized mode with the amdgpu module > enabled, > gcc will begin referencing external gpr1 and fpu save/restore functions. This > will then cause a linker failure as we do not link against libgcc which >

Re: Build regressions/improvements in v6.8-rc1

2024-02-13 Thread Andreas Larsson
On 2024-01-23 15:21, Arnd Bergmann wrote: >>> + /kisskb/src/arch/sparc/include/asm/floppy_64.h: error: no previous >>> prototype for 'sparc_floppy_irq' [-Werror=missing-prototypes]: => 200:13 >>> + /kisskb/src/arch/sparc/include/asm/floppy_64.h: error: no previous >>> prototype for

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread Ryan Roberts
On 13/02/2024 14:08, Ard Biesheuvel wrote: > On Tue, 13 Feb 2024 at 15:05, David Hildenbrand wrote: >> >> On 13.02.24 15:02, Ryan Roberts wrote: >>> On 13/02/2024 13:45, David Hildenbrand wrote: On 13.02.24 14:33, Ard Biesheuvel wrote: > On Tue, 13 Feb 2024 at 14:21, Ryan Roberts wrote:

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread Ard Biesheuvel
On Tue, 13 Feb 2024 at 15:05, David Hildenbrand wrote: > > On 13.02.24 15:02, Ryan Roberts wrote: > > On 13/02/2024 13:45, David Hildenbrand wrote: > >> On 13.02.24 14:33, Ard Biesheuvel wrote: > >>> On Tue, 13 Feb 2024 at 14:21, Ryan Roberts wrote: > > On 13/02/2024 13:13, David

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread David Hildenbrand
On 13.02.24 15:02, Ryan Roberts wrote: On 13/02/2024 13:45, David Hildenbrand wrote: On 13.02.24 14:33, Ard Biesheuvel wrote: On Tue, 13 Feb 2024 at 14:21, Ryan Roberts wrote: On 13/02/2024 13:13, David Hildenbrand wrote: On 13.02.24 14:06, Ryan Roberts wrote: On 13/02/2024 12:19, David

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread Ryan Roberts
On 13/02/2024 13:45, David Hildenbrand wrote: > On 13.02.24 14:33, Ard Biesheuvel wrote: >> On Tue, 13 Feb 2024 at 14:21, Ryan Roberts wrote: >>> >>> On 13/02/2024 13:13, David Hildenbrand wrote: On 13.02.24 14:06, Ryan Roberts wrote: > On 13/02/2024 12:19, David Hildenbrand wrote:

[PATCH] powerpc: Force inlining of arch_vmap_p{u/m}d_supported()

2024-02-13 Thread Christophe Leroy
arch_vmap_pud_supported() and arch_vmap_pmd_supported() are expected to constant-fold to false when RADIX is not enabled. Force inlining in order to avoid following failure which leads to unexpected call of non-existing pud_set_huge() and pmd_set_huge() on powerpc 8xx. In function

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread David Hildenbrand
On 13.02.24 14:33, Ard Biesheuvel wrote: On Tue, 13 Feb 2024 at 14:21, Ryan Roberts wrote: On 13/02/2024 13:13, David Hildenbrand wrote: On 13.02.24 14:06, Ryan Roberts wrote: On 13/02/2024 12:19, David Hildenbrand wrote: On 13.02.24 13:06, Ryan Roberts wrote: On 12/02/2024 20:38, Ryan

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread Ard Biesheuvel
On Tue, 13 Feb 2024 at 14:21, Ryan Roberts wrote: > > On 13/02/2024 13:13, David Hildenbrand wrote: > > On 13.02.24 14:06, Ryan Roberts wrote: > >> On 13/02/2024 12:19, David Hildenbrand wrote: > >>> On 13.02.24 13:06, Ryan Roberts wrote: > On 12/02/2024 20:38, Ryan Roberts wrote: > >

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread Ryan Roberts
On 13/02/2024 13:22, David Hildenbrand wrote: > On 13.02.24 14:20, Ryan Roberts wrote: >> On 13/02/2024 13:13, David Hildenbrand wrote: >>> On 13.02.24 14:06, Ryan Roberts wrote: On 13/02/2024 12:19, David Hildenbrand wrote: > On 13.02.24 13:06, Ryan Roberts wrote: >> On 12/02/2024

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread David Hildenbrand
On 13.02.24 14:20, Ryan Roberts wrote: On 13/02/2024 13:13, David Hildenbrand wrote: On 13.02.24 14:06, Ryan Roberts wrote: On 13/02/2024 12:19, David Hildenbrand wrote: On 13.02.24 13:06, Ryan Roberts wrote: On 12/02/2024 20:38, Ryan Roberts wrote: [...] +static inline bool

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread Ryan Roberts
On 13/02/2024 13:13, David Hildenbrand wrote: > On 13.02.24 14:06, Ryan Roberts wrote: >> On 13/02/2024 12:19, David Hildenbrand wrote: >>> On 13.02.24 13:06, Ryan Roberts wrote: On 12/02/2024 20:38, Ryan Roberts wrote: > [...] > > +static inline bool mm_is_user(struct

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread David Hildenbrand
On 13.02.24 14:06, Ryan Roberts wrote: On 13/02/2024 12:19, David Hildenbrand wrote: On 13.02.24 13:06, Ryan Roberts wrote: On 12/02/2024 20:38, Ryan Roberts wrote: [...] +static inline bool mm_is_user(struct mm_struct *mm) +{ +    /* + * Don't attempt to apply the contig bit to kernel

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread Ryan Roberts
On 13/02/2024 12:19, David Hildenbrand wrote: > On 13.02.24 13:06, Ryan Roberts wrote: >> On 12/02/2024 20:38, Ryan Roberts wrote: >>> [...] >>> >>> +static inline bool mm_is_user(struct mm_struct *mm) >>> +{ >>> +    /* >>> + * Don't attempt to apply the contig bit to kernel

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread Ryan Roberts
On 13/02/2024 12:02, Mark Rutland wrote: > On Mon, Feb 12, 2024 at 12:59:57PM +, Ryan Roberts wrote: >> On 12/02/2024 12:00, Mark Rutland wrote: >>> Hi Ryan, > > [...] > +static inline void set_pte(pte_t *ptep, pte_t pte) +{ + /* + * We don't have the mm or vaddr so

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread David Hildenbrand
On 13.02.24 13:06, Ryan Roberts wrote: On 12/02/2024 20:38, Ryan Roberts wrote: [...] +static inline bool mm_is_user(struct mm_struct *mm) +{ + /* +* Don't attempt to apply the contig bit to kernel mappings, because +* dynamically adding/removing the contig bit can cause

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread Ryan Roberts
On 12/02/2024 20:38, Ryan Roberts wrote: > [...] > > +static inline bool mm_is_user(struct mm_struct *mm) > +{ > + /* > + * Don't attempt to apply the contig bit to kernel mappings, because > + * dynamically adding/removing the contig bit can cause page faults. > + *

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread Mark Rutland
On Mon, Feb 12, 2024 at 12:59:57PM +, Ryan Roberts wrote: > On 12/02/2024 12:00, Mark Rutland wrote: > > Hi Ryan, [...] > >> +static inline void set_pte(pte_t *ptep, pte_t pte) > >> +{ > >> + /* > >> + * We don't have the mm or vaddr so cannot unfold contig entries (since > >> + * it

[PATCH linux-next 3/3] powerpc/kdump: Split KEXEC_CORE and CRASH_DUMP dependency

2024-02-13 Thread Hari Bathini
Remove CONFIG_CRASH_DUMP dependency on CONFIG_KEXEC. CONFIG_KEXEC_CORE was used at places where CONFIG_CRASH_DUMP or CONFIG_CRASH_RESERVE was appropriate. Replace with appropriate #ifdefs to support CONFIG_KEXEC and !CONFIG_CRASH_DUMP configuration option. Also, make CONFIG_FA_DUMP dependent on

[PATCH linux-next 2/3] powerpc/kexec: split CONFIG_KEXEC_FILE and CONFIG_CRASH_DUMP

2024-02-13 Thread Hari Bathini
CONFIG_KEXEC_FILE does not have to select CONFIG_CRASH_DUMP. Move some code under CONFIG_CRASH_DUMP to support CONFIG_KEXEC_FILE and !CONFIG_CRASH_DUMP case. Signed-off-by: Hari Bathini --- arch/powerpc/kexec/elf_64.c | 4 +- arch/powerpc/kexec/file_load_64.c | 269

[PATCH linux-next 1/3] kexec/kdump: make struct crash_mem available without CONFIG_CRASH_DUMP

2024-02-13 Thread Hari Bathini
struct crash_mem defined under include/linux/crash_core.h represents a list of memory ranges. While it is used to represent memory ranges for kdump kernel, it can also be used for other kind of memory ranges. In fact, KEXEC_FILE_LOAD syscall in powerpc uses this structure to represent reserved

[PATCH linux-next 0/3] powerpc/kexec: split CONFIG_CRASH_DUMP out from CONFIG_KEXEC_CORE

2024-02-13 Thread Hari Bathini
This patch series is a follow-up to [1] based on discussions at [2] about additional work needed to get it working on powerpc. The first patch in the series makes struct crash_mem available with or without CONFIG_CRASH_DUMP enabled. The next patch moves kdump specific code for kexec_file_load

Re: [PATCH v2 0/5] powerpc: struct bus_type cleanup

2024-02-13 Thread Greg Kroah-Hartman
On Mon, Feb 12, 2024 at 05:04:58PM -0300, Ricardo B. Marliere wrote: > This series is part of an effort to cleanup the users of the driver > core, as can be seen in many recent patches authored by Greg across the > tree (e.g. [1]). Patch 1/5 is a prerequisite to 2/5, but the others have > no

Re: [DMARC error][SPF error] Re: [PATCH v4 00/10] devm_led_classdev_register() usage problem

2024-02-13 Thread Andy Shevchenko
On Tue, Feb 13, 2024 at 2:14 AM George Stark wrote: > > Hello Andy > > On 2/12/24 12:53, Andy Shevchenko wrote: > > On Mon, Feb 12, 2024 at 1:52 AM George Stark > > wrote: > >> I haven't lose hope for the devm_mutex thing and keep pinging those guys > >> from time to time. > > > > I don't

[PATCH] tty: hvc-iucv: fix function pointer casts

2024-02-13 Thread Arnd Bergmann
From: Arnd Bergmann clang warns about explicitly casting between incompatible function pointers: drivers/tty/hvc/hvc_iucv.c:1100:23: error: cast from 'void (*)(const void *)' to 'void (*)(struct device *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] 1100 |

Re: [PATCH v5 19/25] arm64/mm: Wire up PTE_CONT for user mappings

2024-02-13 Thread David Hildenbrand
On 12.02.24 21:38, Ryan Roberts wrote: [...] +static inline bool mm_is_user(struct mm_struct *mm) +{ + /* +* Don't attempt to apply the contig bit to kernel mappings, because +* dynamically adding/removing the contig bit can cause page faults. +* These racing

Re: [PATCH v5 0/6] DCP as trusted keys backend

2024-02-13 Thread Richard Weinberger
Am Montag, 5. Februar 2024, 09:39:07 CET schrieb David Gstir: > Hi, > > > On 15.12.2023, at 12:06, David Gstir wrote: > > > > This is a revival of the previous patch set submitted by Richard Weinberger: > > https://lore.kernel.org/linux-integrity/20210614201620.30451-1-rich...@nod.at/ > > > >

Re: [PATCH v5 03/25] mm: Make pte_next_pfn() a wrapper around pte_advance_pfn()

2024-02-13 Thread David Hildenbrand
On 12.02.24 22:34, Ryan Roberts wrote: On 12/02/2024 14:29, David Hildenbrand wrote: On 12.02.24 15:10, Ryan Roberts wrote: On 12/02/2024 12:14, David Hildenbrand wrote: On 02.02.24 09:07, Ryan Roberts wrote: The goal is to be able to advance a PTE by an arbitrary number of PFNs. So

Re: [PATCH v2 0/5] powerpc: struct bus_type cleanup

2024-02-13 Thread Ricardo B. Marliere
Hi Christophe, On 13 Feb 08:05, Christophe Leroy wrote: > Hi > > Le 12/02/2024 à 21:04, Ricardo B. Marliere a écrit : > > This series is part of an effort to cleanup the users of the driver > > core, as can be seen in many recent patches authored by Greg across the > > tree (e.g. [1]). Patch 1/5

Re: [PATCH v2 0/5] powerpc: struct bus_type cleanup

2024-02-13 Thread Christophe Leroy
Hi Le 12/02/2024 à 21:04, Ricardo B. Marliere a écrit : > This series is part of an effort to cleanup the users of the driver > core, as can be seen in many recent patches authored by Greg across the > tree (e.g. [1]). Patch 1/5 is a prerequisite to 2/5, but the others have > no dependency. They