[PATCH v18 5/6] powerpc/crash: add crash CPU hotplug support

2024-03-25 Thread Sourabh Jain
Due to CPU/Memory hotplug or online/offline events, the elfcorehdr (which describes the CPUs and memory of the crashed kernel) and FDT (Flattened Device Tree) of kdump image becomes outdated. Consequently, attempting dump collection with an outdated elfcorehdr or FDT can lead to failed or

[PATCH v18 3/6] powerpc/kexec: move *_memory_ranges functions to ranges.c

2024-03-25 Thread Sourabh Jain
Move the following functions form kexec/{file_load_64.c => ranges.c} and make them public so that components other than KEXEC_FILE can also use these functions. 1. get_exclude_memory_ranges 2. get_reserved_memory_ranges 3. get_crash_memory_ranges 4. get_usable_memory_ranges Later in the series

[PATCH v18 4/6] PowerPC/kexec: make the update_cpus_node() function public

2024-03-25 Thread Sourabh Jain
Move the update_cpus_node() from kexec/{file_load_64.c => core_64.c} to allow other kexec components to use it. Later in the series, this function is used for in-kernel updates to the kdump image during CPU/memory hotplug or online/offline events for both kexec_load and kexec_file_load syscalls.

[PATCH v18 2/6] crash: add a new kexec flag for hotplug support

2024-03-25 Thread Sourabh Jain
Commit a72bbec70da2 ("crash: hotplug support for kexec_load()") introduced a new kexec flag, `KEXEC_UPDATE_ELFCOREHDR`. Kexec tool uses this flag to indicate to the kernel that it is safe to modify the elfcorehdr of the kdump image loaded using the kexec_load system call. However, it is possible

[PATCH v18 0/6] powerpc/crash: Kernel handling of CPU and memory hotplug

2024-03-25 Thread Sourabh Jain
Commit 247262756121 ("crash: add generic infrastructure for crash hotplug support") added a generic infrastructure that allows architectures to selectively update the kdump image component during CPU or memory add/remove events within the kernel itself. This patch series adds crash hotplug

[PATCH v18 1/6] crash: forward memory_notify arg to arch crash hotplug handler

2024-03-25 Thread Sourabh Jain
In the event of memory hotplug or online/offline events, the crash memory hotplug notifier `crash_memhp_notifier()` receives a `memory_notify` object but doesn't forward that object to the generic and architecture-specific crash hotplug handler. The `memory_notify` object contains the starting

Re: [PATCH v2 05/14] drm: Suppress intentional warning backtraces in scaling unit tests

2024-03-25 Thread Guenter Roeck
On 3/25/24 18:09, Maíra Canal wrote: On 3/25/24 16:24, Guenter Roeck wrote: Hi, On Mon, Mar 25, 2024 at 04:05:06PM -0300, Maíra Canal wrote: Hi Guenter, On 3/25/24 14:52, Guenter Roeck wrote: The drm_test_rect_calc_hscale and drm_test_rect_calc_vscale unit tests intentionally trigger

Re: [RFC PATCH 3/3] pseries/iommu: Enable DDW for VFIO TCE create

2024-03-25 Thread Shivaprasad G Bhat
Hi Michael, On 3/13/24 18:23, Michael Ellerman wrote: Hi Shivaprasad, Shivaprasad G Bhat writes: The commit 9d67c9433509 ("powerpc/iommu: Add \"borrowing\" iommu_table_group_ops") implemented the "borrow" mechanism for the pSeries SPAPR TCE. It did implement this support partially that it

Re: [PATCH] powerpc: align memory_limit to 16MB in early_parse_mem

2024-03-25 Thread Joel Savitz
On Fri, Mar 8, 2024 at 5:18 AM Aneesh Kumar K.V wrote: > > Joel Savitz writes: > > > On 64-bit powerpc, usage of a non-16MB-aligned value for the mem= kernel > > cmdline parameter results in a system hang at boot. > > > > For example, using 'mem=4198400K' will always reproduce this issue. > > >

[PATCH v1] powerpc: Error on assembly warnings

2024-03-25 Thread Benjamin Gray
We currently enable -Werror on the arch/powerpc subtree. However this only catches C warnings. Assembly warnings are logged, but the make invocation will still succeed. This can allow incorrect syntax such as ori r3, r4, r5 to be compiled without catching that the assembler is treating r5 as

[PATCH v4 09/14] powerpc: Use initializer for struct vm_unmapped_area_info

2024-03-25 Thread Rick Edgecombe
Future changes will need to add a new member to struct vm_unmapped_area_info. This would cause trouble for any call site that doesn't initialize the struct. Currently every caller sets each member manually, so if new members are added they will be uninitialized and the core code parsing the struct

Re: [PATCHv3 pci-next 1/2] PCI/AER: correctable error message as KERN_INFO

2024-03-25 Thread Ethan Zhao
On 3/25/2024 6:15 PM, Xi Ruoyao wrote: On Mon, 2024-03-25 at 16:45 +0800, Ethan Zhao wrote: On 3/25/2024 1:19 AM, Xi Ruoyao wrote: On Mon, 2023-09-18 at 14:39 -0500, Bjorn Helgaas wrote: On Mon, Sep 18, 2023 at 07:42:30PM +0800, Xi Ruoyao wrote: ... My workstation suffers from too much

Re: [PATCH v2 05/14] drm: Suppress intentional warning backtraces in scaling unit tests

2024-03-25 Thread Maíra Canal
On 3/25/24 16:24, Guenter Roeck wrote: Hi, On Mon, Mar 25, 2024 at 04:05:06PM -0300, Maíra Canal wrote: Hi Guenter, On 3/25/24 14:52, Guenter Roeck wrote: The drm_test_rect_calc_hscale and drm_test_rect_calc_vscale unit tests intentionally trigger warning backtraces by providing bad

Re: [PATCH 00/64] i2c: reword i2c_algorithm according to newest specification

2024-03-25 Thread Andi Shyti
Hi Wolfram, > > @Andi: are you okay with this approach? It means you'd need to merge > > -rc2 into your for-next branch. Or rebase if all fails. > > I think it's a good plan, I'll try to support you with it. Do you feel more comfortable if I take the patches as soon as they are reviewd? So far

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

2024-03-25 Thread Benjamin Gray
The new open/close abstraction makes it more difficult for a compiler to optimise. This causes 10% worse performance on ppc32 as in [1]. Restoring the page alignment mask and inlining the helpers allows the compiler to better reason about the address alignment, allowing more optimised cache

[PATCH v2 1/3] powerpc/code-patching: Introduce open_patch_window()/close_patch_window()

2024-03-25 Thread Benjamin Gray
The code patching capabilities have grown, and the specific quirks for setting up and tearing down the patching window are getting duplicated. This commit introduces an abstraction for working with this patching window. It defines open_patch_window() to set up the writable alias page, and

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

2024-03-25 Thread Benjamin Gray
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(), and consumers no longer need to worry about synchronization

Re: [PATCH v2 05/14] drm: Suppress intentional warning backtraces in scaling unit tests

2024-03-25 Thread Maíra Canal
Hi Guenter, On 3/25/24 14:52, Guenter Roeck wrote: The drm_test_rect_calc_hscale and drm_test_rect_calc_vscale unit tests intentionally trigger warning backtraces by providing bad parameters to the tested functions. What is tested is the return value, not the existence of a warning backtrace.

Re: [PATCHv3 pci-next 1/2] PCI/AER: correctable error message as KERN_INFO

2024-03-25 Thread Xi Ruoyao
On Mon, 2024-03-25 at 18:15 +0800, Xi Ruoyao wrote: > On Mon, 2024-03-25 at 16:45 +0800, Ethan Zhao wrote: > > On 3/25/2024 1:19 AM, Xi Ruoyao wrote: > > > On Mon, 2023-09-18 at 14:39 -0500, Bjorn Helgaas wrote: > > > > On Mon, Sep 18, 2023 at 07:42:30PM +0800, Xi Ruoyao wrote: > > > > > ... > > >

Re: Appropriate liburcu cache line size for Power

2024-03-25 Thread Segher Boessenkool
On Mon, Mar 25, 2024 at 03:34:30PM -0500, Nathan Lynch wrote: > Mathieu Desnoyers writes: > For what it's worth, I found a copy of an IBM Journal of Research & > Development article confirming that POWER5's L3 had a 256-byte line > size: > > Each slice [of the L3] is 12-way set-associative,

[PATCH][next] crypto/nx: Avoid potential -Wflex-array-member-not-at-end warning

2024-03-25 Thread Gustavo A. R. Silva
-Wflex-array-member-not-at-end is coming in GCC-14, and we are getting ready to enable it globally. Use the `__struct_group()` helper to separate the flexible array from the rest of the members in flexible `struct nx842_crypto_header`, through tagged `struct nx842_crypto_header_hdr`, and avoid

Re: Appropriate liburcu cache line size for Power

2024-03-25 Thread Nathan Lynch
Mathieu Desnoyers writes: > In the powerpc architecture support within the liburcu project [1] > we have a cache line size defined as 256 bytes with the following > comment: > > /* Include size of POWER5+ L3 cache lines: 256 bytes */ > #define CAA_CACHE_LINE_SIZE 256 > > I recently received a

Re: [PATCH v2 05/14] drm: Suppress intentional warning backtraces in scaling unit tests

2024-03-25 Thread Guenter Roeck
Hi, On Mon, Mar 25, 2024 at 04:05:06PM -0300, Maíra Canal wrote: > Hi Guenter, > > On 3/25/24 14:52, Guenter Roeck wrote: > > The drm_test_rect_calc_hscale and drm_test_rect_calc_vscale unit tests > > intentionally trigger warning backtraces by providing bad parameters to > > the tested

[PATCH v1 1/1] ASoC: fsl: imx-es8328: Remove leftover gpio initialisation

2024-03-25 Thread Andy Shevchenko
The gpio field is not used anymore, remove the leftover. This also fixes the compilation error after the ... Fixes: 9855f05e5536 ("ASoC: fsl: imx-es8328: Switch to using gpiod API") Signed-off-by: Andy Shevchenko --- sound/soc/fsl/imx-es8328.c | 1 - 1 file changed, 1 deletion(-) diff --git

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 entry when pagesize is 8M.

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

2024-03-25 Thread Peter Xu
On Fri, Mar 22, 2024 at 01:10:00PM -0300, Jason Gunthorpe wrote: > On Thu, Mar 21, 2024 at 06:07:50PM -0400, pet...@redhat.com wrote: > > From: Peter Xu > > > > v3: > > - Rebased to latest mm-unstalbe (a824831a082f, of March 21th) > > - Dropped patch to introduce pmd_thp_or_huge(), replace such

Re: [PATCH V2 00/19] timekeeping: Handle potential multiplication overflow

2024-03-25 Thread Arnd Bergmann
On Mon, Mar 25, 2024, at 07:40, Adrian Hunter wrote: > > Extend the facility also to VDSO, dependent on new config option > GENERIC_VDSO_OVERFLOW_PROTECT which is selected by x86 only, so other > architectures are not affected. The result is a calculation that has > similar performance as before.

[PATCH v2 14/14] powerpc: Add support for suppressing warning backtraces

2024-03-25 Thread Guenter Roeck
Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACKTRACE and

[PATCH v2 13/14] riscv: Add support for suppressing warning backtraces

2024-03-25 Thread Guenter Roeck
Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACKTRACE and

[PATCH v2 12/14] sh: Add support for suppressing warning backtraces

2024-03-25 Thread Guenter Roeck
Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACKTRACE and

[PATCH v2 11/14] s390: Add support for suppressing warning backtraces

2024-03-25 Thread Guenter Roeck
Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACKTRACE and

[PATCH v2 10/14] parisc: Add support for suppressing warning backtraces

2024-03-25 Thread Guenter Roeck
Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACKTRACE and

[PATCH v2 09/14] loongarch: Add support for suppressing warning backtraces

2024-03-25 Thread Guenter Roeck
Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACKTRACE and

[PATCH v2 08/14] arm64: Add support for suppressing warning backtraces

2024-03-25 Thread Guenter Roeck
Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACKTRACE and

[PATCH v2 07/14] x86: Add support for suppressing warning backtraces

2024-03-25 Thread Guenter Roeck
Add name of functions triggering warning backtraces to the __bug_table object section to enable support for suppressing WARNING backtraces. To limit image size impact, the pointer to the function name is only added to the __bug_table section if both CONFIG_KUNIT_SUPPRESS_BACKTRACE and

[PATCH v2 06/14] net: kunit: Suppress lock warning noise at end of dev_addr_lists tests

2024-03-25 Thread Guenter Roeck
dev_addr_lists_test generates lock warning noise at the end of tests if lock debugging is enabled. There are two sets of warnings. WARNING: CPU: 0 PID: 689 at kernel/locking/mutex.c:923 __mutex_unlock_slowpath.constprop.0+0x13c/0x368 DEBUG_LOCKS_WARN_ON(__owner_task(owner) != __get_current())

[PATCH v2 05/14] drm: Suppress intentional warning backtraces in scaling unit tests

2024-03-25 Thread Guenter Roeck
The drm_test_rect_calc_hscale and drm_test_rect_calc_vscale unit tests intentionally trigger warning backtraces by providing bad parameters to the tested functions. What is tested is the return value, not the existence of a warning backtrace. Suppress the backtraces to avoid clogging the kernel

[PATCH v2 04/14] kunit: Add documentation for warning backtrace suppression API

2024-03-25 Thread Guenter Roeck
Document API functions for suppressing warning backtraces. Tested-by: Linux Kernel Functional Testing Acked-by: Dan Carpenter Reviewed-by: Kees Cook Signed-off-by: Guenter Roeck --- - Rebased to v6.9-rc1 - Added Tested-by:, Acked-by:, and Reviewed-by: tags

[PATCH v2 03/14] kunit: Add test cases for backtrace warning suppression

2024-03-25 Thread Guenter Roeck
Add unit tests to verify that warning backtrace suppression works. If backtrace suppression does _not_ work, the unit tests will likely trigger unsuppressed backtraces, which should actually help to get the affected architectures / platforms fixed. Tested-by: Linux Kernel Functional Testing

[PATCH v2 02/14] kunit: bug: Count suppressed warning backtraces

2024-03-25 Thread Guenter Roeck
Count suppressed warning backtraces to enable code which suppresses warning backtraces to check if the expected backtrace(s) have been observed. Using atomics for the backtrace count resulted in build errors on some architectures due to include file recursion, so use a plain integer for now.

[PATCH v2 01/14] bug/kunit: Core support for suppressing warning backtraces

2024-03-25 Thread Guenter Roeck
Some unit tests intentionally trigger warning backtraces by passing bad parameters to API functions. Such unit tests typically check the return value from those calls, not the existence of the warning backtrace. Such intentionally generated warning backtraces are neither desirable nor useful for

[PATCH v2 00/14] Add support for suppressing warning backtraces

2024-03-25 Thread Guenter Roeck
Some unit tests intentionally trigger warning backtraces by passing bad parameters to kernel API functions. Such unit tests typically check the return value from such calls, not the existence of the warning backtrace. Such intentionally generated warning backtraces are neither desirable nor

Re: [PATCH v2 1/1] ASoC: fsl: imx-es8328: Switch to using gpiod API

2024-03-25 Thread Mark Brown
On Mon, 18 Mar 2024 22:07:56 +0200, Andy Shevchenko wrote: > This updates the driver to gpiod API, and removes yet another use of > of_get_named_gpio(). > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: fsl: imx-es8328: Switch to

Re: [PATCH 1/1] ASoC: fsl: fsl_ssi: Add dev_err_probe if PCM DMA init fails

2024-03-25 Thread Mark Brown
On Thu, 14 Mar 2024 15:16:42 +0100, Alexander Stein wrote: > This happens especially if this driver is built-in, but SDMA driver > is configured as module. > > Applied to https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next Thanks! [1/1] ASoC: fsl: fsl_ssi: Add

Re: [PATCH v2 1/1] ASoC: fsl: imx-es8328: Switch to using gpiod API

2024-03-25 Thread Andy Shevchenko
On Mon, Mar 18, 2024 at 10:07:56PM +0200, Andy Shevchenko wrote: > This updates the driver to gpiod API, and removes yet another use of > of_get_named_gpio(). This also needs a leftover removal. :-( -- With Best Regards, Andy Shevchenko

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

2024-03-25 Thread Jason Gunthorpe
On Mon, Mar 25, 2024 at 03:55:53PM +0100, Christophe Leroy wrote: > This series reimplements hugepages with hugepd on powerpc 8xx. > > Unlike most architectures, powerpc 8xx HW requires a two-level > pagetable topology for all page sizes. So a leaf PMD-contig approach > is not feasible as such. >

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

2024-03-25 Thread Jason Gunthorpe
On Mon, Mar 25, 2024 at 03:55:57PM +0100, Christophe Leroy wrote: > arch/arm64/include/asm/hugetlb.h | 2 +- > fs/hugetlbfs/inode.c | 2 +- > fs/proc/task_mmu.c | 8 +++--- > fs/userfaultfd.c | 2 +- > include/asm-generic/hugetlb.h| 2 +- >

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

2024-03-25 Thread Jason Gunthorpe
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 entry when pagesize is 8M. > > To fit with Linux page table topology and without

Re: [kvm-unit-tests PATCH v7 06/35] gitlab-ci: Run migration selftest on s390x and powerpc

2024-03-25 Thread Thomas Huth
On 19/03/2024 08.58, Nicholas Piggin wrote: The migration harness is complicated and easy to break so CI will be helpful. Signed-off-by: Nicholas Piggin --- .gitlab-ci.yml | 18 +++--- s390x/unittests.cfg | 8 2 files changed, 19 insertions(+), 7 deletions(-)

Re: [kvm-unit-tests PATCH v7 01/35] arch-run: Add functions to help handle migration directives from test

2024-03-25 Thread Thomas Huth
On 19/03/2024 08.58, Nicholas Piggin wrote: The migration harness will be expanded to deal with more commands from the test, moving these checks into functions helps keep things managable. Signed-off-by: Nicholas Piggin --- scripts/arch-run.bash | 20 +++- 1 file changed, 15

[PATCH v2 6/6] mm/mm_init.c: remove arch_reserved_kernel_pages()

2024-03-25 Thread Baoquan He
Since the current calculation of calc_nr_kernel_pages() has taken into consideration of kernel reserved memory, no need to have arch_reserved_kernel_pages() any more. Signed-off-by: Baoquan He --- arch/powerpc/include/asm/mmu.h | 4 arch/powerpc/kernel/fadump.c | 5 -

[PATCH v2 5/6] mm/mm_init.c: remove unneeded calc_memmap_size()

2024-03-25 Thread Baoquan He
Nobody calls calc_memmap_size() now. Signed-off-by: Baoquan He --- mm/mm_init.c | 20 1 file changed, 20 deletions(-) diff --git a/mm/mm_init.c b/mm/mm_init.c index 7f71e56e83f3..e269a724f70e 100644 --- a/mm/mm_init.c +++ b/mm/mm_init.c @@ -1331,26 +1331,6 @@ static void

[PATCH v2 4/6] mm/mm_init.c: remove meaningless calculation of zone->managed_pages in free_area_init_core()

2024-03-25 Thread Baoquan He
Currently, in free_area_init_core(), when initialize zone's field, a rough value is set to zone->managed_pages. That value is calculated by (zone->present_pages - memmap_pages). In the meantime, add the value to nr_all_pages and nr_kernel_pages which represent all free pages of system (only low

[PATCH v2 3/6] mm/mm_init.c: add new function calc_nr_all_pages()

2024-03-25 Thread Baoquan He
This is a preparation to calculate nr_kernel_pages and nr_all_pages, both of which will be used later in alloc_large_system_hash(). nr_all_pages counts up all free but not reserved memory in memblock allocator, including HIGHMEM memory. While nr_kernel_pages counts up all free but not reserved

[PATCH v2 2/6] mm/mm_init.c: remove the useless dma_reserve

2024-03-25 Thread Baoquan He
Now nobody calls set_dma_reserve() to set value for dma_reserve, remove set_dma_reserve(), global variable dma_reserve and the codes using it. Signed-off-by: Baoquan He --- include/linux/mm.h | 1 - mm/mm_init.c | 23 --- 2 files changed, 24 deletions(-) diff --git

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

2024-03-25 Thread Christophe Leroy
In order to fit better with standard Linux page tables layout, add support for 8M pages using contiguous PTE entries in a standard page table. Page tables will then be populated with 1024 similar entries and two PMD entries will point to that page table. The PMD entries also get a flag to tell it

[PATCH v2 1/6] x86: remove unneeded memblock_find_dma_reserve()

2024-03-25 Thread Baoquan He
Variable dma_reserve and its usage was introduced in commit 0e0b864e069c ("[PATCH] Account for memmap and optionally the kernel image as holes"). Its original purpose was to accounting for the reserved pages in DMA zone to make DMA zone's watermarks calculation more accurate on x86. However,

[PATCH v2 0/6] mm/mm_init.c: refactor free_area_init_core()

2024-03-25 Thread Baoquan He
In function free_area_init_core(), the code calculating zone->managed_pages and the subtracting dma_reserve from DMA zone looks very confusing. >From git history, the code calculating zone->managed_pages was for zone->present_pages originally. The early rough assignment is for optimize zone's pcp

[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 ++- 1 file

[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 +---

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

2024-03-25 Thread Christophe Leroy
On powerpc 8xx huge_ptep_get() will need to know whether the given ptep is a PTE entry or a PMD entry. This cannot be known with the PMD entry itself because there is no easy way to know it from the content of the entry. So huge_ptep_get() will need to know either the size of the page or get the

[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 +-

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

2024-03-25 Thread Christophe Leroy
Unlike many architectures, powerpc 8xx hardware tablewalk requires a two level process for all page sizes, allthough second level only has one entry when pagesize is 8M. To fit with Linux page table topology and without requiring special page directory layout like hugepd, the page entry will be

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

2024-03-25 Thread Christophe Leroy
This series reimplements hugepages with hugepd on powerpc 8xx. Unlike most architectures, powerpc 8xx HW requires a two-level pagetable topology for all page sizes. So a leaf PMD-contig approach is not feasible as such. Possible sizes are 4k, 16k, 512k and 8M. First level (PGD/PMD) covers 4M

Re: [PATCH v10 8/8] PCI: dwc: ep: Remove "core_init_notifier" flag

2024-03-25 Thread Manivannan Sadhasivam
On Fri, Mar 22, 2024 at 12:53:50PM +0100, Niklas Cassel wrote: > On Thu, Mar 14, 2024 at 01:18:06PM +0530, Manivannan Sadhasivam wrote: > > "core_init_notifier" flag is set by the glue drivers requiring refclk from > > the host to complete the DWC core initialization. Also, those drivers will > >

Re: [PATCHv3 pci-next 1/2] PCI/AER: correctable error message as KERN_INFO

2024-03-25 Thread Ethan Zhao
On 3/25/2024 1:19 AM, Xi Ruoyao wrote: On Mon, 2023-09-18 at 14:39 -0500, Bjorn Helgaas wrote: On Mon, Sep 18, 2023 at 07:42:30PM +0800, Xi Ruoyao wrote: ... My workstation suffers from too much correctable AER reporting as well (related to Intel's errata "RPL013: Incorrectly Formed PCIe

[FSL P50x0] Kernel 6.9-rc1 compiling issue

2024-03-25 Thread Christian Zigotzky
Configured: CONFIG_VMCORE_INFO=y # CONFIG_CRASH_DUMP is not set CONFIG_KEXEC_CORE=y PowerPC updates 6.9-2: -#ifdef CONFIG_VMCORE_INFO +#ifdef CONFIG_CRASH_DUMP  /* This keeps a track of which one is the crashing cpu. */  int crashing_cpu = -1;  #endif - int crashing_cpu = -1; was

[PATCH v2 2/2] dt-bindings: timer: narrow regex for unit address to hex numbers

2024-03-25 Thread Krzysztof Kozlowski
Regular expression used to match the unit address part should not allow non-hex numbers. Expect at least one hex digit as well. Acked-by: Rob Herring Signed-off-by: Krzysztof Kozlowski --- v2: Change '*' into '+' in the regex. --- .../devicetree/bindings/timer/arm,arch_timer_mmio.yaml

[PATCH v2 1/2] dt-bindings: soc: fsl: narrow regex for unit address to hex numbers

2024-03-25 Thread Krzysztof Kozlowski
Regular expression used to match the unit address part should not allow non-hex numbers. Acked-by: Rob Herring Signed-off-by: Krzysztof Kozlowski --- v2: No changes --- .../devicetree/bindings/soc/fsl/fsl,layerscape-dcfg.yaml| 2 +-

Re: [PATCHv3 pci-next 1/2] PCI/AER: correctable error message as KERN_INFO

2024-03-25 Thread Xi Ruoyao
On Mon, 2024-03-25 at 16:45 +0800, Ethan Zhao wrote: > On 3/25/2024 1:19 AM, Xi Ruoyao wrote: > > On Mon, 2023-09-18 at 14:39 -0500, Bjorn Helgaas wrote: > > > On Mon, Sep 18, 2023 at 07:42:30PM +0800, Xi Ruoyao wrote: > > > > ... > > > > My workstation suffers from too much correctable AER

Re: [PATCH linux-next v3 02/14] crash: split vmcoreinfo exporting code out from crash_core.c

2024-03-25 Thread Baoquan He
On 03/25/24 at 09:24am, Geert Uytterhoeven wrote: > Hi Baoquan, > > On Wed, Jan 24, 2024 at 6:13 AM Baoquan He wrote: > > Now move the relevant codes into separate files: > > kernel/crash_reserve.c, include/linux/crash_reserve.h. > > > > And add config item CRASH_RESERVE to control its enabling.

Re: [PATCHv12 4/4] watchdog/softlockup: report the most frequent interrupts

2024-03-25 Thread Bitao Hu
Hi, Thomas On 2024/3/24 04:43, Thomas Gleixner wrote: On Wed, Mar 06 2024 at 20:52, Bitao Hu wrote: + if (__this_cpu_read(snapshot_taken)) { + for_each_active_irq(i) { + count = kstat_get_irq_since_snapshot(i); +

[FSL P50x0] Kernel 6.9-rc1 compiling issue

2024-03-25 Thread Christian Zigotzky
We have configured (kernel config): # CONFIG_CRASH_DUMP is not set CONFIG_KEXEC_CORE=y Link: https://github.com/chzigotzky/kernels/blob/main/configs/x5000_defconfig Compiling error: arch/powerpc/platforms/85xx/smp.c: In function 'mpc85xx_smp_kexec_cpu_down':

Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-25 Thread Jarkko Nikula
On 3/22/24 3:25 PM, Wolfram Sang wrote: Match the wording in i2c_algorithm in I2C drivers wrt. the newest I2C v7, SMBus 3.2, I3C specifications and replace "master/slave" with more appropriate terms. For some drivers, this means no more conversions are needed. For the others more work needs to

Re: [PATCH 64/64] i2c: reword i2c_algorithm in drivers according to newest specification

2024-03-25 Thread Oleksij Rempel
On Fri, Mar 22, 2024 at 02:25:57PM +0100, Wolfram Sang wrote: > Match the wording in i2c_algorithm in I2C drivers wrt. the newest I2C > v7, SMBus 3.2, I3C specifications and replace "master/slave" with more > appropriate terms. For some drivers, this means no more conversions are > needed. For the

Re: [ppc64le] Boot failure kernel BUG at mm/usercopy.c:102!

2024-03-25 Thread Dawei Li
Hi Sachin, Sorry for the mess. On Mon, Mar 25, 2024 at 12:08:35PM +0530, Sachin Sant wrote: > Today’s next (6.9.0-rc1-next-20240325) fails to boot on powerpc: > > [ 1.955512] usercopy: Kernel memory exposure attempt detected from SLUB > object 'cpumask' (offset 0, size 16)!

Re: [PATCH linux-next v3 02/14] crash: split vmcoreinfo exporting code out from crash_core.c

2024-03-25 Thread Geert Uytterhoeven
Hi Baoquan, On Wed, Jan 24, 2024 at 6:13 AM Baoquan He wrote: > Now move the relevant codes into separate files: > kernel/crash_reserve.c, include/linux/crash_reserve.h. > > And add config item CRASH_RESERVE to control its enabling. > > And also update the old ifdeffery of CONFIG_CRASH_CORE,

[FSL P50x0] Kernel 6.9-rc1 compiling issue

2024-03-25 Thread Christian Zigotzky
Thanks a lot for the hint. Could you please add #include to arch/powerpc/platforms/85xx/smp.c for the next PowerPC fixes? Christian On 25 March 2024 at 07:43 am, Christophe Leroy wrote: Hi, Le 25/03/2024 à 06:18, Christian Zigotzky a écrit : I have created a patch: ---

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

[PATCH V2 19/19] clocksource: Make watchdog and suspend-timing multiplication overflow safe

2024-03-25 Thread Adrian Hunter
Kernel timekeeping is designed to keep the change in cycles (since the last timer interrupt) below max_cycles, which prevents multiplication overflow when converting cycles to nanoseconds. However, if timer interrupts stop, the clocksource_cyc2ns() calculation will eventually overflow. Add

[PATCH V2 18/19] timekeeping: Let timekeeping_cycles_to_ns() handle both under and overflow

2024-03-25 Thread Adrian Hunter
For the case !CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE, forego overflow protection in the range (mask << 1) < delta <= mask, and interpret it always as an inconsistency between CPU clock values. That allows slightly neater code, and it is on a slow path so has no effect on performance.

[PATCH V2 17/19] timekeeping: Make delta calculation overflow safe

2024-03-25 Thread Adrian Hunter
Kernel timekeeping is designed to keep the change in cycles (since the last timer interrupt) below max_cycles, which prevents multiplication overflow when converting cycles to nanoseconds. However, if timer interrupts stop, the calculation will eventually overflow. Add protection against that. In

[PATCH V2 16/19] timekeeping: Prepare timekeeping_cycles_to_ns() for overflow safety

2024-03-25 Thread Adrian Hunter
Open code clocksource_delta() in timekeeping_cycles_to_ns() so that overflow safety can be added efficiently. Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- kernel/time/timekeeping.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git

[PATCH V2 15/19] timekeeping: Fold in timekeeping_delta_to_ns()

2024-03-25 Thread Adrian Hunter
timekeeping_delta_to_ns() is now called only from timekeeping_cycles_to_ns(), and it is not useful otherwise. Simplify by folding it into timekeeping_cycles_to_ns(). Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- kernel/time/timekeeping.c | 13 + 1 file changed, 1

[PATCH V2 14/19] timekeeping: Consolidate timekeeping helpers

2024-03-25 Thread Adrian Hunter
Consolidate timekeeping helpers, making use of timekeeping_cycles_to_ns() in preference to directly using timekeeping_delta_to_ns(). Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- kernel/time/timekeeping.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-)

[PATCH V2 13/19] timekeeping: Refactor timekeeping helpers

2024-03-25 Thread Adrian Hunter
Simplify use of timekeeping sanity checking, in preparation for consolidating timekeeping helpers. This works towards eliminating timekeeping_delta_to_ns() in favour of timekeeping_cycles_to_ns(). Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- kernel/time/timekeeping.c | 20

[PATCH V2 12/19] timekeeping: Reuse timekeeping_cycles_to_ns()

2024-03-25 Thread Adrian Hunter
Simplify __timekeeping_get_ns() by reusing timekeeping_cycles_to_ns(). Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- kernel/time/timekeeping.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c index

[PATCH V2 11/19] timekeeping: Tidy timekeeping_cycles_to_ns() slightly

2024-03-25 Thread Adrian Hunter
Put together declaration and initialization of the local variable 'delta'. Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- kernel/time/timekeeping.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c

[PATCH V2 10/19] timekeeping: Rename fast_tk_get_delta_ns() to __timekeeping_get_ns()

2024-03-25 Thread Adrian Hunter
Rename fast_tk_get_delta_ns() to __timekeeping_get_ns() to prepare for its reuse as a general timekeeping helper function. Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- kernel/time/timekeeping.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH V2 09/19] timekeeping: Move timekeeping helper functions

2024-03-25 Thread Adrian Hunter
Move timekeeping helper functions to prepare for their reuse. Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- kernel/time/timekeeping.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/kernel/time/timekeeping.c

[PATCH V2 08/19] x86/vdso: Make delta calculation overflow safe

2024-03-25 Thread Adrian Hunter
Kernel timekeeping is designed to keep the change in cycles (since the last timer interrupt) below max_cycles, which prevents multiplication overflow when converting cycles to nanoseconds. However, if timer interrupts stop, the calculation will eventually overflow. Add protection against that.

[PATCH V2 07/19] vdso: Make delta calculation overflow safe

2024-03-25 Thread Adrian Hunter
Kernel timekeeping is designed to keep the change in cycles (since the last timer interrupt) below max_cycles, which prevents multiplication overflow when converting cycles to nanoseconds. However, if timer interrupts stop, the calculation will eventually overflow. Add protection against that,

[PATCH V2 06/19] vdso: Add vdso_data::max_cycles

2024-03-25 Thread Adrian Hunter
Add vdso_data::max_cycles in preparation to use it to detect potential multiplication overflow. Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- include/vdso/datapage.h | 4 kernel/time/vsyscall.c | 6 ++ 2 files changed, 10 insertions(+) diff --git

[PATCH V2 05/19] vdso: math64: Provide mul_u64_u32_add_u64_shr()

2024-03-25 Thread Adrian Hunter
Provide mul_u64_u32_add_u64_shr() which is a calculation that will be used by timekeeping and VDSO. Place #include after #include to allow architecture-specific overrides, at least for the kernel. Signed-off-by: Adrian Hunter --- include/linux/math64.h | 2 +- include/vdso/math64.h | 38

[PATCH V2 04/19] math64: Tidy mul_u64_u32_shr()

2024-03-25 Thread Adrian Hunter
Put together declaration and initialization of local variables. Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- include/linux/math64.h | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/include/linux/math64.h b/include/linux/math64.h index

[PATCH V2 03/19] vdso: Add CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT

2024-03-25 Thread Adrian Hunter
Add CONFIG_GENERIC_VDSO_OVERFLOW_PROTECT in preparation to add multiplication overflow protection to the VDSO time getter functions. Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- lib/vdso/Kconfig | 7 +++ 1 file changed, 7 insertions(+) diff --git a/lib/vdso/Kconfig

[PATCH V2 02/19] vdso: Consolidate nanoseconds calculation

2024-03-25 Thread Adrian Hunter
Consolidate nanoseconds calculation to simplify and reduce code duplication. Suggested-by: Thomas Gleixner Signed-off-by: Adrian Hunter --- Changes in V2: Adjusted due to changes in "vdso: Consolidate vdso_calc_delta()" arch/x86/include/asm/vdso/gettimeofday.h | 17 +

  1   2   >