Re: [PATCH] Add static_key_feature_checks_initialized flag

2024-03-27 Thread Christophe Leroy
Le 27/03/2024 à 05:59, Nicholas Miehlbradt a écrit : > JUMP_LABEL_FEATURE_CHECK_DEBUG used static_key_initialized to determine > whether {cpu,mmu}_has_feature() was used before static keys were > initialized. However, {cpu,mmu}_has_feature() should not be used before > setup_feature_keys() is

Re: [RFC PATCH 1/8] mm: Provide pagesize to pmd_populate()

2024-03-27 Thread Christophe Leroy
Le 26/03/2024 à 16:01, Jason Gunthorpe a écrit : > On Mon, Mar 25, 2024 at 07:05:01PM +0000, Christophe Leroy wrote: > >> Not looked into details yet, but I guess so. >> >> By the way there is a wiki dedicated to huge pages on powerpc, you can >> have a look at i

Re: [PATCH v2 3/3] powerpc/code-patching: Restore 32-bit patching performance

2024-03-26 Thread Christophe Leroy
group.eu/ > > Suggested-by: Christophe Leroy > Signed-off-by: Benjamin Gray > > --- > > v2: * New in v2 > > I think Suggested-by is an appropriate tag. The patch is Christophe's > from the link, I just added the commit description, so it could well > be better to c

Re: [RFC PATCH 1/8] mm: Provide pagesize to pmd_populate()

2024-03-25 Thread Christophe Leroy
Le 25/03/2024 à 17:19, Jason Gunthorpe a écrit : > On Mon, Mar 25, 2024 at 03:55:54PM +0100, Christophe Leroy wrote: >> Unlike many architectures, powerpc 8xx hardware tablewalk requires >> a two level process for all page sizes, allthough second level only >> has one entr

[RFC PATCH 8/8] powerpc/8xx: Add back support for 8M pages using contiguous PTE entries

2024-03-25 Thread Christophe Leroy
it is addressing an 8M page, this is required for the HW tablewalk assistance. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/hugetlb.h| 11 - .../include/asm/nohash/32/hugetlb-8xx.h | 28 +++- arch/powerpc/include/asm/nohash/32/pgalloc.h | 2 + arch

[RFC PATCH 7/8] powerpc/8xx: Remove support for 8M pages

2024-03-25 Thread Christophe Leroy
Remove support for 8M pages in order to stop using hugepd. Support for 8M pages will be added back later using the same approach as for 512k pages, in extenso using contiguous page entries in the regular page table. Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig

Re: [PATCH v3 00/12] mm/gup: Unify hugetlb, part 2

2024-03-25 Thread Christophe Leroy
Le 21/03/2024 à 23:07, pet...@redhat.com a écrit : > From: Peter Xu > > v3: > - Rebased to latest mm-unstalbe (a824831a082f, of March 21th) > - Dropped patch to introduce pmd_thp_or_huge(), replace such uses (and also >pXd_huge() users) with pXd_leaf() [Jason] > - Add a comment for

[RFC PATCH 6/8] powerpc/8xx: Fix size given to set_huge_pte_at()

2024-03-25 Thread Christophe Leroy
set_huge_pte_at() expects the real page size, not the psize which is the index of the page definition in table mmu_psize_defs[] Fixes: 935d4f0c6dc8 ("mm: hugetlb: add huge page size param to set_huge_pte_at()") Signed-off-by: Christophe Leroy --- arch/powerpc/mm/nohash/8xx.c | 3 +

[RFC PATCH 5/8] powerpc/mm: Allow hugepages without hugepd

2024-03-25 Thread Christophe Leroy
In preparation of implementing huge pages on powerpc 8xx without hugepd, enclose hugepd related code inside an ifdef CONFIG_ARCH_HAS_HUGEPD Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/hugetlb.h| 2 ++ arch/powerpc/include/asm/nohash/pgtable.h | 8 +--- arch

[RFC PATCH 4/8] mm: Provide mm_struct and address to huge_ptep_get()

2024-03-25 Thread Christophe Leroy
the pmd. In order to be consistent with huge_ptep_get_and_clear(), give mm and address to huge_ptep_get(). Signed-off-by: Christophe Leroy --- arch/arm64/include/asm/hugetlb.h | 2 +- fs/hugetlbfs/inode.c | 2 +- fs/proc/task_mmu.c | 8 +++--- fs/userfaultfd.c

[RFC PATCH 3/8] mm: Provide pmd to pte_leaf_size()

2024-03-25 Thread Christophe Leroy
On powerpc 8xx, when a page is 8M size, the information is in the PMD entry. So provide it to pte_leaf_size(). Signed-off-by: Christophe Leroy --- arch/arm64/include/asm/pgtable.h | 2 +- arch/powerpc/include/asm/nohash/32/pte-8xx.h | 2 +- arch/riscv/include/asm/pgtable.h

[RFC PATCH 2/8] mm: Provide page size to pte_alloc_huge()

2024-03-25 Thread Christophe Leroy
In order to be able to flag the PMD entry with _PMD_HUGE_8M on powerpc 8xx, provide page size to pte_alloc_huge() and use it through the newly introduced pte_alloc_size(). Signed-off-by: Christophe Leroy --- arch/arm64/mm/hugetlbpage.c | 2 +- arch/parisc/mm/hugetlbpage.c | 2 +- arch

[RFC PATCH 1/8] mm: Provide pagesize to pmd_populate()

2024-03-25 Thread Christophe Leroy
for use by pte_alloc_huge(). When an architecture doesn't provide pmd_populate_size(), pmd_populate() is used as a fallback. Signed-off-by: Christophe Leroy --- include/linux/mm.h | 12 +++- mm/filemap.c | 2 +- mm/internal.h | 2 +- mm/memory.c| 19

[RFC PATCH 0/8] Reimplement huge pages without hugepd on powerpc 8xx

2024-03-25 Thread Christophe Leroy
for that 8M page. At the moment it has to look into each helper to know if the hugepage ptep is a PTE or a PMD in order to know it is a 8M page or a lower size. I hope this can me handled by core-mm in the future. There are probably several ways to implement stuff, so feedback is very welcome. Christophe

Re: [FSL P50x0] Kernel 6.9-rc1 compiling issue

2024-03-25 Thread Christophe Leroy
Hi, Le 25/03/2024 à 06:18, Christian Zigotzky a écrit : > I have created a patch: > > --- a/arch/powerpc/platforms/85xx/smp.c 2024-03-25 06:14:02.201209476 +0100 > +++ b/arch/powerpc/platforms/85xx/smp.c 2024-03-25 06:10:04.421425931 +0100 > @@ -393,6 +393,7 @@ static void

Re: [PATCH 09/13] mm/powerpc: Redefine pXd_huge() with pXd_leaf()

2024-03-20 Thread Christophe Leroy
Le 20/03/2024 à 17:09, Peter Xu a écrit : > On Wed, Mar 20, 2024 at 06:16:43AM +0000, Christophe Leroy wrote: >> At the first place that was to get a close fit between hardware >> pagetable topology and linux pagetable topology. But obviously we >> already stepped back for

Re: [PATCH 09/13] mm/powerpc: Redefine pXd_huge() with pXd_leaf()

2024-03-20 Thread Christophe Leroy
Le 20/03/2024 à 00:26, Jason Gunthorpe a écrit : > On Tue, Mar 19, 2024 at 11:07:08PM +0000, Christophe Leroy wrote: >> >> >> Le 18/03/2024 à 17:15, Jason Gunthorpe a écrit : >>> On Thu, Mar 14, 2024 at 01:11:59PM +, Christophe Leroy wrote: >>>>

Re: [PATCH 09/13] mm/powerpc: Redefine pXd_huge() with pXd_leaf()

2024-03-19 Thread Christophe Leroy
Le 18/03/2024 à 17:15, Jason Gunthorpe a écrit : > On Thu, Mar 14, 2024 at 01:11:59PM +0000, Christophe Leroy wrote: >> >> >> Le 14/03/2024 à 13:53, Peter Xu a écrit : >>> On Thu, Mar 14, 2024 at 08:45:34AM +, Christophe Leroy wrote: >>>> >>

Re: [PATCH] powerpc: Use swapper_pg_dir instead of init_mm->pgd

2024-03-16 Thread Christophe Leroy
Le 09/10/2022 à 19:31, Christophe Leroy a écrit : > init_mm->pgd is always swapper_pg_dir[] which is known > at build time. > > Directly use the later instead of loading it from init_mm > struct at every time. > > Signed-off-by: Christophe Leroy Dropping this p

[PATCH v2] powerpc: Handle error in mark_rodata_ro() and mark_initmem_nx()

2024-03-16 Thread Christophe Leroy
mark_rodata_ro() and mark_initmem_nx() use functions that can fail like set_memory_nx() and set_memory_ro(), leading to a not protected kernel. In case of failure, panic. Link: https://github.com/KSPP/linux/issues/7 Signed-off-by: Christophe Leroy Signed-off-by: Michael Ellerman Link: https

Re: [PATCH v1 2/2] powerpc/code-patching: Convert to open_patch_window()/close_patch_window()

2024-03-16 Thread Christophe Leroy
Le 15/03/2024 à 09:38, Christophe Leroy a écrit : > > > Le 15/03/2024 à 03:59, Benjamin Gray a écrit : >> The existing patching alias page setup and teardown sections can be >> simplified to make use of the new open_patch_window() abstraction. >> >>

Re: [PATCH v1 2/2] powerpc/code-patching: Convert to open_patch_window()/close_patch_window()

2024-03-16 Thread Christophe Leroy
Le 15/03/2024 à 09:38, Christophe Leroy a écrit : > > > Le 15/03/2024 à 03:59, Benjamin Gray a écrit : >> The existing patching alias page setup and teardown sections can be >> simplified to make use of the new open_patch_window() abstraction. >> >>

Re: Cannot load wireguard module

2024-03-15 Thread Christophe Leroy
Hi, Le 15/03/2024 à 13:20, Michal Suchánek a écrit : > Hello, > > I cannot load the wireguard module. > > Loading the module provides no diagnostic other than 'No such device'. > > Please provide maningful diagnostics for loading software-only driver, > clearly there is no particular device

Re: [PATCH v1 2/2] powerpc/code-patching: Convert to open_patch_window()/close_patch_window()

2024-03-15 Thread Christophe Leroy
Le 15/03/2024 à 03:59, Benjamin Gray a écrit : > The existing patching alias page setup and teardown sections can be > simplified to make use of the new open_patch_window() abstraction. > > This eliminates the _mm variants of the helpers, consumers no longer > need to check mm_patch_enabled(),

Re: linux-next: manual merge of the powerpc tree with the mm-stable tree

2024-03-15 Thread Christophe Leroy
Le 29/02/2024 à 07:37, Michael Ellerman a écrit : > Stephen Rothwell writes: >> Hi all, >> >> Today's linux-next merge of the powerpc tree got a conflict in: >> >>arch/powerpc/mm/pgtable_32.c >> >> between commit: >> >>a5e8131a0329 ("arm64, powerpc, riscv, s390, x86: ptdump: refactor

Re: [PATCH v1 1/3] powerpc/code-patching: Test patch_instructions() during boot

2024-03-15 Thread Christophe Leroy
Le 15/03/2024 à 03:57, Benjamin Gray a écrit : > patch_instructions() introduces new behaviour with a couple of > variations. Test each case of > >* a repeated 32-bit instruction, >* a repeated 64-bit instruction (ppc64), and >* a copied sequence of instructions > > for both on a

Re: [PATCH v1 3/3] powerpc/code-patching: Optimise patch_memcpy() to 4 byte chunks

2024-03-15 Thread Christophe Leroy
Le 15/03/2024 à 03:57, Benjamin Gray a écrit : > As we are patching instructions, we can assume the length is a multiple > of 4 and the destination address is aligned. > > Atomicity of patching a prefixed instruction is not a concern, as the > original implementation doesn't provide it anyway.

Re: [PATCH v1 2/3] powerpc/code-patching: Use dedicated memory routines for patching

2024-03-15 Thread Christophe Leroy
Le 15/03/2024 à 03:57, Benjamin Gray a écrit : > The patching page set up as a writable alias may be in quadrant 1 > (userspace) if the temporary mm path is used. This causes sanitiser > failures if so. Sanitiser failures also occur on the non-mm path > because the plain memset family is

Re: [PATCH v9 07/27] net: wan: Add support for QMC HDLC

2024-03-14 Thread Christophe Leroy
: Herve Codina >> Reviewed-by: Christophe Leroy >> Acked-by: Jakub Kicinski >> --- > [ ... ] > >> + >> +static const struct of_device_id qmc_hdlc_id_table[] = { >> +{ .compatible = "fsl,qmc-hdlc" }, >> +{} /* sentinel */ >> +}; >&g

Re: [PATCH 09/13] mm/powerpc: Redefine pXd_huge() with pXd_leaf()

2024-03-14 Thread Christophe Leroy
Le 14/03/2024 à 13:53, Peter Xu a écrit : > On Thu, Mar 14, 2024 at 08:45:34AM +0000, Christophe Leroy wrote: >> >> >> Le 13/03/2024 à 22:47, pet...@redhat.com a écrit : >>> From: Peter Xu >>> >>> PowerPC book3s 4K mostly has the same definition o

Re: [PATCH v6 1/9] locking/mutex: introduce devm_mutex_init

2024-03-14 Thread Christophe Leroy
mutex_init() > > Signed-off-by: George Stark > Suggested by-by: Christophe Leroy s/Suggested by-by/Suggested-by: Reviewed-by: Christophe Leroy > --- > include/linux/mutex.h| 27 +++ > kernel/locking/mutex-debug.c | 11 +++ > 2 fi

Re: [PATCH 12/13] mm/treewide: Remove pXd_huge()

2024-03-14 Thread Christophe Leroy
Le 13/03/2024 à 22:47, pet...@redhat.com a écrit : > From: Peter Xu > > This API is not used anymore, drop it for the whole tree. > > Signed-off-by: Peter Xu > --- > arch/arm/mm/Makefile | 1 - > arch/arm/mm/hugetlbpage.c | 29

Re: [PATCH 11/13] mm/treewide: Replace pXd_huge() with pXd_leaf()

2024-03-14 Thread Christophe Leroy
Le 13/03/2024 à 22:47, pet...@redhat.com a écrit : > From: Peter Xu > > Now after we're sure all pXd_huge() definitions are the same as pXd_leaf(), > reuse it. Luckily, pXd_huge() isn't widely used. > > Signed-off-by: Peter Xu > --- > arch/arm/include/asm/pgtable-3level.h | 2 +- >

Re: [PATCH 09/13] mm/powerpc: Redefine pXd_huge() with pXd_leaf()

2024-03-14 Thread Christophe Leroy
uge() treewide. > > NOTE: *_leaf() definition need to be moved before the inclusion of > asm/book3s/64/pgtable-4k.h, which defines pXd_huge() with it. > > [1] https://lore.kernel.org/r/87v85zo6w7.fsf@mail.lhotse > > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Christo

Re: [PATCH v10 11/12] powerpc: mm: Use set_pte_at_unchecked() for early-boot / internal usages

2024-03-13 Thread Christophe Leroy
Le 13/03/2024 à 05:21, Rohan McLure a écrit : > In the new set_ptes() API, set_pte_at() (a special case of set_ptes()) > is intended to be instrumented by the page table check facility. There > are however several other routines that constitute the API for setting > page table entries, including

Re: [PATCH v10 10/12] poweprc: mm: Implement *_user_accessible_page() for ptes

2024-03-13 Thread Christophe Leroy
Le 13/03/2024 à 05:21, Rohan McLure a écrit : > Page table checking depends on architectures providing an > implementation of p{te,md,ud}_user_accessible_page. With > refactorisations made on powerpc/mm, the pte_access_permitted() and > similar methods verify whether a userland page is

Re: [PATCH v10 09/12] powerpc: mm: Add common pud_pfn stub for all platforms

2024-03-13 Thread Christophe Leroy
Le 13/03/2024 à 05:21, Rohan McLure a écrit : > Prior to this commit, pud_pfn was implemented with BUILD_BUG as the inline > function for 64-bit Book3S systems but is never included, as its > invocations in generic code are guarded by calls to pud_devmap which return > zero on such systems. A

Re: [PATCH v10 08/12] powerpc: mm: Replace p{u,m,4}d_is_leaf with p{u,m,4}_leaf

2024-03-13 Thread Christophe Leroy
re's already an equivalent commit in mm-stable, that will likely go into v6.9: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git/commit/?h=mm-stable=bd18b688220c7225fb50498dabd9f9d0c9988e67 > > Reviewed-by: Christophe Leroy > Signed-off-by: Rohan McLure > --- > v9:

Re: [PATCH v3 07/12] powerpc: Use initializer for struct vm_unmapped_area_info

2024-03-13 Thread Christophe Leroy
tand from this text that, as agreed, this patch removes the pointless/redundant zero-init of individual members. But it is not what is done, see below ? > > Signed-off-by: Rick Edgecombe > Acked-by: Michael Ellerman > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Chri

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-12 Thread Christophe Leroy
Le 12/03/2024 à 16:30, George Stark a écrit : > [Vous ne recevez pas souvent de courriers de gnst...@salutedevices.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Hello Christophe > > On 3/12/24 14:51, Christophe Ler

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-12 Thread Christophe Leroy
Le 12/03/2024 à 12:39, George Stark a écrit : > [Vous ne recevez pas souvent de courriers de gnst...@salutedevices.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Hello Christophe > > Thanks for the review > You were right about typecheck

Re: [PATCH] powerpc/kernel: Fix potential spectre v1 in syscall

2024-03-12 Thread Christophe Leroy
+Nathan as this is RTAS related. Le 21/08/2018 à 20:42, Breno Leitao a écrit : > The rtas syscall reads a value from a user-provided structure and uses it > to index an array, being a possible area for a potential spectre v1 attack. > This is the code that exposes this problem. > >

Re: [PATCH 1/2] powerpc: Flush checkpointed gpr state for 32-bit processes in ptrace

2024-03-12 Thread Christophe Leroy
Le 19/06/2018 à 21:54, Pedro Franco de Carvalho a écrit : > Would something like this be ok? > > I factored out the calls to flush_fp_to_thread and flush_altivec_to_thread, > although I don't really understand why these are necessary. The > tm_cvsx_get/set > functions also calls

Re: [PATCH] powerpc: build-time fixup alternate feature relative addresses

2024-03-12 Thread Christophe Leroy
Le 29/01/2024 à 07:25, Sathvika Vasireddy a écrit : > Hi Christophe, Nick > > On 1/26/24 12:32 AM, Christophe Leroy wrote: >> Hi Nic, >> >> Le 21/05/2017 à 03:01, Nicholas Piggin a écrit : >>> Implement build-time fixup of alternate feature relative addr

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-12 Thread Christophe Leroy
>>>> often is bound to other resources and has no own devm wrapping. >>>>> Since mutex_destroy() actually does nothing in non-debug builds >>>>> frequently calling mutex_destroy() is just ignored which is safe >>>>>

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-11 Thread Christophe Leroy
Le 12/03/2024 à 02:10, Waiman Long a écrit : > On 3/11/24 19:47, George Stark wrote: >> Hello Waiman, Marek >> >> Thanks for the review. >> >> I've never used lockdep for debug but it seems preferable to >> keep that feature working. It could be look like this: >> >> diff --git

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-11 Thread Christophe Leroy
g formally and can lead to a problem if mutex_destroy() will be >>> extended so introduce devm_mutex_init() >>> >>> Signed-off-by: George Stark >>> Signed-off-by: Christophe Leroy >> >>>   Hello Christophe. Hope you don't mind I put you SoB tag because

Re: [RFC PATCH v2 1/3] powerpc/prom_init: Replace linux,sml-base/sml-size with linux,sml-log

2024-03-11 Thread Christophe Leroy
Le 11/03/2024 à 14:20, Stefan Berger a écrit : > linux,sml-base holds the address of a buffer with the TPM log. This > buffer may become invalid after a kexec. To avoid accessing an invalid > address or corrupted buffer, embed the whole TPM log in the device tree > property linux,sml-log. This

Re: [PATCH RFC 00/13] mm/treewide: Remove pXd_huge() API

2024-03-11 Thread Christophe Leroy
Le 06/03/2024 à 11:41, pet...@redhat.com a écrit : > From: Peter Xu > > [based on akpm/mm-unstable latest commit a7f399ae964e] > > In previous work [1], we removed the pXd_large() API, which is arch > specific. This patchset further removes the hugetlb pXd_huge() API. > > Hugetlb was never

Re: [PATCH 3/3] tools/perf/arch/powerc: Add get_arch_regnum for powerpc

2024-03-09 Thread Christophe Leroy
Le 09/03/2024 à 08:25, Athira Rajeev a écrit : > The function get_dwarf_regnum() returns a DWARF register number > from a register name string. This calls arch specific function > get_arch_regnum to return register number for corresponding arch. > Add mappings for register name to register

Re: [PATCH 1/3] tools/perf/arch/powerpc: Add load/store in powerpc annotate instructions for data type profling

2024-03-09 Thread Christophe Leroy
Le 09/03/2024 à 08:25, Athira Rajeev a écrit : > Add powerpc instruction nmemonic table to associate load/store > instructions with move_ops. mov_ops is used to identify mem_type > to associate instruction with data type and offset. Also initialize > and allocate arch specific fields for

Re: [PATCH 01/19] vdso: Consolidate vdso_calc_delta()

2024-03-08 Thread Christophe Leroy
Le 08/03/2024 à 14:14, Adrian Hunter a écrit : > [Vous ne recevez pas souvent de courriers de adrian.hun...@intel.com. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > Consolidate vdso_calc_delta(), in preparation for further simplification. > >

Re: [PATCH v5 02/10] locking/mutex: introduce devm_mutex_init

2024-03-07 Thread Christophe Leroy
builds > frequently calling mutex_destroy() is just ignored which is safe for now > but wrong formally and can lead to a problem if mutex_destroy() will be > extended so introduce devm_mutex_init() > > Signed-off-by: George Stark > Signed-off-by: Christophe Leroy > --- > Hell

Re: [PATCH 3/3] macintosh/ams: Fix unused variable warning

2024-03-06 Thread Christophe Leroy
Le 07/03/2024 à 06:32, Michael Ellerman a écrit : > Christophe Leroy writes: >> Le 06/03/2024 à 13:58, Michael Ellerman a écrit : >>> If both CONFIG_SENSORS_AMS_PMU and CONFIG_SENSORS_AMS_I2C are unset, >>> there is an unused variable warning in the ams driver: >&g

Re: [PATCH 3/3] macintosh/ams: Fix unused variable warning

2024-03-06 Thread Christophe Leroy
Le 06/03/2024 à 13:58, Michael Ellerman a écrit : > If both CONFIG_SENSORS_AMS_PMU and CONFIG_SENSORS_AMS_I2C are unset, > there is an unused variable warning in the ams driver: > >drivers/macintosh/ams/ams-core.c: In function 'ams_init': >drivers/macintosh/ams/ams-core.c:181:29:

Re: [RESEND2 PATCH net v4 2/2] soc: fsl: qbman: Use raw spinlock for cgr_lock

2024-03-05 Thread Christophe Leroy
: >> On 2/23/24 00:38, Christophe Leroy wrote: >>> Le 22/02/2024 à 18:07, Sean Anderson a écrit : >>>> [Vous ne recevez pas souvent de courriers de sean.ander...@linux.dev. >>>> Découvrez pourquoi ceci est important à >>>> https://aka.ms/LearnAboutSenderI

Re: [PATCH v3 02/10] mm/ppc: Replace pXd_is_leaf() with pXd_leaf()

2024-03-05 Thread Christophe Leroy
h/powerpc/include/asm/pgtable.h. because similar > fallback macros for pXd_leaf() are already defined in > include/linux/pgtable.h. > > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: "Aneesh Kumar K.V" > Cc: "Naveen N. Rao" > Cc: linuxppc-dev@lists.

Re: [PATCH v3 01/10] mm/ppc: Define pXd_large() with pXd_leaf()

2024-03-05 Thread Christophe Leroy
macro to pXd_leaf(). > Define it unconditionally just like pXd_leaf(). This helps to prepare > merging the two APIs. > > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Christophe Leroy > Cc: "Aneesh Kumar K.V" > Cc: "Naveen N. Rao" > Cc: linuxppc-

[PATCH] powerpc/bpf/32: Fix failing test_bpf tests

2024-03-05 Thread Christophe Leroy
filter opcode 0006 (@1) unsupported jited:0 261 PASS test_bpf: Summary: 1040 PASSED, 10 FAILED, [924/1038 JIT'ed] Fix them by adding missing processing. Fixes: daabb2b098e0 ("bpf/tests: add tests for cpuv4 instructions") Signed-off-by: Christophe Leroy --- arch/powerpc/incl

Re: [PATCH v2 3/3] arch/powerpc: Remove from backlight code

2024-03-05 Thread Christophe Leroy
Le 05/03/2024 à 11:04, Thomas Zimmermann a écrit : > Hi > > Am 05.03.24 um 10:25 schrieb Christophe Leroy: >> >> Le 05/03/2024 à 10:01, Thomas Zimmermann a écrit : >>> Replace with a forward declaration in to >>> resolves an unnecessary depende

Re: [PATCH v2 3/3] arch/powerpc: Remove from backlight code

2024-03-05 Thread Christophe Leroy
Le 05/03/2024 à 10:01, Thomas Zimmermann a écrit : > Replace with a forward declaration in to > resolves an unnecessary dependency. Remove pmac_backlight_curve_lookup() > and struct fb_info from source and header files. The function and the > framebuffer struct is unused. No functional

Re: [PATCH] powerpc/pseries: fix max polling time in plpks_confirm_object_flushed() function

2024-03-04 Thread Christophe Leroy
Le 04/03/2024 à 07:53, Nayna Jain a écrit : > [Vous ne recevez pas souvent de courriers de na...@linux.ibm.com. Découvrez > pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] > > usleep_range() function takes input time and range in usec. However, > currently it is

Re: [PATCH] powerpc: include linux/backlight.h from asm/backlight.h

2024-03-04 Thread Christophe Leroy
Le 04/03/2024 à 11:32, Thomas Zimmermann a écrit : > Hi > > Am 04.03.24 um 10:55 schrieb Jani Nikula: >> Removal of the backlight include from fb.h uncovered an implicit >> dependency in powerpc asm/backlight.h. Add the explicit include. >> >> Reported-by: Naresh Kamboju >> Closes: >>

Re: [PATCH v2 5/9] mm: Initialize struct vm_unmapped_area_info

2024-03-04 Thread Christophe Leroy
Le 02/03/2024 à 02:51, Kees Cook a écrit : > On Sat, Mar 02, 2024 at 12:47:08AM +, Edgecombe, Rick P wrote: >> On Wed, 2024-02-28 at 09:21 -0800, Kees Cook wrote: >>> I totally understand. If the "uninitialized" warnings were actually >>> reliable, I would agree. I look at it this way: >>>

Re: BUG: Bad page map in process init pte:c0ab684c pmd:01182000 (on a PowerMac G4 DP)

2024-02-29 Thread Christophe Leroy
Le 29/02/2024 à 02:09, Erhard Furtner a écrit : > On Mon, 12 Dec 2022 14:31:35 +1000 > "Nicholas Piggin" wrote: > >> On Thu Dec 1, 2022 at 7:44 AM AEST, Erhard F. wrote: >>> Getting this at boot sometimes, but not always (PowerMac G4 DP, kernel >>> 6.0.9): >>> >>> [...] >>> Freeing unused

Re: [PATCH v2 5/9] mm: Initialize struct vm_unmapped_area_info

2024-02-28 Thread Christophe Leroy
Le 28/02/2024 à 18:01, Edgecombe, Rick P a écrit : > On Wed, 2024-02-28 at 13:22 +0000, Christophe Leroy wrote: >>> Any preference? Or maybe am I missing your point and talking >>> nonsense? >>> >> >> So my preference would go to the addi

Re: [revert 0d60d8df6f49] [net/net-next] [6.8-rc5] Build Failure

2024-02-28 Thread Christophe Leroy
Le 28/02/2024 à 15:43, Eric Dumazet a écrit : > On Wed, Feb 28, 2024 at 3:07 PM Vadim Fedorenko > wrote: >> >> On 28/02/2024 11:09, Tasmiya Nalatwad wrote: >>> Greetings, >>> >>> [revert 0d60d8df6f49] [net/net-next] [6.8-rc5] Build Failure >>> >>> Reverting below commit fixes the issue >>> >>>

Re: [PATCH v2 5/9] mm: Initialize struct vm_unmapped_area_info

2024-02-28 Thread Christophe Leroy
Le 27/02/2024 à 21:25, Edgecombe, Rick P a écrit : > On Tue, 2024-02-27 at 18:16 +0000, Christophe Leroy wrote: >>>> Why doing a full init of the struct when all fields are re- >>>> written a few >>>> lines after ? >>> >>> It's a n

Re: [PATCH 0/5] mm/treewide: Replace pXd_large() with pXd_leaf()

2024-02-28 Thread Christophe Leroy
Le 28/02/2024 à 09:53, pet...@redhat.com a écrit : > From: Peter Xu > > [based on latest akpm/mm-unstable, commit 1274e7646240] > > These two APIs are mostly always the same. It's confusing to have both of > them. Merge them into one. Here I used pXd_leaf() only because pXd_leaf() > is a

Re: [PATCH v2 5/9] mm: Initialize struct vm_unmapped_area_info

2024-02-27 Thread Christophe Leroy
Le 27/02/2024 à 19:07, Kees Cook a écrit : > On Tue, Feb 27, 2024 at 07:02:59AM +0000, Christophe Leroy wrote: >> >> >> Le 26/02/2024 à 20:09, Rick Edgecombe a écrit : >>> Future changes will need to add a field to struct vm_unmapped_area_info. >>>

Re: [PATCH 1/4] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-02-27 Thread Christophe Leroy
Le 27/02/2024 à 16:40, Arnd Bergmann a écrit : > On Mon, Feb 26, 2024, at 17:55, Samuel Holland wrote: >> On 2024-02-26 10:14 AM, Arnd Bergmann wrote: >>> >>> +config HAVE_PAGE_SIZE_4KB >>> + bool >>> + >>> +config HAVE_PAGE_SIZE_8KB >>> + bool >>> + >>> +config HAVE_PAGE_SIZE_16KB >>> +

Re: Increasing build coverage for drivers/spi/spi-ppc4xx.c

2024-02-27 Thread Christophe Leroy
Le 27/02/2024 à 15:00, Uwe Kleine-König a écrit : > On Tue, Feb 27, 2024 at 01:52:07PM +0000, Christophe Leroy wrote: >> >> >> Le 27/02/2024 à 11:58, Uwe Kleine-König a écrit : >>> Hello Christophe, >>> >>> On Tue, Feb 27, 2024 at 10:25:15AM +,

Re: Increasing build coverage for drivers/spi/spi-ppc4xx.c

2024-02-27 Thread Christophe Leroy
Le 27/02/2024 à 11:58, Uwe Kleine-König a écrit : > Hello Christophe, > > On Tue, Feb 27, 2024 at 10:25:15AM +, Christophe Leroy wrote: >> Le 27/02/2024 à 09:46, Uwe Kleine-König a écrit : >>> recently the spi-ppc4xx.c driver suffered from build errors and warnings

Re: Increasing build coverage for drivers/spi/spi-ppc4xx.c

2024-02-27 Thread Christophe Leroy
Le 27/02/2024 à 09:46, Uwe Kleine-König a écrit : > Hello, > > recently the spi-ppc4xx.c driver suffered from build errors and warnings > that were undetected for longer than I expected. I think it would be > very beneficial if this driver was enabled in (at least) a powerpc > allmodconfig

Re: [PATCH v2 5/9] mm: Initialize struct vm_unmapped_area_info

2024-02-26 Thread Christophe Leroy
Le 26/02/2024 à 20:09, Rick Edgecombe a écrit : > Future changes will need to add a field to struct vm_unmapped_area_info. > This would cause trouble for any archs that don't initialize the > struct. Currently every user sets each field, so if new fields are > added, the core code parsing the

Re: [PATCH 2/4] arch: simplify architecture specific page size configuration

2024-02-26 Thread Christophe Leroy
while > leaving the arhcitecture specific ones as the user visible > place for configuring it, to avoid breaking user configs. > > Signed-off-by: Arnd Bergmann Reviewed-by: Christophe Leroy (powerpc32) > --- > arch/arc/Kconfig | 3 +++ > arch/arc/include/uapi/as

Re: [PATCH 1/4] arch: consolidate existing CONFIG_PAGE_SIZE_*KB definitions

2024-02-26 Thread Christophe Leroy
Le 26/02/2024 à 17:14, Arnd Bergmann a écrit : > From: Arnd Bergmann > > These four architectures define the same Kconfig symbols for configuring > the page size. Move the logic into a common place where it can be shared > with all other architectures. > > Signed-off-by: Arnd Bergmann > ---

Re: [PATCH 4/4] vdso: avoid including asm/page.h

2024-02-26 Thread Christophe Leroy
Le 26/02/2024 à 17:14, Arnd Bergmann a écrit : > From: Arnd Bergmann > > The recent change to the vdso_data_store broke building compat VDSO > on at least arm64 because it includes headers outside of the include/vdso/ > namespace: I understand that powerpc64 also has an issue, see

Re: [PATCH v9 2/2] lib: checksum: Use aligned accesses for ip_fast_csum and csum_ipv6_magic tests

2024-02-23 Thread Christophe Leroy
Le 22/02/2024 à 03:55, Charlie Jenkins a écrit : > The test cases for ip_fast_csum and csum_ipv6_magic were failing on a > variety of architectures that are big endian or do not support > misalgined accesses. Both of these test cases are changed to support big > and little endian architectures.

Re: [PATCH v9 1/2] lib: checksum: Fix type casting in checksum kunits

2024-02-23 Thread Christophe Leroy
Le 22/02/2024 à 03:55, Charlie Jenkins a écrit : > The checksum functions use the types __wsum and __sum16. These need to > be explicitly casted to, because will cause sparse errors otherwise. This is not the correct fix. When you forcibly cast, you shut up sparse and hide warnings but you

Re: "test_ip_fast_csum: ASSERTION FAILED at lib/checksum_kunit.c:589" at boot with CONFIG_CHECKSUM_KUNIT=y enabled on a Talos II, kernel 6.8-rc5

2024-02-23 Thread Christophe Leroy
Le 23/02/2024 à 08:00, Charlie Jenkins a écrit : > On Fri, Feb 23, 2024 at 06:58:14AM +0000, Christophe Leroy wrote: >> >> >> Le 23/02/2024 à 07:12, Charlie Jenkins a écrit : >>> On Fri, Feb 23, 2024 at 05:59:07AM +, Christophe Leroy wrote: >>>> Hi E

Re: "test_ip_fast_csum: ASSERTION FAILED at lib/checksum_kunit.c:589" at boot with CONFIG_CHECKSUM_KUNIT=y enabled on a Talos II, kernel 6.8-rc5

2024-02-22 Thread Christophe Leroy
Le 23/02/2024 à 07:12, Charlie Jenkins a écrit : > On Fri, Feb 23, 2024 at 05:59:07AM +0000, Christophe Leroy wrote: >> Hi Erhard, hi Charlie, >> >> Le 23/02/2024 à 02:26, Erhard Furtner a écrit : >>> Greetings! >>> >>> Looks like my

Re: "test_ip_fast_csum: ASSERTION FAILED at lib/checksum_kunit.c:589" at boot with CONFIG_CHECKSUM_KUNIT=y enabled on a Talos II, kernel 6.8-rc5

2024-02-22 Thread Christophe Leroy
Hi Erhard, hi Charlie, Le 23/02/2024 à 02:26, Erhard Furtner a écrit : > Greetings! > > Looks like my Talos II (running a BE kernel+system) fails some of the kernels > internal unit tests. One of the failing tests is checksum_kunit, enabled via > CONFIG_CHECKSUM_KUNIT=y: > > [...] > KTAP

Re: [RESEND2 PATCH net v4 2/2] soc: fsl: qbman: Use raw spinlock for cgr_lock

2024-02-22 Thread Christophe Leroy
Le 22/02/2024 à 18:07, Sean Anderson a écrit : > [Vous ne recevez pas souvent de courriers de sean.ander...@linux.dev. > Découvrez pourquoi ceci est important à > https://aka.ms/LearnAboutSenderIdentification ] > > cgr_lock may be locked with interrupts already disabled by >

Re: [PATCH 1/2] powerpc: Refactor __kernel_map_pages()

2024-02-22 Thread Christophe Leroy
Le 22/02/2024 à 06:32, Michael Ellerman a écrit : > Christophe Leroy writes: >> __kernel_map_pages() is almost identical for PPC32 and RADIX. >> >> Refactor it. >> >> On PPC32 it is not needed for KFENCE, but to keep it simple >> just make it similar to

Re: [PATCH 2/2] powerpc: Don't ignore errors from set_memory_{n}p() in __kernel_map_pages()

2024-02-21 Thread Christophe Leroy
Le 21/02/2024 à 13:09, Michael Ellerman a écrit : > Christophe Leroy writes: >> set_memory_p() and set_memory_np() can fail. >> >> As mentioned in linux/mm.h: >> >> /* >> * To support DEBUG_PAGEALLOC architecture must ensure that >> * __kernel_m

Re: [PATCH 1/4] mm/vmalloc: allow arch-specific vmalloc_node overrides

2024-02-21 Thread Christophe Leroy
Le 21/02/2024 à 06:43, Christoph Hellwig a écrit : > On Tue, Feb 20, 2024 at 02:32:53PM -0600, Maxwell Bland wrote: >> Present non-uniform use of __vmalloc_node and __vmalloc_node_range makes >> enforcing appropriate code and data seperation untenable on certain >> microarchitectures, as

Re: [PATCH 0/4] arm64: mm: support dynamic vmalloc/pmd configuration

2024-02-21 Thread Christophe Leroy
Le 20/02/2024 à 21:32, Maxwell Bland a écrit : > [Vous ne recevez pas souvent de courriers de mbl...@motorola.com. Découvrez > pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] > > Reworks ARM's virtual memory allocation infrastructure to support > dynamic

Re: [PATCH 3/4] arm64: separate code and data virtual memory allocation

2024-02-21 Thread Christophe Leroy
Le 20/02/2024 à 21:32, Maxwell Bland a écrit : > [Vous ne recevez pas souvent de courriers de mbl...@motorola.com. Découvrez > pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] > > Current BPF and kprobe instruction allocation interfaces do not match > the base

Re: [PATCH 2/4] mm: pgalloc: support address-conditional pmd allocation

2024-02-21 Thread Christophe Leroy
Le 20/02/2024 à 21:32, Maxwell Bland a écrit : > [Vous ne recevez pas souvent de courriers de mbl...@motorola.com. Découvrez > pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] > > While other descriptors (e.g. pud) allow allocations conditional on > which virtual

Re: [PATCH 1/4] mm/vmalloc: allow arch-specific vmalloc_node overrides

2024-02-21 Thread Christophe Leroy
Le 20/02/2024 à 21:32, Maxwell Bland a écrit : > [Vous ne recevez pas souvent de courriers de mbl...@motorola.com. Découvrez > pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ] > > Present non-uniform use of __vmalloc_node and __vmalloc_node_range makes > enforcing

Re: [PATCH v4 01/11] dt-bindings: wiiu: Document the Nintendo Wii U devicetree

2024-02-20 Thread Christophe Leroy
Michael, Le 19/11/2022 à 12:30, Ash Logan a écrit : > Adds schema for the various Wii U devicetree nodes used. > > Signed-off-by: Ash Logan There's an issue at https://github.com/linuxppc/issues/issues/410 with kernel v6.4 as a target to merging thing, any plan ? It still applies without

Re: [PATCH v3] powerpc: macio: Make remove callback of macio driver void returned

2024-02-20 Thread Christophe Leroy
Hi Michael, ping ? Le 01/02/2023 à 15:36, Dawei Li a écrit : > Commit fc7a6209d571 ("bus: Make remove callback return void") forces > bus_type::remove be void-returned, it doesn't make much sense for any > bus based driver implementing remove callbalk to return non-void to > its caller. > >

Re: [PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure

2024-02-20 Thread Christophe Leroy
Le 20/02/2024 à 09:51, Christophe Leroy a écrit : > > > Le 19/12/2023 à 07:33, Michael Ellerman a écrit : >> Aneesh Kumar K.V writes: >>> Luming Yu writes: >>> >>>> Before we have powerpc to use the generic entry infrastructure, >>>>

Re: [PATCH v1 2/2] powerpc/debug: hook to user return notifier infrastructure

2024-02-20 Thread Christophe Leroy
Le 19/12/2023 à 07:33, Michael Ellerman a écrit : > Aneesh Kumar K.V writes: >> Luming Yu writes: >> >>> Before we have powerpc to use the generic entry infrastructure, >>> the call to fire user return notifier is made temporarily in powerpc >>> entry code. >>> >> >> It is still not clear what

Re: [PATCH v1 1/1] hvc_console: Allow backends to set I/O buffer size

2024-02-20 Thread Christophe Leroy
Hi, Le 15/01/2023 à 20:56, Geoff Levand a écrit : > To allow HVC backends to set the I/O buffer sizes to values that are most > efficient for the backend, change the macro definitions where the buffer sizes > are set to be conditional on whether or not the macros are already defined. > Also,

Re: [PATCH 4/4] Revert "powerpc/ps3_defconfig: Disable PPC64_BIG_ENDIAN_ELF_ABI_V2"

2024-02-20 Thread Christophe Leroy
Le 19/01/2024 à 11:27, Geoff Levand a écrit : > Patches provided by Nicholas Piggin enable PS3 > support for ELFv2. The said patches are https://patchwork.ozlabs.org/project/linuxppc-dev/cover/20231227072405.63751-1-npig...@gmail.com/ > > Signed-off-by: Geoff Levand > --- >

Re: [PATCH 0/4] powerpc/ps3 Add ELFv2 support

2024-02-20 Thread Christophe Leroy
Hi, Le 19/01/2024 à 11:27, Geoff Levand a écrit : > The following changes since commit 44a1aad2fe6c10bfe0589d8047057b10a4c18a19: > >Merge branch 'topic/ppc-kvm' into next (2023-12-29 15:30:45 +1100) > > are available in the Git repository at: > >

Re: [PATCH 02/12] powerpc/pseries: Restructure hvc_get_chars() endianness

2024-02-19 Thread Christophe Leroy
Michael ? Any reason for not picking that one ? Le 30/10/2023 à 14:16, Aneesh Kumar K.V a écrit : > Benjamin Gray writes: > >> Sparse reports an endian mismatch in hvc_get_chars(). >> >> At first it seemed like the retbuf should be __be64[], but actually >> retbuf holds serialized registers

Re: [PATCH 00/13] kmsan: Enable on powerpc

2024-02-19 Thread Christophe Leroy
Le 14/12/2023 à 06:55, Nicholas Miehlbradt a écrit : > This series provides the minimal support for Kernal Memory Sanitizer on > powerpc pseries le guests. Kernal Memory Sanitizer is a tool which detects > uses of uninitialized memory. Currently KMSAN is clang only. > > The clang support for

<    1   2   3   4   5   6   7   8   9   10   >