Re: [PATCH 11/13] powerpc/rtas: strengthen do_enter_rtas() type safety, drop inline

2022-11-22 Thread Andrew Donnellan
On Fri, 2022-11-18 at 09:07 -0600, Nathan Lynch wrote: > Make do_enter_rtas() take a pointer to struct rtas_args and do the > __pa() conversion in one place instead of leaving it to callers. This > also makes it possible to introduce enter/exit tracepoints that > access > the rtas_args struct field

[PATCH -next] fbdev: offb: allow build when DRM_OFDRM=m

2022-11-22 Thread Randy Dunlap
Fix build when CONFIG_FB_OF=y and CONFIG_DRM_OFDRM=m. When the latter symbol is =m, kconfig downgrades (limits) the 'select's under FB_OF to modular (=m). This causes undefined symbol references: powerpc64-linux-ld: drivers/video/fbdev/offb.o:(.data.rel.ro+0x58): undefined reference to `cfb_fillr

Re: [PATCH 10/13] powerpc/rtas: improve function information lookups

2022-11-22 Thread Andrew Donnellan
On Fri, 2022-11-18 at 09:07 -0600, Nathan Lynch wrote: > Convert rtas_token() to use a lockless binary search on the function > table. Fall back to the old behavior for lookups against names that > are not known to be RTAS functions, but issue a warning. rtas_token() > is for function names; it is

Re: [PATCH linux-next][RFC]torture: avoid offline tick_do_timer_cpu

2022-11-22 Thread Zhouyi Zhou
On Tue, Nov 22, 2022 at 9:37 AM Paul E. McKenney wrote: > > On Mon, Nov 21, 2022 at 11:51:40AM +0800, Zhouyi Zhou wrote: > > During CPU-hotplug torture (CONFIG_NO_HZ_FULL=y), if we try to > > offline tick_do_timer_cpu, the operation will fail because in > > function tick_nohz_cpu_down: > > ``` > >

Re: [PATCH v2 12/44] cpuidle,dt: Push RCU-idle into driver

2022-11-22 Thread Ulf Hansson
On Wed, 16 Nov 2022 at 16:29, Peter Zijlstra wrote: > > > Sorry; things keep getting in the way of finishing this :/ > > As such, I need a bit of time to get on-track again.. > > On Tue, Oct 04, 2022 at 01:03:57PM +0200, Ulf Hansson wrote: > > > > --- a/drivers/acpi/processor_idle.c > > > +++ b/dr

[PATCH v2 0/7] Expand selftest utils

2022-11-22 Thread Benjamin Gray
(No changes to contents from v1, added signed-off-by's and fixed up commit messages) Started this when writing tests for a feature I'm working on, needing a way to read/write numbers to system files. After writing some utils to safely handle file IO and parsing, I realised I'd made the ~6th file

Re: [PATCH 2/4] fs: define a firmware security filesystem named fwsecurityfs

2022-11-22 Thread Nayna
On 11/19/22 06:48, Ritesh Harjani (IBM) wrote: Hello Nayna, Hi Ritesh, On 22/11/09 03:10PM, Nayna wrote: On 11/9/22 08:46, Greg Kroah-Hartman wrote: On Sun, Nov 06, 2022 at 04:07:42PM -0500, Nayna Jain wrote: securityfs is meant for Linux security subsystems to expose policies/logs or a

[PATCH v2 7/7] selftests/powerpc: Add automatically allocating read_file

2022-11-22 Thread Benjamin Gray
A couple of tests roll their own auto-allocating file read logic. Add a generic implementation and convert them to use it. Signed-off-by: Benjamin Gray --- .../testing/selftests/powerpc/include/utils.h | 1 + .../selftests/powerpc/nx-gzip/gzfht_test.c| 37 + .../selftests/powerpc/s

[PATCH v2 6/7] selftests/powerpc: Add {read,write}_{long,ulong}

2022-11-22 Thread Benjamin Gray
Add helper functions to read and write (unsigned) long values directly from/to files. One of the kernel interfaces uses hex strings, so we need to allow passing a base too. Signed-off-by: Benjamin Gray --- tools/testing/selftests/powerpc/dscr/dscr.h | 9 +-- .../selftests/powerpc/dscr/dscr_sy

[PATCH v2 5/7] selftests/powerpc: Parse long/unsigned long value safely

2022-11-22 Thread Benjamin Gray
Often a file is expected to hold an integral value. Existing functions will use a C stdlib function like atoi or strtol to parse the file. These operations are error prone, with complicated error conditions (atoi returns 0 if not a number, and is undefined behaviour if not in range. strtol returns

[PATCH v2 3/7] selftests/powerpc: Add generic read/write file util

2022-11-22 Thread Benjamin Gray
File read/write is reimplemented in about 5 different ways in the various PowerPC selftests. This indicates it should be a common util. Add a common read_file / write_file implementation and convert users to it where (easily) possible. Signed-off-by: Benjamin Gray --- tools/testing/selftests/po

[PATCH v2 1/7] selftests/powerpc: Use mfspr/mtspr macros

2022-11-22 Thread Benjamin Gray
No need to write inline asm for mtspr/mfspr, we have macros for this in reg.h Signed-off-by: Benjamin Gray --- tools/testing/selftests/powerpc/dscr/dscr.h | 17 + .../selftests/powerpc/ptrace/ptrace-hwbreak.c | 6 ++ tools/testing/selftests/powerpc/ptrace/ptrace.h | 5

[PATCH v2 2/7] selftests/powerpc: Add ptrace setup_core_pattern() null-terminator

2022-11-22 Thread Benjamin Gray
- malloc() does not zero the buffer, - fread() does not null-terminate it's output, - `cat /proc/sys/kernel/core_pattern | hexdump -C` shows the file is not inherently null-terminated So using string operations on the buffer is risky. Explicitly add a null character to the end to make it safer.

[PATCH v2 4/7] selftests/powerpc: Add read/write debugfs file, int

2022-11-22 Thread Benjamin Gray
Debugfs files are not always integers, so make *_file return/write a byte buffer, and *_int deal with int values specifically. This increases consistency with the other file read/write helpers. Signed-off-by: Benjamin Gray --- .../testing/selftests/powerpc/include/utils.h | 6 ++-- .../selftest

Re: [PATCH v1 0/7] Expand selftest utils

2022-11-22 Thread Benjamin Gray
And yes, I did realise last night I forgot signed-off-by's and a couple of messages have extra squashed commit messages :(

Re: [PATCH] perf test: Skip watchpoint tests if no watchpoints available

2022-11-22 Thread Ian Rogers
On Tue, Nov 22, 2022 at 11:19 AM Christophe Leroy wrote: > > > > Le 21/11/2022 à 11:27, Naveen N. Rao a écrit : > > On IBM Power9, perf watchpoint tests fail since no hardware breakpoints > > are available. Detect this by checking the error returned by > > perf_event_open() and skip the tests in t

Re: [PATCH 000/606] i2c: Complete conversion to i2c_probe_new

2022-11-22 Thread Uwe Kleine-König
On Tue, Nov 22, 2022 at 06:58:18PM +, Jonathan Cameron wrote: > > Queued all of the below: > with one tweaked as per your suggestion and the highlighted one dropped on > basis > I was already carrying the equivalent - as you pointed out. > > I was already carrying the required dependency. >

Re: [PATCH] perf test: Skip watchpoint tests if no watchpoints available

2022-11-22 Thread Christophe Leroy
Le 21/11/2022 à 11:27, Naveen N. Rao a écrit : > On IBM Power9, perf watchpoint tests fail since no hardware breakpoints > are available. Detect this by checking the error returned by > perf_event_open() and skip the tests in that case. > > Reported-by: Disha Goel > Signed-off-by: Naveen N. Rao

Re: [PATCH 000/606] i2c: Complete conversion to i2c_probe_new

2022-11-22 Thread Jonathan Cameron
Queued all of the below: with one tweaked as per your suggestion and the highlighted one dropped on basis I was already carrying the equivalent - as you pointed out. I was already carrying the required dependency. Includes the IIO ones in staging. Thanks, Jonathan p.s. I perhaps foolishly di

Re: [PATCH v5 5/6] crash: forward memory_notify args to arch crash hotplug handler

2022-11-22 Thread Eric DeVolder
On 11/20/22 17:25, Sourabh Jain wrote: The way memory hot remove is handled on PowerPC, it is hard to update the elfcorehdr without memory_notify args. On PowePC memblock data structure is used to prepare elfcorehdr for kdump. Since the notifier used for memory hotplug crash handler get initi

Re: [PATCH v5 3/6] crash: add phdr for possible CPUs in elfcorehdr

2022-11-22 Thread Eric DeVolder
On 11/20/22 17:25, Sourabh Jain wrote: On architectures like PowerPC the crash notes are available for all possible CPUs. So let's populate the elfcorehdr for all possible CPUs having crash notes to avoid updating elfcorehdr during in-kernel crash update on CPU hotplug events. The similar tec

Re: [PATCH printk v5 00/40] reduce console_lock scope

2022-11-22 Thread Greg Kroah-Hartman
On Wed, Nov 16, 2022 at 05:27:12PM +0106, John Ogness wrote: > This is v5 of a series to prepare for threaded/atomic > printing. v4 is here [0]. This series focuses on reducing the > scope of the BKL console_lock. It achieves this by switching to > SRCU and a dedicated mutex for console list iterat

Re: [PATCH] powerpc/ps3: mark ps3_system_bus_type static

2022-11-22 Thread Geoff Levand
Hi Christoph, On 11/21/22 23:22, Christoph Hellwig wrote: > ps3_system_bus_type is only used inside of system-bus.c, so remove > the external declaration and the very outdated comment next to it. > > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/include/asm/ps3.h | 4 > ar

Re: [PATCH mm-unstable v1 09/20] mm/gup: reliable R/O long-term pinning in COW mappings

2022-11-22 Thread Vlastimil Babka
On 11/16/22 11:26, David Hildenbrand wrote: > We already support reliable R/O pinning of anonymous memory. However, > assume we end up pinning (R/O long-term) a pagecache page or the shared > zeropage inside a writable private ("COW") mapping. The next write access > will trigger a write-fault and

Re: [PATCH mm-unstable v1 08/20] mm: extend FAULT_FLAG_UNSHARE support to anything in a COW mapping

2022-11-22 Thread Vlastimil Babka
On 11/16/22 11:26, David Hildenbrand wrote: > Extend FAULT_FLAG_UNSHARE to break COW on anything mapped into a > COW (i.e., private writable) mapping and adjust the documentation > accordingly. > > FAULT_FLAG_UNSHARE will now also break COW when encountering the shared > zeropage, a pagecache page

Re: [PATCH mm-unstable v1 07/20] mm: don't call vm_ops->huge_fault() in wp_huge_pmd()/wp_huge_pud() for private mappings

2022-11-22 Thread Vlastimil Babka
On 11/16/22 11:26, David Hildenbrand wrote: > If we already have a PMD/PUD mapped write-protected in a private mapping > and we want to break COW either due to FAULT_FLAG_WRITE or > FAULT_FLAG_UNSHARE, there is no need to inform the file system just like on > the PTE path. > > Let's just split (->

Re: [PATCH mm-unstable v1 06/20] mm: rework handling in do_wp_page() based on private vs. shared mappings

2022-11-22 Thread Vlastimil Babka
On 11/16/22 11:26, David Hildenbrand wrote: > We want to extent FAULT_FLAG_UNSHARE support to anything mapped into a > COW mapping (pagecache page, zeropage, PFN, ...), not just anonymous pages. > Let's prepare for that by handling shared mappings first such that we can > handle private mappings la

Re: [PATCH] powerpc/bpf/32: Fix Oops on tail call tests

2022-11-22 Thread Naveen N. Rao
Christophe Leroy wrote: Le 22/11/2022 à 08:33, Naveen N. Rao a écrit : Christophe Leroy wrote: This is a tentative to write above the stack. The problem is encoutered with tests added by commit 38608ee7b690 ("bpf, tests: Add load store test case for tail call") This happens because tail cal