Re: [PATCH 1/2] tools/perf: Include global and local variants for p_stage_cyc sort key

2021-11-25 Thread Nageswara Sastry
On 25/11/21 8:18 am, Athira Rajeev wrote: Sort key p_stage_cyc is used to present the latency cycles spend in pipeline stages. perf tool has local p_stage_cyc sort key to display this info. There is no global variant available for this sort key. local variant shows latency in a sinlge sample,

[PATCH v2 5/9] powerpc/mm: Call radix__arch_get_unmapped_area() from arch_get_unmapped_area()

2021-11-25 Thread Christophe Leroy
Instead of setting mm->get_unmapped_area() to either arch_get_unmapped_area() or radix__arch_get_unmapped_area(), always set it to arch_get_unmapped_area() and call radix__arch_get_unmapped_area() from there when radix is enabled. To keep radix__arch_get_unmapped_area() static, move it to slice.c

[PATCH v2 6/9] mm: Allow arch specific arch_randomize_brk() with CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT

2021-11-25 Thread Christophe Leroy
Commit e7142bf5d231 ("arm64, mm: make randomization selected by generic topdown mmap layout") introduced a default version of arch_randomize_brk() provided when CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT is selected. powerpc could select CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT but needs to

[PATCH v2 4/9] powerpc/mm: Remove asm/slice.h

2021-11-25 Thread Christophe Leroy
Move necessary stuff in asm/book3s/64/slice.h and remove asm/slice.h Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/hash.h | 3 ++ arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 + arch/powerpc/include/asm/book3s/64/slice.h| 18 + arch/powerpc/include

[PATCH v2 1/9] powerpc/mm: Make slice specific to book3s/64

2021-11-25 Thread Christophe Leroy
Since commit 555904d07eef ("powerpc/8xx: MM_SLICE is not needed anymore") only book3s/64 selects CONFIG_PPC_MM_SLICES. Move slice.c into mm/book3s64/ Signed-off-by: Christophe Leroy --- v2: Remove now unnecessary #ifdef CONFIG_PPC_BOOK3S_64 in slice.c --- arch/powerpc/mm/Makefile

[PATCH v2 3/9] powerpc/mm: Remove CONFIG_PPC_MM_SLICES

2021-11-25 Thread Christophe Leroy
CONFIG_PPC_MM_SLICES is always selected by book3s/64. CONFIG_PPC_MM_SLICES is never selected by other platforms. Remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/hash.h | 2 -- arch/powerpc/include/asm/hugetlb.h| 2 +- arch/powerpc/include/asm/paca.h

[PATCH v2 0/9] Convert powerpc to default topdown mmap layout

2021-11-25 Thread Christophe Leroy
This series converts powerpc to default topdown mmap layout. powerpc provides its own arch_get_unmapped_area() only when slices are needed, which is only for book3s/64. First part of the series moves slices into book3s/64 specific directories and cleans up other subarchitectures. Then a small mod

[PATCH v2 7/9] powerpc/mm: Convert to default topdown mmap layout

2021-11-25 Thread Christophe Leroy
Select CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT and remove arch/powerpc/mm/mmap.c This change provides standard randomisation of mmaps. See commit 8b8addf891de ("x86/mm/32: Enable full randomization on i386 and X86_32") for all the benefits of mmap randomisation. Signed-off-by: Christophe Le

[PATCH v2 9/9] powerpc: Simplify and move arch_randomize_brk()

2021-11-25 Thread Christophe Leroy
arch_randomize_brk() is only needed for hash on book3s/64, for other platforms the one provided by the default mmap layout is good enough. Move it to hash_utils.c and use randomize_page() like the generic one. And properly opt out the radix case instead of making an assumption on mmu_highuser_ssi

[PATCH v2 2/9] powerpc/mm: Move vma_mmu_pagesize() and hugetlb_get_unmapped_area() to slice.c

2021-11-25 Thread Christophe Leroy
vma_mmu_pagesize() is only required for slices, otherwise there is a generic weak version. hugetlb_get_unmapped_area() is dedicated to slices. radix__hugetlb_get_unmapped_area() as well. Move them to slice.c Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/hugetlb.h | 4

[PATCH v2 8/9] powerpc/mm: Properly randomise mmap with slices

2021-11-25 Thread Christophe Leroy
Now that powerpc switched to default topdown mmap layout, mm->mmap_base is properly randomised. However slice_find_area_bottomup() doesn't use mm->mmap_base but uses the fixed TASK_UNMAPPED_BASE instead. slice_find_area_bottomup() being used as a fallback to slice_find_area_topdown(), it can't us

Re: [PATCH 0/3] KEXEC_SIG with appended signature

2021-11-25 Thread Philipp Rudo
Hi Michal, On Wed, 24 Nov 2021 14:27:16 +0100 Michal Suchánek wrote: > On Wed, Nov 24, 2021 at 08:10:10AM -0500, Mimi Zohar wrote: > > On Wed, 2021-11-24 at 12:09 +0100, Philipp Rudo wrote: > > > Now Michal wants to adapt KEXEC_SIG for ppc too so distros can rely on all > > > architectures usi

Re: [PATCH] powerpc/32: Fix hardlockup on vmap stack overflow

2021-11-25 Thread Michael Ellerman
On Thu, 18 Nov 2021 10:39:53 +0100, Christophe Leroy wrote: > Since the commit c118c7303ad5 ("powerpc/32: Fix vmap stack - Do not > activate MMU before reading task struct") a vmap stack overflow > results in a hard lockup. This is because emergency_ctx is still > addressed with its virtual address

Re: [PATCH v1] KVM: PPC: Book3S HV: Prevent POWER7/8 TLB flush flushing SLB

2021-11-25 Thread Michael Ellerman
On Fri, 19 Nov 2021 13:16:27 +1000, Nicholas Piggin wrote: > The POWER9 ERAT flush instruction is a SLBIA with IH=7, which is a > reserved value on POWER7/8. On POWER8 this invalidates the SLB entries > above index 0, similarly to SLBIA IH=0. > > If the SLB entries are invalidated, and then the gu

Re: [PATCH v2 2/8] i915: simplify subdirectory registration with register_sysctl()

2021-11-25 Thread Jani Nikula
On Tue, 23 Nov 2021, Luis Chamberlain wrote: > There is no need to user boiler plate code to specify a set of base > directories we're going to stuff sysctls under. Simplify this by using > register_sysctl() and specifying the directory path directly. \o/ Acked-by: Jani Nikula > > // pycocci s

Re: [PATCH v3] powerpc/code-patching: Improve verification of patchability

2021-11-25 Thread Michael Ellerman
On Mon, 15 Nov 2021 11:12:22 +0100, Christophe Leroy wrote: > Today, patch_instruction() assumes that it is called exclusively on > valid addresses, and only checks that it is not called on an init > address after init section has been freed. > > Improve verification by calling kernel_text_address

Re: [PATCH 00/11] powerpc/xive: Improve diagnostic and activate StoreEOI on P10 PowerNV

2021-11-25 Thread Michael Ellerman
On Fri, 5 Nov 2021 11:26:25 +0100, Cédric Le Goater wrote: > This series tries to improve diagnostic support in the XIVE driver. It > adds pr_debug() primitives that can be activated at run-time and changes > the debugfs xive entry to expose more information : > > /sys/kernel/debug/powerpc/xive/

Re: [PATCH 1/2] eeh: Small refactor of eeh_handle_normal_event

2021-11-25 Thread Michael Ellerman
On Fri, 15 Oct 2021 18:06:27 +1100, Daniel Axtens wrote: > The control flow of eeh_handle_normal_event is a bit tricky. > > Break out one of the error handling paths - rather than be in > an else block, we'll make it part of the regular body of the > function and put a 'goto out;' in the true limb

Re: [RESEND PATCH v4 0/8] bpf powerpc: Add BPF_PROBE_MEM support in powerpc JIT compiler

2021-11-25 Thread Michael Ellerman
On Tue, 12 Oct 2021 18:00:48 +0530, Hari Bathini wrote: > Patch #1 & #2 are simple cleanup patches. Patch #3 refactors JIT > compiler code with the aim to simplify adding BPF_PROBE_MEM support. > Patch #4 introduces PPC_RAW_BRANCH() macro instead of open coding > branch instruction. Patch #5 & #7 a

Re: [PATCH] powerpc/prom_init: fix the improper check of prom_getprop

2021-11-25 Thread Michael Ellerman
On Fri, 19 Nov 2021 17:12:18 +0800, Peiwei Hu wrote: > prom_getprop() can return PROM_ERROR. Binary operator can not identify it. > > Applied to powerpc/next. [1/1] powerpc/prom_init: fix the improper check of prom_getprop https://git.kernel.org/powerpc/c/869fb7e5aecbc163003f93f36dcc26d05

Re: (subset) [PATCH 0/6] add missing of_node_put

2021-11-25 Thread Michael Ellerman
On Fri, 20 Nov 2015 20:33:18 +, Julia Lawall wrote: > The various for_each device_node iterators performs an of_node_get on each > iteration, so a break out of the loop requires an of_node_put. > > The complete semantic patch that fixes this problem is > (http://coccinelle.lip6.fr): > > // >

Re: [PATCH] powerpc/microwatt: Make microwatt_get_random_darn() static

2021-11-25 Thread Michael Ellerman
On Thu, 18 Nov 2021 11:44:15 +1100, Michael Ellerman wrote: > Make microwatt_get_random_darn() static, because it can be. > > Applied to powerpc/next. [1/1] powerpc/microwatt: Make microwatt_get_random_darn() static https://git.kernel.org/powerpc/c/4afc78eae10cd74c5a0b70822b9754d1d094c5d6

Re: [PATCH] powerpc/pseries: delete scanlog

2021-11-25 Thread Michael Ellerman
On Mon, 20 Sep 2021 12:32:03 -0500, Nathan Lynch wrote: > Remove the pseries scanlog driver. > > This code supports functions from Power4-era servers that are not present > on targets currently supported by arch/powerpc. System manuals from this > time have this description: > > Scan Dump data

Re: [PATCH] powerpc/rtas: kernel-doc fixes

2021-11-25 Thread Michael Ellerman
On Tue, 16 Nov 2021 15:58:06 -0600, Nathan Lynch wrote: > Fix the following issues reported by kernel-doc: > > $ scripts/kernel-doc -v -none arch/powerpc/kernel/rtas.c > arch/powerpc/kernel/rtas.c:810: info: Scanning doc for function > rtas_activate_firmware > arch/powerpc/kernel/rtas.c:818: warn

Re: [PATCH v2 0/2] powerpc/rtas: improved busy and extended delay status handling

2021-11-25 Thread Michael Ellerman
On Wed, 17 Nov 2021 00:02:57 -0600, Nathan Lynch wrote: > This can be considered a successor to: > > https://lore.kernel.org/linuxppc-dev/20210504030358.1715034-1-nath...@linux.ibm.com/ > > which tried to address both the suboptimal delay behavior as well as API > issues. This version achieves th

Re: [PATCH 0/4] powerpc/security mitigation updates

2021-11-25 Thread Michael Ellerman
On Mon, 3 May 2021 23:02:39 +1000, Nicholas Piggin wrote: > This series adds a few missing bits added to recent pseries > H_GET_CPU_CHARACTERISTICS and implements them, also removes > a restriction from powernv for some of the flushes. > > This is tested mianly in qemu where I just submitted a pat

Re: [PATCH v3 0/4] powerpc: watchdog fixes

2021-11-25 Thread Michael Ellerman
On Wed, 10 Nov 2021 12:50:52 +1000, Nicholas Piggin wrote: > These are some watchdog fixes and improvements, in particular a > deadlock between the wd_smp_lock and console lock when the watchdog > fires, found by Laurent. > > Thanks, > Nick > > [...] Applied to powerpc/next. [1/4] powerpc/watch

Re: [PATCH v4 00/53] KVM: PPC: Book3S HV P9: entry/exit optimisations

2021-11-25 Thread Michael Ellerman
On Tue, 23 Nov 2021 19:51:38 +1000, Nicholas Piggin wrote: > This reduces radix guest full entry/exit latency on POWER9 and POWER10 > by 2x. > > Nested HV guests should see smaller improvements in their L1 entry/exit, > but this is also combined with most L0 speedups also applying to nested > entr

Re: [PATCH] powerpc: tsi108: make EXPORT_SYMBOL follow its function immediately

2021-11-25 Thread Michael Ellerman
On Sun, 14 Nov 2021 19:56:16 +0800, Jason Wang wrote: > EXPORT_SYMBOL(foo); should immediately follow its function/variable. > > Applied to powerpc/next. [1/1] powerpc: tsi108: make EXPORT_SYMBOL follow its function immediately https://git.kernel.org/powerpc/c/a3bcfc182b2c968fd740101322bd

[PATCH] powerpc/watchdog: Fix wd_smp_last_reset_tb reporting

2021-11-25 Thread Nicholas Piggin
wd_smp_last_reset_tb now gets reset by watchdog_smp_panic() as part of marking CPUs stuck and removing them from the pending mask before it begins any printing. This causes last reset times reported to be off. Fix this by reading it into a local variable before it gets reset. Fixes: 76521c4b0291

Re: [PATCH v2 9/9] powerpc: Simplify and move arch_randomize_brk()

2021-11-25 Thread Christophe Leroy
Le 25/11/2021 à 09:23, Christophe Leroy a écrit : arch_randomize_brk() is only needed for hash on book3s/64, for other platforms the one provided by the default mmap layout is good enough. Move it to hash_utils.c and use randomize_page() like the generic one. And properly opt out the radix c

Re: [PATCH] powerpc/watchdog: Fix wd_smp_last_reset_tb reporting

2021-11-25 Thread Michael Ellerman
On Thu, 25 Nov 2021 20:33:46 +1000, Nicholas Piggin wrote: > wd_smp_last_reset_tb now gets reset by watchdog_smp_panic() as part of > marking CPUs stuck and removing them from the pending mask before it > begins any printing. This causes last reset times reported to be off. > > Fix this by reading

Re: [PATCH v2] powerpc64/exceptions: Refactor code to eliminate a few memory loads

2021-11-25 Thread Christophe Leroy
Le 13/11/2017 à 18:04, Naveen N. Rao a écrit : Michael Ellerman wrote: "Naveen N. Rao" writes: On 2017/06/19 03:21PM, Aneesh Kumar K.V wrote: @@ -1445,8 +1446,8 @@ do_hash_page: handle_page_fault: andis. r0,r4,DSISR_DABRMATCH@h bne-handle_dabr_fault - ld

[PATCH] powerpc: Don't bother about .data..Lubsan sections

2021-11-25 Thread Christophe Leroy
Since commit 9a427556fb8e ("vmlinux.lds.h: catch compound literals into data and BSS") .data..Lubsan sections are taken into account in DATA_MAIN which is included in DATA_DATA macro. No need to take care of them anymore in powerpc vmlinux.lds.S Signed-off-by: Christophe Leroy --- arch/powerpc/

Re: [PATCH v2 7/8] cdrom: simplify subdirectory registration with register_sysctl()

2021-11-25 Thread Phillip Potter
On Tue, Nov 23, 2021 at 12:24:21PM -0800, Luis Chamberlain wrote: > There is no need to user boiler plate code to specify a set of base > directories we're going to stuff sysctls under. Simplify this by using > register_sysctl() and specifying the directory path directly. > > // pycocci sysctl-sub

Re: [5.16.0-rc2] Kernel warning while running sigfuz w/PPC_IRQ_SOFT_MASK_DEBUG

2021-11-25 Thread Nicholas Piggin
Excerpts from Sachin Sant's message of November 25, 2021 9:37 pm: > While running sigfuz powerpc self test following warning is seen on a Power > 10 LPAR. > This warning is seen only with CONFIG_PPC_IRQ_SOFT_MASK_DEBUG=y > The kernel eventually panics. > > [ 1032.912973] sigfuz[2061671]: bad fra

[PATCH v4 00/17] powerpc: Make hash MMU code build configurable

2021-11-25 Thread Nicholas Piggin
Now that there's a platform that can make good use of it, here's a series that can prevent the hash MMU code being built for 64s platforms that don't need it. Since v3: - Merged microwatt patches into 1. - Fix some changelogs, titles, comments. - Keep MMU_FTR_HPTE_TABLE in the features when bootin

[PATCH v4 01/17] powerpc: Remove unused FW_FEATURE_NATIVE references

2021-11-25 Thread Nicholas Piggin
FW_FEATURE_NATIVE_ALWAYS and FW_FEATURE_NATIVE_POSSIBLE are always zero and never do anything. Remove them. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/firmware.h | 8 1 file changed, 8 deletions(-) diff --git a/arch/powerpc/include/asm/firmware.h b/arch/powerpc/includ

[PATCH v4 02/17] powerpc: Rename PPC_NATIVE to PPC_HASH_MMU_NATIVE

2021-11-25 Thread Nicholas Piggin
PPC_NATIVE now only controls the native HPT code, so rename it to be more descriptive. Restrict it to Book3S only. Signed-off-by: Nicholas Piggin --- arch/powerpc/mm/book3s64/Makefile | 2 +- arch/powerpc/mm/book3s64/hash_utils.c | 2 +- arch/powerpc/platforms/52xx/Kconfig|

[PATCH v4 03/17] powerpc/pseries: Stop selecting PPC_HASH_MMU_NATIVE

2021-11-25 Thread Nicholas Piggin
The pseries platform does not use the native hash code but the PAPR virtualised hash interfaces, so remove PPC_HASH_MMU_NATIVE. This requires moving tlbiel code from hash_native.c to hash_utils.c. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/book3s/64/tlbflush.h | 4 - arch/pow

[PATCH v4 04/17] powerpc/64s: Move and rename do_bad_slb_fault as it is not hash specific

2021-11-25 Thread Nicholas Piggin
slb.c is hash-specific SLB management, but do_bad_slb_fault deals with segment interrupts that occur with radix MMU as well. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/interrupt.h | 2 +- arch/powerpc/kernel/exceptions-64s.S | 4 ++-- arch/powerpc/mm/book3s64/slb.c | 16

[PATCH v4 05/17] powerpc/pseries: move process table registration away from hash-specific code

2021-11-25 Thread Nicholas Piggin
This reduces ifdefs in a later change which makes hash support configurable. Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/pseries/lpar.c | 56 +-- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/arch/powerpc/platforms/pseries/lpar.c b/arch/po

[PATCH v4 06/17] powerpc/pseries: lparcfg don't include slb_size line in radix mode

2021-11-25 Thread Nicholas Piggin
This avoids a change in behaviour in the later patch making hash support configurable. This is possibly a user interface change, so the alternative would be a hard-coded slb_size=0 here. Signed-off-by: Nicholas Piggin --- arch/powerpc/platforms/pseries/lparcfg.c | 3 ++- 1 file changed, 2 insert

[PATCH v4 07/17] powerpc/64s: move THP trace point creation out of hash specific file

2021-11-25 Thread Nicholas Piggin
In preparation for making hash MMU support configurable, move THP trace point function definitions out of an otherwise hash-specific file. Signed-off-by: Nicholas Piggin --- arch/powerpc/mm/book3s64/Makefile | 2 +- arch/powerpc/mm/book3s64/hash_pgtable.c | 1 - arch/powerpc/mm/book3s64/tr

[PATCH v4 08/17] powerpc/64s: Make flush_and_reload_slb a no-op when radix is enabled

2021-11-25 Thread Nicholas Piggin
The radix test can exclude slb_flush_all_realmode() from being called because flush_and_reload_slb() is only expected to flush ERAT when called by flush_erat(), which is only on pre-ISA v3.0 CPUs that do not support radix. This helps the later change to make hash support configurable to not introd

[PATCH v4 09/17] powerpc/64s: move page size definitions from hash specific file

2021-11-25 Thread Nicholas Piggin
The radix code uses some of the psize variables. Move the common ones from hash_utils.c to pgtable.c. Signed-off-by: Nicholas Piggin --- arch/powerpc/mm/book3s64/hash_utils.c | 5 - arch/powerpc/mm/book3s64/pgtable.c| 7 +++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --gi

[PATCH v4 10/17] powerpc/64s: Rename hash_hugetlbpage.c to hugetlbpage.c

2021-11-25 Thread Nicholas Piggin
This file contains functions and data common to radix, so rename it to remove the hash_ prefix. Signed-off-by: Nicholas Piggin --- arch/powerpc/mm/book3s64/Makefile | 2 +- arch/powerpc/mm/book3s64/{hash_hugetlbpage.c => hugetlbpage.c} | 0 2 files changed, 1 inserti

[PATCH v4 11/17] powerpc/64: pcpu setup avoid reading mmu_linear_psize on 64e or radix

2021-11-25 Thread Nicholas Piggin
Radix never sets mmu_linear_psize so it's always 4K, which causes pcpu atom_size to always be PAGE_SIZE. 64e sets it to 1GB always. Make paths for these platforms to be explicit about what value they set atom_size to. Signed-off-by: Nicholas Piggin --- arch/powerpc/kernel/setup_64.c | 21 ++

[PATCH v4 12/17] powerpc: make memremap_compat_align 64s-only

2021-11-25 Thread Nicholas Piggin
memremap_compat_align is only relevant when ZONE_DEVICE is selected. ZONE_DEVICE depends on ARCH_HAS_PTE_DEVMAP, which is only selected by PPC_BOOK3S_64. Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 2 +- arch/powerpc/mm/book3s64/pgtable.c | 20 a

[PATCH v4 13/17] powerpc/64e: remove mmu_linear_psize

2021-11-25 Thread Nicholas Piggin
mmu_linear_psize is only set at boot once on 64e, is not necessarily the correct size of the linear map pages, and is never used anywhere. Remove it. Signed-off-by: Nicholas Piggin --- arch/powerpc/include/asm/nohash/mmu-book3e.h | 1 - arch/powerpc/mm/nohash/tlb.c | 9 -

[PATCH v4 14/17] powerpc/64s: Fix radix MMU when MMU_FTR_HPTE_TABLE is clear

2021-11-25 Thread Nicholas Piggin
There are a few places that require MMU_FTR_HPTE_TABLE to be set even when running in radix mode. Fix those up. Signed-off-by: Nicholas Piggin --- arch/powerpc/mm/pgtable.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/powerpc/mm/pgtable.c b/arch/powerpc/mm/pg

[PATCH v4 15/17] powerpc/64s: Make hash MMU support configurable

2021-11-25 Thread Nicholas Piggin
This adds Kconfig selection which allows 64s hash MMU support to be disabled. It can be disabled if radix support is enabled, the minimum supported CPU type is POWER9 (or higher), and KVM is not selected. Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 3 ++- arch/

[PATCH v4 16/17] powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU

2021-11-25 Thread Nicholas Piggin
Compiling out hash support code when CONFIG_PPC_64S_HASH_MMU=n saves 128kB kernel image size (90kB text) on powernv_defconfig minus KVM, 350kB on pseries_defconfig minus KVM, 40kB on a tiny config. Signed-off-by: Nicholas Piggin --- arch/powerpc/Kconfig | 2 +- arch/pow

[PATCH v4 17/17] powerpc/microwatt: add POWER9_CPU, clear PPC_64S_HASH_MMU

2021-11-25 Thread Nicholas Piggin
Microwatt implements a subset of ISA v3.0 (which is equivalent to the POWER9_CPU option). It is radix-only, so does not require hash MMU support. This saves 20kB compressed dtbImage and 56kB vmlinux size. Signed-off-by: Nicholas Piggin --- arch/powerpc/configs/microwatt_defconfig | 3 ++- arch/

[powerpc:fixes-test] BUILD SUCCESS 5bb60ea611db1e04814426ed4bd1c95d1487678e

2021-11-25 Thread kernel test robot
allmodconfig i386 randconfig-c001-20211125 ia64 allmodconfig ia64defconfig ia64 allyesconfig m68k allmodconfig m68kdefconfig m68k

Re: bug: usb: gadget: FSL_UDC_CORE Corrupted request list leads to unrecoverable loop.

2021-11-25 Thread Thorsten Leemhuis
Hi, this is your Linux kernel regression tracker speaking. Top-posting for once, to make this easy to process for everyone: Li Yang and Felipe Balbi: how to move on with this? It's quite an old regression, but nevertheless it is one and thus should be fixed. Part of my position is to make that ha

Re: [PATCH v2 2/2] powerpc:85xx: fix timebase sync issue when CONFIG_HOTPLUG_CPU=n

2021-11-25 Thread Martin Kennedy
Hi there, Yes, I can test this patch. I have added it to my tree and removed the reversion, and can confirm that the second CPU comes up correctly now. Martin On Thu, Nov 25, 2021 at 2:23 AM Xiaoming Ni wrote: > > On 2021/11/25 12:20, Martin Kennedy wrote: > > Hi there, > > > > I have bisected

Re: [PATCH v3 0/4] powerpc: watchdog fixes

2021-11-25 Thread Laurent Dufour
On 25/11/2021, 10:36:43, Michael Ellerman wrote: > On Wed, 10 Nov 2021 12:50:52 +1000, Nicholas Piggin wrote: >> These are some watchdog fixes and improvements, in particular a >> deadlock between the wd_smp_lock and console lock when the watchdog >> fires, found by Laurent. >> >> Thanks, >> Nick >

Re: [5.16.0-rc2] Kernel warning while running sigfuz w/PPC_IRQ_SOFT_MASK_DEBUG

2021-11-25 Thread Sachin Sant
>> [ 1032.913679] GPR00: c000c6d8 cc7e7e10 2fcdac67 >> 0800 >> [ 1032.913679] GPR04: 60d67006 8280f032 45faa436 >> c001eb3d4c00 >> [ 1032.913679] GPR08: 8280f032 0001 0001 >> 60d67004 >>

Re: [PATCH v3 0/4] powerpc: watchdog fixes

2021-11-25 Thread Michal Suchánek
Hello, On Thu, Nov 25, 2021 at 04:11:03PM +0100, Laurent Dufour wrote: > On 25/11/2021, 10:36:43, Michael Ellerman wrote: > > On Wed, 10 Nov 2021 12:50:52 +1000, Nicholas Piggin wrote: > >> These are some watchdog fixes and improvements, in particular a > >> deadlock between the wd_smp_lock and co

[PATCH] powerpc: mm: radix_tlb: rearrange the if-else block

2021-11-25 Thread Anders Roxell
Clang warns: arch/powerpc/mm/book3s64/radix_tlb.c:1191:23: error: variable 'hstart' is uninitialized when used here [-Werror,-Wuninitialized] __tlbiel_va_range(hstart, hend, pid, ^~ arch/powerpc/mm/book3s64/radi

Re: [PATCH v4 00/17] powerpc: Make hash MMU code build configurable

2021-11-25 Thread Christophe Leroy
Le 25/11/2021 à 13:50, Nicholas Piggin a écrit : Now that there's a platform that can make good use of it, here's a series that can prevent the hash MMU code being built for 64s platforms that don't need it. # CONFIG_PPC_64S_HASH_MMU is not set :1559:2: warning: #warning syscall futex_wait

Re: [PATCH v3 0/4] powerpc: watchdog fixes

2021-11-25 Thread Laurent Dufour
On 25/11/2021, 16:26:33, Michal Suchánek wrote: > Hello, > > On Thu, Nov 25, 2021 at 04:11:03PM +0100, Laurent Dufour wrote: >> On 25/11/2021, 10:36:43, Michael Ellerman wrote: >>> On Wed, 10 Nov 2021 12:50:52 +1000, Nicholas Piggin wrote: These are some watchdog fixes and improvements, in pa

Re: [PATCH] powerpc/watchdog: Fix wd_smp_last_reset_tb reporting

2021-11-25 Thread Laurent Dufour
On 25/11/2021, 11:33:46, Nicholas Piggin wrote: > wd_smp_last_reset_tb now gets reset by watchdog_smp_panic() as part of > marking CPUs stuck and removing them from the pending mask before it > begins any printing. This causes last reset times reported to be off. > > Fix this by reading it into a

Re: [PATCH v4 00/17] powerpc: Make hash MMU code build configurable

2021-11-25 Thread Christophe Leroy
Le 25/11/2021 à 17:35, Christophe Leroy a écrit : Le 25/11/2021 à 13:50, Nicholas Piggin a écrit : Now that there's a platform that can make good use of it, here's a series that can prevent the hash MMU code being built for 64s platforms that don't need it. # CONFIG_PPC_64S_HASH_MMU is no

[PATCH v2 rebased 2/9] powerpc/mm: Move vma_mmu_pagesize() and hugetlb_get_unmapped_area() to slice.c

2021-11-25 Thread Christophe Leroy
vma_mmu_pagesize() is only required for slices, otherwise there is a generic weak version. hugetlb_get_unmapped_area() is dedicated to slices. radix__hugetlb_get_unmapped_area() as well. Move them to slice.c Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/hugetlb.h | 4

[PATCH v2 rebased 6/9] mm: Allow arch specific arch_randomize_brk() with CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT

2021-11-25 Thread Christophe Leroy
Commit e7142bf5d231 ("arm64, mm: make randomization selected by generic topdown mmap layout") introduced a default version of arch_randomize_brk() provided when CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT is selected. powerpc could select CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT but needs to

[PATCH v2 rebased 1/9] powerpc/mm: Make slice specific to book3s/64

2021-11-25 Thread Christophe Leroy
Since commit 555904d07eef ("powerpc/8xx: MM_SLICE is not needed anymore") only book3s/64 selects CONFIG_PPC_MM_SLICES. Move slice.c into mm/book3s64/ Signed-off-by: Christophe Leroy --- v2: Remove now unnecessary #ifdef CONFIG_PPC_BOOK3S_64 in slice.c --- arch/powerpc/mm/Makefile

[PATCH v2 rebased 0/9] Convert powerpc to default topdown mmap layout

2021-11-25 Thread Christophe Leroy
Same as v2 but rebased on top of Nic's v4 series "powerpc: Make hash MMU code build configurable" This series converts powerpc to default topdown mmap layout. powerpc provides its own arch_get_unmapped_area() only when slices are needed, which is only for book3s/64. First part of the series move

[PATCH v2 rebased 9/9] powerpc: Simplify and move arch_randomize_brk()

2021-11-25 Thread Christophe Leroy
arch_randomize_brk() is only needed for hash on book3s/64, for other platforms the one provided by the default mmap layout is good enough. Move it to hash_utils.c and use randomize_page() like the generic one. And properly opt out the radix case instead of making an assumption on mmu_highuser_ssi

[PATCH v2 rebased 8/9] powerpc/mm: Properly randomise mmap with slices

2021-11-25 Thread Christophe Leroy
Now that powerpc switched to default topdown mmap layout, mm->mmap_base is properly randomised. However slice_find_area_bottomup() doesn't use mm->mmap_base but uses the fixed TASK_UNMAPPED_BASE instead. slice_find_area_bottomup() being used as a fallback to slice_find_area_topdown(), it can't us

[PATCH v2 rebased 7/9] powerpc/mm: Convert to default topdown mmap layout

2021-11-25 Thread Christophe Leroy
Select CONFIG_ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT and remove arch/powerpc/mm/mmap.c This change provides standard randomisation of mmaps. See commit 8b8addf891de ("x86/mm/32: Enable full randomization on i386 and X86_32") for all the benefits of mmap randomisation. Signed-off-by: Christophe Le

[PATCH v2 rebased 5/9] powerpc/mm: Call radix__arch_get_unmapped_area() from arch_get_unmapped_area()

2021-11-25 Thread Christophe Leroy
Instead of setting mm->get_unmapped_area() to either arch_get_unmapped_area() or radix__arch_get_unmapped_area(), always set it to arch_get_unmapped_area() and call radix__arch_get_unmapped_area() from there when radix is enabled. To keep radix__arch_get_unmapped_area() static, move it to slice.c

[PATCH v2 rebased 4/9] powerpc/mm: Remove asm/slice.h

2021-11-25 Thread Christophe Leroy
Move necessary stuff in asm/book3s/64/slice.h and remove asm/slice.h Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/hash.h | 3 ++ arch/powerpc/include/asm/book3s/64/mmu-hash.h | 1 + arch/powerpc/include/asm/book3s/64/slice.h| 18 + arch/powerpc/include

[PATCH v2 rebased 3/9] powerpc/mm: Remove CONFIG_PPC_MM_SLICES

2021-11-25 Thread Christophe Leroy
CONFIG_PPC_MM_SLICES is always selected by hash book3s/64. CONFIG_PPC_MM_SLICES is never selected by other platforms. Remove it. Signed-off-by: Christophe Leroy --- arch/powerpc/include/asm/book3s/64/hash.h | 4 ++-- arch/powerpc/include/asm/hugetlb.h| 2 +- arch/powerpc/include/asm/p

[PATCH v2 0/6] KEXEC_SIG with appended signature

2021-11-25 Thread Michal Suchanek
Hello, This is resend of the KEXEC_SIG patchset. The first patch is new because it'a a cleanup that does not require any change to the module verification code. The second patch is the only one that is intended to change any functionality. The rest only deduplicates code but I did not receive a

[PATCH v2 1/6] s390/kexec_file: Don't opencode appended signature check.

2021-11-25 Thread Michal Suchanek
Module verification already implements appeded signature check. Reuse it for kexec_file. Signed-off-by: Michal Suchanek --- arch/s390/kernel/machine_kexec_file.c | 22 +- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/arch/s390/kernel/machine_kexec_file.c b/

[PATCH v2 3/6] kexec_file: Don't opencode appended signature verification.

2021-11-25 Thread Michal Suchanek
Module verification already implements appeded signature verification. Reuse it for kexec_file. Signed-off-by: Michal Suchanek --- arch/powerpc/kexec/elf_64.c | 21 - arch/s390/kernel/machine_kexec_file.c | 21 - include/linux/verification.h

[PATCH v2 5/6] module: Use key_being_used_for for log messages in verify_appended_signature

2021-11-25 Thread Michal Suchanek
Add value for kexec appended signature and pass in key_being_used_for enum rather than a string to verify_appended_signature to produce log messages about the signature. Signed-off-by: Michal Suchanek --- arch/powerpc/kexec/elf_64.c | 2 +- arch/s390/kernel/machine_kexec_file.c

[PATCH v2 4/6] module: strip the signature marker in the verification function.

2021-11-25 Thread Michal Suchanek
It is stripped by each caller separately. Signed-off-by: Michal Suchanek --- arch/powerpc/kexec/elf_64.c | 9 - arch/s390/kernel/machine_kexec_file.c | 9 - kernel/module.c | 7 +-- kernel/module_signing.c | 12 ++-- 4

[PATCH v2 2/6] powerpc/kexec_file: Add KEXEC_SIG support.

2021-11-25 Thread Michal Suchanek
Copy the code from s390x Signed-off-by: Michal Suchanek --- arch/powerpc/Kconfig| 11 +++ arch/powerpc/kexec/elf_64.c | 36 2 files changed, 47 insertions(+) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index ac0c515552fd..ecc1227

[PATCH v2 6/6] module: Move duplicate mod_check_sig users code to mod_parse_sig

2021-11-25 Thread Michal Suchanek
Multiple users of mod_check_sig check for the marker, then call mod_check_sig, extract signature length, and remove the signature. Put this code in one place together with mod_check_sig. Signed-off-by: Michal Suchanek --- include/linux/module_signature.h| 1 + kernel/module_signature.c

[PATCH v2 1/2] powerpc: handle kdump appropriately with crash_kexec_post_notifiers option

2021-11-25 Thread Hari Bathini
Kdump can be triggered after panic_notifers since commit f06e5153f4ae2 ("kernel/panic.c: add "crash_kexec_post_notifiers" option for kdump after panic_notifers") introduced crash_kexec_post_notifiers option. But using this option would mean smp_send_stop(), that marks all other CPUs as offline, get

[PATCH v2 2/2] ppc64/fadump: fix inaccurate CPU state info in vmcore generated with panic

2021-11-25 Thread Hari Bathini
In panic path, fadump is triggered via a panic notifier function. Before calling panic notifier functions, smp_send_stop() gets called, which stops all CPUs except the panic'ing CPU. Commit 8389b37dffdc ("powerpc: stop_this_cpu: remove the cpu from the online map.") and again commit bab26238bbd4 ("

Re: [PATCH v4 16/17] powerpc/64s: Move hash MMU support code under CONFIG_PPC_64S_HASH_MMU

2021-11-25 Thread kernel test robot
Hi Nicholas, I love your patch! Yet something to improve: [auto build test ERROR on powerpc/next] [also build test ERROR on char-misc/char-misc-testing v5.16-rc2 next-20211125] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

Re: [PATCH 0/5] xen: cleanup detection of non-essential pv devices

2021-11-25 Thread Boris Ostrovsky
On 11/22/21 3:20 AM, Juergen Gross wrote: On 22.10.21 08:47, Juergen Gross wrote: Today the non-essential pv devices are hard coded in the xenbus driver and this list is lacking multiple entries. This series reworks the detection logic of non-essential devices by adding a flag for that purpos

[powerpc:topic/ppc-kvm] BUILD SUCCESS 9c5a432a558105d6145b058fad78eb6fcf3d4c38

2021-11-25 Thread kernel test robot
allmodconfig i386 randconfig-c001-20211125 ia64 allmodconfig ia64defconfig ia64 allyesconfig m68k allmodconfig m68kdefconfig m68k

[powerpc:next] BUILD SUCCESS 3d030e301856da366380b3865fce6c03037b08a6

2021-11-25 Thread kernel test robot
allmodconfig i386 randconfig-c001-20211125 ia64 allmodconfig ia64defconfig ia64 allyesconfig m68k allmodconfig m68kdefconfig m68k

[powerpc:next-test] BUILD SUCCESS dbf69a1d7c9daa284ec98147f627321bdfd64288

2021-11-25 Thread kernel test robot
allmodconfig i386 randconfig-c001-20211125 ia64 allmodconfig ia64defconfig ia64 allyesconfig m68k allmodconfig m68kdefconfig

Re: [PATCH v2 9/9] powerpc: Simplify and move arch_randomize_brk()

2021-11-25 Thread kernel test robot
Hi Christophe, I love your patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on hnaz-mm/master linus/master v5.16-rc2 next-20211125] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest

Re: [PATCH] powerpc/watchdog: Fix wd_smp_last_reset_tb reporting

2021-11-25 Thread Nicholas Piggin
Excerpts from Laurent Dufour's message of November 26, 2021 3:21 am: > On 25/11/2021, 11:33:46, Nicholas Piggin wrote: >> wd_smp_last_reset_tb now gets reset by watchdog_smp_panic() as part of >> marking CPUs stuck and removing them from the pending mask before it >> begins any printing. This cause

Re: [PATCH v4 00/17] powerpc: Make hash MMU code build configurable

2021-11-25 Thread Nicholas Piggin
Excerpts from Christophe Leroy's message of November 26, 2021 3:35 am: > > > Le 25/11/2021 à 17:35, Christophe Leroy a écrit : >> >> >> Le 25/11/2021 à 13:50, Nicholas Piggin a écrit : >>> Now that there's a platform that can make good use of it, here's >>> a series that can prevent the hash MM

[Bug 205099] KASAN hit at raid6_pq: BUG: Unable to handle kernel data access at 0x00f0fd0d

2021-11-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 --- Comment #34 from Erhard F. (erhar...@mailbox.org) --- Created attachment 299711 --> https://bugzilla.kernel.org/attachment.cgi?id=299711&action=edit dmesg (5.15.5, OUTLINE KASAN, PowerMac G4 DP) Finally my G4 DP got its' fixed & overhauled

[Bug 205099] KASAN hit at raid6_pq: BUG: Unable to handle kernel data access at 0x00f0fd0d

2021-11-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 --- Comment #35 from Erhard F. (erhar...@mailbox.org) --- Created attachment 299713 --> https://bugzilla.kernel.org/attachment.cgi?id=299713&action=edit dmesg (5.15.5, INLINE KASAN, PowerMac G4 DP) -- You may reply to this email to add a comme

[Bug 205099] KASAN hit at raid6_pq: BUG: Unable to handle kernel data access at 0x00f0fd0d

2021-11-25 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=205099 Erhard F. (erhar...@mailbox.org) changed: What|Removed |Added Attachment #292347|0 |1 is obsolete|

[PATCH] powerpc/64s/radix: Fix unmapping huge vmaps when CONFIG_HUGETLB_PAGE=n

2021-11-25 Thread Nicholas Piggin
pmd_huge is defined out to false when HUGETLB_PAGE is not configured, but the vmap code still installs huge PMDs. This leads to errors encountering bad PMDs when vunmapping because it is not seen as a huge PTE, and the bad PMD check catches it. The end result may not be much more serious than some

[PATCH AUTOSEL 5.15 03/39] powerpc/pseries/ddw: Revert "Extend upper limit for huge DMA window for persistent memory"

2021-11-25 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 2d33f5504490a9d90924476dbccd4a5349ee1ad0 ] This reverts commit 54fc3c681ded9437e4548e2501dc1136b23cfa9a which does not allow 1:1 mapping even for the system RAM which is usually possible. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael El

[PATCH AUTOSEL 5.15 04/39] powerpc/pseries/ddw: Do not try direct mapping with persistent memory and one window

2021-11-25 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit ad3976025b311cdeb822ad3e7a7554018cb0f83f ] There is a possibility of having just one DMA window available with a limited capacity which the existing code does not handle that well. If the window is big enough for the system RAM but less than MAX_PHYSM

[PATCH AUTOSEL 5.10 03/28] powerpc/pseries/ddw: Revert "Extend upper limit for huge DMA window for persistent memory"

2021-11-25 Thread Sasha Levin
From: Alexey Kardashevskiy [ Upstream commit 2d33f5504490a9d90924476dbccd4a5349ee1ad0 ] This reverts commit 54fc3c681ded9437e4548e2501dc1136b23cfa9a which does not allow 1:1 mapping even for the system RAM which is usually possible. Signed-off-by: Alexey Kardashevskiy Signed-off-by: Michael El

[PATCH 1/3] powerpc/code-patching: work around code patching verification in patching tests

2021-11-25 Thread Nicholas Piggin
Code patching tests patch the stack and (non-module) vmalloc space now, which falls afoul of the new address check. The stack patching can easily be fixed, but the vmalloc patching is more difficult. For now, add an ugly workaround to skip the check while the test code is running. Fixes: 8b8a8f0a

  1   2   >