Re: [PATCH] powerpc/kprobes: Pass ppc_inst as a pointer to emulate_step() on ppc32

2021-06-07 Thread Naveen N. Rao
Naveen N. Rao wrote: Trying to use a kprobe on ppc32 results in the below splat: BUG: Unable to handle kernel data access on read at 0x7c0802a6 Faulting instruction address: 0xc002e9f0 Oops: Kernel access of bad area, sig: 11 [#1] BE PAGE_SIZE=4K PowerPC 44x Platform Modules

Re: [PATCH] watchdog: Remove MV64x60 watchdog driver

2021-06-07 Thread Guenter Roeck
On Mon, Jun 07, 2021 at 11:43:26AM +1000, Michael Ellerman wrote: > Guenter Roeck writes: > > On 5/17/21 4:17 AM, Michael Ellerman wrote: > >> Guenter Roeck writes: > >>> On 3/18/21 10:25 AM, Christophe Leroy wrote: > Commit 92c8c16f3457 ("powerpc/embedded6xx: Remove C2K board support") >

Re: [PATCH v3] powerpc: Fixup for v3 "powerpc/nohash: Refactor update of BDI2000 pointers in switch_mmu_context()" in next-test

2021-06-07 Thread Michael Ellerman
Christophe Leroy writes: > As mentionned in history, v3 doesn't apply to book3s/32 so the hunk > on head_book3s_32.S has to be dropped from the commit mentionned > in the title. > > Signed-off-by: Christophe Leroy > --- > Michael, tell me if you prefer a v4 of the series. Nah that's OK, I

Re: [PATCH] Fixup for "[v2] powerpc/8xx: Allow disabling KUAP at boot time"

2021-06-07 Thread Michael Ellerman
Christophe Leroy writes: > Le 06/06/2021 à 19:43, Christophe Leroy a écrit : > > Michael, I sent it as a Fixup because it's in next-test, but if you prefer I > can sent a v3. That's fine, I squashed it in. cheers

Re: [PATCH] Revert "powerpc: Switch to relative jump labels"

2021-06-07 Thread Greg Kurz
On Tue, 01 Jun 2021 17:36:15 +1000 Michael Ellerman wrote: > Roman Bolshakov writes: > > On Sat, May 29, 2021 at 09:39:49AM +1000, Michael Ellerman wrote: > >> Roman Bolshakov writes: > >> > This reverts commit b0b3b2c78ec075cec4721986a95abbbac8c3da4f. > >> > > >> > Otherwise, direct kernel

Re: [PATCH v1 1/1] powerpc/prom_init: Move custom isspace() to its own namespace

2021-06-07 Thread Andy Shevchenko
On Mon, May 10, 2021 at 05:49:25PM +0300, Andy Shevchenko wrote: > If by some reason any of the headers will include ctype.h > we will have a name collision. Avoid this by moving isspace() > to the dedicate namespace. > > First appearance of the code is in the commit cf68787b68a2 >

[PATCH v1 05/12] mm/memory_hotplug: remove nid parameter from remove_memory() and friends

2021-06-07 Thread David Hildenbrand
There is only a single user remaining. We can simply try to offline all online nodes - which is fast, because we usually span pages and can skip such nodes right away. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: "Rafael J. Wysocki" Cc: Len Brown Cc: Dan Williams

Re: [PATCH] powerpc/kprobes: Pass ppc_inst as a pointer to emulate_step() on ppc32

2021-06-07 Thread Christophe Leroy
Le 07/06/2021 à 16:31, Christophe Leroy a écrit : Le 07/06/2021 à 13:34, Naveen N. Rao a écrit : Naveen N. Rao wrote: Trying to use a kprobe on ppc32 results in the below splat:     BUG: Unable to handle kernel data access on read at 0x7c0802a6     Faulting instruction address: 0xc002e9f0

Re: [PATCH] powerpc: Fix duplicate included _clear.h

2021-06-07 Thread kernel test robot
Hi Jiapeng, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on v5.13-rc5 next-20210607] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base

[PATCH v1 04/12] mm/memory_hotplug: remove nid parameter from arch_remove_memory()

2021-06-07 Thread David Hildenbrand
The parameter is unused, let's remove it. Cc: Catalin Marinas Cc: Will Deacon Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Cc: Heiko Carstens Cc: Vasily Gorbik Cc: Christian Borntraeger Cc: Yoshinori Sato Cc: Rich Felker Cc: Dave Hansen Cc: Andy Lutomirski Cc:

Re: [PATCH] powerpc/kprobes: Pass ppc_inst as a pointer to emulate_step() on ppc32

2021-06-07 Thread Christophe Leroy
Le 07/06/2021 à 13:34, Naveen N. Rao a écrit : Naveen N. Rao wrote: Trying to use a kprobe on ppc32 results in the below splat:     BUG: Unable to handle kernel data access on read at 0x7c0802a6     Faulting instruction address: 0xc002e9f0     Oops: Kernel access of bad area, sig: 11 [#1]    

Re: [PATCH] powerpc: Fix duplicate included _clear.h

2021-06-07 Thread Michael Ellerman
Jiapeng Chong writes: > Clean up the following includecheck warning: > > ./arch/powerpc/perf/req-gen/perf.h: _clear.h is included more than once. That's by design. See the error reported by the kbuild robot. > No functional change. Not true. cheers > Reported-by: Abaci Robot >

Re: [PATCH v4 1/4] lazy tlb: introduce lazy mm refcount helper functions

2021-06-07 Thread Nicholas Piggin
Excerpts from Andrew Morton's message of June 8, 2021 11:48 am: > On Tue, 08 Jun 2021 11:39:56 +1000 Nicholas Piggin wrote: > >> > Looks like a functional change. What's happening here? >> >> That's kthread_use_mm being clever about the lazy tlb mm. If it happened >> that the kthread had

Re: [PATCH] powerpc: Fix kernel-jump address for ppc64 wrapper boot

2021-06-07 Thread Christophe Leroy
Le 04/06/2021 à 11:22, He Ying a écrit : From "64-bit PowerPC ELF Application Binary Interface Supplement 1.9", we know that the value of a function pointer in a language like C is the address of the function descriptor and the first doubleword of the function descriptor contains the address

Re: [PATCH] powerpc/kprobes: Pass ppc_inst as a pointer to emulate_step() on ppc32

2021-06-07 Thread Christophe Leroy
Le 07/06/2021 à 19:36, Christophe Leroy a écrit : Le 07/06/2021 à 16:31, Christophe Leroy a écrit : Le 07/06/2021 à 13:34, Naveen N. Rao a écrit : Naveen N. Rao wrote: Trying to use a kprobe on ppc32 results in the below splat:     BUG: Unable to handle kernel data access on read at

Re: [PATCH v2] libnvdimm/pmem: Fix blk_cleanup_disk() usage

2021-06-07 Thread Sachin Sant
> Reported-by: Sachin Sant > Fixes: 87eb73b2ca7c ("nvdimm-pmem: convert to > blk_alloc_disk/blk_cleanup_disk") > Link: > http://lore.kernel.org/r/dfb75ba8-603f-4a35-880b-c5b23ef8f...@linux.vnet.ibm.com > Cc: Christoph Hellwig > Cc: Ulf Hansson > Cc: Jens Axboe > Signed-off-by: Dan Williams

Re: [PATCH v4 1/4] lazy tlb: introduce lazy mm refcount helper functions

2021-06-07 Thread Andrew Morton
On Tue, 08 Jun 2021 11:39:56 +1000 Nicholas Piggin wrote: > > Looks like a functional change. What's happening here? > > That's kthread_use_mm being clever about the lazy tlb mm. If it happened > that the kthread had inherited a the lazy tlb mm that happens to be the > one we want to use

Re: [PATCH] powerpc: Fix kernel-jump address for ppc64 wrapper boot

2021-06-07 Thread Oliver O'Halloran
On Fri, Jun 4, 2021 at 7:39 PM He Ying wrote: > > From "64-bit PowerPC ELF Application Binary Interface Supplement 1.9", > we know that the value of a function pointer in a language like C is > the address of the function descriptor and the first doubleword > of the function descriptor contains

Re: [PATCH v2 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA

2021-06-07 Thread Mike Rapoport
Hi, On Mon, Jun 07, 2021 at 10:53:08AM +0200, Geert Uytterhoeven wrote: > Hi Mike, > > On Fri, Jun 4, 2021 at 8:50 AM Mike Rapoport wrote: > > From: Mike Rapoport > > > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > > configuration options are equivalent. > > > > Drop

Re: [PATCH v4 3/4] lazy tlb: shoot lazies, a non-refcounting lazy tlb option

2021-06-07 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of June 5, 2021 11:42 am: > On big systems, the mm refcount can become highly contented when doing > a lot of context switching with threaded applications (particularly > switching between the idle thread and an application thread). > > Abandoning lazy tlb

Re: [PATCH v7 01/11] mm/mremap: Fix race between MOVE_PMD mremap and pageout

2021-06-07 Thread Hugh Dickins
On Mon, 7 Jun 2021, Aneesh Kumar K.V wrote: > CPU 1 CPU 2 CPU 3 > > mremap(old_addr, new_addr) page_shrinker/try_to_unmap_one > > mmap_write_lock_killable() > > addr = old_addr >

Re: [PATCH v7 00/11] Speedup mremap on ppc64

2021-06-07 Thread Nicholas Piggin
Excerpts from Aneesh Kumar K.V's message of June 8, 2021 2:39 pm: > On 6/7/21 3:40 PM, Nick Piggin wrote: >> On Monday, 7 June 2021, Aneesh Kumar K.V >> wrote: This patchset enables MOVE_PMD/MOVE_PUD support on power. This >> requires the platform to support updating higher-level page tables

Re: [PATCH 20/30] nullb: use blk_mq_alloc_disk

2021-06-07 Thread Christoph Hellwig
On Thu, Jun 03, 2021 at 12:10:09AM +, Chaitanya Kulkarni wrote: > > diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c > > index d8e098f1e5b5..74fb2ec63219 100644 > > --- a/drivers/block/null_blk/main.c > > +++ b/drivers/block/null_blk/main.c > > @@ -1851,13 +1851,12 @@

[PATCH v2] libnvdimm/pmem: Fix blk_cleanup_disk() usage

2021-06-07 Thread Dan Williams
The queue_to_disk() helper can not be used after del_gendisk() communicate @disk via the pgmap->owner. Otherwise, queue_to_disk() returns NULL resulting in the splat below. Kernel attempted to read user page (330) - exploit attempt? (uid: 0) BUG: Kernel NULL pointer dereference on read at

Re: [PATCH v4 4/4] powerpc/64s: enable MMU_LAZY_TLB_SHOOTDOWN

2021-06-07 Thread Andrew Morton
On Sat, 5 Jun 2021 11:42:16 +1000 Nicholas Piggin wrote: > On a 16-socket 192-core POWER8 system, a context switching benchmark > with as many software threads as CPUs (so each switch will go in and > out of idle), upstream can achieve a rate of about 1 million context > switches per second.

Re: [PATCH v4 1/4] lazy tlb: introduce lazy mm refcount helper functions

2021-06-07 Thread Nicholas Piggin
Excerpts from Andrew Morton's message of June 8, 2021 9:49 am: > On Sat, 5 Jun 2021 11:42:13 +1000 Nicholas Piggin wrote: > >> Add explicit _lazy_tlb annotated functions for lazy mm refcounting. >> This makes lazy mm references more obvious, and allows explicit >> refcounting to be removed if

Re: [PATCH v4 4/4] powerpc/64s: enable MMU_LAZY_TLB_SHOOTDOWN

2021-06-07 Thread Nicholas Piggin
Excerpts from Andrew Morton's message of June 8, 2021 9:52 am: > On Sat, 5 Jun 2021 11:42:16 +1000 Nicholas Piggin wrote: > >> On a 16-socket 192-core POWER8 system, a context switching benchmark >> with as many software threads as CPUs (so each switch will go in and >> out of idle), upstream

Re: [PATCH v4 2/4] lazy tlb: allow lazy tlb mm refcounting to be configurable

2021-06-07 Thread Nicholas Piggin
Excerpts from Nicholas Piggin's message of June 5, 2021 11:42 am: > Add CONFIG_MMU_TLB_REFCOUNT which enables refcounting of the lazy tlb mm > when it is context switched. This can be disabled by architectures that > don't require this refcounting if they clean up lazy tlb mms when the > last

Re: [PATCH v7 00/11] Speedup mremap on ppc64

2021-06-07 Thread Aneesh Kumar K.V
On 6/7/21 3:40 PM, Nick Piggin wrote: On Monday, 7 June 2021, Aneesh Kumar K.V wrote: This patchset enables MOVE_PMD/MOVE_PUD support on power. This requires the platform to support updating higher-level page tables without updating page table ZjQcmQRYFpfptBannerStart This Message Is From an

Re: [PATCH v2] libnvdimm/pmem: Fix blk_cleanup_disk() usage

2021-06-07 Thread Christoph Hellwig
Thanks Dan, this looks good to me: Reviewed-by: Christoph Hellwig Jens, can you quickly pick this up?

[PATCH] selftests/powerpc: Fix typo in spectre_v2

2021-06-07 Thread Russell Currey
Signed-off-by: Russell Currey --- tools/testing/selftests/powerpc/security/spectre_v2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/powerpc/security/spectre_v2.c b/tools/testing/selftests/powerpc/security/spectre_v2.c index

[PATCH 2/2] selftests: Skip TM tests on synthetic TM implementations

2021-06-07 Thread Jordan Niethe
Transactional Memory was removed from the architecture in ISA v3.1. For threads running in P8/P9 compatibility mode on P10 a synthetic TM implementation is provided. In this implementation, tbegin. always sets cr0 eq meaning the abort handler is always called. This is not an issue as users of TM

[PATCH 1/2] selftests/powerpc: Add missing clobbered register to to ptrace TM tests

2021-06-07 Thread Jordan Niethe
ISA v3.1 removes TM but includes a synthetic implementation for backwards compatibility. With this implementation, the tests ptrace-tm-spd-gpr and ptrace-tm-gpr should never be able to make any forward progress and eventually should be killed by the timeout. Instead on a P10 running in P9 mode,

[PATCH] libnvdimm/pmem: Fix blk_cleanup_disk() usage

2021-06-07 Thread Dan Williams
The queue_to_disk() helper can not be used after del_gendisk() communicate @disk via the pgmap->owner. Reported-by: Sachin Sant Fixes: 87eb73b2ca7c ("nvdimm-pmem: convert to blk_alloc_disk/blk_cleanup_disk") Cc: Christoph Hellwig Cc: Ulf Hansson Cc: Jens Axboe Signed-off-by: Dan Williams ---

Re: [PATCH v4 1/4] lazy tlb: introduce lazy mm refcount helper functions

2021-06-07 Thread Andrew Morton
On Sat, 5 Jun 2021 11:42:13 +1000 Nicholas Piggin wrote: > Add explicit _lazy_tlb annotated functions for lazy mm refcounting. > This makes lazy mm references more obvious, and allows explicit > refcounting to be removed if it is not used. > > ... > > --- a/kernel/kthread.c > +++

Re: [PATCH] powerpc/stacktrace: fix raise_backtrace_ipi() logic

2021-06-07 Thread Nathan Lynch
Michael Ellerman writes: > Nathan Lynch writes: >> Hi Michael, >> >> Michael Ellerman writes: >>> Nathan Lynch writes: When smp_send_safe_nmi_ipi() indicates that the target CPU has responded to the IPI, skip the remote paca inspection fallback. Otherwise both the sending and

Re: [PATCH v7 00/11] Speedup mremap on ppc64

2021-06-07 Thread Nick Piggin
On Monday, 7 June 2021, Aneesh Kumar K.V wrote: > > This patchset enables MOVE_PMD/MOVE_PUD support on power. This requires > the platform to support updating higher-level page tables without > updating page table entries. This also needs to invalidate the Page Walk > Cache on architecture

[PATCH -next] soc: fsl: dpio: use list_move_tail instead of list_del/list_add_tail

2021-06-07 Thread Zou Wei
Using list_move_tail() instead of list_del() + list_add_tail(). Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/soc/fsl/dpio/dpio-service.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/soc/fsl/dpio/dpio-service.c

Re: [FSL P50x0] KVM HV doesn't work anymore

2021-06-07 Thread Christian Zigotzky
On 02 June 2021 at 01:26pm, Christian Zigotzky wrote: On 20 May 2021 at 01:07am, Nicholas Piggin wrote: Hmm, okay that probably rules out those notifier changes then. Can you remind me were you able to rule these out as suspects? 8f6cc75a97d1 powerpc: move norestart trap flag to bit 0

[Bug 213079] [bisected] IRQ problems and crashes on a PowerMac G5 with 5.12.3

2021-06-07 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=213079 --- Comment #6 from Erhard F. (erhar...@mailbox.org) --- This is already a custom built kernel with lots of debugging options turned on (see bugzilla attached kernel .config). But of course I can add "debug" to the other kernel command line

Re: [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code

2021-06-07 Thread Russell King (Oracle)
On Mon, Jun 07, 2021 at 07:48:54AM +0200, Christophe Leroy wrote: > Hi Kefeng, > > What you could do is to define a __weak function that architectures can > override and call that function from mm_init() as suggested by Mike, The problem with weak functions is that they bloat the kernel. Each

Re: [PATCH 00/21] Rid W=1 warnings from IDE

2021-06-07 Thread Christoph Hellwig
Please don't touch this code as it is about to be removed entirely.

Re: [PATCH v2 00/15] init_mm: cleanup ARCH's text/data/brk setup code

2021-06-07 Thread Kefeng Wang
On 2021/6/7 13:48, Christophe Leroy wrote: Hi Kefeng, Le 07/06/2021 à 02:55, Kefeng Wang a écrit : On 2021/6/7 5:29, Mike Rapoport wrote: Hello Kefeng, On Fri, Jun 04, 2021 at 03:06:18PM +0800, Kefeng Wang wrote: Add setup_initial_init_mm() helper, then use it to cleanup the text, data

Re: [PATCH v2 0/9] Remove DISCINTIGMEM memory model

2021-06-07 Thread Geert Uytterhoeven
Hi Mike, You may want to fix the DISCINTIGMEM typo in the subject for v3, unless you think that makes tracking series versions more complicated ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal

Re: [PATCH v2 8/9] mm: replace CONFIG_NEED_MULTIPLE_NODES with CONFIG_NUMA

2021-06-07 Thread Geert Uytterhoeven
Hi Mike, On Fri, Jun 4, 2021 at 8:50 AM Mike Rapoport wrote: > From: Mike Rapoport > > After removal of DISCINTIGMEM the NEED_MULTIPLE_NODES and NUMA > configuration options are equivalent. > > Drop CONFIG_NEED_MULTIPLE_NODES and use CONFIG_NUMA instead. > > Done with > > $ sed -i

[PATCH v3] powerpc: Fixup for v3 "powerpc/nohash: Refactor update of BDI2000 pointers in switch_mmu_context()" in next-test

2021-06-07 Thread Christophe Leroy
As mentionned in history, v3 doesn't apply to book3s/32 so the hunk on head_book3s_32.S has to be dropped from the commit mentionned in the title. Signed-off-by: Christophe Leroy --- Michael, tell me if you prefer a v4 of the series. --- arch/powerpc/kernel/head_book3s_32.S | 6 ++ 1 file

[PATCH] powerpc: Fix duplicate included linux/sched/clock.h

2021-06-07 Thread Jiapeng Chong
Clean up the following includecheck warning: ./arch/powerpc/kernel/time.c: linux/sched/clock.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/kernel/time.c | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH] powerpc: Fix duplicate included _clear.h

2021-06-07 Thread Jiapeng Chong
Clean up the following includecheck warning: ./arch/powerpc/perf/req-gen/perf.h: _clear.h is included more than once. No functional change. Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong --- arch/powerpc/perf/req-gen/perf.h | 1 - 1 file changed, 1 deletion(-) diff --git

[PATCH 2/3] powerpc: Define swapper_pg_dir[] in C

2021-06-07 Thread Christophe Leroy
Don't duplicate swapper_pg_dir[] in each platform's head.S Define it in mm/pgtable.c Define MAX_PTRS_PER_PGD because on book3s/64 PTRS_PER_PGD is not a constant. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/pgtable.h | 3 +++ arch/powerpc/include/asm/pgtable.h

[PATCH 1/3] powerpc: Define empty_zero_page[] in C

2021-06-07 Thread Christophe Leroy
At the time being, empty_zero_page[] is defined in each platform head.S. Define it in mm/mem.c instead, and put it in BSS section instead of the DATA section. Commit 5227cfa71f9e ("arm64: mm: place empty_zero_page in bss") explains why it is interesting to have it in BSS. Signed-off-by:

[PATCH 3/3] powerpc/32s: Rename PTE_SIZE to PTE_T_SIZE

2021-06-07 Thread Christophe Leroy
PTE_SIZE means PTE page table size in most placed, whereas in hash_low.S in means size of one entry in the table. Rename it PTE_T_SIZE, and define it directly in hash_low.S instead of going through asm-offsets. Signed-off-by: Christophe Leroy --- arch/powerpc/kernel/asm-offsets.c | 2 --