Re: [PATCH 4/9] powerpc/dexcr: Support userspace ROP protection

2023-03-23 Thread Michael Ellerman
Benjamin Gray writes: > The ISA 3.1B hashst and hashchk instructions use a per-cpu SPR HASHKEYR > to hold a key used in the hash calculation. This key should be different > for each process to make it harder for a malicious process to recreate > valid hash values for a victim process. > > Add

Re: [PATCH 8/8] powerpc/rtas: consume retry statuses in sys_rtas()

2023-03-23 Thread Michael Ellerman
Nathan Lynch via B4 Relay writes: > From: Nathan Lynch > > The kernel can handle retrying RTAS function calls in response to > -2/990x in the sys_rtas() handler instead of relaying the intermediate > status to user space. This looks good in general. One query ... > diff --git

Re: [PATCH v2 4/4] Add myself to MAINTAINERS for Power VFIO support

2023-03-22 Thread Michael Ellerman
On Mon, 6 Mar 2023 11:31:28 -0600 (CST), Timothy Pearson wrote: > Applied to powerpc/next. [4/4] Add myself to MAINTAINERS for Power VFIO support https://git.kernel.org/powerpc/c/a34d2f0d79ec890b9b1b156a90016b6330173b8a cheers

Re: [PATCH v2 3/4] powerpc/iommu: Add iommu_ops to report capabilities and

2023-03-22 Thread Michael Ellerman
On Mon, 6 Mar 2023 11:31:00 -0600 (CST), Timothy Pearson wrote: > allow blocking domains > > Up until now PPC64 managed to avoid using iommu_ops. The VFIO driver > uses a SPAPR TCE sub-driver and all iommu_ops uses were kept in > the Type1 VFIO driver. Recent development added 2 uses of

Re: [PATCH v2 2/4] powerpc/pci_64: Init pcibios subsys a bit later

2023-03-22 Thread Michael Ellerman
On Mon, 6 Mar 2023 11:30:42 -0600 (CST), Timothy Pearson wrote: > The following patches are going to add dependency/use of iommu_ops which > is initialized in subsys_initcall as well. > > This moves pciobios_init() to the next initcall level. > > This should not cause behavioral change. > >

Re: (subset) [PATCH 1/2] selftests/powerpc/pmu: Fix sample field check in the mmcra_thresh_marked_sample_test

2023-03-22 Thread Michael Ellerman
On Wed, 01 Mar 2023 22:39:17 +0530, Kajol Jain wrote: > The testcase verifies the setting of different fields in Monitor Mode > Control Register A (MMCRA). In the current code, EV_CODE_EXTRACT macro > is used to extract the "sample" field, which then needs to be further > processed to fetch

Re: [PATCH v2 1/4] powerpc/iommu: Add "borrowing" iommu_table_group_ops

2023-03-22 Thread Michael Ellerman
On Mon, 6 Mar 2023 11:30:20 -0600 (CST), Timothy Pearson wrote: > PPC64 IOMMU API defines iommu_table_group_ops which handles DMA windows > for PEs: control the ownership, create/set/unset a table the hardware > for dynamic DMA windows (DDW). VFIO uses the API to implement support > on POWER. > >

Re: [PATCH 0/3] Allow CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 with ld.lld 15+

2023-03-22 Thread Michael Ellerman
On Wed, 15 Feb 2023 11:41:14 -0700, Nathan Chancellor wrote: > Currently, CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 is not selectable with > ld.lld because of an explicit dependency on GNU ld, due to lack of > testing with LLVM. > > Erhard was kind enough to test this option on his hardware with LLVM

Re: [PATCH] selftests/powerpc: Increase timeout for vsx_signal test

2023-03-22 Thread Michael Ellerman
On Wed, 08 Mar 2023 08:36:14 +1100, Michael Neuling wrote: > On the max config P10 machine (1920 threads and 64TB) this test fails > with a timeout: > > Sending signals to all threads 10 times...!! killing vmx_signal > !! child died by signal 15 > failure: vmx_signal > > [...]

Re: [PATCH 0/2] ppc: simplify sysctl registration

2023-03-22 Thread Michael Ellerman
On Fri, 10 Mar 2023 15:28:48 -0800, Luis Chamberlain wrote: > We can simplify the way we do sysctl registration both by > reducing the number of lines and also avoiding calllers which > could do recursion. The docs are being updated to help reflect > this better [0]. > > [0] >

Re: [PATCH] powerpc: Fix some kernel-doc warnings

2023-03-22 Thread Michael Ellerman
On Mon, 31 Oct 2022 21:54:52 -0400, Bo Liu wrote: > The current code provokes some kernel-doc warnings: > arch/powerpc/kernel/process.c:1606: warning: This comment starts with > '/**', but isn't a kernel-doc comment. Refer > Documentation/doc-guide/kernel-doc.rst > > Applied to

Re: (subset) [PATCH v2 01/10] powerpc/machdep: Make machine name const

2023-03-22 Thread Michael Ellerman
On Sat, 18 Feb 2023 10:15:44 +0100, Christophe Leroy wrote: > Machine name in struct machdep_calls should never be modified. > > Mark it const. > > Patches 1-7 applied to powerpc/next. [01/10] powerpc/machdep: Make machine name const

Re: [PATCH v3 2/2] arch/powerpc/kvm: kvmppc_hv_entry: remove r4 argument

2023-03-22 Thread Michael Ellerman
Kautuk Consul writes: > kvmppc_hv_entry is called from only 2 locations within > book3s_hv_rmhandlers.S. Both of those locations set r4 > as HSTATE_KVM_VCPU(r13) before calling kvmppc_hv_entry. > So, shift the r4 load instruction to kvmppc_hv_entry and > thus modify the calling convention of this

Re: [PATCH v2 0/4] Reenable VFIO support on POWER systems

2023-03-21 Thread Michael Ellerman
Timothy Pearson writes: > - Original Message - >> From: "Michael Ellerman" >> To: "Timothy Pearson" , "Timothy Pearson" >> >> Cc: "kvm" , "linuxppc-dev" >> >> Sent: Tuesday, March 21, 2023 5:33

Re: [PATCH v2 0/4] Reenable VFIO support on POWER systems

2023-03-21 Thread Michael Ellerman
Timothy Pearson writes: > - Original Message - >> From: "Timothy Pearson" >> To: "Michael Ellerman" >> Cc: "Timothy Pearson" , "kvm" >> , "linuxppc-dev" >> >> Sent: Thursday, March

[GIT PULL] Please pull powerpc/linux.git powerpc-6.3-3 tag

2023-03-16 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some more powerpc fixes for 6.3: The following changes since commit eeac8ede17557680855031c6f305ece2378af326: Linux 6.3-rc2 (2023-03-12 16:36:44 -0700) are available in the git repository at:

Re: [PATCH 0/3] COVER: Remove memcpy_page_flushcache()

2023-03-16 Thread Michael Ellerman
Ira Weiny writes: > + Konstantin > > Michael Ellerman wrote: >> Ira Weiny writes: >> > Dave Hansen wrote: >> >> On 3/15/23 16:20, Ira Weiny wrote: >> >> > Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray >>

Re: [PATCH 0/2] KVM: PPC: support kvm selftests

2023-03-16 Thread Michael Ellerman
a tiny bit headers so > conflicts should be unlikely and trivial. > > I guess Paolo is the best point to merge these, if no comments > or objections? Yeah. If it helps: Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH 0/3] COVER: Remove memcpy_page_flushcache()

2023-03-16 Thread Michael Ellerman
Ira Weiny writes: > Dave Hansen wrote: >> On 3/15/23 16:20, Ira Weiny wrote: >> > Commit 21b56c847753 ("iov_iter: get rid of separate bvec and xarray >> > callbacks") removed the calls to memcpy_page_flushcache(). >> > >> > kmap_atomic() is deprecated and used in the x86 version of >> >

Re: [PATCH] cpufreq: pmac32: Use of_property_read_bool() for boolean properties

2023-03-15 Thread Michael Ellerman
Signed-off-by: Rob Herring > --- > drivers/cpufreq/pmac32-cpufreq.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) Reviewed-by: Michael Ellerman cheers > diff --git a/drivers/cpufreq/pmac32-cpufreq.c > b/drivers/cpufreq/pmac32-cpufreq.c > index 4b8ee2014da6.

Re: [PATCH] crypto: p10-aes-gcm - remove duplicate include header

2023-03-15 Thread Michael Ellerman
Herbert Xu writes: > On Tue, Mar 14, 2023 at 09:44:52PM +1100, Michael Ellerman wrote: >> >> Hmm. Seems none of them were ever Cc'ed to linuxppc-dev. So this is the >> first I've seen of them. > > Sorry, I didn't know that you weren't aware of this change. I > will

Re: [PATCH v2 2/2] arch/powerpc/kvm: kvmppc_hv_entry: remove r4 argument

2023-03-15 Thread Michael Ellerman
Michael Ellerman writes: > Kautuk Consul writes: >> On 2023-03-15 15:48:53, Michael Ellerman wrote: >>> Kautuk Consul writes: >>> > kvmppc_hv_entry is called from only 2 locations within >>> > book3s_hv_rmhandlers.S. Both of those locations set r4 &g

Re: [PATCH v2 2/2] arch/powerpc/kvm: kvmppc_hv_entry: remove r4 argument

2023-03-15 Thread Michael Ellerman
Kautuk Consul writes: > On 2023-03-15 15:48:53, Michael Ellerman wrote: >> Kautuk Consul writes: >> > kvmppc_hv_entry is called from only 2 locations within >> > book3s_hv_rmhandlers.S. Both of those locations set r4 >> > as HSTATE_KVM_VCPU(r13) before cal

Re: boot regression on ppc64 with linux 6.2

2023-03-15 Thread Michael Ellerman
Andrea Righi writes: > On Wed, Mar 15, 2023 at 02:30:53PM +1100, Michael Ellerman wrote: >> Andrea Righi writes: >> > I'm triggering the following bug when booting my qemu powerpc VM: >> >> I'm not seeing that here :/ >> >> Can you give a bit more det

Re: [PATCH v2 2/2] arch/powerpc/kvm: kvmppc_hv_entry: remove r4 argument

2023-03-14 Thread Michael Ellerman
Kautuk Consul writes: > kvmppc_hv_entry is called from only 2 locations within > book3s_hv_rmhandlers.S. Both of those locations set r4 > as HSTATE_KVM_VCPU(r13) before calling kvmppc_hv_entry. > So, shift the r4 load instruction to kvmppc_hv_entry and > thus modify the calling convention of this

Re: boot regression on ppc64 with linux 6.2

2023-03-14 Thread Michael Ellerman
Andrea Righi writes: > I'm triggering the following bug when booting my qemu powerpc VM: I'm not seeing that here :/ Can you give a bit more detail? - qemu version - qemu command line - what userspace are you using? - full dmesg of the failing case > event-sources: Unable to request

Re: [PATCH 14/36] powerpc/pseries: move to use bus_get_dev_root()

2023-03-14 Thread Michael Ellerman
Greg Kroah-Hartman writes: > Direct access to the struct bus_type dev_root pointer is going away soon > so replace that with a call to bus_get_dev_root() instead, which is what > it is there for. > > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Christophe Leroy >

Re: [RFC PATCH v1] powerpc: Add version to install filenames

2023-03-14 Thread Michael Ellerman
Nick Child writes: > Rather than replacing the versionless vmlinux and System.map files, > copy to files with the version info appended. > > Additionally, since executing the script is a last resort option, > inform the user about the missing `installkernel` command and the > location of the

Re: [PATCH v3] vdso: Improve cmd_vdso_check to check all dynamic relocations

2023-03-14 Thread Michael Ellerman
> arch/arm64/kernel/vdso32/Makefile | 3 --- > arch/csky/kernel/vdso/Makefile| 4 +--- > arch/loongarch/vdso/Makefile | 4 +--- > arch/mips/vdso/Makefile | 4 +--- > arch/powerpc/kernel/vdso/Makefile | 2 +- Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH] crypto: p10-aes-gcm - remove duplicate include header

2023-03-14 Thread Michael Ellerman
Herbert Xu writes: > On Tue, Mar 14, 2023 at 08:47:30AM +, Christophe Leroy wrote: >> >> Any reason for resending ? > > The p10 patches were reverted, and have only just been re-instated. Hmm. Seems none of them were ever Cc'ed to linuxppc-dev. So this is the first I've seen of them. We

Re: [PATCH] KVM: PPC: Mark three local functions "static"

2023-03-10 Thread Michael Ellerman
Sean Christopherson writes: > Tag a few functions that are local and don't have a previous prototype as > "static". > > No functional change intended. > > Reported-by: kernel test robot > Link: > https://lore.kernel.org/oe-kbuild-all/202303031630.ntviuyqo-...@intel.com > Signed-off-by: Sean

Re: [PATCH v2] hvc/xen: prevent concurrent accesses to the shared ring

2023-03-09 Thread Michael Ellerman
Roger Pau Monné writes: > On Mon, Dec 12, 2022 at 01:36:48PM +0100, Roger Pau Monné wrote: >> On Fri, Dec 02, 2022 at 12:40:05PM +0100, Roger Pau Monné wrote: >> > On Wed, Nov 30, 2022 at 05:08:06PM -0800, Stefano Stabellini wrote: >> > > On Wed, 30 Nov 2022, Roger Pau Monne wrote: >> > > > The

Re: [PATCH v4 3/4] arch/*/io.h: remove ioremap_uc in some architectures

2023-03-09 Thread Michael Ellerman
> --- > Documentation/driver-api/device-io.rst | 9 + > arch/alpha/include/asm/io.h| 1 - > arch/hexagon/include/asm/io.h | 3 --- > arch/m68k/include/asm/kmap.h | 1 - > arch/mips/include/asm/io.h | 1 - > arch/parisc/incl

Re: [PATCH v2 0/4] Reenable VFIO support on POWER systems

2023-03-09 Thread Michael Ellerman
Timothy Pearson writes: > This patch series reenables VFIO support on POWER systems. It > is based on Alexey Kardashevskiys's patch series, rebased and > successfully tested under QEMU with a Marvell PCIe SATA controller > on a POWER9 Blackbird host. > > Alexey Kardashevskiy (3): >

Re: [PATCH v2 0/4] Reenable VFIO support on POWER systems

2023-03-09 Thread Michael Ellerman
Alex Williamson writes: > On Mon, 6 Mar 2023 11:29:53 -0600 (CST) > Timothy Pearson wrote: > >> This patch series reenables VFIO support on POWER systems. It >> is based on Alexey Kardashevskiys's patch series, rebased and >> successfully tested under QEMU with a Marvell PCIe SATA controller >>

Re: [RFC PATCH 0/4] Remove some e300/MPC83xx evaluation platforms

2023-03-09 Thread Michael Ellerman
e or not: Yes he is the de-facto 32-bit maintainer :) He's listed as a reviewer on the converged 64-bit/32-bit maintainers entry which is meant to reflect that: LINUX FOR POWERPC (32-BIT AND 64-BIT) M: Michael Ellerman R: Nicholas Piggin R: Christophe Leroy L: linuxppc-dev@lis

Re: [PATCH 2/5] selftests/powerpc/dscr: Add lockstep test cases to DSCR explicit tests

2023-03-07 Thread Michael Ellerman
Benjamin Gray writes: > Add new cases to the relevant tests that use explicitly synchronized > threads to test the behaviour across context switches with less > randomness. By locking the participants to the same CPU we guarantee a > context switch occurs each time they make progress, which is a

Re: [PATCH v3 2/2] arch/*/io.h: remove ioremap_uc in some architectures

2023-03-06 Thread Michael Ellerman
"Arnd Bergmann" writes: > On Sun, Mar 5, 2023, at 10:29, Geert Uytterhoeven wrote: >> On Sun, Mar 5, 2023 at 10:23 AM Michael Ellerman wrote: >>> Maybe that exact code path is only reachable on x86/ia64? But if so >>> please explain why. >>> >&

Re: [PATCH] mm: add PTE pointer parameter to flush_tlb_fix_spurious_fault()

2023-03-06 Thread Michael Ellerman
pte_t *ptep) > { > /* >* Book3S 64 does not require spurious fault flushes because the PTE Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH v3 2/2] arch/*/io.h: remove ioremap_uc in some architectures

2023-03-05 Thread Michael Ellerman
Baoquan He writes: > ioremap_uc() is only meaningful on old x86-32 systems with the PAT > extension, and on ia64 with its slightly unconventional ioremap() > behavior, everywhere else this is the same as ioremap() anyway. > > Here, remove the ioremap_uc() definition in architecutures other > than

[GIT PULL] Please pull powerpc/linux.git powerpc-6.3-2 tag

2023-03-04 Thread Michael Ellerman
llor - ------ Michael Ellerman (3): powerpc: Drop orphaned VAS MAINTAINERS entry powerpc/vmlinux.lds: Add .text.asan/tsan sections powerpc: Avoid dead code/data elimination when using recordmcount MAINTAI

Re: [PATCH] powerpc: Drop orphaned VAS MAINTAINERS entry

2023-03-04 Thread Michael Ellerman
On Tue, 21 Feb 2023 21:19:52 +1100, Michael Ellerman wrote: > The MAINTAINERS entry for VAS (Virtual Accelerator Switchboard) no > longer has any maintainers, it just points to linuxppc-dev, since commit > 60496069d0ae ("powerpc: Update MAINTAINERS for ibmvnic and VAS"). >

Re: [PATCH] powerpc: Avoid dead code/data elimination when using recordmcount

2023-03-04 Thread Michael Ellerman
On Wed, 22 Feb 2023 00:03:31 +1100, Michael Ellerman wrote: > Although powerpc now has objtool mcount support, it's not enabled in all > configurations due to dependencies. > > On those configurations, with some linkers (binutils 2.37 at least), > it's still possible to

Re: [PATCH] powerpc/vmlinux.lds: Add .text.asan/tsan sections

2023-03-04 Thread Michael Ellerman
On Wed, 22 Feb 2023 17:00:37 +1100, Michael Ellerman wrote: > When KASAN/KCSAN are enabled clang generates .text.asan/tsan sections. > Because they are not mentioned in the linker script warnings are > generated, and when orphan handling is set to error that becomes a build &g

Re: [PATCH v2 5/5] of: address: Always use dma_default_coherent for default coherency

2023-03-02 Thread Michael Ellerman
Jiaxun Yang writes: >> 2023年3月1日 13:06,Christoph Hellwig 写道: >> >>> - select OF_DMA_DEFAULT_COHERENT if !NOT_COHERENT_CACHE >> >> Doesn't powerpc need to select CONFIG_ARCH_DMA_DEFAULT_COHERENT now, >> or even better should be doing that in the patch adding that >> symbol? > > If I read the

Re: [PATCH 1/2] powerpc/64: Move CPU -mtune options into Kconfig

2023-03-02 Thread Michael Ellerman
Nathan Chancellor writes: > On Fri, Mar 03, 2023 at 12:16:55AM +1100, Michael Ellerman wrote: >> Currently the -mtune options are set in the Makefile, depending on what >> is the compiler supports. >> >> One downside of doing it that way is that the chosen -mtun

Re: [PATCH 2/2] powerpc/64: Use -mtune=pwr10/9/8 for clang

2023-03-02 Thread Michael Ellerman
Nathan Chancellor writes: > Hi Michael, > > Thanks for the workaround and sorry this has come to bite us :/ > > On Fri, Mar 03, 2023 at 12:16:56AM +1100, Michael Ellerman wrote: >> For the -mtune option clang doesn't accept power10/9/8, instead it >> accepts pw

Re: [PATCH 2/2] powerpc/tpm: Reserve SML log when kexec'ing

2023-03-02 Thread Michael Ellerman
Stefan Berger writes: > On 2/23/23 22:25, Michael Ellerman wrote: >> The TPM code in prom_init.c creates a small buffer of memory to store >> the TPM's SML (Stored Measurement Log). It's communicated to Linux via >> the linux,sml-base/size device tree properties of the

[PATCH 1/2] powerpc/64: Move CPU -mtune options into Kconfig

2023-03-02 Thread Michael Ellerman
in the Makefile. So move the determination of which -mtune option to use into Kconfig logic. Signed-off-by: Michael Ellerman --- arch/powerpc/Makefile | 4 +--- arch/powerpc/platforms/Kconfig.cputype | 6 ++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/arch

[PATCH 2/2] powerpc/64: Use -mtune=pwr10/9/8 for clang

2023-03-02 Thread Michael Ellerman
r BugLink: https://github.com/ClangBuiltLinux/linux/issues/1799 Signed-off-by: Michael Ellerman --- arch/powerpc/platforms/Kconfig.cputype | 4 1 file changed, 4 insertions(+) Need to confirm the clang <= 16 statement is correct. diff --git a/arch/powerpc/platforms/Kconfig.cputype b

Re: [PATCH mm] kasan, powerpc: Don't rename memintrinsics if compiler adds prefixes

2023-02-28 Thread Michael Ellerman
s patch into that patch. > > Yes, that looks right. > > If a powerpc maintainer could take a quick look as well would be good. The patch looks OK to me. It builds for various configs and I did a few test boots with KASAN enabled, everything seems normal. Acked-by: Michael Ellerman (

Re: [PATCH 1/2] powerpc/tpm: Create linux,sml-base/size as big endian

2023-02-28 Thread Michael Ellerman
Jarkko Sakkinen writes: > On Mon, Feb 27, 2023 at 06:08:31PM -0500, Stefan Berger wrote: >> On 2/23/23 22:25, Michael Ellerman wrote: >> > There's code in prom_instantiate_sml() to do a "SML handover" (Stored >> > Measurement Log) from OF to Linux, befor

Re: Possible bug in linux-6.2/tools/testing/selftests/powerpc/pmu/sampling_tests/mmcra_thresh_marked_sample_test.c

2023-02-26 Thread Michael Ellerman
David Binderman writes: > Hello there, > > I ran the static analyser cppcheck over the linux-6.2 source code and got > this: > > linux-6.2/tools/testing/selftests/powerpc/pmu/sampling_tests/mmcra_thresh_marked_sample_test.c:68:10: > style: Same expression '0x3' found multiple times in chain of

[PATCH 2/2] powerpc/tpm: Reserve SML log when kexec'ing

2023-02-23 Thread Michael Ellerman
the region to the reserved memory areas, so that the second kernel does not use the memory for something else. Reported-by: Stefan Berger Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/kexec_ranges.h | 1 + arch/powerpc/kexec/file_load_64.c | 12 arch/powerpc/kexec

[PATCH 1/2] powerpc/tpm: Create linux,sml-base/size as big endian

2023-02-23 Thread Michael Ellerman
hanging the encoding of a property like this would present problems for kexec. However the SML is not propagated across kexec, so changing the encoding of the properties is a non-issue. Fixes: e46e22f12b19 ("tpm: enhance read_log_of() to support Physical TPM event log") Signed-off-by: Michael Elle

[GIT PULL] Please pull powerpc/linux.git powerpc-6.3-1 tag

2023-02-23 Thread Michael Ellerman
u Desnoyers (1): selftests/powerpc: Fix incorrect kernel headers search path Michael Ellerman (6): Merge branch 'fixes' into next powerpc/rtas: Drop unused export symbols Merge branch 'fixes' into next powerpc/secvar: Use u64 in secvar_operations powerpc/nohash: F

Re: [PATCH] powerpc/e500: Add missing prototype for 'relocate_init'

2023-02-23 Thread Michael Ellerman
On Sat, 18 Feb 2023 10:28:50 +0100, Christophe Leroy wrote: > Kernel test robot reports: > > arch/powerpc/mm/nohash/e500.c:314:21: warning: no previous prototype for > 'relocate_init' [-Wmissing-prototypes] > 314 | notrace void __init relocate_init(u64 dt_ptr, phys_addr_t start) >

Re: [PATCH] powerpc/pseries: Avoid hcall in plpks_is_available() on non-pseries

2023-02-23 Thread Michael Ellerman
On Wed, 22 Feb 2023 13:17:08 +1100, Russell Currey wrote: > plpks_is_available() can be called on any platform via kexec but calls > _plpks_get_config() which makes a hcall, which will only work on pseries. > Fix this by returning early in plpks_is_available() if hcalls aren't > possible. > >

Re: [PATCH RESEND] powerpc: dts: turris1x.dts: Set lower priority for CPLD syscon-reboot

2023-02-23 Thread Michael Ellerman
On Mon, 20 Feb 2023 09:04:35 +0100, Pali Rohár wrote: > Due to CPLD firmware bugs, set CPLD syscon-reboot priority level to 64 > (between rstcr and watchdog) to ensure that rstcr's global-utilities reset > method which is preferred stay as default one, and to ensure that CPLD > syscon-reboot is

Re: [PATCH v2] arch/powerpc/include/asm/barrier.h: redefine rmb and wmb to lwsync

2023-02-23 Thread Michael Ellerman
Kautuk Consul writes: > >> You are correct, the patch is wrong because it fails to account for IO >> accesses. > > Okay, I looked at the PowerPC ISA and found: > "The memory barrier provides an ordering function for the storage accesses > caused by Load, Store,and dcbz instructions that are

Re: [PATCH v4 00/17] powerpc/85xx: p2020: Create one unified machine description

2023-02-23 Thread Michael Ellerman
Christophe Leroy writes: > Le 22/02/2023 à 19:22, Pali Rohár a écrit : >> On Wednesday 22 February 2023 15:42:47 Christophe Leroy wrote: >>> This patch series unifies all P2020 boards and machine descriptions into >>> one generic unified P2020 machine description. With this generic machine >>>

Re: [PATCH] macintosh: via-pmu-led: *********************************

2023-02-23 Thread Michael Ellerman
h PPC32 and PPC64. > > Fixes: 0e865a80c135 ("macintosh: Remove dependency on IDE_GD_ATA if > ADB_PMU_LED_DISK is selected") > Signed-off-by: Randy Dunlap > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Elimar Riesebieter > Cc: Michael Ellerman >

Re: linux-next tree panic on ppc64le

2023-02-22 Thread Michael Ellerman
Murphy Zhou writes: > On Wed, Feb 22, 2023 at 10:35 AM Bagas Sanjaya wrote: >> On 2/22/23 07:55, Murphy Zhou wrote: >> > [ 59.558339] [ cut here ] >> > [ 59.558361] kernel BUG at arch/powerpc/kernel/syscall.c:34! >> > [ 59.558373] Oops: Exception in kernel mode,

Re: [PATCH] powerpc/vmlinux.lds: Add .text.asan/tsan sections

2023-02-22 Thread Michael Ellerman
Nathan Chancellor writes: > On Wed, Feb 22, 2023 at 05:00:37PM +1100, Michael Ellerman wrote: >> When KASAN/KCSAN are enabled clang generates .text.asan/tsan sections. >> Because they are not mentioned in the linker script warnings are >> generated, and when orphan han

Re: [PATCH v2] arch/powerpc/include/asm/barrier.h: redefine rmb and wmb to lwsync

2023-02-22 Thread Michael Ellerman
Hi Paul, "Paul E. McKenney" writes: > On Wed, Feb 22, 2023 at 02:33:44PM +0530, Kautuk Consul wrote: >> A link from ibm.com states: >> "Ensures that all instructions preceding the call to __lwsync >> complete before any subsequent store instructions can be executed >> on the processor that

[PATCH] powerpc/vmlinux.lds: Add .text.asan/tsan sections

2023-02-21 Thread Michael Ellerman
d}tor sections"). Signed-off-by: Michael Ellerman --- arch/powerpc/kernel/vmlinux.lds.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 958e77a24f85..7a2209767adf 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S

[PATCH] powerpc: Avoid dead code/data elimination when using recordmcount

2023-02-21 Thread Michael Ellerman
Signed-off-by: Michael Ellerman --- arch/powerpc/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index 2c9cdf1d8761..a6c4407d3ec8 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig @@ -236,7 +236,7 @@ config PPC

Re: [PATCH v4 07/15] powerpc/83xx/mpc832x_rdb: Replace all spi->chip_select references with function call

2023-02-21 Thread Michael Ellerman
Amit Kumar Mahapatra writes: > Supporting multi-cs in spi drivers would require the chip_select & cs_gpiod > members of struct spi_device to be an array. But changing the type of these > members to array would break the spi driver functionality. To make the > transition smoother introduced four

[PATCH] powerpc: Drop orphaned VAS MAINTAINERS entry

2023-02-21 Thread Michael Ellerman
entry, ie. the output of get_maintainer.pl is unchanged. Signed-off-by: Michael Ellerman --- MAINTAINERS | 7 --- 1 file changed, 7 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 7f86d02cb427..13be1509b8d7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -9899,13 +9899,6 @@ L:

Re: [PATCH 0/3] Allow CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 with ld.lld 15+

2023-02-19 Thread Michael Ellerman
Nathan Chancellor writes: > Currently, CONFIG_PPC64_BIG_ENDIAN_ELF_ABI_V2 is not selectable with > ld.lld because of an explicit dependency on GNU ld, due to lack of > testing with LLVM. > > Erhard was kind enough to test this option on his hardware with LLVM 15, > which ran without any issues.

Re: [PATCH 2/2] powerpc/{32,book3e}: kcsan: Extend KCSAN Support

2023-02-19 Thread Michael Ellerman
Christophe Leroy writes: > Le 17/02/2023 à 00:23, Rohan McLure a écrit : >>> On 16 Feb 2023, at 6:14 pm, Christophe Leroy >>> wrote: >>> Le 16/02/2023 à 06:09, Rohan McLure a écrit : Enable HAVE_ARCH_KCSAN on all powerpc platforms, permitting use of the kernel concurrency sanitiser

Re: [PATCH v1 4/5] powerpc: Remove cpu-as-y completely

2023-02-19 Thread Michael Ellerman
Christophe Leroy writes: > cpu-as-y is there to force assembler building options. > But there is no need for that. Gcc is passed the necessary > options and it automatically pass the appropriate option to > GAS. > > GCC is given -maltivec when relevant, so no need > for -Wa,-maltivec in addition

Re: [PATCH v1 1/5] powerpc/64: Set default CPU in Kconfig

2023-02-19 Thread Michael Ellerman
On Mon, 19 Dec 2022 19:45:56 +0100, Christophe Leroy wrote: > Since 0069f3d14e7a ("powerpc/64e: Tie PPC_BOOK3E_64 to PPC_E500MC"), the > only possible BOOK3E/64 are E500, so no need of a default CPU over the > E5500. > > When the user selects book3e, they must have an e500 compatible > compiler,

Re: [PATCH] powerpc/64: Fix unannotated intra-function call warning

2023-02-19 Thread Michael Ellerman
On Fri, 17 Feb 2023 10:02:26 +0530, Sathvika Vasireddy wrote: > objtool throws the following warning: > arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x6128: > unannotated intra-function call > > Fix the warning by annotating start_initialization_book3s symbol with the >

Re: [PATCH] powerpc/kexec_file: print error string on usable memory property update failure

2023-02-19 Thread Michael Ellerman
On Fri, 16 Dec 2022 17:57:08 +0530, Sourabh Jain wrote: > Print the FDT error description along with the error message if failed > to set the "linux,drconf-usable-memory" property in the kdump kernel's > FDT. > > Applied to powerpc/next. [1/1] powerpc/kexec_file: print error string on usable

Re: [PATCH v2] powerpc/machdep: warn when machine_is() used too early

2023-02-19 Thread Michael Ellerman
On Mon, 13 Feb 2023 13:23:51 -0600, Nathan Lynch wrote: > machine_is() can't provide correct results before probe_machine() has > run. Warn when it's used too early in boot, placing the WARN_ON() in a > helper function so the reported file:line indicates exactly what went > wrong. > > checkpatch

Re: [PATCH] macintosh: windfarm: Use unsigned type for 1-bit bitfields

2023-02-19 Thread Michael Ellerman
On Wed, 15 Feb 2023 10:12:12 -0700, Nathan Chancellor wrote: > Clang warns: > > drivers/macintosh/windfarm_lm75_sensor.c:63:14: error: implicit truncation > from 'int' to a one-bit wide bit-field changes value from 1 to -1 > [-Werror,-Wsingle-bit-bitfield-constant-conversion] >

Re: [PATCH] powerpc/nohash: Fix build with llvm-as

2023-02-19 Thread Michael Ellerman
On Thu, 16 Feb 2023 22:29:15 +1100, Michael Ellerman wrote: > When using the LLVM integrated assembler (llvm-as), the book3e build > fails with: > > arch/powerpc/mm/nohash/tlb_low_64e.S:354:2: error: invalid instruction >tlbilxva 0,%r15 >^ > > [...] Applie

Re: [PATCH] powerpc/nohash: Fix build error with binutils >= 2.38

2023-02-19 Thread Michael Ellerman
On Mon, 13 Feb 2023 22:23:22 +1100, Michael Ellerman wrote: > With bintils >= 2.38 the ppc64_book3e_allmodconfig build fails: > > {standard input}: Assembler messages: > {standard input}:196: Error: unrecognized opcode: `lbarx' > {standard input}:196: Error: unrecogni

Re: [PATCH] powerpc/eeh: Set channel state after notifying the drivers

2023-02-19 Thread Michael Ellerman
On Thu, 9 Feb 2023 16:26:49 +0530, Ganesh Goudar wrote: > When a PCI error is encountered 6th time in an hour we > set the channel state to perm_failure and notify the > driver about the permanent failure. > > However, after upstream commit 38ddc011478e ("powerpc/eeh: > Make permanently failed

Re: [PATCHv3, resend] powerpc: mm: radix_tlb: rearrange the if-else block

2023-02-19 Thread Michael Ellerman
On Wed, 10 Aug 2022 13:43:18 +0200, Anders Roxell wrote: > Clang warns: > > arch/powerpc/mm/book3s64/radix_tlb.c:1191:23: error: variable 'hstart' is > uninitialized when used here [-Werror,-Wuninitialized] > __tlbiel_va_range(hstart, hend, pid, >

Re: [PATCH] powerpc/pseries: Fix endianness issue when parsing PLPKS secvar flags

2023-02-19 Thread Michael Ellerman
On Thu, 16 Feb 2023 18:09:03 +1100, Andrew Donnellan wrote: > When a user updates a variable through the PLPKS secvar interface, we take > the first 8 bytes of the data written to the update attribute to pass > through to the H_PKS_SIGNED_UPDATE hcall as flags. These bytes are always > written in

Re: [PATCH] powerpc/64s: Prevent fallthrough to hash TLB flush when using radix

2023-02-19 Thread Michael Ellerman
On Fri, 17 Feb 2023 12:14:34 +1100, Benjamin Gray wrote: > In the fix reconnecting hash__tlb_flush() to tlb_flush() the > void return on radix__tlb_flush() was not restored and subsequently > falls through to the restored hash__tlb_flush(). > > Guard hash__tlb_flush() under an else to prevent

Re: [PATCH v6 13/41] mm: Make pte_mkwrite() take a VMA

2023-02-19 Thread Michael Ellerman
arch/powerpc/include/asm/book3s/64/pgtable.h | 4 ++-- > arch/powerpc/include/asm/nohash/32/pgtable.h | 2 +- > arch/powerpc/include/asm/nohash/32/pte-8xx.h | 2 +- > arch/powerpc/include/asm/nohash/64/pgtable.h | 2 +- Looks like you discovered the joys of ppc's at-least 5 different MMU implementations, sorry :) Acked-by: Michael Ellerman (powerpc) cheers

Re: [PATCH v4 3/3] powerpc: dts: turris1x.dts: Set lower priority for CPLD syscon-reboot

2023-02-19 Thread Michael Ellerman
Pali Rohár writes: > On Thursday 09 February 2023 01:10:21 Pali Rohár wrote: >> On Monday 26 December 2022 12:45:13 Pali Rohár wrote: >> > Due to CPLD firmware bugs, set CPLD syscon-reboot priority level to 64 >> > (between rstcr and watchdog) to ensure that rstcr's global-utilities reset >> >

Re: [PATCH v2 09/10] powerpc: Use ppc_md_progress()

2023-02-19 Thread Michael Ellerman
Joe Perches writes: > On Sat, 2023-02-18 at 10:15 +0100, Christophe Leroy wrote: >> Many places have: >> >> if (ppc.md_progress) >> ppc.md_progress(); >> >> Use ppc_md_progress() instead. >> >> Note that checkpatch complains about using function names, >> but this is not a

Re: [GIT PULL] Please pull powerpc/linux.git powerpc-6.2-6 tag

2023-02-19 Thread Michael Ellerman
Linus Torvalds writes: > On Fri, Feb 17, 2023 at 2:40 PM Michael Ellerman wrote: >> >> Thanks to: Benjamin Gray, "Erhard F.". > > That just looks _odd_. Yeah true. My scripts just take it verbatim from the From: line of the email. > It's not like the

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

2023-02-17 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull one more powerpc fix for 6.2: The following changes since commit 2ea31e2e62bbc4d11c411eeb36f1b02841dbcab1: powerpc/64s/interrupt: Fix interrupt exit race with security mitigation switch (2023-02-07 10:13:33 +1100) are

Re: linux-next: build warning after merge of the powerpc tree

2023-02-16 Thread Michael Ellerman
Josh Poimboeuf writes: > On Thu, Feb 16, 2023 at 02:40:31PM +1100, Stephen Rothwell wrote: >> Hi all, >> >> After merging the powerpc tree, today's linux-next build (powerpc >> pseries_le_defconfig) produced this warning: >> >> arch/powerpc/kernel/head_64.o: warning: objtool: .text+0x6128:

Re: [PATCH v5 00/10] Add the PowerQUICC audio support using the QMC

2023-02-16 Thread Michael Ellerman
Herve Codina writes: > Hi, > > This series adds support for audio using the QMC controller available in > some Freescale PowerQUICC SoCs. Who's going to take this series? By lines of code it's mostly in drivers/soc/fsl, so I was expecting it would go via that tree. Or is it a sound series that

[PATCH] powerpc/nohash: Fix build with llvm-as

2023-02-16 Thread Michael Ellerman
instruction. Fix it by using the existing PPC_TLBILX_VA macro. The resulting binary is identical when building with binutils. Signed-off-by: Michael Ellerman --- arch/powerpc/mm/nohash/tlb_low_64e.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/nohash

Re: [PATCH v1 3/9] powerpc/47x: Split ppc47x machine in two

2023-02-15 Thread Michael Ellerman
Christophe Leroy writes: > This machine matches two compatibles and sets .pci_irq_fixup > on one of them. > > Split it into two machines, then the probe function can be dropped. That will break the machine initcalls that look for ppc47x:

Re: [PATCH] powerpc/rtas: Drop unused export symbols

2023-02-15 Thread Michael Ellerman
On Fri, 27 Jan 2023 22:12:31 +1100, Michael Ellerman wrote: > Some RTAS symbols are never used by modular code, drop their exports. > > Applied to powerpc/next. [1/1] powerpc/rtas: Drop unused export symbols https://git.kernel.org/powerpc/c/0d7e812fd282bf248b54523cc550a34

Re: [PATCH v3 0/5] powerpc: Add KCSAN support

2023-02-15 Thread Michael Ellerman
On Mon, 6 Feb 2023 13:17:56 +1100, Rohan McLure wrote: > Add Kernel Concurrency Sanitiser support for PPC64. Doing so involves > exclusion of a number of compilation units from instrumentation, as was > done with KASAN. > > KCSAN uses watchpoints on memory accesses to enforce the semantics of >

Re: [PATCH v2 1/2] powerpc/pci: Enable PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT by default

2023-02-15 Thread Michael Ellerman
On Sat, 28 Jan 2023 14:34:58 +0100, Pali Rohár wrote: > It makes sense to enable CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT by default > (when possible by dependencies) to take advantages of all 256 PCI buses on > each PCI domain, like it is already on all other kernel architectures. > > Patch 1

Re: [PATCH v2 0/3] powerpc/32: nohz full support

2023-02-15 Thread Michael Ellerman
On Sat, 21 Jan 2023 19:58:02 +1000, Nicholas Piggin wrote: > I'd like to try get this series merged. If Christophe isn't comfortable > with patch 2/3 yet then maybe we could at least get the first one in > which shares more code and makes it tidier. > > Since v1 I just split the first patch out

Re: [PATCH] powerpc/64: Don't recurse irq replay

2023-02-15 Thread Michael Ellerman
On Sat, 21 Jan 2023 20:26:18 +1000, Nicholas Piggin wrote: > Interrupt handlers called by soft-pending irq replay code can run > softirqs, softirq replay enables and disables local irqs, which allows > interrupts to come in including soft-masked interrupts, and it can > cause pending irqs to be

Re: [PATCH 0/4] powerpc: Misc early boot fixes

2023-02-15 Thread Michael Ellerman
On Fri, 16 Dec 2022 21:59:26 +1000, Nicholas Piggin wrote: > The first patch is a fix for a commit that's in powerpc next which > is a pretty harmless dump_stack(). Except that we had some bugs with > doing stack unwinding that early when the boot CPU is not zero so > that ended up crashing badly.

Re: [PATCH 0/3] powerpc: prepare for pcrel addressing patches

2023-02-15 Thread Michael Ellerman
On Fri, 3 Feb 2023 21:38:55 +1000, Nicholas Piggin wrote: > Here's a few of the easier preparation patches from the pcrel > addressing series. > > Thanks, > Nick > > Nicholas Piggin (3): > crypto: powerpc - Use address generation helper for asm > powerpc/64s: Refactor initialisation after

Re: [PATCH 0/3] powerpc/64s/radix: misc tidying

2023-02-15 Thread Michael Ellerman
On Fri, 3 Feb 2023 21:17:15 +1000, Nicholas Piggin wrote: > Here's a few things I wanted to tidy before doing the lazy tlb mm > shootdown / exit TLB flush IPI optimisation. There is no hard > dependency just slight code rearrangement but since we're waiting > for the shootdown patches to go via

<    6   7   8   9   10   11   12   13   14   15   >