[PATCH] powerpc: Don't select HAVE_IRQ_EXIT_ON_IRQ_STACK

2022-05-24 Thread Michael Ellerman
The HAVE_IRQ_EXIT_ON_IRQ_STACK option tells generic code that irq_exit() is called while still running on the hard irq stack (hardirq_ctx[] in the powerpc code). Selecting the option means the generic code will *not* switch to the softirq stack before running softirqs, because the code is already

Re: [PATCH 2/2] drm/tiny: Add ofdrm for Open Firmware framebuffers

2022-05-24 Thread Benjamin Herrenschmidt
On Sun, 2022-05-22 at 21:35 +0200, Thomas Zimmermann wrote: > > Interesting. Did you find some formats that were not supported ? > > We still don't support XRGB1555. If the native buffer uses this format, > we'd have no conversion helper. In this case, we rely on userspace/fbcon > to use the

[PATCH 3/3] powerpc/64s: Remove spurious fault flushing for NMMU

2022-05-24 Thread Nicholas Piggin
Commit 6d8278c414cb2 ("powerpc/64s/radix: do not flush TLB on spurious fault") removed the TLB flush for spurious faults, except when a coprocessor (nest MMU) maps the address space. This is not needed because the NMMU workaround in the PTE permission upgrade paths prevents PTEs existing with less

[PATCH 2/3] powerpc/64s: POWER10 nest MMU can upgrade PTE access authority without TLB flush

2022-05-24 Thread Nicholas Piggin
The nest MMU in POWER9 does not re-fetch the PTE in response to permission mismatch, contrary to the architecture[*] and unlike the core MMU. This requires a TLB flush before upgrading permissions of valid PTEs, for any address space with a coprocessor attached. Per (non-public) Nest MMU

[PATCH 1/3] powerpc/64s: POWER10 nest MMU does not require flush escalation workaround

2022-05-24 Thread Nicholas Piggin
Per (non-public) Nest MMU Workbook, POWER10 and POWER9P NMMU does not cache PTEs in PWC, so does not require PWC flush to invalidate these translations. Skip the workaround on POWER10 and later. Signed-off-by: Nicholas Piggin --- arch/powerpc/mm/book3s64/radix_tlb.c | 14 +++--- 1 file

[PATCH 0/3] powerpc/64s: Restrict NMMU workarounds

2022-05-24 Thread Nicholas Piggin
POWER10 doesn't require the two Nest MMU workarounds according to the workbook. Also remove the last vestige of the spurious fault flushing for NMMU which shouldn't have been required anyway. Thanks, Nick Nicholas Piggin (3): powerpc/64s: POWER10 nest MMU does not require flush escalation

[PATCH v3] mm: Avoid unnecessary page fault retires on shared memory types

2022-05-24 Thread Peter Xu
I observed that for each of the shared file-backed page faults, we're very likely to retry one more time for the 1st write fault upon no page. It's because we'll need to release the mmap lock for dirty rate limit purpose with balance_dirty_pages_ratelimited() (in fault_dirty_shared_page()). Then

Re: [PATCH V9 20/20] riscv: compat: Add COMPAT Kbuild skeletal support

2022-05-24 Thread Guenter Roeck
On Wed, May 25, 2022 at 01:46:38AM +0800, Guo Ren wrote: [ ... ] > > The problem is come from "__dls3's vdso decode part in musl's > > ldso/dynlink.c". The ehdr->e_phnum & ehdr->e_phentsize are wrong. > > > > I think the root cause is from musl's implementation with the wrong > > elf parser. I

Re: [PATCH V2] platforms/83xx: Use of_device_get_match_data()

2022-05-24 Thread Christophe JAILLET
Le 25/02/2022 à 02:07, cgel@gmail.com a écrit : From: Minghao Chi (CGEL ZTE) Use of_device_get_match_data() to simplify the code. v1->v2: Add a judgment on the return value of the A function as NULL Reported-by: Zeal Robot Signed-off-by: Minghao Chi (CGEL ZTE) ---

Re: [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler

2022-05-24 Thread Segher Boessenkool
On Tue, May 24, 2022 at 09:16:10PM +0200, Pali Rohár wrote: > On Tuesday 24 May 2022 13:52:47 Segher Boessenkool wrote: > > Aha. Right, because this config forces -mspe it requires one of these > > CPUs. > > > > You can use a powerpc-linux compiler instead, and everything will just > > work.

Re: [RFC PATCH v2 5/7] objtool: Enable objtool to run only on files with ftrace enabled

2022-05-24 Thread Peter Zijlstra
On Tue, May 24, 2022 at 06:59:50PM +, Christophe Leroy wrote: > > > Le 24/05/2022 à 20:02, Peter Zijlstra a écrit : > > On Tue, May 24, 2022 at 08:01:39PM +0200, Peter Zijlstra wrote: > >> On Tue, May 24, 2022 at 03:17:45PM +0200, Christophe Leroy wrote: > >>> From: Sathvika Vasireddy > >>>

Re: [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler

2022-05-24 Thread Pali Rohár
On Tuesday 24 May 2022 13:52:47 Segher Boessenkool wrote: > On Tue, May 24, 2022 at 08:12:55PM +0200, Pali Rohár wrote: > > On Tuesday 24 May 2022 12:59:55 Segher Boessenkool wrote: > > > On Tue, May 24, 2022 at 11:39:39AM +0200, Pali Rohár wrote: > > > > gcc e500 compiler does not support

Re: [RFC PATCH v2 5/7] objtool: Enable objtool to run only on files with ftrace enabled

2022-05-24 Thread Christophe Leroy
Le 24/05/2022 à 20:02, Peter Zijlstra a écrit : > On Tue, May 24, 2022 at 08:01:39PM +0200, Peter Zijlstra wrote: >> On Tue, May 24, 2022 at 03:17:45PM +0200, Christophe Leroy wrote: >>> From: Sathvika Vasireddy >>> >>> This patch makes sure objtool runs only on the object files >>> that have

Re: [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler

2022-05-24 Thread Segher Boessenkool
On Tue, May 24, 2022 at 08:12:55PM +0200, Pali Rohár wrote: > On Tuesday 24 May 2022 12:59:55 Segher Boessenkool wrote: > > On Tue, May 24, 2022 at 11:39:39AM +0200, Pali Rohár wrote: > > > gcc e500 compiler does not support -mcpu=powerpc option. When it is > > > specified then gcc throws compile

Re: [PATCH Linux] powerpc: add documentation for HWCAPs

2022-05-24 Thread Segher Boessenkool
On Tue, May 24, 2022 at 11:52:00AM +0200, Florian Weimer wrote: > * Nicholas Piggin: > > > +2. Facilities > > +- > > +The Power ISA uses the term "facility" to describe a class of instructions, > > +registers, interrupts, etc. The presence or absence of a facility indicates > >

Re: [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler

2022-05-24 Thread Pali Rohár
On Tuesday 24 May 2022 12:59:55 Segher Boessenkool wrote: > Hi! > > On Tue, May 24, 2022 at 11:39:39AM +0200, Pali Rohár wrote: > > gcc e500 compiler does not support -mcpu=powerpc option. When it is > > specified then gcc throws compile error: > > > > gcc: error: unrecognized argument in

Re: [RFC PATCH v2 5/7] objtool: Enable objtool to run only on files with ftrace enabled

2022-05-24 Thread Peter Zijlstra
On Tue, May 24, 2022 at 08:01:39PM +0200, Peter Zijlstra wrote: > On Tue, May 24, 2022 at 03:17:45PM +0200, Christophe Leroy wrote: > > From: Sathvika Vasireddy > > > > This patch makes sure objtool runs only on the object files > > that have ftrace enabled, instead of running on all the object

Re: [PATCH] powerpc: e500: Fix compilation with gcc e500 compiler

2022-05-24 Thread Segher Boessenkool
Hi! On Tue, May 24, 2022 at 11:39:39AM +0200, Pali Rohár wrote: > gcc e500 compiler does not support -mcpu=powerpc option. When it is > specified then gcc throws compile error: > > gcc: error: unrecognized argument in option ‘-mcpu=powerpc’ > gcc: note: valid arguments to ‘-mcpu=’ are: 8540

Re: [RFC PATCH v2 5/7] objtool: Enable objtool to run only on files with ftrace enabled

2022-05-24 Thread Peter Zijlstra
On Tue, May 24, 2022 at 03:17:45PM +0200, Christophe Leroy wrote: > From: Sathvika Vasireddy > > This patch makes sure objtool runs only on the object files > that have ftrace enabled, instead of running on all the object > files. > > Signed-off-by: Naveen N. Rao > Signed-off-by: Sathvika

Re: [RFC PATCH v2 3/7] objtool: Use target file class size instead of a compiled constant

2022-05-24 Thread Peter Zijlstra
On Tue, May 24, 2022 at 03:17:43PM +0200, Christophe Leroy wrote: > - sec = elf_create_section(elf, relocname, 0, sizeof(GElf_Rela), 0); > + if (size == sizeof(u32)) > + sec = elf_create_section(elf, relocname, 0, sizeof(Elf32_Rela), > 0); > + else > + sec =

Re: [PATCH V9 20/20] riscv: compat: Add COMPAT Kbuild skeletal support

2022-05-24 Thread Guo Ren
On Wed, May 25, 2022 at 1:42 AM Guo Ren wrote: > > On Mon, May 23, 2022 at 1:45 PM Guenter Roeck wrote: > > > > On Tue, Mar 22, 2022 at 10:40:03PM +0800, guo...@kernel.org wrote: > > > From: Guo Ren > > > > > > Adds initial skeletal COMPAT Kbuild (Running 32bit U-mode on > > > 64bit S-mode)

Re: [PATCH V9 20/20] riscv: compat: Add COMPAT Kbuild skeletal support

2022-05-24 Thread Guo Ren
On Mon, May 23, 2022 at 1:45 PM Guenter Roeck wrote: > > On Tue, Mar 22, 2022 at 10:40:03PM +0800, guo...@kernel.org wrote: > > From: Guo Ren > > > > Adds initial skeletal COMPAT Kbuild (Running 32bit U-mode on > > 64bit S-mode) support. > > - Setup kconfig & dummy functions for compiling. > >

Re: [PATCH Linux] powerpc: add documentation for HWCAPs

2022-05-24 Thread Segher Boessenkool
Hi! On Tue, May 24, 2022 at 07:38:28PM +1000, Nicholas Piggin wrote: > Thanks for all the comments and corrections. It should be nearing the > point where it is useful now. Yes I do think it would be useful to align > this more with OpenPOWER docs (and possibly eventually move it into the > ABI,

Re: [PATCH v7 21/25] Kbuild: add Rust support

2022-05-24 Thread Miguel Ojeda
On Mon, May 23, 2022 at 8:45 PM Nick Desaulniers wrote: > > I'm super not into having the rust optimization level differ from the > C optimization level. This is just someone having too much fun > wrapping every compiler flag in a kbuild option. Either folks wan't I mean, `Makefile`s are not

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

2022-05-24 Thread Eric W. Biederman
"Guilherme G. Piccoli" writes: > 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 conditionals, for example. The panic

Re: [PATCH V9 20/20] riscv: compat: Add COMPAT Kbuild skeletal support

2022-05-24 Thread Heiko Stübner
shes during reboot > # with sifive_u emulations. > enable_config "${defconfig}" CONFIG_RISCV_SBI_V01 > > Hope that helps, Actually it doesn't seem rootfs-specific at all. Merged was this v9, but the version I last tested was one of the earlier ones, so it looks like s

Re: [PATCH] powerpc/papr_scm: don't requests stats with '0' sized stats buffer

2022-05-24 Thread Sachin Sant
> On 24-May-2022, at 4:53 PM, Vaibhav Jain wrote: > > Sachin reported [1] that on a POWER-10 lpar he is seeing a kernel panic being > reported with vPMEM when papr_scm probe is being called. The panic is of the > form below and is observed only with following option disabled(profile) for >

Re: [RFC PATCH 4/4] objtool/powerpc: Add --mcount specific implementation

2022-05-24 Thread Christophe Leroy
Le 24/05/2022 à 13:00, Sathvika Vasireddy a écrit : > [Vous ne recevez pas souvent de courriers de la part de > s...@linux.vnet.ibm.com. Découvrez pourquoi cela peut être important à > l’adresse https://aka.ms/LearnAboutSenderIdentification.] > > On 24/05/22 15:05, Christophe Leroy wrote: >>

Re: [RFC PATCH 2/4] objtool: Enable objtool to run only on files with ftrace enabled

2022-05-24 Thread Christophe Leroy
Hi Sathvika Le 24/05/2022 à 12:53, Sathvika Vasireddy a écrit : > [Vous ne recevez pas souvent de courriers de la part de > s...@linux.vnet.ibm.com. Découvrez pourquoi cela peut être important à > l’adresse https://aka.ms/LearnAboutSenderIdentification.] > > Hi Christophe, > > On 24/05/22

[RFC PATCH v2 2/7] objtool: Use target file endianness instead of a compiled constant

2022-05-24 Thread Christophe Leroy
Some architectures like powerpc support both endianness, it's therefore not possible to fix the endianness via arch/endianness.h because there is no easy way to get the target endianness at build time. Use the endianness recorded in the file objtool is working on. Signed-off-by: Christophe Leroy

[RFC PATCH v2 6/7] objtool/powerpc: Enable objtool to be built on ppc

2022-05-24 Thread Christophe Leroy
From: Sathvika Vasireddy This patch adds [stub] implementations for required functions, inorder to enable objtool build on powerpc. Signed-off-by: Sathvika Vasireddy Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig | 1 + tools/objtool/arch/powerpc/Build

[RFC PATCH v2 4/7] objtool: Add --mnop as an option to --mcount

2022-05-24 Thread Christophe Leroy
From: Sathvika Vasireddy Architectures can select HAVE_NOP_MCOUNT if they choose to nop out mcount call sites. If that config option is selected, then --mnop is passed as an option to objtool, along with --mcount. Also, make sure that --mnop can be passed as an option to objtool only when

[RFC PATCH v2 0/7] objtool: Enable and implement --mcount option on powerpc

2022-05-24 Thread Christophe Leroy
This draft series adds PPC32 support to Sathvika's series. Verified on pmac32 on QEMU. It should in principle also work for PPC64 BE but for the time being something goes wrong. In the beginning I had a segfaut hence the first patch. But I still get no mcount section in the files. Christophe

[RFC PATCH v2 7/7] objtool/powerpc: Add --mcount specific implementation

2022-05-24 Thread Christophe Leroy
From: Sathvika Vasireddy This patch enables objtool --mcount on powerpc, and adds implementation specific to powerpc. Signed-off-by: Sathvika Vasireddy Signed-off-by: Christophe Leroy --- arch/powerpc/Kconfig| 1 + tools/objtool/arch/powerpc/decode.c | 14 ++

[RFC PATCH v2 3/7] objtool: Use target file class size instead of a compiled constant

2022-05-24 Thread Christophe Leroy
In order to allow using objtool on cross-built kernels, determine size of long from elf data instead of using sizeof(long) at build time. For the time being this covers only mcount. Signed-off-by: Christophe Leroy --- tools/objtool/check.c | 16 +---

[RFC PATCH v2 1/7] objtool: Fix SEGFAULT

2022-05-24 Thread Christophe Leroy
Signed-off-by: Christophe Leroy --- tools/objtool/check.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 190b2f6e360a..6cb07e151588 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -203,7 +203,7 @@ static

[RFC PATCH v2 5/7] objtool: Enable objtool to run only on files with ftrace enabled

2022-05-24 Thread Christophe Leroy
From: Sathvika Vasireddy This patch makes sure objtool runs only on the object files that have ftrace enabled, instead of running on all the object files. Signed-off-by: Naveen N. Rao Signed-off-by: Sathvika Vasireddy Signed-off-by: Christophe Leroy --- scripts/Makefile.build | 4 ++-- 1

Re: [powerpc] linux-next 20220520 boot failure (drc_pmem_query_stats)

2022-05-24 Thread Vaibhav Jain
Thanks for reporting this Sachin, I have posted a fix for this at https://lore.kernel.org/nvdimm/20220524112353.1718454-1-vaib...@linux.ibm.com Sachin Sant writes: > While booting linux-next (5.18.0-rc7-next-20220520) on a Power10 LPAR > configure with pmem following oops is seen. The LPAR

Re: [PATCH -next] powerpc/pseries/vas: Call misc_deregister if sysfs init fails

2022-05-24 Thread Michael Ellerman
On Wed, 11 May 2022 11:35:07 +0800, Zheng Bin wrote: > Undo effects of misc_register if sysfs init fails after > misc_register. > > Applied to powerpc/next. [1/1] powerpc/pseries/vas: Call misc_deregister if sysfs init fails

Re: [PATCH -next] powerpc/kaslr_booke: Fix build error

2022-05-24 Thread Michael Ellerman
On Tue, 17 May 2022 17:49:00 +0800, YueHaibing wrote: > arch/powerpc/mm/nohash/kaslr_booke.c: In function ‘kaslr_get_cmdline’: > arch/powerpc/mm/nohash/kaslr_booke.c:46:2: error: implicit declaration of > function ‘early_init_dt_scan_chosen’; did you mean > ‘early_init_mmu_secondary’?

Re: [PATCH -next] powerpc/book3e: Fix build error

2022-05-24 Thread Michael Ellerman
On Tue, 17 May 2022 17:48:30 +0800, YueHaibing wrote: > arch/powerpc/mm/nohash/fsl_book3e.c: In function ‘relocate_init’: > arch/powerpc/mm/nohash/fsl_book3e.c:348:2: error: implicit declaration of > function ‘early_get_first_memblock_info’ > [-Werror=implicit-function-declaration] >

Re: [PATCH -next] powerpc/iommu: Add missing of_node_put in iommu_init_early_dart

2022-05-24 Thread Michael Ellerman
On Mon, 25 Apr 2022 08:12:45 +, Peng Wu wrote: > The device_node pointer is returned by of_find_compatible_node > with refcount incremented. We should use of_node_put() to avoid > the refcount leak. > > Applied to powerpc/next. [1/1] powerpc/iommu: Add missing of_node_put in

Re: [PATCH v2] powerpc/papr_scm: Fix leaking nvdimm_events_map elements

2022-05-24 Thread Michael Ellerman
On Wed, 11 May 2022 13:56:36 +0530, Vaibhav Jain wrote: > Right now 'char *' elements allocated for individual 'stat_id' in > 'papr_scm_priv.nvdimm_events_map[]' during papr_scm_pmu_check_events(), get > leaked in papr_scm_remove() and papr_scm_pmu_register(), > papr_scm_pmu_check_events() error

Re: [PATCH v2 1/2] powerpc/powernv: Get L1D flush requirements from device-tree

2022-05-24 Thread Michael Ellerman
On Mon, 4 Apr 2022 20:15:35 +1000, Russell Currey wrote: > The device-tree properties no-need-l1d-flush-msr-pr-1-to-0 and > no-need-l1d-flush-kernel-on-user-access are the equivalents of > H_CPU_BEHAV_NO_L1D_FLUSH_ENTRY and H_CPU_BEHAV_NO_L1D_FLUSH_UACCESS > from the H_GET_CPU_CHARACTERISTICS

Re: [PATCH] selftests/powerpc: Handle more misreporting cases in spectre_v2

2022-05-24 Thread Michael Ellerman
On Tue, 8 Jun 2021 16:48:09 +1000, Russell Currey wrote: > In commit f3054ffd71b5 ("selftests/powerpc: Return skip code for > spectre_v2"), the spectre_v2 selftest is updated to be aware of cases > where the vulnerability status reported in sysfs is incorrect, skipping > the test instead. > >

Re: [PATCH v2] macintosh: via-pmu and via-cuda need RTC_LIB

2022-05-24 Thread Michael Ellerman
On Sun, 10 Apr 2022 09:10:35 -0700, Randy Dunlap wrote: > Fix build when RTC_LIB is not set/enabled. > Eliminates these build errors: > > m68k-linux-ld: drivers/macintosh/via-pmu.o: in function `pmu_set_rtc_time': > drivers/macintosh/via-pmu.c:1769: undefined reference to `rtc_tm_to_time64' >

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

2022-05-24 Thread Michael Ellerman
On Wed, 18 May 2022 20:03:27 +1000, Paul Mackerras wrote: > This patch series implements KASAN on 64-bit POWER with radix MMU, > such as POWER9 or POWER10. Daniel Axtens posted previous versions of > these patches, but is no longer working on KASAN, and I have been > asked to get them ready for

Re: [PATCH] powerpc/85xx: P2020: Add fsl,mpc8548-pmc node

2022-05-24 Thread Michael Ellerman
On Fri, 6 May 2022 22:36:21 +0200, Pali Rohár wrote: > P2020 also contains Power Management Controller and their registers at > offset 0xe0070 compatible with mpc8548. So add PMC node into DTS include > file fsl/p2020si-post.dtsi > > Applied to powerpc/next. [1/1] powerpc/85xx: P2020: Add

Re: [PATCH] powerpc/numa: Associate numa node to its cpu earlier

2022-05-24 Thread Michael Ellerman
On Mon, 11 Apr 2022 09:49:34 +0200, Oscar Salvador wrote: > powerpc is the only platform that do not rely on > cpu_up()->try_online_node() to bring up a numa node, > and special cases it, instead, deep in its own machinery: > > dlpar_online_cpu > find_and_online_cpu_nid > try_online_node > >

Re: [PATCH] powerpc/powernv/pci: Drop VF MPS fixup

2022-05-24 Thread Michael Ellerman
On Wed, 2 Sep 2020 13:51:59 +1000, Oliver O'Halloran wrote: > The MPS field in the VF config space is marked as reserved in current > versions of the SR-IOV spec. In other words, this fixup doesn't do > anything. > > Applied to powerpc/next. [1/1] powerpc/powernv/pci: Drop VF MPS fixup

Re: [PATCH 1/2] powerpc/64: Bump SIGSTKSZ and MINSIGSTKSZ

2022-05-24 Thread Michael Ellerman
On Tue, 8 Mar 2022 04:27:33 +1000, Nicholas Piggin wrote: > The sad tale of SIGSTKSZ and MINSIGSTKSZ is documented in glibc.git > commit f7c399cff5bd ("PowerPC SIGSTKSZ"), which explains why glibc > does not use the kernel defines for these constants. Since then in > fact there has been a further

Re: [PATCH 00/14] powerpc/rtas: various cleanups and improvements

2022-05-24 Thread Michael Ellerman
On Tue, 8 Mar 2022 23:50:33 +1000, Nicholas Piggin wrote: > I had a bunch of random little fixes and cleanups around and > was prompted to put them together and make a change to call > RTAS with MSR[RI] enabled because of a report of the hard > lockup watchdog NMI IPI hitting in an rtas call which

Re: [PATCH v2] powerpc/ftrace: Remove ftrace init tramp once kernel init is complete

2022-05-24 Thread Michael Ellerman
On Mon, 16 May 2022 12:44:22 +0530, Naveen N. Rao wrote: > Stop using the ftrace trampoline for init section once kernel init is > complete. > > Applied to powerpc/next. [1/1] powerpc/ftrace: Remove ftrace init tramp once kernel init is complete

[PATCH] powerpc/papr_scm: don't requests stats with '0' sized stats buffer

2022-05-24 Thread Vaibhav Jain
Sachin reported [1] that on a POWER-10 lpar he is seeing a kernel panic being reported with vPMEM when papr_scm probe is being called. The panic is of the form below and is observed only with following option disabled(profile) for the said LPAR 'Enable Performance Information Collection' in the

Re: [PATCH v2 0/2] Link the PowerPC vDSO with ld.lld

2022-05-24 Thread Michael Ellerman
On Wed, 11 May 2022 11:49:59 -0700, Nathan Chancellor wrote: > This series is an alternative to the one proposed by Nick before the > PowerPC vDSO unification in commit fd1feade75fb ("powerpc/vdso: Merge > vdso64 and vdso32 into a single directory"): > >

Re: [PATCH] powerpc: Fix all occurences of "the the"

2022-05-24 Thread Michael Ellerman
On Thu, 19 May 2022 00:26:29 +1000, Michael Ellerman wrote: > Rather than waiting for the bots to fix these one-by-one, fix all > occurences of "the the" throughout arch/powerpc. > > Applied to powerpc/next. [1/1] powerpc: Fix all occurences of "the the"

Re: [PATCH 1/2] powerpc: Add generic PAGE_SIZE config symbols

2022-05-24 Thread Michael Ellerman
On Thu, 5 May 2022 22:51:22 +1000, Michael Ellerman wrote: > Other arches (sh, mips, hexagon) use standard names for PAGE_SIZE > related config symbols. > > Add matching symbols for powerpc, which are enabled by default but > depend on our architecture specific PAGE_SIZE symbols. > > This allows

Re: [PATCH] selftest/powerpc/pmu/ebb: remove fixed_instruction.S

2022-05-24 Thread Michael Ellerman
On Tue, 22 Mar 2022 10:26:38 +0530, Madhavan Srinivasan wrote: > Commit 3752e453f6ba ("selftests/powerpc: Add tests of PMU EBBs") added > selftest testcases to verify EBB interface. instruction_count_test.c > testcase needs a fixed loop function to count overhead. Instead of > using the

Re: [PATCH] powerpc/xive: Fix refcount leak in xive_spapr_init

2022-05-24 Thread Michael Ellerman
On Thu, 12 May 2022 13:05:33 +0400, Miaoqian Lin wrote: > of_find_compatible_node() returns a node pointer with refcount > incremented, we should use of_node_put() on it when done. > Add missing of_node_put() to avoid refcount leak. > > Applied to powerpc/next. [1/1] powerpc/xive: Fix refcount

Re: [PATCH] powerpc/fsl_rio: Fix refcount leak in fsl_rio_setup

2022-05-24 Thread Michael Ellerman
On Thu, 12 May 2022 16:37:18 +0400, Miaoqian Lin wrote: > of_parse_phandle() returns a node pointer with refcount > incremented, we should use of_node_put() on it when not need anymore. > Add missing of_node_put() to avoid refcount leak. > > Applied to powerpc/next. [1/1] powerpc/fsl_rio: Fix

Re: [PATCH v3 1/2] powerpc/powermac: add missing g5_phy_disable_cpu1() declaration

2022-05-24 Thread Michael Ellerman
On Fri, 24 Sep 2021 12:56:52 +0200, Krzysztof Kozlowski wrote: > g5_phy_disable_cpu1() is used outside of platforms/powermac/feature.c, > so it should have a declaration to fix W=1 warning: > > arch/powerpc/platforms/powermac/feature.c:1533:6: > error: no previous prototype for

Re: [PATCH 1/2] powerpc/perf: Fix the threshold compare group constraint for power10

2022-05-24 Thread Michael Ellerman
On Fri, 6 May 2022 11:40:14 +0530, Kajol Jain wrote: > Thresh compare bits for a event is used to program thresh compare > field in Monitor Mode Control Register A (MMCRA: 8-18 bits for power10). > When scheduling events as a group, all events in that group should > match value in threshold bits.

Re: [PATCH] powerpc/microwatt: Add mmu bits to device tree

2022-05-24 Thread Michael Ellerman
On Thu, 19 May 2022 22:27:06 +0930, Joel Stanley wrote: > In commit 5402e239d09f ("powerpc/64s: Get LPID bit width from device > tree") the kernel tried to determine the pid and lpid bits from the > device tree. If they are not found, there is a fallback, but Microwatt > wasn't covered as has the

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

2022-05-24 Thread Michael Ellerman
On Tue, 14 Sep 2021 15:46:30 +0530, Vasant Hegde wrote: > Currently only FSP based powernv systems supports firmware update > interfaces. Hence check that the token OPAL_FLASH_VALIDATE exists > before initalising the flash driver. > > Applied to powerpc/next. [1/1] powerpc/powernv/flash: Check

Re: [PATCH] powerpc/pseries/vas: sysfs comments with the correct entries

2022-05-24 Thread Michael Ellerman
On Sat, 09 Apr 2022 01:46:15 -0700, Haren Myneni wrote: > VAS entry is created as a misc device and the sysfs comments > should list the proper entries > > Applied to powerpc/next. [1/1] powerpc/pseries/vas: sysfs comments with the correct entries

Re: [PATCH] powerpc/powernv/vas: Assign real address to rx_fifo in vas_rx_win_attr

2022-05-24 Thread Michael Ellerman
On Sat, 09 Apr 2022 01:44:16 -0700, Haren Myneni wrote: > In init_winctx_regs(), __pa() is called on winctx->rx_fifo and this > function is called to initialize registers for receive and fault > windows. But the real address is passed in winctx->rx_fifo for > receive windows and the virtual

Re: [PATCH] powerpc: Export mmu_feature_keys[] as non-GPL

2022-05-24 Thread Michael Ellerman
On Tue, 29 Mar 2022 16:57:09 +0800, Kevin Hao wrote: > When the mmu_feature_keys[] was introduced in the commit c12e6f24d413 > ("powerpc: Add option to use jump label for mmu_has_feature()"), > it is unlikely that it would be used either directly or indirectly in > the out of tree modules. So we

Re: (subset) [PATCH 00/30] The panic notifiers refactor

2022-05-24 Thread Michael Ellerman
On Wed, 27 Apr 2022 19:48:54 -0300, Guilherme G. Piccoli wrote: > Hey folks, this is an attempt to improve/refactor the dated panic notifiers > infrastructure. This is strongly based in a suggestion made by Pter Mladek [0] > some time ago, and it's finally ready. Below I'll detail the patch

Re: [PATCH v2] macintosh/via-pmu: Fix build failure when CONFIG_INPUT is disabled

2022-05-24 Thread Michael Ellerman
On Thu, 07 Apr 2022 20:11:32 +1000, Finn Thain wrote: > drivers/macintosh/via-pmu-event.o: In function `via_pmu_event': > via-pmu-event.c:(.text+0x44): undefined reference to `input_event' > via-pmu-event.c:(.text+0x68): undefined reference to `input_event' > via-pmu-event.c:(.text+0x94):

Re: [PATCH] selftests/powerpc/pmu: fix spelling mistake "mis-match" -> "mismatch"

2022-05-24 Thread Michael Ellerman
On Sat, 19 Mar 2022 23:20:25 +, Colin Ian King wrote: > There are a few spelling mistakes in error messages. Fix them. > > Applied to powerpc/next. [1/1] selftests/powerpc/pmu: fix spelling mistake "mis-match" -> "mismatch"

Re: [PATCH v3 00/25] powerpc: ftrace optimisation and cleanup and more [v3]

2022-05-24 Thread Michael Ellerman
On Mon, 9 May 2022 07:35:58 +0200, Christophe Leroy wrote: > This series provides optimisation and cleanup of ftrace on powerpc. > > With this series ftrace activation is about 20% faster on an 8xx. > > At the end of the series come additional cleanups around ppc-opcode, > that would likely

Re: [PATCH] powerpc/irq: Remove arch_local_irq_restore() for !CONFIG_CC_HAS_ASM_GOTO

2022-05-24 Thread Michael Ellerman
On Mon, 16 May 2022 17:36:04 +0200, Christophe Leroy wrote: > All supported versions of GCC support asm goto. > > Remove the !CONFIG_CC_HAS_ASM_GOTO version of arch_local_irq_restore() > > Applied to powerpc/next. [1/1] powerpc/irq: Remove arch_local_irq_restore() for !CONFIG_CC_HAS_ASM_GOTO

Re: [PATCH] powerpc/fsl_book3e: Don't set rodata RO too early

2022-05-24 Thread Michael Ellerman
On Thu, 19 May 2022 19:24:15 +0200, Christophe Leroy wrote: > On fsl_book3e, rodata is set read-only at the same time as > init text is set NX at the end of init. That's too early. > > As both action are performed at the same time, delay both > actions to the time rodata is expected to be made

Re: [PATCH] powerpc/85xx: Remove FSL_85XX_CACHE_SRAM

2022-05-24 Thread Michael Ellerman
On Thu, 31 Mar 2022 12:03:06 +0200, Christophe Leroy wrote: > CONFIG_FSL_85XX_CACHE_SRAM is an option that is not > user selectable and which is not selected by any driver > nor any defconfig. > > Remove it and all associated code. > > > [...] Applied to powerpc/next. [1/1] powerpc/85xx:

Re: [PATCH V2] platforms/83xx: Use of_device_get_match_data()

2022-05-24 Thread Michael Ellerman
On Fri, 25 Feb 2022 01:07:37 +, cgel@gmail.com wrote: > From: Minghao Chi (CGEL ZTE) > > Use of_device_get_match_data() to simplify the code. > v1->v2: > Add a judgment on the return value of the A function as NULL > > > [...] Applied to powerpc/next. [1/1] platforms/83xx: Use

Re: [PATCH] powerpc/sysdev: fix refcount leak in icp_opal_init()

2022-05-24 Thread Michael Ellerman
On Sat, 2 Apr 2022 01:34:19 +, cgel@gmail.com wrote: > From: Lv Ruyi > > The of_find_compatible_node() function returns a node pointer with > refcount incremented, use of_node_put() on it when done. > > Applied to powerpc/next. [1/1] powerpc/sysdev: fix refcount leak in

Re: [PATCH] powerpc/powernv: fix missing of_node_put in uv_init()

2022-05-24 Thread Michael Ellerman
On Thu, 7 Apr 2022 09:00:43 +, cgel@gmail.com wrote: > From: Lv Ruyi > > of_find_compatible_node() returns node pointer with refcount incremented, > use of_node_put() on it when done. > > Applied to powerpc/next. [1/1] powerpc/powernv: fix missing of_node_put in uv_init()

Re: [PATCH V2] powerpc/eeh: Drop redundant spinlock initialization

2022-05-24 Thread Michael Ellerman
On Wed, 11 May 2022 09:27:56 +0800, Haowen Bai wrote: > slot_errbuf_lock has declared and initialized by DEFINE_SPINLOCK, > so we don't need to spin_lock_init again, drop it. > > Applied to powerpc/next. [1/1] powerpc/eeh: Drop redundant spinlock initialization

Re: [PATCH] powerpc: Enable the DAWR on POWER9 DD2.3 and above

2022-05-24 Thread Michael Ellerman
On Tue, 3 May 2022 12:01:52 -0500, Reza Arbab wrote: > The hardware bug in POWER9 preventing use of the DAWR was fixed in > DD2.3. Set the CPU_FTR_DAWR feature bit on these newer systems to start > using it again, and update the documentation accordingly. > > The CPU features for DD2.3 are

Re: [RFC PATCH 4/4] objtool/powerpc: Add --mcount specific implementation

2022-05-24 Thread Sathvika Vasireddy
On 24/05/22 15:05, Christophe Leroy wrote: Le 23/05/2022 à 19:55, Sathvika Vasireddy a écrit : This patch enables objtool --mcount on powerpc, and adds implementation specific to powerpc. Signed-off-by: Sathvika Vasireddy --- arch/powerpc/Kconfig| 1 +

Re: [RFC PATCH 2/4] objtool: Enable objtool to run only on files with ftrace enabled

2022-05-24 Thread Sathvika Vasireddy
Hi Christophe, On 24/05/22 14:27, Christophe Leroy wrote: Le 23/05/2022 à 19:55, Sathvika Vasireddy a écrit : This patch makes sure objtool runs only on the object files that have ftrace enabled, instead of running on all the object files. Why do that ? This was done to address the issue

Re: [RESEND][PATCH] KVM: PPC: Book3S HV: fix incorrect NULL check on list iterator

2022-05-24 Thread Michael Ellerman
On Thu, 14 Apr 2022 14:21:03 +0800, Xiaomeng Tong wrote: > The bug is here: > if (!p) > return ret; > > The list iterator value 'p' will *always* be set and non-NULL by > list_for_each_entry(), so it is incorrect to assume that the iterator > value will be NULL if the list

Re: [PATCH] KVM: PPC: Book3S HV P9: Optimise loads around context switch

2022-05-24 Thread Michael Ellerman
On Sun, 23 Jan 2022 21:47:25 +1000, Nicholas Piggin wrote: > It is better to get all loads for the register values in flight > before starting to switch LPID, PID, and LPCR because those > mtSPRs are expensive and serialising. > > This also just tidies up the code for a potential future change >

Re: [PATCH] KVM: PPC: Book3S HV: HFSCR[PREFIX] does not exist

2022-05-24 Thread Michael Ellerman
On Sat, 22 Jan 2022 20:56:39 +1000, Nicholas Piggin wrote: > This facility is controlled by FSCR only. Reserved bits should not be > set in the HFSCR register (although it's likely harmless as this > position would not be re-used, and the L0 is forgiving here too). > > Applied to

Re: [PATCH 0/6] KVM: PPC: Book3S: Make LPID/nested LPID allocations dynamic

2022-05-24 Thread Michael Ellerman
On Sun, 23 Jan 2022 22:00:37 +1000, Nicholas Piggin wrote: > With LPID width plumbed through from firmware, LPID allocations can now > be dynamic, which requires changing the fixed sized bitmap. Rather than > just dynamically sizing it, switch to IDA allocator. > > Nested KVM stays with a fixed

Re: [PATCH 0/6] KVM: PPC: Book3S HV interrupt fixes

2022-05-24 Thread Michael Ellerman
On Thu, 3 Mar 2022 15:33:09 +1000, Nicholas Piggin wrote: > This series fixes up a bunch of little interrupt issues which were found > by inspection haven't seem to have caused big problems but possibly > could or could cause the occasional latency spike from a temporarily lost > interrupt. > >

Re: [PATCH] KVM: PPC: Book3S HV: fix the return value of kvm_age_rmapp()

2022-05-24 Thread Michael Ellerman
On Fri, 1 Apr 2022 02:52:52 -0400, Bo Liu wrote: > The return value type defined in the function kvm_age_rmapp() is > "bool", but the return value type defined in the implementation of the > function kvm_age_rmapp() is "int". > > Change the return value type to "bool". > > > [...] Applied to

Re: [PATCH] KVM: PPC: Book3S HV: Initialize AMOR in nested entry

2022-05-24 Thread Michael Ellerman
On Mon, 25 Apr 2022 11:21:51 -0300, Fabiano Rosas wrote: > The hypervisor always sets AMOR to ~0, but let's ensure we're not > passing stale values around. > > Applied to powerpc/topic/ppc-kvm. [1/1] KVM: PPC: Book3S HV: Initialize AMOR in nested entry

Re: [PATCH] KVM: PPC: Book3S HV: Fix vcore_blocked tracepoint

2022-05-24 Thread Michael Ellerman
On Mon, 28 Mar 2022 18:58:31 -0300, Fabiano Rosas wrote: > We removed most of the vcore logic from the P9 path but there's still > a tracepoint that tried to dereference vc->runner. > > Applied to powerpc/topic/ppc-kvm. [1/1] KVM: PPC: Book3S HV: Fix vcore_blocked tracepoint

Re: [PATCH RESEND] KVM: powerpc: remove extraneous asterisk from rm_host_ipi_action comment

2022-05-24 Thread Michael Ellerman
On Fri, 6 May 2022 14:07:47 +0700, Bagas Sanjaya wrote: > kernel test robot reported kernel-doc warning for rm_host_ipi_action(): > > >> arch/powerpc/kvm/book3s_hv_rm_xics.c:887: warning: This comment starts > >> with '/**', but isn't a kernel-doc comment. Refer > >>

Re: [PATCH kernel] KVM: PPC: Book3s: PR: Enable default TCE hypercalls

2022-05-24 Thread Michael Ellerman
On Fri, 6 May 2022 17:37:37 +1000, Alexey Kardashevskiy wrote: > When KVM_CAP_PPC_ENABLE_HCALL was introduced, H_GET_TCE and H_PUT_TCE > were already implemented and enabled by default; however H_GET_TCE > was missed out on PR KVM (probably because the handler was in > the real mode code at the

Re: [PATCH kernel] KVM: PPC: Book3s: Remove real mode interrupt controller hcalls handlers

2022-05-24 Thread Michael Ellerman
On Mon, 9 May 2022 17:11:50 +1000, Alexey Kardashevskiy wrote: > Currently we have 2 sets of interrupt controller hypercalls handlers > for real and virtual modes, this is from POWER8 times when switching > MMU on was considered an expensive operation. > > POWER9 however does not have dependent

Re: [PATCH kernel v2] KVM: PPC: Book3s: Retire H_PUT_TCE/etc real mode handlers

2022-05-24 Thread Michael Ellerman
On Fri, 6 May 2022 15:37:55 +1000, Alexey Kardashevskiy wrote: > LoPAPR defines guest visible IOMMU with hypercalls to use it - > H_PUT_TCE/etc. Implemented first on POWER7 where hypercalls would trap > in the KVM in the real mode (with MMU off). The problem with the real mode > is some memory is

Re: [RFC PATCH 1/4] objtool: Add --mnop as an option to --mcount

2022-05-24 Thread Naveen N. Rao
Christophe Leroy wrote: Le 24/05/2022 à 12:15, Naveen N. Rao a écrit : Christophe Leroy wrote: Le 23/05/2022 à 19:55, Sathvika Vasireddy a écrit : Architectures can select HAVE_NOP_MCOUNT if they choose to nop out mcount call sites. If that config option is selected, then --mnop is passed

Re: [RFC PATCH 1/4] objtool: Add --mnop as an option to --mcount

2022-05-24 Thread Christophe Leroy
Le 24/05/2022 à 12:15, Naveen N. Rao a écrit : > Christophe Leroy wrote: >> >> >> Le 23/05/2022 à 19:55, Sathvika Vasireddy a écrit : >>> Architectures can select HAVE_NOP_MCOUNT if they choose >>> to nop out mcount call sites. If that config option is >>> selected, then --mnop is passed as an

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

2022-05-24 Thread Baoquan He
On 05/24/22 at 10:01am, Petr Mladek wrote: > On Fri 2022-05-20 08:23:33, Guilherme G. Piccoli wrote: > > On 19/05/2022 20:45, Baoquan He wrote: > > > [...] > > >> I really appreciate the summary skill you have, to convert complex > > >> problems in very clear and concise ideas. Thanks for that,

Re: [RFC PATCH 1/4] objtool: Add --mnop as an option to --mcount

2022-05-24 Thread Naveen N. Rao
Christophe Leroy wrote: Le 23/05/2022 à 19:55, Sathvika Vasireddy a écrit : Architectures can select HAVE_NOP_MCOUNT if they choose to nop out mcount call sites. If that config option is selected, then --mnop is passed as an option to objtool, along with --mcount. Is there a reason not to

Re: [PATCH Linux] powerpc: add documentation for HWCAPs

2022-05-24 Thread Florian Weimer
* Nicholas Piggin: > +2. Facilities > +- > +The Power ISA uses the term "facility" to describe a class of instructions, > +registers, interrupts, etc. The presence or absence of a facility indicates > +whether this class is available to be used, but the specifics depend on the > +ISA

[PATCH] powerpc: e500: Fix compilation with gcc e500 compiler

2022-05-24 Thread Pali Rohár
gcc e500 compiler does not support -mcpu=powerpc option. When it is specified then gcc throws compile error: gcc: error: unrecognized argument in option ‘-mcpu=powerpc’ gcc: note: valid arguments to ‘-mcpu=’ are: 8540 8548 native So do not set -mcpu=powerpc option when CONFIG_E500 is set.

[PATCH Linux] powerpc: add documentation for HWCAPs

2022-05-24 Thread Nicholas Piggin
Take the arm64 HWCAP documentation file and adjust it for powerpc. Signed-off-by: Nicholas Piggin --- Thanks for all the comments and corrections. It should be nearing the point where it is useful now. Yes I do think it would be useful to align this more with OpenPOWER docs (and possibly

  1   2   >