Re: [PATCH] arch/powerpc/kvm: kvmppc_core_vcpu_create_hv: check for kzalloc failure

2023-03-29 Thread Michael Ellerman
Kautuk Consul writes: > On 2023-03-28 23:02:09, Michael Ellerman wrote: >> Kautuk Consul writes: >> > On 2023-03-28 15:44:02, Kautuk Consul wrote: >> >> On 2023-03-28 20:44:48, Michael Ellerman wrote: >> >> > Kautuk Consul writes: >> >>

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

2023-03-29 Thread Michael Ellerman
option, that gets messy 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 | 7 +++ 2 files changed, 8 insertions(+), 3

Re: [PATCH 5/8] powerpc/rtas: rename va_rtas_call_unlocked() to va_rtas_call()

2023-03-29 Thread Michael Ellerman
Nathan Lynch via B4 Relay writes: > From: Nathan Lynch > > The function name va_rtas_call_unlocked() is confusing: it may be > called with or without rtas_lock held. Rename it to va_rtas_call(). I'm not sure about this one. The "unlocked" is meant to convey that it doesn't do any locking. The

Re: [PATCH 7/8] powerpc/rtas: warn on unsafe argument to rtas_call_unlocked()

2023-03-29 Thread Michael Ellerman
Nathan Lynch writes: > Nathan Lynch writes: >> >> aside: does anyone know if the display_status() code is worth keeping? >> It looks like it is used to drive the 16-character wide physical LCD I >> remember seeing on P4-era and older machines. Is it a vestige of >> non-LPAR pseries that should

[PATCH 1/2] powerpc/Makefile: Don't prefix archhelp commands with "@"

2023-03-29 Thread Michael Ellerman
It's not necessary to prefix every command in archhelp with "@" (to supress echoing the command), because that is done by the top level Makefile when it evaluates archhelp. Signed-off-by: Michael Ellerman --- arch/powerpc/Makefile | 38 +++--- 1 file c

[PATCH 2/2] powerpc/Makefile: Add generated defconfigs to help output

2023-03-29 Thread Michael Ellerman
- Build for amigaone Signed-off-by: Michael Ellerman --- arch/powerpc/Makefile | 41 +++-- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index b9bfa9ac3f06..0a99aa425326 100644 --- a/arch/powerpc/Make

Re: [powerpc:next-test] BUILD REGRESSION c827c932c00ccd231a73da9816a51ce2c2b557d6

2023-03-28 Thread Michael Ellerman
kernel test robot writes: > tree/branch: > https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next-test > branch HEAD: c827c932c00ccd231a73da9816a51ce2c2b557d6 powerpc: Use > of_address_to_resource() > > Error/Warning reports: > >

Re: [PATCH v3 4/4] of: address: Always use dma_default_coherent for default coherency

2023-03-28 Thread Michael Ellerman
select NEED_SG_DMA_LENGTH > select OF > - select OF_DMA_DEFAULT_COHERENT if !NOT_COHERENT_CACHE > select OF_EARLY_FLATTREE > select OLD_SIGACTIONif PPC32 > select OLD_SIGSUSPEND Acked-by: Michael Ellerman (powerpc) cheers

Re: Memory coherency issue with IO thread offloading?

2023-03-28 Thread Michael Ellerman
Jens Axboe writes: >>> Can the queueing cause the creation of an IO thread (if one does not >>> exist, or all blocked?) >> >> Yep >> >> Since writing this email, I've gone through a lot of different tests. >> Here's a rough listing of what I found: >> >> - Like using the hack patch, if I just

Re: Memory coherency issue with IO thread offloading?

2023-03-28 Thread Michael Ellerman
Daniel Black writes: > Thanks Jens, Nick, Christophe and Michael for your work so far. > > Apologies for the out of thread email. > > Confirming MariabD-10.6+ is required( when we added liburing), and > previous versions used libaio (which tested without incident as mpe > retested). Thanks! I

Re: [PATCH] arch/powerpc/kvm: kvmppc_core_vcpu_create_hv: check for kzalloc failure

2023-03-28 Thread Michael Ellerman
Kautuk Consul writes: > On 2023-03-28 15:44:02, Kautuk Consul wrote: >> On 2023-03-28 20:44:48, Michael Ellerman wrote: >> > Kautuk Consul writes: >> > > kvmppc_vcore_create() might not be able to allocate memory through >> > > kzalloc. In that

Re: [PATCH] powerpc: don't try to copy ppc for task with NULL pt_regs

2023-03-28 Thread Michael Ellerman
"Nicholas Piggin" writes: > On Mon Mar 27, 2023 at 8:26 PM AEST, Christophe Leroy wrote: ... >> >> Now that thread.regs doesn't change anymore at each interrupt, it would >> probably be worth dropping it and falling back to task_pt_regs() as >> defined on most architecture. >> Knowing whether a

Re: [PATCH] powerpc: don't try to copy ppc for task with NULL pt_regs

2023-03-28 Thread Michael Ellerman
Jens Axboe writes: > Powerpc sets up PF_KTHREAD and PF_IO_WORKER with a NULL pt_regs, which > from my (arguably very short) checking is not commonly done for other > archs. This is fine, except when PF_IO_WORKER's have been created and > the task does something that causes a coredump to be

Re: [PATCH] arch/powerpc/kvm: kvmppc_core_vcpu_create_hv: check for kzalloc failure

2023-03-28 Thread Michael Ellerman
Kautuk Consul writes: > kvmppc_vcore_create() might not be able to allocate memory through > kzalloc. In that case the kvm->arch.online_vcores shouldn't be > incremented. I agree that looks wrong. Have you tried to test what goes wrong if it fails? It looks like it will break the LPCR update,

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

2023-03-28 Thread Michael Ellerman
"Nicholas Piggin" writes: > On Tue Mar 28, 2023 at 3:43 AM AEST, Sean Christopherson wrote: >> On Mon, Mar 27, 2023, Nicholas Piggin wrote: >> > On Thu Mar 23, 2023 at 3:41 AM AEST, Sean Christopherson wrote: ... >> > > >> > > What is the long term plan for KVM PPC maintenance? I was under the

Re: [PATCH] powerpc: don't try to copy ppc for task with NULL pt_regs

2023-03-27 Thread Michael Ellerman
"Nicholas Piggin" writes: > On Mon Mar 27, 2023 at 8:15 AM AEST, Jens Axboe wrote: >> Powerpc sets up PF_KTHREAD and PF_IO_WORKER with a NULL pt_regs, which >> from my (arguably very short) checking is not commonly done for other >> archs. This is fine, except when PF_IO_WORKER's have been

Re: Memory coherency issue with IO thread offloading?

2023-03-27 Thread Michael Ellerman
Jens Axboe writes: > On 3/24/23 6:42?PM, Michael Ellerman wrote: >> Jens Axboe writes: >>> I got a report sent to me from mariadb, in where 5.10.158 works fine and >>> 5.10.162 is broken. And in fact, current 6.3-rc also fails the test >>> case. Beware th

Re: Memory coherency issue with IO thread offloading?

2023-03-24 Thread Michael Ellerman
Jens Axboe writes: > Hi, Hi Jens, Thanks for the report. > I got a report sent to me from mariadb, in where 5.10.158 works fine and > 5.10.162 is broken. And in fact, current 6.3-rc also fails the test > case. Beware that this email is long, as I'm trying to include > everything that may be

Re: Memory coherency issue with IO thread offloading?

2023-03-24 Thread Michael Ellerman
Jens Axboe writes: > On 3/24/23 1:27?AM, Christophe Leroy wrote: >> Le 23/03/2023 ? 19:54, Jens Axboe a ?crit : >>> I got a report sent to me from mariadb, in where 5.10.158 works fine and >>> 5.10.162 is broken. And in fact, current 6.3-rc also fails the test >>> case. Beware that this email is

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, >

  1   2   3   4   5   6   7   8   9   10   >