Re: [PATCH v4.19 0/2] Custom backports for powerpc SLB issues

2022-04-29 Thread Greg KH
On Thu, Apr 28, 2022 at 10:41:48PM +1000, Michael Ellerman wrote: > Hi Greg, > > Here are two custom backports to v4.19 for some powerpc issues we've > discovered. > Both were fixed upstream as part of a large non-backportable rewrite. Other > stable > kernel versions are not affected. > > chee

Patch "powerpc/64/interrupt: Temporarily save PPR on stack to fix register corruption due to SLB miss" has been added to the 4.19-stable tree

2022-04-29 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/64/interrupt: Temporarily save PPR on stack to fix register corruption due to SLB miss to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=su

Patch "powerpc/64s: Unmerge EX_LR and EX_DAR" has been added to the 4.19-stable tree

2022-04-29 Thread gregkh
This is a note to let you know that I've just added the patch titled powerpc/64s: Unmerge EX_LR and EX_DAR to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: powerpc-64s-unme

Re: [PATCH 17/30] tracing: Improve panic/die notifiers

2022-04-29 Thread Sergei Shtylyov
Hello! On 4/28/22 1:49 AM, Guilherme G. Piccoli wrote: > Currently the tracing dump_on_oops feature is implemented > through separate notifiers, one for die/oops and the other > for panic. With the addition of panic notifier "id", this > patch makes use of such "id" to unify both functions. > >

Re: [PATCH] powerpc/time: Always set decrementer in timer_interrupt()

2022-04-29 Thread Michael Ellerman
Nicholas Piggin writes: > Excerpts from Nicholas Piggin's message of April 21, 2022 12:07 pm: >> Excerpts from Michal Suchánek's message of April 21, 2022 12:28 am: >>> Hello, >>> >>> On Thu, Apr 21, 2022 at 12:16:57AM +1000, Michael Ellerman wrote: This is a partial revert of commit 0faf20a

Re: L2 SRAM on PowerPC e500 and Caching-inhibited bit

2022-04-29 Thread Michael Ellerman
Pali Rohár writes: > Hello! > > I started playing with PowerPC e500 architecture, it is something really > new for me and I suspect that I found a bug in U-Boot code which > configures L2 cache as initial SRAM (L2 with locked lines). > > U-Boot code for the first half of L2 cache sets Caching-inhi

[PATCH 1/3] mm: change huge_ptep_clear_flush() to return the original pte

2022-04-29 Thread Baolin Wang
It is incorrect to use ptep_clear_flush() to nuke a hugetlb page table when unmapping or migrating a hugetlb page, and will change to use huge_ptep_clear_flush() instead in the following patches. So this is a preparation patch, which changes the huge_ptep_clear_flush() to return the original pte t

[PATCH 2/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when migration

2022-04-29 Thread Baolin Wang
On some architectures (like ARM64), it can support CONT-PTE/PMD size hugetlb, which means it can support not only PMD/PUD size hugetlb: 2M and 1G, but also CONT-PTE/PMD size: 64K and 32M if a 4K page size specified. When migrating a hugetlb page, we will get the relevant page table entry by huge_p

[PATCH 0/3] Fix CONT-PTE/PMD size hugetlb issue when unmapping or migrating

2022-04-29 Thread Baolin Wang
Hi, Now migrating a hugetlb page or unmapping a poisoned hugetlb page, we'll use ptep_clear_flush() and set_pte_at() to nuke the page table entry and remap it, and this is incorrect for CONT-PTE or CONT-PMD size hugetlb page, which will cause potential data consistent issue. This patch set will ch

[PATCH 3/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when unmapping

2022-04-29 Thread Baolin Wang
On some architectures (like ARM64), it can support CONT-PTE/PMD size hugetlb, which means it can support not only PMD/PUD size hugetlb: 2M and 1G, but also CONT-PTE/PMD size: 64K and 32M if a 4K page size specified. When unmapping a hugetlb page, we will get the relevant page table entry by huge_p

Re: L2 SRAM on PowerPC e500 and Caching-inhibited bit

2022-04-29 Thread Pali Rohár
On Friday 29 April 2022 22:57:03 Michael Ellerman wrote: > Pali Rohár writes: > > Hello! > > > > I started playing with PowerPC e500 architecture, it is something really > > new for me and I suspect that I found a bug in U-Boot code which > > configures L2 cache as initial SRAM (L2 with locked lin

Re: [PATCH 17/30] tracing: Improve panic/die notifiers

2022-04-29 Thread Steven Rostedt
On Fri, 29 Apr 2022 12:22:44 +0300 Sergei Shtylyov wrote: > > + switch (ev) { > > + case DIE_OOPS: > > + do_dump = 1; > > + break; > > + case PANIC_NOTIFIER: > > + do_dump = 1; > > + break; > >Why not: > > case DIE_OOPS: > case PAN

Re: [powerpc] kernel BUG at mm/mmap.c:3164! w/ltp(mmapstress03)

2022-04-29 Thread Sachin Sant
> On 28-Apr-2022, at 10:26 PM, Sachin Sant wrote: > > While running LTP tests (mmapstress03 specifically) against > 5.18.0-rc4-next-20220428 > booted on IBM Power server mentioned BUG is encountered. > > # ./mmapstress03 > mmapstress030 TINFO : uname.machine=ppc64le kernel is 64bit > m

Re: [PATCH 17/30] tracing: Improve panic/die notifiers

2022-04-29 Thread Guilherme G. Piccoli
On 29/04/2022 10:23, Steven Rostedt wrote: > On Fri, 29 Apr 2022 12:22:44 +0300 > Sergei Shtylyov wrote: > >>> + switch (ev) { >>> + case DIE_OOPS: >>> + do_dump = 1; >>> + break; >>> + case PANIC_NOTIFIER: >>> + do_dump = 1; >>> + break; >> >>W

[RFC v2 01/39] Kconfig: introduce HAS_IOPORT option and select it as necessary

2022-04-29 Thread Niklas Schnelle
We introduce a new HAS_IOPORT Kconfig option to indicate support for I/O Port access. In a future patch HAS_IOPORT=n will disable compilation of the I/O accessor functions inb()/outb() and friends on architectures which can not meaningfully support legacy I/O spaces such as s390 or where such suppo

Re: [PATCH 17/30] tracing: Improve panic/die notifiers

2022-04-29 Thread Steven Rostedt
On Fri, 29 Apr 2022 10:46:35 -0300 "Guilherme G. Piccoli" wrote: > Thanks Sergei and Steven, good idea! I thought about the switch change > you propose, but I confess I got a bit confused by the "fallthrough" > keyword - do I need to use it? No. The fallthrough keyword is only needed when there'

Re: [PATCH 12/30] parisc: Replace regular spinlock with spin_trylock on panic path

2022-04-29 Thread Guilherme G. Piccoli
On 28/04/2022 13:55, Helge Deller wrote: > [...] > You may add: > Acked-by: Helge Deller # parisc > > Helge Thanks Helge, added! Cheers, Guilherme > > >> --- >> arch/parisc/include/asm/pdc.h | 1 + >> arch/parisc/kernel/firmware.c | 27 +++ >> drivers/parisc/power.

Re: [PATCH 17/30] tracing: Improve panic/die notifiers

2022-04-29 Thread Guilherme G. Piccoli
On 29/04/2022 10:56, Steven Rostedt wrote: > [...] > No. The fallthrough keyword is only needed when there's code between case > labels. As it is very common to list multiple cases for the same code path. > That is: > > case DIE_OOPS: > case PANIC_NOTIFIER: > do_dump = 1;

[next] powerpc: multiple definition of `____cacheline_aligned'; sound/core/oss/pcm_oss.o:(.bss+0x40): first defined here

2022-04-29 Thread Naresh Kamboju
Following powerpc builds failed on Linux next-20220428 and next-20220429. Regressions found on powerpc: - gcc-11-ppc64e_defconfig - gcc-10-ppc64e_defconfig - gcc-9-ppc64e_defconfig - gcc-8-ppc64e_defconfig - clang-14-ppc64e_defconfig - clang-nightly-ppc64e_defconfig - clang

Re: [PATCH 24/30] panic: Refactor the panic path

2022-04-29 Thread Guilherme G. Piccoli
On 27/04/2022 21:28, Randy Dunlap wrote: > > > On 4/27/22 15:49, Guilherme G. Piccoli wrote: >> +crash_kexec_post_notifiers >> +This was DEPRECATED - users should always prefer the > > This is DEPRECATED - users should always prefer the > >> +

Re: [PATCH v6] PCI hotplug: rpaphp: Error out on busy status from get-sensor-state

2022-04-29 Thread Bjorn Helgaas
On Thu, Apr 28, 2022 at 05:31:38PM -0500, Nathan Lynch wrote: > Bjorn Helgaas writes: > > On Tue, Apr 26, 2022 at 11:07:39PM +0530, Mahesh Salgaonkar wrote: > >> +/* > >> + * RTAS call get-sensor-state(DR_ENTITY_SENSE) return values as per PAPR: > >> + *-1: Hardware Error > >> + *-2: RTAS_

Re: [PATCH v2 2/2] ftrace: recordmcount: Handle sections with no non-weak symbols

2022-04-29 Thread Naveen N. Rao
Steven Rostedt wrote: On Thu, 28 Apr 2022 22:49:52 +0530 "Naveen N. Rao" wrote: But, with ppc64 elf abi v1 which only supports the old -pg flag, mcount location can differ between the weak and non-weak variants of a function. In such scenarios, one of the two mcount entries will be invalid. Su

Re: [PATCH 09/30] coresight: cpu-debug: Replace mutex with mutex_trylock on panic notifier

2022-04-29 Thread Guilherme G. Piccoli
On 28/04/2022 05:11, Suzuki K Poulose wrote: > Hi Guilherme, > [...] > How would you like to proceed with queuing this ? I am happy > either way. In case you plan to push this as part of this > series (I don't see any potential conflicts) : > > Reviewed-by: Suzuki K Poulose Thanks for your revi

Re: [PATCH 20/30] panic: Add the panic informational notifier list

2022-04-29 Thread Guilherme G. Piccoli
Thanks Paul and Suzuki for the ACKs. Cheers, Guilherme

Re: [PATCH 21/30] panic: Introduce the panic pre-reboot notifier list

2022-04-29 Thread Guilherme G. Piccoli
On 28/04/2022 13:26, Corey Minyard wrote: > [...] > > For the IPMI portion: > > Acked-by: Corey Minyard Thanks Alex and Corey for the ACKs! > > Note that the IPMI panic_event() should always return, but it may take > some time, especially if the IPMI controller is no longer functional. > So t

Re: [PATCH 21/30] panic: Introduce the panic pre-reboot notifier list

2022-04-29 Thread Max Filippov
On Wed, Apr 27, 2022 at 3:55 PM Guilherme G. Piccoli wrote: > > This patch renames the panic_notifier_list to panic_pre_reboot_list; > the idea is that a subsequent patch will refactor the panic path > in order to better split the notifiers, running some of them very > early, some of them not so e

RE: [PATCH 02/30] ARM: kexec: Disable IRQs/FIQs also on crash CPUs shutdown path

2022-04-29 Thread Michael Kelley (LINUX)
From: Guilherme G. Piccoli Sent: Wednesday, April 27, 2022 3:49 PM > > Currently the regular CPU shutdown path for ARM disables IRQs/FIQs > in the secondary CPUs - smp_send_stop() calls ipi_cpu_stop(), which > is responsible for that. This makes sense, since we're turning off > such CPUs, puttin

RE: [PATCH 18/30] notifier: Show function names on notifier routines if DEBUG_NOTIFIERS is set

2022-04-29 Thread Michael Kelley (LINUX)
From: Guilherme G. Piccoli Sent: Wednesday, April 27, 2022 3:49 PM > > Currently we have a debug infrastructure in the notifiers file, but > it's very simple/limited. This patch extends it by: > > (a) Showing all registered/unregistered notifiers' callback names; > > (b) Adding a dynamic debug

RE: [PATCH 16/30] drivers/hv/vmbus, video/hyperv_fb: Untangle and refactor Hyper-V panic notifiers

2022-04-29 Thread Michael Kelley (LINUX)
From: Guilherme G. Piccoli Sent: Wednesday, April 27, 2022 3:49 PM > > Currently Hyper-V guests are among the most relevant users of the panic > infrastructure, like panic notifiers, kmsg dumpers, etc. The reasons rely > both in cleaning-up procedures (closing a hypervisor <-> guest connection,

RE: [PATCH 19/30] panic: Add the panic hypervisor notifier list

2022-04-29 Thread Michael Kelley (LINUX)
From: Guilherme G. Piccoli Sent: Wednesday, April 27, 2022 3:49 PM > > The goal of this new panic notifier is to allow its users to register > callbacks to run very early in the panic path. This aims hypervisor/FW > notification mechanisms as well as simple LED functions, and any other > simple

Re: [PATCH 0/2] Fix session topology test for powerpc and add utility function to get cpuinfo entries

2022-04-29 Thread Disha Goel
-Original Message- From: Athira Rajeev To: a...@kernel.org, jo...@kernel.org, disg...@linux.vnet.ibm.com Cc: m...@ellerman.id.au, linux-perf-us...@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, ma...@linux.vnet.ibm.com, rnsas...@linux.ibm.com, kj...@linux.ibm.com, irog...@google.com S

RE: [PATCH 24/30] panic: Refactor the panic path

2022-04-29 Thread Michael Kelley (LINUX)
From: Guilherme G. Piccoli Sent: Wednesday, April 27, 2022 3:49 PM > > The panic() function is somewhat convoluted - a lot of changes were > made over the years, adding comments that might be misleading/outdated > now, it has a code structure that is a bit complex to follow, with > lots of condi

Re: [PATCH v2 2/2] ftrace: recordmcount: Handle sections with no non-weak symbols

2022-04-29 Thread Steven Rostedt
On Fri, 29 Apr 2022 23:09:19 +0530 "Naveen N. Rao" wrote: > If I'm understanding your suggestion right: > - we now create a new section in each object file: __mcount_loc_weak, > and capture such relocations using weak symbols there. Yes, but it would be putting the same information it puts in

Re: [PATCH v2 2/2] ftrace: recordmcount: Handle sections with no non-weak symbols

2022-04-29 Thread Naveen N. Rao
Steven Rostedt wrote: On Fri, 29 Apr 2022 23:09:19 +0530 "Naveen N. Rao" wrote: If I'm understanding your suggestion right: - we now create a new section in each object file: __mcount_loc_weak, and capture such relocations using weak symbols there. Yes, but it would be putting the same in

Re: [PATCH v2 2/2] ftrace: recordmcount: Handle sections with no non-weak symbols

2022-04-29 Thread Steven Rostedt
On Sat, 30 Apr 2022 01:03:01 +0530 "Naveen N. Rao" wrote: > > The point of this section is to know which functions in __mcount_loc may > > have been overridden, as they would be found in the __mcount_loc_weak > > section. And then we can do something "special" to them. > > I'm not sure I follo

Re: [PATCH 3/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when unmapping

2022-04-29 Thread Gerald Schaefer
On Fri, 29 Apr 2022 16:14:43 +0800 Baolin Wang wrote: > On some architectures (like ARM64), it can support CONT-PTE/PMD size > hugetlb, which means it can support not only PMD/PUD size hugetlb: > 2M and 1G, but also CONT-PTE/PMD size: 64K and 32M if a 4K page > size specified. > > When unmapping

Re: [PATCH 24/30] panic: Refactor the panic path

2022-04-29 Thread Guilherme G. Piccoli
On 29/04/2022 14:53, Michael Kelley (LINUX) wrote: > From: Guilherme G. Piccoli Sent: Wednesday, April 27, > 2022 3:49 PM >> [...] >> +panic_notifiers_level= >> +[KNL] Set the panic notifiers execution order. >> +Format: >> +We curr

Re: [PATCH 02/30] ARM: kexec: Disable IRQs/FIQs also on crash CPUs shutdown path

2022-04-29 Thread Guilherme G. Piccoli
Thanks Marc and Michael for the review/discussion. On 29/04/2022 15:20, Marc Zyngier wrote: > [...] > My expectations would be that, since we're getting here using an IPI, > interrupts are already masked. So what reenabled them the first place? > > Thanks, > > M. > Marc, I did some inve

Re: serial hang in qemu-system-ppc64 -M pseries

2022-04-29 Thread Fabiano Rosas
Rob Landley writes: > On 4/27/22 10:27, Thomas Huth wrote: >> On 26/04/2022 12.26, Rob Landley wrote: >>> When I cut and paste 80-ish characters of text into the Linux serial >>> console, it >>> reads 16 characters and stops. When I hit space, it reads another 16 >>> characters, >>> and if I ke

Re: [PATCH 02/30] ARM: kexec: Disable IRQs/FIQs also on crash CPUs shutdown path

2022-04-29 Thread Russell King (Oracle)
On Fri, Apr 29, 2022 at 06:38:19PM -0300, Guilherme G. Piccoli wrote: > Thanks Marc and Michael for the review/discussion. > > On 29/04/2022 15:20, Marc Zyngier wrote: > > [...] > > > My expectations would be that, since we're getting here using an IPI, > > interrupts are already masked. So what

Re: [PATCH 02/30] ARM: kexec: Disable IRQs/FIQs also on crash CPUs shutdown path

2022-04-29 Thread Guilherme G. Piccoli
On 29/04/2022 18:45, Russell King (Oracle) wrote: > [...] >> Marc, I did some investigation in the code (and tried/failed in the ARM >> documentation as well heh), but this is still not 100% clear for me. >> >> You're saying IPI calls disable IRQs/FIQs by default in the the target >> CPUs? Where do

Re: [PATCH 02/30] ARM: kexec: Disable IRQs/FIQs also on crash CPUs shutdown path

2022-04-29 Thread Marc Zyngier
On Fri, 29 Apr 2022 22:45:14 +0100, "Russell King (Oracle)" wrote: > > On Fri, Apr 29, 2022 at 06:38:19PM -0300, Guilherme G. Piccoli wrote: > > Thanks Marc and Michael for the review/discussion. > > > > On 29/04/2022 15:20, Marc Zyngier wrote: > > > [...] > > > > > My expectations would be tha

Re: [PATCH 19/30] panic: Add the panic hypervisor notifier list

2022-04-29 Thread Guilherme G. Piccoli
On 29/04/2022 14:30, Michael Kelley (LINUX) wrote: > From: Guilherme G. Piccoli Sent: Wednesday, April 27, > 2022 3:49 PM >> [...] >> >> @@ -2843,7 +2843,7 @@ static void __exit vmbus_exit(void) >> if (ms_hyperv.misc_features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) { >> kmsg_dum

Re: [PATCH 02/30] ARM: kexec: Disable IRQs/FIQs also on crash CPUs shutdown path

2022-04-29 Thread Marc Zyngier
On Wed, 27 Apr 2022 23:48:56 +0100, "Guilherme G. Piccoli" wrote: > > Currently the regular CPU shutdown path for ARM disables IRQs/FIQs > in the secondary CPUs - smp_send_stop() calls ipi_cpu_stop(), which > is responsible for that. This makes sense, since we're turning off > such CPUs, putting

Re: [PATCH 13/30] s390/consoles: Improve panic notifiers reliability

2022-04-29 Thread Heiko Carstens
On Wed, Apr 27, 2022 at 07:49:07PM -0300, Guilherme G. Piccoli wrote: > Currently many console drivers for s390 rely on panic/reboot notifiers > to invoke callbacks on these events. The panic() function disables local > IRQs, secondary CPUs and preemption, so callbacks invoked on panic are > effect

Re: [PATCH 13/30] s390/consoles: Improve panic notifiers reliability

2022-04-29 Thread Guilherme G. Piccoli
On 29/04/2022 15:46, Heiko Carstens wrote: > [...] > > Code looks good, and everything still seems to work. I applied this > internally for the time being, and if it passes testing, I'll schedule > it for the next merge window. > > Thanks! Perfect Heiko, thanks a bunch for your review and tests!

Re: [PATCH 21/30] panic: Introduce the panic pre-reboot notifier list

2022-04-29 Thread Guilherme G. Piccoli
On 29/04/2022 13:04, Max Filippov wrote: > [...] >> arch/xtensa/platforms/iss/setup.c | 4 ++--For xtensa: > > For xtensa: > Acked-by: Max Filippov > Perfect, thanks Max! Cheers, Guilherme

Re: [PATCH 18/30] notifier: Show function names on notifier routines if DEBUG_NOTIFIERS is set

2022-04-29 Thread Guilherme G. Piccoli
On 27/04/2022 22:01, Xiaoming Ni wrote: > [...] > Duplicate Code. > > Is it better to use __func__ and %pS? > > pr_info("%s: %pS\n", __func__, n->notifier_call); > > This is a great suggestion Xiaoming, much appreciated! I feel like reinventing the wheel here - with your idea, code was super c

Re: [PATCH 16/30] drivers/hv/vmbus, video/hyperv_fb: Untangle and refactor Hyper-V panic notifiers

2022-04-29 Thread Guilherme G. Piccoli
Hi Michael, first of all thanks for the great review, much appreciated. Some comments inline below: On 29/04/2022 14:16, Michael Kelley (LINUX) wrote: > [...] >> hypervisor I/O completion), so we postpone that to run late. But more >> relevant: this *same* vmbus unloading happens in the crash_shut

Re: [PATCH 3/3] mm: rmap: Fix CONT-PTE/PMD size hugetlb issue when unmapping

2022-04-29 Thread Baolin Wang
On 4/30/2022 4:02 AM, Gerald Schaefer wrote: On Fri, 29 Apr 2022 16:14:43 +0800 Baolin Wang wrote: On some architectures (like ARM64), it can support CONT-PTE/PMD size hugetlb, which means it can support not only PMD/PUD size hugetlb: 2M and 1G, but also CONT-PTE/PMD size: 64K and 32M if a

Re: [PATCH V12 00/20] riscv: Add COMPAT mode support for 64BIT

2022-04-29 Thread Guo Ren
On Fri, Apr 29, 2022 at 2:22 AM Palmer Dabbelt wrote: > > On Thu, 28 Apr 2022 05:25:19 PDT (-0700), guo...@kernel.org wrote: > > Hi Palmer, > > > > I see you have taken v12 into your riscv-compat branch and added > > asm/signal32.h. Do you need me help put compat_sigcontext & > > compat_ucontext &