[PATCH 4/4] powerpc/64s/radix: combine final TLB flush and lazy tlb mm shootdown IPIs

2023-05-23 Thread Nicholas Piggin
This performs lazy tlb mm shootdown when doing the exit TLB flush when all mm users go away and user mappings are removed, which avoids having to do the lazy tlb mm shootdown IPIs on the final mmput when all kernel references disappear. powerpc/64s uses a broadcast TLBIE for the exit TLB flush if

[PATCH 3/4] powerpc: Add mm_cpumask warning when context switching

2023-05-23 Thread Nicholas Piggin
When context switching away from an mm, add a CONFIG_DEBUG_VM warning check to ensure this CPU is still set in the mask. This could catch bugs where the mask is improperly trimmed while the CPU is still using the mm. Signed-off-by: Nicholas Piggin --- arch/powerpc/mm/mmu_context.c | 7 +-- 1

[PATCH 2/4] powerpc/64s: Use dec_mm_active_cpus helper

2023-05-23 Thread Nicholas Piggin
Avoid open-coded atomic_dec on mm->context.active_cpus and use the function made for it. Add CONFIG_DEBUG_VM underflow checking on the counter. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/book3s/64/mmu.h | 2 +- arch/powerpc/include/asm/mmu_context.h | 1 + arch/powerpc/mm/book

[PATCH 1/4] powerpc: Account mm_cpumask and active_cpus in init_mm

2023-05-23 Thread Nicholas Piggin
init_mm mm_cpumask and context.active_cpus is not maintained at boot and hotplug. This seems to be harmless because init_mm does not have a userspace and so never gets user TLBs flushed, but it looks odd and it prevents some sanity checks being added. Signed-off-by: Nicholas Piggin --- arch/powe

[PATCH 0/4] powerpc: mm_cpumask cleanups and lazy tlb mm

2023-05-23 Thread Nicholas Piggin
In the process of doing patch 4, I found a few things we could improve and tighten up with mm_cpumask handling, so added those first. They're mostly just debugging, no real fixes or dependency on patch 4 there. Thanks, Nick Nicholas Piggin (4): powerpc: Account mm_cpumask and active_cpus in ini

[PATCH 2/2] lazy tlb: consolidate lazy tlb mm switching

2023-05-23 Thread Nicholas Piggin
Switching a kernel thread using a "lazy tlb mm" to init_mm is a relatively common sequence that is not quite trivial. Consolidate this into a function. This fixes a bug in do_shoot_lazy_tlb() for any arch that implements finish_arch_post_lock_switch(). None select MMU_LAZY_TLB_SHOOTDOWN at the mom

[PATCH 1/2] lazy tlb: fix hotplug exit race with MMU_LAZY_TLB_SHOOTDOWN

2023-05-23 Thread Nicholas Piggin
CPU unplug first calls __cpu_disable(), and that's where powerpc calls cleanup_cpu_mmu_context(), which clears this CPU from mm_cpumask() of all mms in the system. However this CPU may still be using a lazy tlb mm, and its mm_cpumask bit will be cleared from it. The CPU does not switch away from t

linux-next: boot failure after merge of the tip tree

2023-05-23 Thread Stephen Rothwell
Hi all, After merging the tip tree, today's linux-next build (powerpc pseries_le_defconfig) failed to boot like this: Built 1 zonelists, mobility grouping on. Total pages: 32736 Policy zone: Normal mem auto-init: stack:all(zero), heap alloc:off, heap free:off Memory: 2027392K/2097152K availa

Re: [PATCH v6 1/3] PCI/AER: Factor out interrupt toggling into helpers

2023-05-23 Thread Kai-Heng Feng
Hi Bjorn, On Fri, May 12, 2023 at 8:01 AM Kai-Heng Feng wrote: > > There are many places that enable and disable AER interrupt, so move > them into helpers. Do you think the series is good to be be merged now? Kai-Heng > > Reviewed-by: Mika Westerberg > Reviewed-by: Kuppuswamy Sathyanarayanan

Re: [PATCH 15/23] s390: allow pte_offset_map_lock() to fail

2023-05-23 Thread Hugh Dickins
On Tue, 23 May 2023, Claudio Imbrenda wrote: > > so if I understand the above correctly, pte_offset_map_lock will only > fail if the whole page table has disappeared, and in that case, it will > never reappear with zero pages, therefore we can safely skip (in that > case just break). if we were to

[powerpc:merge] BUILD SUCCESS 7b2f56d76feff3b494d6e77950ab97987323d3c5

2023-05-23 Thread kernel test robot
onfig-r022-20230522 gcc alpharandconfig-r034-20230521 gcc arc allyesconfig gcc arc defconfig gcc arc randconfig-r006-20230523 gcc arc randconfig-r014-20230521

Re: [PATCH] mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED

2023-05-23 Thread David Rientjes
On Tue, 23 May 2023, Vlastimil Babka wrote: > As discussed at LSF/MM [1] [2] and with no objections raised there, > deprecate the SLAB allocator. Rename the user-visible option so that > users with CONFIG_SLAB=y get a new prompt with explanation during make > oldconfig, while make olddefconfig wil

[PATCH v4 22/23] PCI/AER: Forward RCH downstream port-detected errors to the CXL.mem dev handler

2023-05-23 Thread Terry Bowman
From: Robert Richter In Restricted CXL Device (RCD) mode a CXL device is exposed as an RCiEP, but CXL downstream and upstream ports are not enumerated and not visible in the PCIe hierarchy. Protocol and link errors are sent to an RCEC. Restricted CXL host (RCH) downstream port-detected errors ar

[Bug 216715] kernel 6.1-rc5 + KASAN_OUTLINE fails to boot at very early stage when DEBUG_PAGEALLOC_ENABLE_DEFAULT is enabled (PowerMac G4 3,6)

2023-05-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216715 --- Comment #8 from Erhard F. (erhar...@mailbox.org) --- Created attachment 304311 --> https://bugzilla.kernel.org/attachment.cgi?id=304311&action=edit kernel .config (6.4-rc3, PowerMac G4 DP) -- You may reply to this email to add a comment.

[Bug 216715] kernel 6.1-rc5 + KASAN_OUTLINE fails to boot at very early stage when DEBUG_PAGEALLOC_ENABLE_DEFAULT is enabled (PowerMac G4 3,6)

2023-05-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=216715 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #303257|0 |1 is obsolete|

Re: [PATCH] macintosh: Switch i2c drivers back to use .probe()

2023-05-23 Thread Dmitry Torokhov
On Tue, May 23, 2023 at 09:50:53PM +0200, Uwe Kleine-König wrote: > After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() > call-back type"), all drivers being converted to .probe_new() and then > 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert > back to (the n

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

2023-05-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215389 --- Comment #39 from Erhard F. (erhar...@mailbox.org) --- No change with 6.4-rc4, only additional data "page_type: 0x()" is shown: [...] pagealloc: memory corruption 06fe3258: 00 00 00 00 CPU: 1 P

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

2023-05-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215389 --- Comment #38 from Erhard F. (erhar...@mailbox.org) --- Created attachment 304309 --> https://bugzilla.kernel.org/attachment.cgi?id=304309&action=edit kernel .config (6.3.3, PowerMac G4 DP) -- You may reply to this email to add a comment. Y

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

2023-05-23 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=215389 --- Comment #37 from Erhard F. (erhar...@mailbox.org) --- Created attachment 304308 --> https://bugzilla.kernel.org/attachment.cgi?id=304308&action=edit dmesg (6.3.3, KCSAN, PowerMac G4 DP) Thanks for taking another look into this Christophe!

[PATCH] macintosh: Switch i2c drivers back to use .probe()

2023-05-23 Thread Uwe Kleine-König
After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new() call-back type"), all drivers being converted to .probe_new() and then 03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert back to (the new) .probe() to be able to eventually drop .probe_new() from struct i2c_dr

Re: [PATCH v2 0/2] ASoC: do not include runtime_pm.h if not needed

2023-05-23 Thread Mark Brown
On Wed, 17 May 2023 12:49:01 +0300, Claudiu Beznea wrote: > Series removes the pm_runtime.h inclusion in files where > APIs exported though pm_runtime.h are not used. In case > of files that make use of pm.h which comes form pm_runtime.h > added patch 2/2. > > Changes were built with allmodconfig

Re: [PATCH] soc: fsl: qe: Replace all non-returning strlcpy with strscpy

2023-05-23 Thread Kees Cook
On Tue, May 23, 2023 at 02:14:25AM +, Azeem Shaikh wrote: > strlcpy() reads the entire source buffer first. > This read may exceed the destination size limit. > This is both inefficient and can lead to linear read > overflows if a source string is not NUL-terminated [1]. > In an effort to remov

Re: [PATCH v5 10/18] watchdog/hardlockup: Add a "cpu" param to watchdog_hardlockup_check()

2023-05-23 Thread Doug Anderson
Hi, On Tue, May 23, 2023 at 9:02 AM Petr Mladek wrote: > > On Fri 2023-05-19 10:18:34, Douglas Anderson wrote: > > In preparation for the buddy hardlockup detector where the CPU > > checking for lockup might not be the currently running CPU, add a > > "cpu" parameter to watchdog_hardlockup_check(

Re: [PATCH v5 10/18] watchdog/hardlockup: Add a "cpu" param to watchdog_hardlockup_check()

2023-05-23 Thread Petr Mladek
On Fri 2023-05-19 10:18:34, Douglas Anderson wrote: > In preparation for the buddy hardlockup detector where the CPU > checking for lockup might not be the currently running CPU, add a > "cpu" parameter to watchdog_hardlockup_check(). > > As part of this change, make hrtimer_interrupts an atomic_t

Re: [RFC PATCH] powerpc/ftrace: Refactoring and support for -fpatchable-function-entry

2023-05-23 Thread Steven Rostedt
On Sat, 20 May 2023 23:58:01 +0530 Naveen N Rao wrote: > > > > At the begining of ftrace_replace_code(), don't you miss: > > > > if (unlikely(ftrace_disabled)) > > return; > > ftrace_disabled is a static, so it can't be tested here. FWIW, x86 also > implements ftrace_replace

Re: [PATCH 15/23] s390: allow pte_offset_map_lock() to fail

2023-05-23 Thread Claudio Imbrenda
On Wed, 17 May 2023 14:50:28 -0700 (PDT) Hugh Dickins wrote: > On Wed, 17 May 2023, Claudio Imbrenda wrote: > > On Tue, 9 May 2023 22:01:16 -0700 (PDT) > > Hugh Dickins wrote: > > > > > In rare transient cases, not yet made possible, pte_offset_map() and > > > pte_offset_map_lock() may not fi

Re: [PATCH v5 08/18] watchdog/hardlockup: Move perf hardlockup checking/panic to common watchdog.c

2023-05-23 Thread Petr Mladek
On Fri 2023-05-19 10:18:32, Douglas Anderson wrote: > The perf hardlockup detector works by looking at interrupt counts and > seeing if they change from run to run. The interrupt counts are > managed by the common watchdog code via its watchdog_timer_fn(). > > Currently the API between the perf de

Re: [PATCH] mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED

2023-05-23 Thread Hyeonggon Yoo
On Tue, May 23, 2023 at 6:12 PM Vlastimil Babka wrote: > > As discussed at LSF/MM [1] [2] and with no objections raised there, > deprecate the SLAB allocator. Rename the user-visible option so that > users with CONFIG_SLAB=y get a new prompt with explanation during make > oldconfig, while make old

Re: [PATCH v5 06/18] watchdog/hardlockup: Add comments to touch_nmi_watchdog()

2023-05-23 Thread Petr Mladek
On Fri 2023-05-19 10:18:30, Douglas Anderson wrote: > In preparation for the buddy hardlockup detector, add comments to > touch_nmi_watchdog() to make it obvious that it touches the configured > hardlockup detector regardless of whether it's backed by an NMI. Also > note that arch_touch_nmi_watchdo

Re: [RFC PATCH] powerpc/ftrace: Refactoring and support for -fpatchable-function-entry

2023-05-23 Thread Naveen N Rao
Christophe Leroy wrote: That's better, but still more time than original implementation: +20% to activate function tracer (was +40% with your RFC) +21% to activate nop tracer (was +24% with your RFC) perf record (without strict kernel rwx) : 17.75% echo [kernel.kallsyms] [k] ftrac

Re: [PATCH v5 02/18] watchdog/perf: More properly prevent false positives with turbo modes

2023-05-23 Thread Petr Mladek
On Fri 2023-05-19 10:18:26, Douglas Anderson wrote: > Currently, in the watchdog_overflow_callback() we first check to see > if the watchdog had been touched and _then_ we handle the workaround > for turbo mode. This order should be reversed. > > Specifically, "touching" the hardlockup detector's

Re: [PATCH v2 2/2] serial: cpm_uart: Fix a COMPILE_TEST dependency

2023-05-23 Thread Herve Codina
On Tue, 23 May 2023 11:13:02 +0200 Jiri Slaby wrote: > On 23. 05. 23, 10:59, Herve Codina wrote: > > In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from > > the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is > > set. > > > > Without this dependency, the l

Re: [PATCH] mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED

2023-05-23 Thread Vlastimil Babka
On 5/23/23 11:22, Geert Uytterhoeven wrote: > Hi Vlastimil, > > Thanks for your patch! > > On Tue, May 23, 2023 at 11:12 AM Vlastimil Babka wrote: >> As discussed at LSF/MM [1] [2] and with no objections raised there, >> deprecate the SLAB allocator. Rename the user-visible option so that >> use

Re: [PATCH] mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED

2023-05-23 Thread Geert Uytterhoeven
Hi Vlastimil, Thanks for your patch! On Tue, May 23, 2023 at 11:12 AM Vlastimil Babka wrote: > As discussed at LSF/MM [1] [2] and with no objections raised there, > deprecate the SLAB allocator. Rename the user-visible option so that > users with CONFIG_SLAB=y get a new prompt with explanation d

Re: [PATCH v2 2/2] serial: cpm_uart: Fix a COMPILE_TEST dependency

2023-05-23 Thread Jiri Slaby
On 23. 05. 23, 10:59, Herve Codina wrote: In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set. Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that n

[PATCH] mm/slab: rename CONFIG_SLAB to CONFIG_SLAB_DEPRECATED

2023-05-23 Thread Vlastimil Babka
As discussed at LSF/MM [1] [2] and with no objections raised there, deprecate the SLAB allocator. Rename the user-visible option so that users with CONFIG_SLAB=y get a new prompt with explanation during make oldconfig, while make olddefconfig will just switch to SLUB. In all defconfigs with CONFIG

[PATCH v2 2/2] serial: cpm_uart: Fix a COMPILE_TEST dependency

2023-05-23 Thread Herve Codina
In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set. Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that needs SERIAL_CPM without enabling CPM2. This

[PATCH v2 0/2] Fix COMPILE_TEST dependencies for CPM uart, TSA and QMC

2023-05-23 Thread Herve Codina
This series fixes issues raised by the kernel test robot https://lore.kernel.org/oe-kbuild-all/202305160221.9xgweobz-...@intel.com/ In COMPILE_TEST configurations, TSA and QMC need CONFIG_CPM to be set in order to compile and CPM uart needs CONFIG_CPM2. Compare to the previous iteration http

[PATCH v2 1/2] soc: fsl: cpm1: Fix TSA and QMC dependencies in case of COMPILE_TEST

2023-05-23 Thread Herve Codina
In order to compile tsa.c and qmc.c, CONFIG_CPM must be set. Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configurations that need QMC without enabling CPM. Signed-off-by: Herve Codina Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild

Re: [PATCH 2/2] serial: cpm_uart: Fix a COMPILE_TEST dependency

2023-05-23 Thread Herve Codina
On Tue, 23 May 2023 09:52:00 +0200 Jiri Slaby wrote: > On 22. 05. 23, 10:20, Herve Codina wrote: > > In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from > > the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is > > set. > > > > Without this dependency, the l

Re: [PATCH 2/2] serial: cpm_uart: Fix a COMPILE_TEST dependency

2023-05-23 Thread Jiri Slaby
On 22. 05. 23, 10:20, Herve Codina wrote: In a COMPILE_TEST configuration, the cpm_uart driver uses symbols from the cpm_uart_cpm2.c file. This file is compiled only when CONFIG_CPM2 is set. Without this dependency, the linker fails with some missing symbols for COMPILE_TEST configuration that n

Re: [PATCH 0/2] Fix COMPILE_TEST dependencies for CPM uart, TSA and QMC

2023-05-23 Thread Jiri Slaby
On 22. 05. 23, 10:20, Herve Codina wrote: This series fixes issues raised by the kernel test robot https://lore.kernel.org/oe-kbuild-all/202305160221.9xgweobz-...@intel.com/ In COMPILE_TEST configurations, TSA and QMC need CONFIG_CPM to be set in order to compile and CPM uart needs CONFIG_CPM