Re: [PATCH v6 02/14] x86/kexec: refactor for kernel/Kconfig.kexec

2023-08-22 Thread Michal Suchánek
Hello, On Thu, Jul 13, 2023 at 07:13:57PM +0800, Leizhen (ThunderTown) wrote: > > > On 2023/7/13 0:15, Eric DeVolder wrote: > > The kexec and crash kernel options are provided in the common > > kernel/Kconfig.kexec. Utilize the common options and provide > > the ARCH_SUPPORTS_ and ARCH_SELECTS_

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

2023-08-22 Thread Michael Ellerman
Matthew Wilcox writes: > On Tue, Aug 22, 2023 at 09:55:37AM +1000, Stephen Rothwell wrote: >> In file included from include/trace/trace_events.h:27, >> from include/trace/define_trace.h:102, >> from fs/xfs/xfs_trace.h:4428, >> from fs/xfs/xfs_trac

Re: KASAN debug kernel fails to boot at early stage when CONFIG_SMP=y is set (kernel 6.5-rc5, PowerMac G4 3,6)

2023-08-22 Thread Christophe Leroy
Le 18/08/2023 à 18:23, Erhard Furtner a écrit : > On Fri, 18 Aug 2023 15:47:38 + > Christophe Leroy wrote: > >> I'm wondering if the problem is just linked to the kernel being built >> with CONFIG_SMP or if it is the actual startup of a secondary CPU that >> cause the freeze. >> >> Please l

Re: [PATCH rfc v2 05/10] powerpc: mm: use try_vma_locked_page_fault()

2023-08-22 Thread Christophe Leroy
Le 21/08/2023 à 14:30, Kefeng Wang a écrit : > Use new try_vma_locked_page_fault() helper to simplify code. > No functional change intended. Does it really simplifies code ? It's 32 insertions versus 34 deletions so only removing 2 lines. I don't like the struct vm_fault you are adding because

[PATCH AUTOSEL 6.4 09/10] powerpc/powermac: Use early_* IO variants in via_calibrate_decr()

2023-08-22 Thread Sasha Levin
From: Benjamin Gray [ Upstream commit 86582e6189dd8f9f52c25d46c70fe5d111da6345 ] On a powermac platform, via the call path: start_kernel() time_init() ppc_md.calibrate_decr() (pmac_calibrate_decr) via_calibrate_decr() ioremap() and iounmap() are called. The unmap can enable

[PATCH AUTOSEL 6.1 9/9] powerpc/powermac: Use early_* IO variants in via_calibrate_decr()

2023-08-22 Thread Sasha Levin
From: Benjamin Gray [ Upstream commit 86582e6189dd8f9f52c25d46c70fe5d111da6345 ] On a powermac platform, via the call path: start_kernel() time_init() ppc_md.calibrate_decr() (pmac_calibrate_decr) via_calibrate_decr() ioremap() and iounmap() are called. The unmap can enable

Re: linux-next: manual merge of the tty tree with the powerpc tree

2023-08-22 Thread Greg KH
On Fri, Aug 18, 2023 at 02:58:26PM +1000, Stephen Rothwell wrote: > Hi all, > > Today's linux-next merge of the tty tree got a conflict in: > > arch/powerpc/include/asm/fs_pd.h > > between commits: > > e6e077cb2aa4 ("powerpc/include: Declare mpc8xx_immr in 8xx_immap.h") > fecc436a97af ("p

Re: [PATCH rfc v2 05/10] powerpc: mm: use try_vma_locked_page_fault()

2023-08-22 Thread Kefeng Wang
On 2023/8/22 17:38, Christophe Leroy wrote: Le 21/08/2023 à 14:30, Kefeng Wang a écrit : Use new try_vma_locked_page_fault() helper to simplify code. No functional change intended. Does it really simplifies code ? It's 32 insertions versus 34 deletions so only removing 2 lines. Yes,it i

Re: [PATCH v5 0/3 RESEND] sed-opal: keyrings, discovery, revert, key store

2023-08-22 Thread Jarkko Sakkinen
On Mon Aug 21, 2023 at 6:26 PM EEST, Greg Joyce wrote: > On Wed, 2023-08-16 at 23:41 +0300, Jarkko Sakkinen wrote: > > On Wed Aug 16, 2023 at 10:45 PM EEST, Greg Joyce wrote: > > > It's been almost 4 weeks since the last resend and there haven't > > > been > > > any comments. Is there anything that

Re: [PATCH mm-unstable] mm/khugepaged: fix collapse_pte_mapped_thp() versus uffd

2023-08-22 Thread Peter Xu
Hi, Hugh, Jann, On Mon, Aug 21, 2023 at 07:51:38PM -0700, Hugh Dickins wrote: > On Mon, 21 Aug 2023, Jann Horn wrote: > > On Mon, Aug 21, 2023 at 9:51 PM Hugh Dickins wrote: > > > Jann Horn demonstrated how userfaultfd ioctl UFFDIO_COPY into a private > > > shmem mapping can add valid PTEs to pag

Re: [PATCH mm-unstable] mm/khugepaged: fix collapse_pte_mapped_thp() versus uffd

2023-08-22 Thread Jann Horn
On Tue, Aug 22, 2023 at 4:51 AM Hugh Dickins wrote: > On Mon, 21 Aug 2023, Jann Horn wrote: > > On Mon, Aug 21, 2023 at 9:51 PM Hugh Dickins wrote: > > > Just for this case, take the pmd_lock() two steps earlier: not because > > > it gives any protection against this case itself, but because ptlo

Re: [PATCH v14 00/15] phy: Add support for Lynx 10G SerDes

2023-08-22 Thread Ioana Ciornei
On Mon, Aug 21, 2023 at 02:46:53PM -0400, Sean Anderson wrote: > On 8/21/23 14:13, Ioana Ciornei wrote: > > On Mon, Aug 21, 2023 at 01:45:44PM -0400, Sean Anderson wrote: > >> Well, we have two pieces of information we need > >> > >> - What values do we need to program in the PCCRs to select a par

Re: [PATCH mm-unstable] mm/khugepaged: fix collapse_pte_mapped_thp() versus uffd

2023-08-22 Thread Matthew Wilcox
On Tue, Aug 22, 2023 at 04:39:43PM +0200, Jann Horn wrote: > > Perhaps something else will want that same behaviour in future (it's > > tempting, but difficult to guarantee correctness); for now, it is just > > userfaultfd (but by saying "_armed" rather than "_missing", I'm half- > > expecting uffd

Re: [PATCH mm-unstable] mm/khugepaged: fix collapse_pte_mapped_thp() versus uffd

2023-08-22 Thread David Hildenbrand
On 22.08.23 16:39, Jann Horn wrote: On Tue, Aug 22, 2023 at 4:51 AM Hugh Dickins wrote: On Mon, 21 Aug 2023, Jann Horn wrote: On Mon, Aug 21, 2023 at 9:51 PM Hugh Dickins wrote: Just for this case, take the pmd_lock() two steps earlier: not because it gives any protection against this case i

Re: [PATCH mm-unstable] mm/khugepaged: fix collapse_pte_mapped_thp() versus uffd

2023-08-22 Thread Jann Horn
On Tue, Aug 22, 2023 at 5:23 PM Matthew Wilcox wrote: > On Tue, Aug 22, 2023 at 04:39:43PM +0200, Jann Horn wrote: > > > Perhaps something else will want that same behaviour in future (it's > > > tempting, but difficult to guarantee correctness); for now, it is just > > > userfaultfd (but by sayin

Re: [PATCH mm-unstable] mm/khugepaged: fix collapse_pte_mapped_thp() versus uffd

2023-08-22 Thread David Hildenbrand
On 22.08.23 17:30, Jann Horn wrote: On Tue, Aug 22, 2023 at 5:23 PM Matthew Wilcox wrote: On Tue, Aug 22, 2023 at 04:39:43PM +0200, Jann Horn wrote: Perhaps something else will want that same behaviour in future (it's tempting, but difficult to guarantee correctness); for now, it is just userf

Re: [PATCH v5 0/3 RESEND] sed-opal: keyrings, discovery, revert, key store

2023-08-22 Thread Jens Axboe
On Fri, 21 Jul 2023 16:15:31 -0500, gjo...@linux.vnet.ibm.com wrote: > This patchset has gone through numerous rounds of review and > all comments/suggetions have been addressed. The reviews have > covered all relevant areas including reviews by block and keyring > developers as well as the SED O

Re: [PATCH mm-unstable] mm/khugepaged: fix collapse_pte_mapped_thp() versus uffd

2023-08-22 Thread Matthew Wilcox
On Tue, Aug 22, 2023 at 11:34:19AM -0700, Hugh Dickins wrote: > (Yes, the locking is a bit confusing: but mainly for the unrelated reason, > that with the split locking configs, we never quite know whether this lock > is the same as that lock or not, and so have to be rather careful.) Is it time t

Re: [PATCH mm-unstable] mm/khugepaged: fix collapse_pte_mapped_thp() versus uffd

2023-08-22 Thread Hugh Dickins
On Tue, 22 Aug 2023, Jann Horn wrote: > On Tue, Aug 22, 2023 at 4:51 AM Hugh Dickins wrote: > > On Mon, 21 Aug 2023, Jann Horn wrote: > > > On Mon, Aug 21, 2023 at 9:51 PM Hugh Dickins wrote: > > > > Just for this case, take the pmd_lock() two steps earlier: not because > > > > it gives any prote

Re: [PATCH mm-unstable] mm/khugepaged: fix collapse_pte_mapped_thp() versus uffd

2023-08-22 Thread Jann Horn
On Tue, Aug 22, 2023 at 8:54 PM Hugh Dickins wrote: > But rather than reworking it, please let's just go with v1 for now. Sounds good to me.

Re: [PATCH mm-unstable] mm/khugepaged: fix collapse_pte_mapped_thp() versus uffd

2023-08-22 Thread Hugh Dickins
On Tue, 22 Aug 2023, Matthew Wilcox wrote: > On Tue, Aug 22, 2023 at 11:34:19AM -0700, Hugh Dickins wrote: > > (Yes, the locking is a bit confusing: but mainly for the unrelated reason, > > that with the split locking configs, we never quite know whether this lock > > is the same as that lock or no

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

2023-08-22 Thread Matthew Wilcox
On Mon, Aug 21, 2023 at 09:00:43PM -0700, Darrick J. Wong wrote: > Please leave this ^^^ comment, because the need for TRACE_DEFINE_ENUM to > make enums work in tracepoints is not at all obvious. > > "order %u" to match the (non dev_t) style of the rest of the xfs > tracepoints. ACK, thanks. And

[PATCH RFC 0/2] powerpc/pseries: new character devices for RTAS functions

2023-08-22 Thread Nathan Lynch via B4 Relay
This is a proposal for adding chardev-based access to a select subset of RTAS functions on the pseries platform. The problem: important platform features are enabled on Linux VMs through the powerpc-specific rtas() syscall in combination with writeable mappings of /dev/mem. In typical usage, this

[PATCH RFC 2/2] powerpc/selftests: add test for papr-vpd

2023-08-22 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch Add selftests for /dev/papr-vpd, exercising the common expected use cases: * Retrieve all VPD by passing an empty location code. * Retrieve the "system VPD" by passing a location code derived from DT root node properties, as done by the vpdupdate command. The tests also ver

[PATCH RFC 1/2] powerpc/pseries: papr-vpd char driver for VPD retrieval

2023-08-22 Thread Nathan Lynch via B4 Relay
From: Nathan Lynch PowerVM LPARs may retrieve Vital Product Data (VPD) for system components using the ibm,get-vpd RTAS function. We can expose this to user space with a /dev/papr-vpd character device, where the programming model is: struct papr_location_code plc = { .str = "", }; /* obtain a

Re: [PATCH v6 2/3] PCI/AER: Disable AER interrupt on suspend

2023-08-22 Thread Kai-Heng Feng
On Fri, Aug 11, 2023 at 4:00 PM Kai-Heng Feng wrote: > > On Thu, Aug 10, 2023 at 6:51 PM Bjorn Helgaas wrote: > > > > On Thu, Aug 10, 2023 at 04:17:21PM +0800, Kai-Heng Feng wrote: > > > On Thu, Aug 10, 2023 at 2:52 AM Bjorn Helgaas wrote: > > > > On Fri, Jul 21, 2023 at 11:58:24AM +0800, Kai-He

Re: [PATCH 1/2] powerpc/powernv: Fix fortify source warnings in opal-prd.c

2023-08-22 Thread Mahesh J Salgaonkar
On 2023-08-22 00:28:19 Tue, Michael Ellerman wrote: > As reported by Mahesh & Aneesh, opal_prd_msg_notifier() triggers a > FORTIFY_SOURCE warning: > > memcpy: detected field-spanning write (size 32) of single field > "&item->msg" at arch/powerpc/platforms/powernv/opal-prd.c:355 (size 4) > WAR

[PATCH] cxl: Drop unused detach_spa()

2023-08-22 Thread Michael Ellerman
Clang warns: drivers/misc/cxl/native.c:272:20: error: unused function 'detach_spa' [-Werror,-Wunused-function] It was created as part of some refactoring in commit 05155772f642 ("cxl: Allocate and release the SPA with the AFU"), but has never been called in its current form. Drop it. Signed-of

Re: [PATCH] cxl: Drop unused detach_spa()

2023-08-22 Thread Andrew Donnellan
On Wed, 2023-08-23 at 14:48 +1000, Michael Ellerman wrote: > Clang warns: >   drivers/misc/cxl/native.c:272:20: error: unused function > 'detach_spa' [-Werror,-Wunused-function] > > It was created as part of some refactoring in commit 05155772f642 > ("cxl: > Allocate and release the SPA with the A

[PATCH] ibmveth: Use dcbf rather than dcbfl

2023-08-22 Thread Michael Ellerman
When building for power4, newer binutils don't recognise the "dcbfl" extended mnemonic. dcbfl RA, RB is equivalent to dcbf RA, RB, 1. Switch to "dcbf" to avoid the build error. Signed-off-by: Michael Ellerman --- drivers/net/ethernet/ibm/ibmveth.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[PATCH 2/4] powerpc/pseries: Move hcall_vphn() prototype into vphn.h

2023-08-22 Thread Michael Ellerman
Consolidate the two prototypes for hcall_vphn() into vphn.h. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/dtl.h| 1 - arch/powerpc/include/asm/lppaca.h | 2 -- arch/powerpc/include/asm/vphn.h | 2 ++ 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/powerp

[PATCH v2 4/4] powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT

2023-08-22 Thread Michael Ellerman
From: Russell Currey lppaca_shared_proc() takes a pointer to the lppaca which is typically accessed through get_lppaca(). With DEBUG_PREEMPT enabled, this leads to checking if preemption is enabled, for example: BUG: using smp_processor_id() in preemptible [] code: grep/10693 caller

[PATCH 3/4] powerpc: Don't include lppaca.h in paca.h

2023-08-22 Thread Michael Ellerman
By adding a forward declaration for struct lppaca we can untangle paca.h and lppaca.h. Also move get_lppaca() into lppaca.h for consistency. Add includes of lppaca.h to some files that need it. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/lppaca.h | 4 arch/powerpc/

[PATCH 1/4] powerpc/pseries: Move VPHN constants into vphn.h

2023-08-22 Thread Michael Ellerman
These don't have any particularly good reason to belong in lppaca.h, move them into their own header. Signed-off-by: Michael Ellerman --- arch/powerpc/include/asm/lppaca.h | 22 --- arch/powerpc/include/asm/vphn.h | 22 +++ arch/powerpc/m

[PATCH] powerpc: Drop zalloc_maybe_bootmem()

2023-08-22 Thread Michael Ellerman
The only callers of zalloc_maybe_bootmem() are PCI setup routines. These used to be called early during boot before slab setup, and also during runtime due to hotplug. But commit 5537fcb319d0 ("powerpc/pci: Add ppc_md.discover_phbs()") moved the boot-time calls later, after slab setup, meaning the

Re: [PATCH] powerpc: Drop zalloc_maybe_bootmem()

2023-08-22 Thread Christophe Leroy
Le 23/08/2023 à 07:54, Michael Ellerman a écrit : > The only callers of zalloc_maybe_bootmem() are PCI setup routines. These > used to be called early during boot before slab setup, and also during > runtime due to hotplug. > > But commit 5537fcb319d0 ("powerpc/pci: Add ppc_md.discover_phbs()")

Re: linux-next: manual merge of the tty tree with the powerpc tree

2023-08-22 Thread Michael Ellerman
Greg KH writes: > On Fri, Aug 18, 2023 at 02:58:26PM +1000, Stephen Rothwell wrote: >> Hi all, >> >> Today's linux-next merge of the tty tree got a conflict in: >> >> arch/powerpc/include/asm/fs_pd.h >> >> between commits: >> >> e6e077cb2aa4 ("powerpc/include: Declare mpc8xx_immr in 8xx_im