Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-16 Thread Michael Ellerman
Christoph Hellwig writes: > On Wed, Sep 15, 2021 at 07:18:34PM +0200, Christophe Leroy wrote: >> Could you please provide more explicit explanation why inlining such an >> helper is considered as bad practice and messy ? > > Because now we get architectures to all subly differ. Look at the mess

Re: [PATCH 1/3] perf: Add macros to specify onchip L2/L3 accesses

2021-09-16 Thread Michael Ellerman
Peter Zijlstra writes: > On Tue, Sep 14, 2021 at 08:40:38PM +1000, Michael Ellerman wrote: >> Peter Zijlstra writes: > >> > I'm thinking we ought to keep hops as steps along the NUMA fabric, with >> > 0 hops being the local node. That only gets us: >> > &g

Re: [PATCH] powerpc/powernv/flash: Check OPAL flash calls exist before using

2021-09-15 Thread Michael Ellerman
Vasant Hegde writes: > Currently only FSP based powernv systems supports firmware update > interfaces. Hence check that the token OPAL_FLASH_VALIDATE exists > before initalising the flash driver. > > Signed-off-by: Vasant Hegde > --- > arch/powerpc/platforms/powernv/opal-flash.c | 4 > 1

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-14 Thread Michael Ellerman
nitially only support the CC_ATTR_MEM_ENCRYPT >> attribute. >> >> Cc: Michael Ellerman >> Cc: Benjamin Herrenschmidt >> Cc: Paul Mackerras >> Signed-off-by: Tom Lendacky >> --- >> arch/powerpc/platforms/pseries/Kconfig | 1 + >> arch/powerpc

Re: [PATCH 1/1] powerpc: Drop superfluous pci_dev_is_added() calls

2021-09-14 Thread Michael Ellerman
Bjorn Helgaas writes: > On Fri, Sep 10, 2021 at 04:19:40PM +0200, Niklas Schnelle wrote: >> On powerpc, pci_dev_is_added() is called as part of SR-IOV fixups >> that are done under pcibios_add_device() which in turn is only called in >> pci_device_add() whih is called when a PCI device is

Re: linux-next: build failure after merge of the origin tree

2021-09-14 Thread Michael Ellerman
Linus Torvalds writes: > On Mon, Sep 13, 2021 at 7:08 PM Stephen Rothwell > wrote: >> >> That patch works for me - for the ppc64_defconfig build at least. > > Yeah, I just tested the allmodconfig case too, although I suspect it's > essentially the same wrt the boot *.S files, so it probably

[PATCH] powerpc/boot: Fix build failure since GCC 4.9 removal

2021-09-14 Thread Michael Ellerman
The minimal fix is to move the addition to BOOT_CFLAGS of -include compiler_attributes.h until after we've copied BOOT_CFLAGS into BOOT_AFLAGS. That avoids including compiler_attributes.h for asm files, but makes no other change to BOOT_CFLAGS or BOOT_AFLAGS. Reported-by: Stephen Rothwell Debugged-by

Re: [PATCH 1/3] perf: Add macros to specify onchip L2/L3 accesses

2021-09-14 Thread Michael Ellerman
Peter Zijlstra writes: > On Thu, Sep 09, 2021 at 10:45:54PM +1000, Michael Ellerman wrote: > >> > The 'new' composite doesnt have a hops field because the hardware that >> > nessecitated that change doesn't report it, but we could easily add a >> > field there. &

Re: linux-next: build failure after merge of the origin tree

2021-09-13 Thread Michael Ellerman
Linus Torvalds writes: > On Mon, Sep 13, 2021 at 7:08 PM Stephen Rothwell > wrote: >> >> That patch works for me - for the ppc64_defconfig build at least. > > Yeah, I just tested the allmodconfig case too, although I suspect it's > essentially the same wrt the boot *.S files, so it probably

Re: [PATCH 1/1] selftests/powerpc: Add memmove_64 test

2021-09-11 Thread Michael Ellerman
Ritesh Harjani writes: > While debugging an issue, we wanted to check whether the arch specific > kernel memmove implementation is correct. This selftest could help test that. > > Suggested-by: Aneesh Kumar K.V > Suggested-by: Vaibhav Jain > Signed-off-by: Ritesh Harjani > --- >

Re: [PATCH 1/1] powerpc: Drop superfluous pci_dev_is_added() calls

2021-09-11 Thread Michael Ellerman
Niklas Schnelle writes: > On powerpc, pci_dev_is_added() is called as part of SR-IOV fixups > that are done under pcibios_add_device() which in turn is only called in > pci_device_add() whih is called when a PCI device is scanned. Thanks for cleaning this up for us. > Now pci_dev_assign_added()

Re: [PATCH 06/10] powerpc: remove GCC version check for UPD_CONSTR

2021-09-11 Thread Michael Ellerman
Nathan Chancellor writes: > On 9/10/2021 4:40 PM, Nick Desaulniers wrote: >> Now that GCC 5.1 is the minimum supported version, we can drop this >> workaround for older versions of GCC. This adversely affected clang, >> too. >> >> Cc: Michael Ellerman >>

Re: [PATCH 1/3] perf: Add macros to specify onchip L2/L3 accesses

2021-09-09 Thread Michael Ellerman
Peter Zijlstra writes: > On Wed, Sep 08, 2021 at 05:17:53PM +1000, Michael Ellerman wrote: >> Kajol Jain writes: > >> > diff --git a/include/uapi/linux/perf_event.h >> > b/include/uapi/linux/perf_event.h >> > index f92880a15645..030b3e990ac3 100644 >

Re: [Bug 213837] "Kernel panic - not syncing: corrupted stack end detected inside scheduler" at building via distcc on a G5

2021-09-08 Thread Michael Ellerman
bugzilla-dae...@bugzilla.kernel.org writes: > https://bugzilla.kernel.org/show_bug.cgi?id=213837 > > Erhard F. (erhar...@mailbox.org) changed: > >What|Removed |Added > >See

Re: [PATCH 1/3] perf: Add macros to specify onchip L2/L3 accesses

2021-09-08 Thread Michael Ellerman
Kajol Jain writes: > Add couple of new macros to represent onchip L2 and onchip L3 accesses. It would be "on chip". But I think this needs much more explanation, this is a generic header so these definitions need to make sense, and have an understood meaning, across all architectures. I think

Re: [PATCH] powerpc/mce: Fix access error in mce handler

2021-09-07 Thread Michael Ellerman
Ganesh writes: > On 9/6/21 6:03 PM, Michael Ellerman wrote: > >> Ganesh Goudar writes: >>> We queue an irq work for deferred processing of mce event >>> in realmode mce handler, where translation is disabled. >>> Queuing of the work may result in

Re: [PATCH 1/2] powerpc/perf: Expose instruction and data address registers as part of extended regs

2021-09-07 Thread Michael Ellerman
Athira Rajeev writes: > Patch adds support to include Sampled Instruction Address Register > (SIAR) and Sampled Data Address Register (SDAR) SPRs as part of extended > registers. Update the definition of PERF_REG_PMU_MASK_300/31 and > PERF_REG_EXTENDED_MAX to include these SPR's. > >

Re: [RFC PATCH v2] powerpc/papr_scm: Move duplicate definitions to common header files

2021-09-07 Thread Michael Ellerman
Shivaprasad G Bhat writes: > papr_scm and ndtest share common PDSM payload structs like > nd_papr_pdsm_health. Presently these structs are duplicated across papr_pdsm.h > and ndtest.h header files. Since 'ndtest' is essentially arch independent and > can > run on platforms other than PPC64, a

Re: [PATCH v2] ftrace: Cleanup ftrace_dyn_arch_init()

2021-09-06 Thread Michael Ellerman
Weizhao Ouyang writes: > Most of ARCHs use empty ftrace_dyn_arch_init(), introduce a weak common > ftrace_dyn_arch_init() to cleanup them. > > Signed-off-by: Weizhao Ouyang > Acked-by: Heiko Carstens (s390) > > --- > > Changes in v2: > -- correct CONFIG_DYNAMIC_FTRACE on PowerPC > -- add

Re: [PATCH] powerpc/mce: Fix access error in mce handler

2021-09-06 Thread Michael Ellerman
Ganesh Goudar writes: > We queue an irq work for deferred processing of mce event > in realmode mce handler, where translation is disabled. > Queuing of the work may result in accessing memory outside > RMO region, such access needs the translation to be enabled > for an LPAR running with hash

Re: [PATCH -next] powerpc/mm: check base flags in ioremap_prot

2021-09-04 Thread Michael Ellerman
Nanyong Sun writes: > On 2021/9/3 17:16, Christophe Leroy wrote: >> Le 03/09/2021 à 11:03, Nanyong Sun a écrit : >>> Some drivers who call ioremap_prot without setting base flags like >>> ioremap_prot(addr, len, 0) may work well before >>> commit 56f3c1413f5c ("powerpc/mm: properly set

Re: [PATCH kernel] KVM: PPC: Fix clearing never mapped TCEs in realmode

2021-09-03 Thread Michael Ellerman
On Fri, 27 Aug 2021 14:07:06 +1000, Alexey Kardashevskiy wrote: > Since e1a1ef84cd07, pages for TCE tables for KVM guests are allocated > only when needed. This allows skipping any update when clearing TCEs. > This works mostly fine as TCE updates are handled when MMU is enabled. > The realmode

Re: [PATCH v2] powerpc/bug: Cast to unsigned long before passing to inline asm

2021-09-03 Thread Michael Ellerman
On Wed, 1 Sep 2021 21:25:22 +1000, Michael Ellerman wrote: > In commit 1e688dd2a3d6 ("powerpc/bug: Provide better flexibility to > WARN_ON/__WARN_FLAGS() with asm goto") we changed WARN_ON(). Previously > it would take the warning condition, x, and double negate it before >

Re: [PATCH] powerpc/ptdump: Fix generic ptdump for 64-bit

2021-09-03 Thread Michael Ellerman
On Tue, 31 Aug 2021 23:51:51 +1000, Michael Ellerman wrote: > Since the conversion to generic ptdump we see crashes on 64-bit: > > BUG: Unable to handle kernel data access on read at 0xc0eeff7f > Faulting instruction address: 0xc045e5fc > Oops: Kernel access o

Re: [PATCH v2 2/2] selftests/powerpc: Add scv versions of the basic TM syscall tests

2021-09-01 Thread Michael Ellerman
Nicholas Piggin writes: > The basic TM vs syscall test code hard codes an sc instruction for the > system call, which fails to cover scv even when the userspace libc has > support for it. > > Duplicate the tests with hard coded scv variants so both are tested > when possible. > > Signed-off-by:

Re: [PATCH v2 2/2] selftests/powerpc: Add scv versions of the basic TM syscall tests

2021-09-01 Thread Michael Ellerman
Nicholas Piggin writes: > Excerpts from Christophe Leroy's message of September 2, 2021 3:15 am: >> Le 01/09/2021 à 18:54, Nicholas Piggin a écrit : >>> The basic TM vs syscall test code hard codes an sc instruction for the >>> system call, which fails to cover scv even when the userspace libc

[PATCH v2] powerpc/bug: Cast to unsigned long before passing to inline asm

2021-09-01 Thread Michael Ellerman
s://bugs.llvm.org/show_bug.cgi?id=51634 Fixes: 1e688dd2a3d6 ("powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto") Reported-by: Nathan Chancellor Reviewed-by: Nathan Chancellor Tested-by: Nathan Chancellor Signed-off-by: Michael Ellerman --- arch/powerpc/includ

Re: [PATCH] powerpc/bug: Cast to unsigned long before passing to inline asm

2021-09-01 Thread Michael Ellerman
Segher Boessenkool writes: > On Tue, Aug 31, 2021 at 11:27:20PM +1000, Michael Ellerman wrote: >> Nathan filed an LLVM bug [2], in which Eli Friedman explained that "if >> you pass a value of a type that's narrower than a register to an inline >> asm, the high bits are u

Re: [PATCH] powerpc/head_check: Fix shellcheck errors

2021-08-31 Thread Michael Ellerman
On Tue, 17 Aug 2021 22:51:54 +1000, Michael Ellerman wrote: > Replace "cat file | grep pattern" with "grep pattern file", and quote a > few variables. Together that fixes all shellcheck errors. Applied to powerpc/next. [1/1] powerpc/head_check: Fix shellcheck errors

Re: [PATCH v3 1/3] powerpc: Remove MSR_PR check in interrupt_exit_{user/kernel}_prepare()

2021-08-31 Thread Michael Ellerman
On Mon, 23 Aug 2021 08:24:20 + (UTC), Christophe Leroy wrote: > In those hot functions that are called at every interrupt, any saved > cycle is worth it. > > interrupt_exit_user_prepare() and interrupt_exit_kernel_prepare() are > called from three places: > - From entry_32.S > - From

Re: [PATCH v3 0/5] Updates to powerpc for robust CPU online/offline

2021-08-31 Thread Michael Ellerman
On Thu, 26 Aug 2021 15:35:16 +0530, Srikar Dronamraju wrote: > Changelog v2 -> v3: > v2: > https://lore.kernel.org/linuxppc-dev/20210821102535.169643-1-sri...@linux.vnet.ibm.com/t/#u > Add patch 1: to drop dbg and numa=debug (Suggested by Michael Ellerman) > Add patch 2:

Re: [PATCH v2 0/3] powerpc/smp: Misc fixes

2021-08-31 Thread Michael Ellerman
On Thu, 26 Aug 2021 15:33:58 +0530, Srikar Dronamraju wrote: > Changelog : v1 -> v2: > v1: > https://lore.kernel.org/linuxppc-dev/20210821092419.167454-1-sri...@linux.vnet.ibm.com/t/#u`` > [ patch 1: Updated to use DIV_ROUND_UP instead of max to handle more > situations ] > [ patch 2: updated

Re: [PATCH v6 00/11] DDW + Indirect Mapping

2021-08-31 Thread Michael Ellerman
On Tue, 17 Aug 2021 03:39:18 -0300, Leonardo Bras wrote: > So far it's assumed possible to map the guest RAM 1:1 to the bus, which > works with a small number of devices. SRIOV changes it as the user can > configure hundreds VFs and since phyp preallocates TCEs and does not > allow IOMMU pages

Re: [PATCH 0/3] powerpc/microwatt: Device tree and config updates

2021-08-31 Thread Michael Ellerman
On Thu, 26 Aug 2021 21:56:50 +0930, Joel Stanley wrote: > This enables the liteeth network device for microwatt which will be > merged in v5.15. > > It also turns on some options so the microwatt defconfig can be used to > boot a userspace with systemd. > > Joel Stanley (3): >

Re: [PATCH] powerpc: Redefine HMT_xxx macros as empty on PPC32

2021-08-31 Thread Michael Ellerman
On Wed, 25 Aug 2021 13:34:45 + (UTC), Christophe Leroy wrote: > HMT_xxx macros are macros for adjusting thread priority > (hardware multi-threading) are macros inherited from PPC64 > via commit 5f7c690728ac ("[PATCH] powerpc: Merged ppc_asm.h") > > Those instructions are pointless on PPC32,

[PATCH] powerpc/ptdump: Fix generic ptdump for 64-bit

2021-08-31 Thread Michael Ellerman
or Signed-off-by: Michael Ellerman --- arch/powerpc/mm/ptdump/ptdump.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdump.c index 2d80d775d15e..bf251191e78d 100644 --- a/arch/powerpc/mm/ptdump/ptdump.c +++ b/arch/powerpc/mm/ptdum

Re: [PATCH v4 4/4] powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP

2021-08-31 Thread Michael Ellerman
Christophe Leroy writes: > Le 30/08/2021 à 13:55, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> Le 30/08/2021 à 09:52, Michael Ellerman a écrit : >>>> Christophe Leroy writes: >>>>> Le 29/08/2021 à 20:55, Nathan Chancellor a écrit : &g

[PATCH] powerpc/bug: Cast to unsigned long before passing to inline asm

2021-08-31 Thread Michael Ellerman
commit 32818c2eb6b8 ("[PATCH] ppc64: Fix issue with gcc 4.0 compiled kernels"). [1]: http://lore.kernel.org/r/YSa1O4fcX1nNKqN/@Ryzen-9-3900X.localdomain [2]: https://bugs.llvm.org/show_bug.cgi?id=51634 Fixes: 1e688dd2a3d6 ("powerpc/bug: Provide better flexibility to WARN_ON/

Re: [PATCH v4 4/4] powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP

2021-08-30 Thread Michael Ellerman
Christophe Leroy writes: > Le 30/08/2021 à 09:52, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> Le 29/08/2021 à 20:55, Nathan Chancellor a écrit : >>>> On Thu, Jul 08, 2021 at 04:49:43PM +, Christophe Leroy wrote: >>>>> This

Re: [PATCH v4 4/4] powerpc/ptdump: Convert powerpc to GENERIC_PTDUMP

2021-08-30 Thread Michael Ellerman
Christophe Leroy writes: > Hi Nathan, > > Le 29/08/2021 à 20:55, Nathan Chancellor a écrit : >> Hi Christophe, >> >> On Thu, Jul 08, 2021 at 04:49:43PM +, Christophe Leroy wrote: >>> This patch converts powerpc to the generic PTDUMP implementation. >>> >>> Signed-off-by: Christophe Leroy >>

Re: [RFC PATCH 6/6] powerpc/microwatt: Stop building the hash MMU code

2021-08-29 Thread Michael Ellerman
Christophe Leroy writes: > Le 27/08/2021 à 18:34, Nicholas Piggin a écrit : >> Microwatt is radix-only, so stop selecting the hash MMU code. >> >> This saves 20kB compressed dtbImage and 56kB vmlinux size. >> >> Signed-off-by: Nicholas Piggin >> --- >>

Re: [PATCH] net: spider_net: switch from 'pci_' to 'dma_' API

2021-08-29 Thread Michael Ellerman
Christophe Leroy writes: > Le 27/08/2021 à 21:56, Christophe JAILLET a écrit : >> --- >> It has *not* been compile tested because I don't have the needed >> configuration or cross-compiler. However, the modification is completely >> mechanical and done by coccinelle. > > All you need is at

[GIT PULL] Please pull powerpc/linux.git powerpc-5.14-7 tag

2021-08-28 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull two more powerpc fixes for 5.14: The following changes since commit 9f7853d7609d59172eecfc5e7ccf503bc1b690bd: powerpc/mm: Fix set_memory_*() against concurrent accesses (2021-08-19 09:41:54 +1000) are available in the

Re: [PATCH v2 0/2] Kconfig symbol fixes on powerpc

2021-08-27 Thread Michael Ellerman
On Thu, 19 Aug 2021 13:39:52 +0200, Lukas Bulwahn wrote: > The script ./scripts/checkkconfigsymbols.py warns on invalid references to > Kconfig symbols (often, minor typos, name confusions or outdated references). > > This patch series addresses all issues reported by >

Re: [PATCH v1] powerpc/64s: Fix scv implicit soft-mask table for relocated kernels

2021-08-27 Thread Michael Ellerman
On Fri, 20 Aug 2021 20:34:31 +1000, Nicholas Piggin wrote: > The implict soft-mask table addresses get relocated if they use a > relative symbol like a label. This is right for code that runs relocated > but not for unrelocated. The scv interrupt vectors run unrelocated, so > absolute addresses

Re: [PATCH] powerpc/xive: Do not mark xive_request_ipi() as __init

2021-08-27 Thread Michael Ellerman
On Mon, 16 Aug 2021 11:57:11 -0700, Nathan Chancellor wrote: > Compiling ppc64le_defconfig with clang-14 shows a modpost warning: > > WARNING: modpost: vmlinux.o(.text+0xa74e0): Section mismatch in > reference from the function xive_setup_cpu_ipi() to the function > .init.text:xive_request_ipi()

Re: [PATCH v2] powerpc/mm: Fix set_memory_*() against concurrent accesses

2021-08-27 Thread Michael Ellerman
On Wed, 18 Aug 2021 22:05:18 +1000, Michael Ellerman wrote: > Laurent reported that STRICT_MODULE_RWX was causing intermittent crashes > on one of his systems: > > kernel tried to execute exec-protected page (c00804073278) - exploit > attempt? (uid: 0) > BUG: Unabl

Re: [PATCH v2] powerpc/32s: Fix random crashes by adding isync() after locking/unlocking KUEP

2021-08-27 Thread Michael Ellerman
On Wed, 18 Aug 2021 06:49:29 + (UTC), Christophe Leroy wrote: > Commit b5efec00b671 ("powerpc/32s: Move KUEP locking/unlocking in C") > removed the 'isync' instruction after adding/removing NX bit in user > segments. The reasoning behind this change was that when setting the > NX bit we don't

Re: [PATCH -next] selftests/powerpc: Remove duplicated include from tm-poison.c

2021-08-27 Thread Michael Ellerman
On Fri, 26 Mar 2021 14:48:08 +0800, Zheng Yongjun wrote: > Remove duplicated include. > > > > Applied to powerpc/next. [1/1] selftests/powerpc: Remove duplicated include from tm-poison.c https://git.kernel.org/powerpc/c/6af0b5570b59ce8dd1608a8e48f59eff3f4bdd04 cheers

Re: [PATCH] [v2] arch: powerpc: Remove duplicate includes

2021-08-27 Thread Michael Ellerman
On Tue, 23 Mar 2021 14:29:05 +0800, Wan Jiabing wrote: > mmu-hash.h: asm/bug.h has been included at line 12, so remove > the duplicate one at line 21. > interrupt.c: asm/interrupt.h has been included at line 12, so > remove the duplicate one at line 10. > time.c: linux/sched/clock.h has been

Re: [PATCH v2 0/4] Some improvements on regs usage

2021-08-27 Thread Michael Ellerman
On Sat, 7 Aug 2021 09:02:35 +0800, sxwj...@me.com wrote: > From: Xiongwei Song > > When CONFIG_4xx=y or CONFIG_BOOKE=y, currently in code we reference dsisr > to get interrupt reasons and reference dar to get excepiton address. > However, in reference manuals, esr is used for interrupt reasons

Re: [PATCH] powerpc/head_check: use stdout for error messages

2021-08-27 Thread Michael Ellerman
On Sun, 15 Aug 2021 15:23:34 -0700, Randy Dunlap wrote: > Prefer stderr instead of stdout for error messages. > This is a good practice and can help CI error detecting and > reporting (0day in this case). > > > > > [...] Applied to powerpc/next. [1/1] powerpc/head_check: use stdout for error

Re: (subset) [PATCH v2 00/60] KVM: PPC: Book3S HV P9: entry/exit optimisations

2021-08-27 Thread Michael Ellerman
On Thu, 12 Aug 2021 02:00:34 +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 >

Re: [PATCH] powerpc/pseries: Fix build error when NUMA=n

2021-08-27 Thread Michael Ellerman
On Mon, 16 Aug 2021 14:10:32 +1000, Michael Ellerman wrote: > As reported by lkp, if NUMA=n we see a build error: > >arch/powerpc/platforms/pseries/hotplug-cpu.c: In function > 'pseries_cpu_hotplug_init': >arch/powerpc/platforms/pseries/hotplug-cpu.

Re: [PATCH v2] ppc: add "-z notext" flag to disable diagnostic

2021-08-27 Thread Michael Ellerman
On Fri, 13 Aug 2021 13:05:11 -0700, Bill Wendling wrote: > Object files used to link .tmp_vmlinux.kallsyms1 have many R_PPC64_ADDR64 > relocations in non-SHF_WRITE sections. There are many text relocations (e.g. > in > .rela___ksymtab_gpl+* and .rela__mcount_loc sections) in a -pie link and are >

Re: [PATCH v2 0/2] Kconfig symbol fixes on powerpc

2021-08-27 Thread Michael Ellerman
On Thu, 19 Aug 2021 13:39:52 +0200, Lukas Bulwahn wrote: > The script ./scripts/checkkconfigsymbols.py warns on invalid references to > Kconfig symbols (often, minor typos, name confusions or outdated references). > > This patch series addresses all issues reported by >

Re: [PATCH v4 1/3] powerpc/perf: Use stack siar instead of mfspr

2021-08-27 Thread Michael Ellerman
On Wed, 18 Aug 2021 22:45:54 +0530, Kajol Jain wrote: > Minor optimization in the 'perf_instruction_pointer' function code by > making use of stack siar instead of mfspr. > > > > Applied to powerpc/next. [1/3] powerpc/perf: Use stack siar instead of mfspr

Re: [PATCH] powerpc/perf/hv-gpci: Fix the logic to compute counter value from the hcall result buffer.

2021-08-27 Thread Michael Ellerman
On Fri, 13 Aug 2021 13:51:58 +0530, Kajol Jain wrote: > H_GetPerformanceCounterInfo (0xF080) hcall returns the counter data in the > result buffer. Result buffer has specific format defined in the PAPR > specification. One of the field is counter offset and width of the counter > data returned. >

Re: [PATCH v2 0/3] powerpc: mpc855_ads defconfig fixes

2021-08-27 Thread Michael Ellerman
On Tue, 17 Aug 2021 14:24:04 +0930, Joel Stanley wrote: > v2: fix typos, split out mtd fix from savedefconfig patch > > The first patch fixes a build warning I noticed when testing something > unrelated. > > The second fixes a regression where the MTD partition support dropped out > of the

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

2021-08-27 Thread Michael Ellerman
On Thu, 29 Jul 2021 14:13:16 +1000, Jordan Niethe wrote: > 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

Re: [PATCH] powerpc/tau: Add 'static' storage qualifier to 'tau_work' definition

2021-08-27 Thread Michael Ellerman
On Thu, 19 Aug 2021 10:46:54 +1000, Finn Thain wrote: > This patch prevents the following sparse warning. > > arch/powerpc/kernel/tau_6xx.c:199:1: sparse: sparse: symbol 'tau_work' > was not declared. Should it be static? > > > > [...] Applied to powerpc/next. [1/1] powerpc/tau: Add 'static'

Re: [PATCH v2 0/3] KVM: PPC: Book3S HV: kvmhv_copy_tofrom_guest_radix changes

2021-08-27 Thread Michael Ellerman
On Thu, 5 Aug 2021 18:26:13 -0300, Fabiano Rosas wrote: > This series contains the fix for __kvmhv_copy_tofrom_guest_radix plus > a couple of changes. > > - Patch 1: The fix itself. I thought a smaller fix upfront would be >better to facilitate any backports. > > - Patch 2: Adds a

Re: [PATCH v2 0/2] W=1 fixes

2021-08-27 Thread Michael Ellerman
On Mon, 23 Aug 2021 11:00:37 +0200, Cédric Le Goater wrote: > These are the remaining patches needed to compile the ppc kernel with > W=1. Audit issues are now being addressed by Christophe in patch : > > [v2] powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC >

Re: [PATCH 0/6] W=1 fixes

2021-08-27 Thread Michael Ellerman
On Thu, 19 Aug 2021 14:56:50 +0200, Cédric Le Goater wrote: > With this small series, I could compile the ppc kernel with W=1. There > are certainly other configs which will need more fixes but it's a good > start. > > The last 2 patches look hacky. Christophe, could you help with these > to find

Re: [PATCH v4 1/4] powerpc/ptdump: Use DEFINE_SHOW_ATTRIBUTE()

2021-08-27 Thread Michael Ellerman
On Thu, 8 Jul 2021 16:49:40 + (UTC), Christophe Leroy wrote: > Use DEFINE_SHOW_ATTRIBUTE() instead of open coding > open() and fops. > > > > Applied to powerpc/next. [1/4] powerpc/ptdump: Use DEFINE_SHOW_ATTRIBUTE()

Re: [PATCH v3] powerpc/booke: Avoid link stack corruption in several places

2021-08-27 Thread Michael Ellerman
On Tue, 24 Aug 2021 07:56:26 + (UTC), Christophe Leroy wrote: > Use bcl 20,31,+4 instead of bl in order to preserve link stack. > > See commit c974809a26a1 ("powerpc/vdso: Avoid link stack corruption > in __get_datapage()") for details. > > > > [...] Applied to powerpc/next. [1/1]

Re: (subset) [PATCH v3 1/3] powerpc: Remove MSR_PR check in interrupt_exit_{user/kernel}_prepare()

2021-08-27 Thread Michael Ellerman
On Mon, 23 Aug 2021 08:24:20 + (UTC), Christophe Leroy wrote: > In those hot functions that are called at every interrupt, any saved > cycle is worth it. > > interrupt_exit_user_prepare() and interrupt_exit_kernel_prepare() are > called from three places: > - From entry_32.S > - From

Re: [PATCH v2] powerpc: Avoid link stack corruption in misc asm functions

2021-08-27 Thread Michael Ellerman
On Tue, 24 Aug 2021 07:56:35 + (UTC), Christophe Leroy wrote: > bl;mflr is used at several places to get code position. > > Use bcl 20,31,+4 instead of bl in order to preserve link stack. > > See commit c974809a26a1 ("powerpc/vdso: Avoid link stack corruption > in __get_datapage()") for

Re: [PATCH v1 1/2] powerpc: Use lwarx/ldarx directly instead of PPC_LWARX/LDARX macros

2021-08-27 Thread Michael Ellerman
On Tue, 2 Mar 2021 08:48:11 + (UTC), Christophe Leroy wrote: > Force the eh flag at 0 on PPC32. > Patch 1 applied to powerpc/next. [1/2] powerpc: Use lwarx/ldarx directly instead of PPC_LWARX/LDARX macros https://git.kernel.org/powerpc/c/9401f4e46cf6965e23738f70e149172344a01eef

Re: [PATCH] powerpc/syscalls: Simplify do_mmap2()

2021-08-27 Thread Michael Ellerman
On Fri, 25 Jun 2021 10:58:33 + (UTC), Christophe Leroy wrote: > When shift is nul, operations remain valid so no test needed. > > And 'ret' is unnecessary. > > And use IS_ALIGNED() to check alignment, that's more clear. > > > [...] Applied to powerpc/next. [1/1] powerpc/syscalls:

Re: [PATCH] powerpc/syscalls: Remove __NR__exit

2021-08-27 Thread Michael Ellerman
On Mon, 23 Aug 2021 06:45:20 + (UTC), Christophe Leroy wrote: > __NR_exit is nowhere used. On most architectures it was removed by > commit 135ab6ec8fda ("[PATCH] remove remaining errno and > __KERNEL_SYSCALLS__ references") but not on powerpc. > > powerpc removed __KERNEL_SYSCALLS__ in

Re: [PATCH] powerpc/ptrace: Make user_mode() common to PPC32 and PPC64

2021-08-27 Thread Michael Ellerman
On Tue, 17 Aug 2021 16:00:14 + (UTC), Christophe Leroy wrote: > Today we have: > > #ifdef __powerpc64__ > #define user_mode(regs) regs)->msr) >> MSR_PR_LG) & 0x1) > #else > #define user_mode(regs) (((regs)->msr & MSR_PR) != 0) > #endif > > [...] Applied to

Re: [PATCH] powerpc/32: indirect function call use bctrl rather than blrl in ret_from_kernel_thread

2021-08-27 Thread Michael Ellerman
On Fri, 20 Aug 2021 05:16:05 + (UTC), Christophe Leroy wrote: > Copied from commit 89bbe4c798bc ("powerpc/64: indirect function call > use bctrl rather than blrl in ret_from_kernel_thread") > > blrl is not recommended to use as an indirect function call, as it may > corrupt the link stack

Re: [PATCH] powerpc/audit: Simplify syscall_get_arch()

2021-08-27 Thread Michael Ellerman
On Fri, 20 Aug 2021 09:39:14 + (UTC), Christophe Leroy wrote: > Make use of is_32bit_task() and CONFIG_CPU_LITTLE_ENDIAN > to simplify syscall_get_arch(). > > > > Applied to powerpc/next. [1/1] powerpc/audit: Simplify syscall_get_arch()

Re: [PATCH] powerpc/audit: Avoid unneccessary #ifdef in syscall_get_arguments()

2021-08-27 Thread Michael Ellerman
On Fri, 20 Aug 2021 09:28:19 + (UTC), Christophe Leroy wrote: > Use is_32bit_task() which already handles CONFIG_COMPAT. > > > > Applied to powerpc/next. [1/1] powerpc/audit: Avoid unneccessary #ifdef in syscall_get_arguments()

Re: [PATCH] powerpc/32: Remove unneccessary calculations in load_up_{fpu/altivec}

2021-08-27 Thread Michael Ellerman
On Wed, 18 Aug 2021 08:47:28 + (UTC), Christophe Leroy wrote: > No need to re-read SPRN_THREAD, we can calculate thread address > from current (r2). > > And remove a reload of value 1 into r4 as r4 is already 1. > > > > [...] Applied to powerpc/next. [1/1] powerpc/32: Remove unneccessary

Re: [PATCH] powerpc/doc: Fix htmldocs errors

2021-08-27 Thread Michael Ellerman
On Wed, 25 Aug 2021 09:54:47 +0530, Aneesh Kumar K.V wrote: > Fix make htmldocs related errors with the newly added associativity.rst > doc file. > > > > Applied to powerpc/next. [1/1] powerpc/doc: Fix htmldocs errors

Re: [PATCH v2 2/2] powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto

2021-08-27 Thread Michael Ellerman
Nathan Chancellor writes: > On Thu, Aug 26, 2021 at 11:54:17AM -0700, Nathan Chancellor wrote: >> On Thu, Aug 26, 2021 at 01:21:39PM +1000, Michael Ellerman wrote: >> > Nathan Chancellor writes: >> > > On Tue, Apr 13, 2021 at 04:38:10PM +, Christophe Leroy

Re: [GIT PULL] retire legacy WR sbc8548 and sbc8641 platforms

2021-08-26 Thread Michael Ellerman
Paul Gortmaker writes: > This is unchanged from the original wr_sbc-delete branch sent in January, > other than to add the Acks from Scott in July, and update the baseline. > > Built with ppc64 defconfig and mpc85xx_cds_defconfig and mpc86xx_defconfig > just to make sure I didn't fat finger

Re: [PATCH v2 2/2] powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto

2021-08-26 Thread Michael Ellerman
Christophe Leroy writes: > Le 26/08/2021 à 05:21, Michael Ellerman a écrit : >> Nathan Chancellor writes: >>> On Tue, Apr 13, 2021 at 04:38:10PM +, Christophe Leroy wrote: >>>> Using asm goto in __WARN_FLAGS() and WARN_ON() allows more >>>> fle

Re: [PATCH v2 RESEND] powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC

2021-08-26 Thread Michael Ellerman
Paul Moore writes: > On Tue, Aug 24, 2021 at 1:11 PM Christophe Leroy > wrote: >> Le 24/08/2021 à 16:47, Paul Moore a écrit : >> > On Tue, Aug 24, 2021 at 9:36 AM Christophe Leroy >> > wrote: >> >> >> >> Commit e65e1fc2d24b ("[PATCH] syscall class hookup for all normal >> >> targets") added

Re: [PATCH linux-next] powerpc/tm: remove duplicate include in tm-poison.c

2021-08-26 Thread Michael Ellerman
Christophe Leroy writes: > Le 24/08/2021 à 16:40, Shuah Khan a écrit : >> On 8/5/21 12:52 AM, cgel@gmail.com wrote: >>> From: yong yiran >>> >>> 'inttypes.h' included in 'tm-poison.c' is duplicated. >>> Remove all but the first include of inttypes.h from tm-poison.c. >>> >>> Reported-by:

Re: [PATCH] powerpc: Make set_endian() return EINVAL when not supporting little endian

2021-08-26 Thread Michael Ellerman
Christophe Leroy writes: > Le 26/08/2021 à 05:41, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> There is no point in modifying MSR_LE bit on CPUs not supporting >>> little endian. >> >> Isn't that an ABI break? > > Or an ABI fix ? I don'

Re: [PATCH v2 3/3] powerpc/numa: Fill distance_lookup_table for offline nodes

2021-08-26 Thread Michael Ellerman
be > updated with actual entries. > Cc: linuxppc-dev@lists.ozlabs.org > Cc: Nathan Lynch > Cc: Michael Ellerman > Cc: Ingo Molnar > Cc: Peter Zijlstra > Cc: Valentin Schneider > Cc: Gautham R Shenoy > Cc: Vincent Guittot > Cc: Geetika Moolchandani &g

Re: [PATCH] powerpc: Redefine HMT_xxx macros as empty on PPC32

2021-08-25 Thread Michael Ellerman
Christophe Leroy writes: > HMT_xxx macros are macros for adjusting thread priority > (hardware multi-threading) are macros inherited from PPC64 > via commit 5f7c690728ac ("[PATCH] powerpc: Merged ppc_asm.h") > > Those instructions are pointless on PPC32, but some common > fonctions like

Re: [PATCH] powerpc: Make set_endian() return EINVAL when not supporting little endian

2021-08-25 Thread Michael Ellerman
Christophe Leroy writes: > There is no point in modifying MSR_LE bit on CPUs not supporting > little endian. Isn't that an ABI break? set_endian(PR_ENDIAN_BIG) should work on a big endian CPU, even if it does nothing useful. cheers > diff --git a/arch/powerpc/kernel/process.c

Re: [PATCH v2 2/3] selftests/powerpc: Add test for real address error handling

2021-08-25 Thread Michael Ellerman
Ganesh writes: > On 8/24/21 6:18 PM, Michael Ellerman wrote: > >> Ganesh Goudar writes: >>> Add test for real address or control memory address access >>> error handling, using NX-GZIP engine. >>> >>> The error is injected by accessing the cont

Re: [PATCH v2 2/2] powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto

2021-08-25 Thread Michael Ellerman
Nathan Chancellor writes: > On Tue, Apr 13, 2021 at 04:38:10PM +, Christophe Leroy wrote: >> Using asm goto in __WARN_FLAGS() and WARN_ON() allows more >> flexibility to GCC. ... > > This patch as commit 1e688dd2a3d6 ("powerpc/bug: Provide better > flexibility to WARN_ON/__WARN_FLAGS() with

Re: [PATCH v2 1/3] powerpc/pseries: Parse control memory access error

2021-08-25 Thread Michael Ellerman
Ganesh writes: > On 8/24/21 12:09 PM, Michael Ellerman wrote: >> Ganesh Goudar writes: >>> Add support to parse and log control memory access >>> error for pseries. >>> >>> Signed-off-by: Ganesh Goudar >>> --- >>> v2: No changes in

Re: [PATCH v2 1/3] powerpc/numa: Print debug statements only when required

2021-08-25 Thread Michael Ellerman
y added >> > (removed) from the node. >> > >> > Cc: linuxppc-dev@lists.ozlabs.org >> > Cc: Nathan Lynch >> > Cc: Michael Ellerman >> > Cc: Ingo Molnar >> > Cc: Peter Zijlstra >> > Cc: Valentin Schneider >> > Cc: Gautham

Re: [PATCH v3 1/3] powerpc: Remove MSR_PR check in interrupt_exit_{user/kernel}_prepare()

2021-08-25 Thread Michael Ellerman
Christophe Leroy writes: > Le 25/08/2021 à 07:27, Michael Ellerman a écrit : >> Christophe Leroy writes: >>> In those hot functions that are called at every interrupt, any saved >>> cycle is worth it. >>> >>> interrupt_exit_user_prepare() and interr

Re: [PATCH v3 1/3] powerpc: Remove MSR_PR check in interrupt_exit_{user/kernel}_prepare()

2021-08-24 Thread Michael Ellerman
Christophe Leroy writes: > In those hot functions that are called at every interrupt, any saved > cycle is worth it. > > interrupt_exit_user_prepare() and interrupt_exit_kernel_prepare() are > called from three places: > - From entry_32.S > - From interrupt_64.S > - From

Re: [PATCH v3 3/3] powerpc: Define and use MSR_RI only on non booke/40x

2021-08-24 Thread Michael Ellerman
Christophe Leroy writes: > 40x and BOOKE don't have MSR_RI. > > Define MSR_RI only for platforms where it exists. For the other ones, > defines it as BUILD_BUG for C and do not define it for ASM. > > Signed-off-by: Christophe Leroy > --- > v3: Fixes kvm_emul.S and include in > --- >

Re: [PATCH v2] powerpc/audit: Convert powerpc to AUDIT_ARCH_COMPAT_GENERIC

2021-08-24 Thread Michael Ellerman
Christophe Leroy writes: > Commit e65e1fc2d24b ("[PATCH] syscall class hookup for all normal > targets") added generic support for AUDIT but that didn't include > support for bi-arch like powerpc. > > Commit 4b58841149dc ("audit: Add generic compat syscall support") > added generic support for

Re: [PATCH v2 2/3] selftests/powerpc: Add test for real address error handling

2021-08-24 Thread Michael Ellerman
Ganesh Goudar writes: > Add test for real address or control memory address access > error handling, using NX-GZIP engine. > > The error is injected by accessing the control memory address > using illegal instruction, on successful handling the process > attempting to access control memory

Re: [PATCH v2 1/3] powerpc/pseries: Parse control memory access error

2021-08-24 Thread Michael Ellerman
Hi Ganesh, Some comments below ... Ganesh Goudar writes: > Add support to parse and log control memory access > error for pseries. > > Signed-off-by: Ganesh Goudar > --- > v2: No changes in this patch. > --- > arch/powerpc/platforms/pseries/ras.c | 21 + > 1 file changed,

Re: [PATCH] powerpc/syscalls: Remove __NR__exit

2021-08-23 Thread Michael Ellerman
Christophe Leroy writes: > Le 23/08/2021 à 10:33, Andreas Schwab a écrit : >> On Aug 23 2021, Christophe Leroy wrote: >> >>> __NR_exit is nowhere used. On most architectures it was removed by >> >> ITYM __NR__exit, which is what you are removing. >> > > Indeed. > > Michael, can you fix when

Re: [PATCH v2 57/63] powerpc/signal32: Use struct_group() to zero spe regs

2021-08-22 Thread Michael Ellerman
Kees Cook writes: > On Fri, Aug 20, 2021 at 05:49:35PM +1000, Michael Ellerman wrote: >> Kees Cook writes: >> > In preparation for FORTIFY_SOURCE performing compile-time and run-time >> > field bounds checking for memset(), avoid intentionally writing acr

[GIT PULL] Please pull powerpc/linux.git powerpc-5.14-6 tag

2021-08-21 Thread Michael Ellerman
to: Christophe Leroy, Fabiano Rosas, Laurent Vivier, Murilo Opsfelder Araújo, Nathan Chancellor, Stan Johnson. - -- Christophe Leroy (1): powerpc/32s: Fix random crashes by adding isync() after locking/unlocking KUEP Michael

Re: [PATCH v8 2/3] tty: hvc: pass DMA capable memory to put_chars()

2021-08-20 Thread Michael Ellerman
Daniel Axtens writes: > Xianting Tian writes: > >> As well known, hvc backend driver(eg, virtio-console) can register its >> operations to hvc framework. The operations can contain put_chars(), >> get_chars() and so on. >> >> Some hvc backend may do dma in its operations. eg, put_chars() of >>

  1   2   3   4   5   6   7   8   9   10   >