Re: [PATCH 3/5] bpf ppc64: Add instructions for atomic_[cmp]xchg

2022-05-15 Thread Russell Currey
On Thu, 2022-05-12 at 13:15 +0530, Hari Bathini wrote: > This adds two atomic opcodes BPF_XCHG and BPF_CMPXCHG on ppc64, both > of which include the BPF_FETCH flag.  The kernel's atomic_cmpxchg > operation fundamentally has 3 operands, but we only have two register > fields. Therefore the operand

[powerpc:next-test] BUILD SUCCESS 5a915665235fbb6e13961870b670ba8445746f52

2022-05-15 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test branch HEAD: 5a915665235fbb6e13961870b670ba8445746f52 powerpc/64: Only WARN if __pa()/__va() called with bad addresses elapsed time: 725m configs tested: 55 configs skipped: 3 The following configs have

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

2022-05-15 Thread Guilherme G. Piccoli
On 12/05/2022 11:03, Petr Mladek wrote: > Hello, > > first, I am sorry for stepping into the discussion so late. > I was busy with some other stuff and this patchset is far > from trivial. > > Second, thanks a lot for putting so much effort into it. > Most of the changes look pretty good,

Re: [PATCH 11/30] um: Improve panic notifiers consistency and ordering

2022-05-15 Thread Guilherme G. Piccoli
On 13/05/2022 11:44, Johannes Berg wrote: > [...] >> Maybe Anton / Johannes / Richard could give their opinions - appreciate >> that, I'm not attached to the priority here, it's more about users' >> common usage of UML I can think of... > > It's hard to say ... In a sense I'm not sure it matters?

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-5.18-5 tag

2022-05-15 Thread pr-tracker-bot
The pull request you sent on Sun, 15 May 2022 21:57:18 +1000: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git > tags/powerpc-5.18-5 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/bc403203d65a874df2f3156046468052e4109cb0 Thank you! --

[GIT PULL] Please pull powerpc/linux.git powerpc-5.18-5 tag

2022-05-15 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull another powerpc fix for 5.18: The following changes since commit 348c71344111d7a48892e3e52264ff11956fc196: powerpc/papr_scm: Fix buffer overflow issue with CONFIG_FORTIFY_SOURCE (2022-05-06 12:44:03 +1000) are available

Re: [PATCH v3] KVM: PPC: Book3S PR: Enable MSR_DR for switch_mmu_context()

2022-05-15 Thread Michael Ellerman
On Tue, 10 May 2022 14:37:17 +0200, Alexander Graf wrote: > Commit 863771a28e27 ("powerpc/32s: Convert switch_mmu_context() to C") > moved the switch_mmu_context() to C. While in principle a good idea, it > meant that the function now uses the stack. The stack is not accessible > from real mode

Re: [PATCH v2 0/3] powerpc: Remove system call emulation

2022-05-15 Thread Michael Ellerman
On Wed, 30 Mar 2022 19:37:16 +0530, Naveen N. Rao wrote: > Since v1, the main change is to use helpers to decode primary/extended > opcode and the addition of macros for some of the used opcodes. > > - Naveen > > > > [...] Applied to powerpc/next. [1/3] powerpc: Sort and de-dup primary

Re: [PATCH v3] powerpc/rtas: Keep MSR[RI] set when calling RTAS

2022-05-15 Thread Michael Ellerman
On Wed, 4 May 2022 12:12:44 +0200, Laurent Dufour wrote: > RTAS runs in real mode (MSR[DR] and MSR[IR] unset) and in 32bits > big endian mode (MSR[SF,LE] unset). > > The change in MSR is done in enter_rtas() in a relatively complex way, > since the MSR value could be hardcoded. > > Furthermore,

Re: [PATCH] powerpc: fix typos in comments

2022-05-15 Thread Michael Ellerman
On Sat, 30 Apr 2022 20:56:54 +0200, Julia Lawall wrote: > Various spelling mistakes in comments. > Detected with the help of Coccinelle. > > Applied to powerpc/next. [1/1] powerpc: fix typos in comments https://git.kernel.org/powerpc/c/1fd02f6605b855b4af2883f29a2abc88bdf17857 cheers

Re: [PATCH v2 1/5] powerpc/8xx: Move CPM interrupt controller into a dedicated file

2022-05-15 Thread Michael Ellerman
On Wed, 6 Apr 2022 08:23:17 +0200, Christophe Leroy wrote: > CPM interrupt controller is quite standalone. Move it into a > dedicated file. It will help for next step which will change > it to a platform driver. > > This is pure code move, checkpatch report is ignored at this point, > except one

Re: [PATCH v1] powerpc: Use static call for get_irq()

2022-05-15 Thread Michael Ellerman
On Fri, 11 Mar 2022 13:38:04 +0100, Christophe Leroy wrote: > __do_irq() inconditionnaly calls ppc_md.get_irq() > > That's definitely a hot path. > > At the time being ppc_md.get_irq address is read every time > from ppc_md structure. > > [...] Applied to powerpc/next. [1/1] powerpc: Use

Re: [PATCH v1 1/6] powerpc/64: Move pci_device_from_OF_node() out of asm/pci-bridge.h

2022-05-15 Thread Michael Ellerman
On Tue, 8 Mar 2022 20:20:20 +0100, Christophe Leroy wrote: > Move pci_device_from_OF_node() in pci64.c because it needs definition > of struct device_node and is not worth inlining. > > ppc32.c already has it in pci32.c. > > That way pci-bridge.h doesn't need linux/of.h (Brought by asm/prom.h >

Re: [PATCH v1 0/4] Kill the time spent in patch_instruction()

2022-05-15 Thread Michael Ellerman
On Tue, 22 Mar 2022 16:40:17 +0100, Christophe Leroy wrote: > This series reduces by 70% the time required to activate > ftrace on an 8xx with CONFIG_STRICT_KERNEL_RWX. > > Measure is performed in function ftrace_replace_code() using mftb() > around the loop. > > With the series, > - Without

Re: [PATCH v10 00/13] Convert powerpc to default topdown mmap layout (v10)

2022-05-15 Thread Michael Ellerman
On Sat, 9 Apr 2022 19:17:24 +0200, Christophe Leroy wrote: > Rebased on top of v5.18-rc1 > > This series converts powerpc to default topdown mmap layout. > > First patch is a mm fix that should go into v5.18 and stable. > > Andrew, can you take it ? > > [...] Patches 2-13 applied to

Re: [PATCH] powerpc: Use rol32() instead of opencoding in csum_fold()

2022-05-15 Thread Michael Ellerman
On Wed, 9 Mar 2022 08:56:14 +0100, Christophe Leroy wrote: > rol32(x, 16) will do the rotate using rlwinm. > > No need to open code using inline assembly. > > Applied to powerpc/next. [1/1] powerpc: Use rol32() instead of opencoding in csum_fold()

Re: [PATCH] powerpc: Reduce csum_add() complexity for PPC64

2022-05-15 Thread Michael Ellerman
On Sat, 12 Feb 2022 08:36:17 +0100, Christophe Leroy wrote: > PPC64 does everything in C, gcc is able to skip calculation > when one of the operands in zero. > > Move the constant folding in PPC32 part. > > This helps GCC and reduces ppc64_defconfig by 170 bytes. > > [...] Applied to

Re: [PATCH] powerpc: align address to page boundary in change_page_attr()

2022-05-15 Thread Michael Ellerman
On Mon, 21 Mar 2022 16:44:45 +0100, Christophe Leroy wrote: > Aligning address to page boundary allows flush_tlb_kernel_range() > to know it's a single page flush and use tlbie instead of tlbia. > > On 603 we now have the following code in first leg of > change_page_attr(): > > 2c: 55

Re: [PATCH] powerpc/8xx: Simplify flush_tlb_kernel_range()

2022-05-15 Thread Michael Ellerman
On Mon, 21 Mar 2022 16:44:18 +0100, Christophe Leroy wrote: > In the same spirit as commit 63f501e07a85 ("powerpc/8xx: Simplify TLB > handling"), simplify flush_tlb_kernel_range() for 8xx. > > 8xx cannot be SMP, and has 'tlbie' and 'tlbia' instructions, so > an inline version of

Re: [PATCH] macintosh: Prepare cleanup of powerpc's asm/prom.h

2022-05-15 Thread Michael Ellerman
On Fri, 1 Apr 2022 19:15:53 +0200, Christophe Leroy wrote: > powerpc's asm/prom.h brings some headers that it doesn't > need itself. > > In order to clean it up, first add missing headers in > users of asm/prom.h > > > [...] Applied to powerpc/next. [1/1] macintosh: Prepare cleanup of

Re: [PATCH] cxl/ocxl: Prepare cleanup of powerpc's asm/prom.h

2022-05-15 Thread Michael Ellerman
On Sat, 2 Apr 2022 11:52:33 +0200, Christophe Leroy wrote: > powerpc's asm/prom.h brings some headers that it doesn't > need itself. > > In order to clean it up, first add missing headers in > users of asm/prom.h > > > [...] Applied to powerpc/next. [1/1] cxl/ocxl: Prepare cleanup of

Re: [PATCH kernel v3] powerpc/boot: Stop using RELACOUNT

2022-05-15 Thread Michael Ellerman
On Wed, 6 Apr 2022 17:00:38 +1000, Alexey Kardashevskiy wrote: > So far the RELACOUNT tag from the ELF header was containing the exact > number of R_PPC_RELATIVE/R_PPC64_RELATIVE relocations. However the LLVM's > recent change [1] make it equal-or-less than the actual number which > makes it

Re: [PATCH 3/6] powerpc/85xx: Fix virt_to_phys() off-by-one in smp_85xx_start_cpu()

2022-05-15 Thread Michael Ellerman
On Thu, 7 Apr 2022 00:57:59 +1000, Michael Ellerman wrote: > In smp_85xx_start_cpu() we are passed an address but we're unsure if > it's a real or virtual address, so there's a check to determine that. > > [...] Applied to powerpc/next. [3/6] powerpc/85xx: Fix virt_to_phys() off-by-one in

Re: [PATCH v2 -next] powerpc/eeh: Remove unused inline functions

2022-05-15 Thread Michael Ellerman
On Wed, 16 Mar 2022 18:42:39 +0800, YueHaibing wrote: > pseries_eeh_init_edev() is exclusively in eeh_pseries.c, > make it static and remove unused inline function. > pseries_eeh_init_edev_recursive() is only called from files build > wich CONFIG_HOTPLUG_PCI_RPA which depends on CONFIG_PSERIES and

Re: [PATCH v2] POWERPC: idle: fix return value of __setup handler

2022-05-15 Thread Michael Ellerman
On Mon, 2 May 2022 12:29:25 -0700, Randy Dunlap wrote: > __setup() handlers should return 1 to obsolete_checksetup() in > init/main.c to indicate that the boot option has been handled. > A return of 0 causes the boot option/value to be listed as an Unknown > kernel parameter and added to init's

Re: [PATCH v2] powerpc/4xx: cpm: fix return value of __setup handler

2022-05-15 Thread Michael Ellerman
On Mon, 2 May 2022 12:29:41 -0700, Randy Dunlap wrote: > __setup() handlers should return 1 to obsolete_checksetup() in > init/main.c to indicate that the boot option has been handled. > A return of 0 causes the boot option/value to be listed as an Unknown > kernel parameter and added to init's

Re: [PATCH] selftests/powerpc: Add a test of 4PB SLB handling

2022-05-15 Thread Michael Ellerman
On Fri, 18 Mar 2022 01:39:25 +1100, Michael Ellerman wrote: > Add a test for a bug we had in the 4PB address space SLB handling. It > was fixed in commit 4c2de74cc869 ("powerpc/64: Interrupts save PPR on > stack rather than thread_struct"). > > Applied to powerpc/next. [1/1] selftests/powerpc:

Re: [PATCH] powerpc/boot: Build wrapper for an appropriate CPU

2022-05-15 Thread Michael Ellerman
On Wed, 30 Mar 2022 21:54:37 +1030, Joel Stanley wrote: > Currently the boot wrapper lacks a -mcpu option, so it will be built for > the toolchain's default cpu. This is a problem if the toolchain defaults > to a cpu with newer instructions. > > We could wire in TARGET_CPU but instead use the

Re: (subset) [PATCH 0/7] Remove unused SLOW_DOWN_IO

2022-05-15 Thread Michael Ellerman
On Fri, 15 Apr 2022 14:08:10 -0500, Bjorn Helgaas wrote: > From: Bjorn Helgaas > > Only alpha, ia64, powerpc, and sh define SLOW_DOWN_IO, and there are no > actual uses of it. The few references to it are in situations that are > themselves unused. Remove them all. > > It should be safe to

Re: [PATCH] misc: ocxl: fix possible double free in ocxl_file_register_afu

2022-05-15 Thread Michael Ellerman
On Mon, 18 Apr 2022 16:57:58 +0800, Hangyu Hua wrote: > info_release() will be called in device_unregister() when info->dev's > reference count is 0. So there is no need to call ocxl_afu_put() and > kfree() again. > > Fix this by adding free_minor() and return to err_unregister error path. > >

Re: [PATCH] powerpc/fadump: save CPU reg data in vmcore when PHYP terminates LPAR

2022-05-15 Thread Michael Ellerman
On Mon, 4 Apr 2022 23:51:37 +0530, Hari Bathini wrote: > An LPAR can be terminated by the POWER Hypervisor (PHYP) for various > reasons. If FADump was configured when PHYP terminates the LPAR, > platform-assisted dump is initiated to save the kernel dump. But CPU > register data would not be

Re: [PATCH] opal/fadump: fix fadump to work with a different endian capture kernel

2022-05-15 Thread Michael Ellerman
On Wed, 21 Apr 2021 23:20:52 +0530, Hari Bathini wrote: > Dump capture would fail if capture kernel is not of the endianess as > the production kernel, because the in-memory data structure (struct > opal_fadump_mem_struct) shared across production kernel and capture > kernel assumes the same

Re: [PATCH 0/3] powerpc/fadump: fadump fixes and improvements

2022-05-15 Thread Michael Ellerman
On Wed, 6 Apr 2022 15:08:36 +0530, Hari Bathini wrote: > This series fixes a couple of issues in fadump and improves logging. > The first patch fixes a bug that is observed when memory reserved for > fadump is not adjacent to boot memory area. The second patch ensures > mmap read succeeds for all

Re: [PATCH 1/1] powerpc/boot: remove unused function find_node_by_linuxphandle()

2022-05-15 Thread Michael Ellerman
On Sun, 24 Apr 2022 13:40:14 -0500, frowand.l...@gmail.com wrote: > From: Frank Rowand > > The last user of find_node_by_linuxphandle() was removed in v4.18-rc1 > by commit 30f4bbe0472a ("powerpc/boot: Remove support for Marvell MPSC serial > controller") > four years ago. This function is no

Re: [PATCH v1 1/1] powerpc/83xx/mpc8349emitx: Get rid of of_node assignment

2022-05-15 Thread Michael Ellerman
On Wed, 23 Mar 2022 19:43:42 +0200, Andy Shevchenko wrote: > Let GPIO library to assign of_node from the parent device. > This allows to move GPIO library and drivers to use fwnode > APIs instead of being stuck with OF-only interfaces. > > Applied to powerpc/next. [1/1]

Re: [PATCH] selftests/powerpc/pmu: Fix unsigned function returning negative constant

2022-05-15 Thread Michael Ellerman
On Sun, 24 Apr 2022 16:26:41 +0800, Haowen Bai wrote: > The function __perf_reg_mask has an unsigned return type, but returns a > negative constant to indicate an error condition. So we change unsigned > to int. > > Applied to powerpc/next. [1/1] selftests/powerpc/pmu: Fix unsigned function

Re: [PATCH] selftests/powerpc: Add matrix multiply assist (MMA) test

2022-05-15 Thread Michael Ellerman
On Mon, 22 Jun 2020 12:18:32 +1000, Alistair Popple wrote: > Adds a simple test of some basic matrix multiply assist (MMA) > instructions. > > Applied to powerpc/next. [1/1] selftests/powerpc: Add matrix multiply assist (MMA) test

Re: [PATCH 0/3] KASAN support for 64-bit Book 3S powerpc

2022-05-15 Thread Christophe Leroy
Le 11/05/2022 à 09:25, Paul Mackerras a écrit : > [Vous ne recevez pas souvent de courriers de la part de pau...@ozlabs.org. > D?couvrez pourquoi cela peut ?tre important ? l'adresse > https://aka.ms/LearnAboutSenderIdentification.] > > This patch series implements KASAN on 64-bit POWER with

Re: [PATCH 3/3] [RFC] powerpc: Book3S 64-bit outline-only KASAN support

2022-05-15 Thread Christophe Leroy
Le 11/05/2022 à 09:28, Paul Mackerras a écrit : > From: Daniel Axtens > > Implement a limited form of KASAN for Book3S 64-bit machines running under > the Radix MMU, supporting only outline mode. > > - Enable the compiler instrumentation to check addresses and maintain the > shadow