Re: [PATCH v6 00/13] Add support for DAX vmemmap optimization for ppc64

2023-07-26 Thread Aneesh Kumar K.V
Andrew Morton writes: > On Wed, 26 Jul 2023 10:59:32 +0530 Aneesh Kumar K V > wrote: > >> On 7/26/23 12:59 AM, Andrew Morton wrote: >> > On Tue, 25 Jul 2023 00:37:46 +0530 "Aneesh Kumar K.V" >> > wrote: >> > >> >> This patch series implements changes required to support DAX vmemmap >> >>

[PATCH v6 10/13 -fix] powerpc/book3s64/vmemmap: Switch radix to use a different vmemmap handling function

2023-07-26 Thread Aneesh Kumar K.V
>From 9125b1815758ab3b83966aeead6f486c0708ea73 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Thu, 27 Jul 2023 10:02:37 +0530 Subject: [PATCH] powerpc/mm: Fix section mismatch warning remove_pte_table is only called from remove_pmd_table which is marked __meminit. These functions are

Re: Add fchmodat2() - or add a more general syscall?

2023-07-26 Thread Eric Biggers
On Tue, Jul 25, 2023 at 04:58:34PM +0100, David Howells wrote: > Rather than adding a fchmodat2() syscall, should we add a "set_file_attrs()" > syscall that takes a mask and allows you to set a bunch of stuff all in one > go? Basically, an interface to notify_change() in the kernel that would

Re: [RFC PATCH v11 08/29] KVM: Introduce per-page memory attributes

2023-07-26 Thread Xu Yilun
On 2023-07-26 at 08:59:53 -0700, Sean Christopherson wrote: > On Mon, Jul 24, 2023, Xu Yilun wrote: > > On 2023-07-18 at 16:44:51 -0700, Sean Christopherson wrote: > > > + if (WARN_ON_ONCE(start == end)) > > > + return -EINVAL; > > > > Also, is this check possible to be hit? Maybe remove

[PATCH 3/3] ASoC: fsl_micfil: Use SET_SYSTEM_SLEEP_PM_OPS to simplify PM

2023-07-26 Thread Chancel Liu
Use SET_SYSTEM_SLEEP_PM_OPS to simplify suspend and resume function. fsl_micfil_suspend() and fsl_micfil_resume() can be deleted. Signed-off-by: Chancel Liu --- sound/soc/fsl/fsl_micfil.c | 18 ++ 1 file changed, 2 insertions(+), 16 deletions(-) diff --git

[PATCH 2/3] ASoC: fsl_micfil: Add fsl_micfil_check_version function

2023-07-26 Thread Chancel Liu
fsl_micfil_check_version can help to parse the version info in VERID and PARAM registers. Since the two registers are added only on i.MX93 platform, a member flag called check_version is introduced to soc data structure which indicates need to check version. Signed-off-by: Chancel Liu ---

[PATCH 1/3] ASoC: fsl_micfil: Add new registers and new bit definition

2023-07-26 Thread Chancel Liu
MICFIL IP is upgraded on i.MX93 platform. These new registers and new bit definition are added to complete the register list. Signed-off-by: Chancel Liu --- sound/soc/fsl/fsl_micfil.c | 6 ++ sound/soc/fsl/fsl_micfil.h | 28 2 files changed, 34 insertions(+)

[PATCH 0/3] Update the register list of MICFIL

2023-07-26 Thread Chancel Liu
MICFIL IP is upgraded on i.MX93 platform. Add new registers and new bit definition. Chancel Liu (3): ASoC: fsl_micfil: Add new registers and new bit definition ASoC: fsl_micfil: Add fsl_micfil_check_version function ASoC: fsl_micfil: Use SET_SYSTEM_SLEEP_PM_OPS to simplify PM

Re: [PATCH] I2C: Explicitly include correct DT includes

2023-07-26 Thread Andi Shyti
Hi Rob, On Fri, Jul 14, 2023 at 11:46:16AM -0600, Rob Herring wrote: > The DT of_device.h and of_platform.h date back to the separate > of_platform_bus_type before it as merged into the regular platform bus. > As part of that merge prepping Arm DT support 13 years ago, they > "temporarily"

Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-07-26 Thread Elliot Berman
On 7/18/2023 4:44 PM, Sean Christopherson wrote: TODO diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h index 6325d1d0e90f..15041aa7d9ae 100644 --- a/include/uapi/linux/magic.h +++ b/include/uapi/linux/magic.h @@ -101,5 +101,6 @@ #define DMA_BUF_MAGIC

Re: [PATCH] arch/powerpc: Remove unnecessary endian conversion code in XICS

2023-07-26 Thread Gautam Menghani
On Thu, Jul 06, 2023 at 05:50:57PM +1000, Jordan Niethe wrote: > > > On 30/6/23 3:56 pm, Gautam Menghani wrote: > > Remove an unnecessary piece of code that does an endianness conversion but > > does not use the result. The following warning was reported by Clang's > > static analyzer: > > > >

Re: [PATCH] arch/powerpc: Remove unnecessary endian conversion code in XICS

2023-07-26 Thread Gautam Menghani
On Thu, Jul 06, 2023 at 05:50:57PM +1000, Jordan Niethe wrote: > > > On 30/6/23 3:56 pm, Gautam Menghani wrote: > > Remove an unnecessary piece of code that does an endianness conversion but > > does not use the result. The following warning was reported by Clang's > > static analyzer: > > > >

[PATCH v2] char: Explicitly include correct DT includes

2023-07-26 Thread Rob Herring
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it was merged into the regular platform bus. As part of that merge prepping Arm DT support 13 years ago, they "temporarily" include each other. They also include platform_device.h and of.h. As a result,

Re: [PATCH] soc: fsl: qe: Replace all non-returning strlcpy with strscpy

2023-07-26 Thread Kees Cook
On Tue, 23 May 2023 02:14:25 +, Azeem Shaikh wrote: > strlcpy() reads the entire source buffer first. > This read may exceed the destination size limit. > This is both inefficient and can lead to linear read > overflows if a source string is not NUL-terminated [1]. > In an effort to remove

Re: [PATCH 1/1] ASoC: fsl: fsl_qmc_audio: Fix snd_pcm_format_t values handling

2023-07-26 Thread Mark Brown
On Wed, 26 Jul 2023 18:16:20 +0200, Herve Codina wrote: > Running sparse on fsl_qmc_audio (make C=1) raises the following warnings: > fsl_qmc_audio.c:387:26: warning: restricted snd_pcm_format_t degrades to > integer > fsl_qmc_audio.c:389:59: warning: incorrect type in argument 1 (different >

Re: [RFC PATCH v11 01/29] KVM: Wrap kvm_gfn_range.pte in a per-action union

2023-07-26 Thread Sean Christopherson
On Wed, Jul 19, 2023, Paolo Bonzini wrote: > On 7/19/23 01:44, Sean Christopherson wrote: > > + BUILD_BUG_ON(sizeof(gfn_range.arg) != sizeof(gfn_range.arg.raw)); > > + BUILD_BUG_ON(sizeof(range->arg) != sizeof(range->arg.raw)); > > I think these should be static assertions near the definition

Re: [RFC PATCH v11 12/29] KVM: Add KVM_CREATE_GUEST_MEMFD ioctl() for guest-specific backing memory

2023-07-26 Thread Sean Christopherson
On Wed, Jul 26, 2023, Elliot Berman wrote: > > > On 7/18/2023 4:44 PM, Sean Christopherson wrote: > > TODO > > > diff --git a/include/uapi/linux/magic.h b/include/uapi/linux/magic.h > > index 6325d1d0e90f..15041aa7d9ae 100644 > > --- a/include/uapi/linux/magic.h > > +++

Re: [PATCH v6 00/13] Add support for DAX vmemmap optimization for ppc64

2023-07-26 Thread Andrew Morton
On Wed, 26 Jul 2023 10:59:32 +0530 Aneesh Kumar K V wrote: > On 7/26/23 12:59 AM, Andrew Morton wrote: > > On Tue, 25 Jul 2023 00:37:46 +0530 "Aneesh Kumar K.V" > > wrote: > > > >> This patch series implements changes required to support DAX vmemmap > >> optimization for ppc64. > > > > Do

Re: [PATCH v4 0/5] Add a new fchmodat2() syscall

2023-07-26 Thread Rich Felker
On Tue, Jul 11, 2023 at 06:16:02PM +0200, Alexey Gladkov wrote: > In glibc, the fchmodat(3) function has a flags argument according to the > POSIX specification [1], but kernel syscalls has no such argument. > Therefore, libc implementations do workarounds using /proc. However, > this requires

Re: [PATCH v5 6/7] mm/hotplug: Embed vmem_altmap details in memory block

2023-07-26 Thread David Hildenbrand
On 26.07.23 12:31, Aneesh Kumar K.V wrote: David Hildenbrand writes: On 25.07.23 12:02, Aneesh Kumar K.V wrote: With memmap on memory, some architecture needs more details w.r.t altmap such as base_pfn, end_pfn, etc to unmap vmemmap memory. Instead of computing them again when we remove a

Re: [PATCH v5 4/7] mm/hotplug: Support memmap_on_memory when memmap is not aligned to pageblocks

2023-07-26 Thread David Hildenbrand
On 26.07.23 11:57, Aneesh Kumar K V wrote: On 7/26/23 2:34 PM, David Hildenbrand wrote:    /* @@ -1310,7 +1400,10 @@ int __ref add_memory_resource(int nid, struct resource *res, mhp_t mhp_flags)    {    struct mhp_params params = { .pgprot = pgprot_mhp(PAGE_KERNEL) };    enum

[PATCH 1/1] ASoC: fsl: fsl_qmc_audio: Fix snd_pcm_format_t values handling

2023-07-26 Thread Herve Codina
Running sparse on fsl_qmc_audio (make C=1) raises the following warnings: fsl_qmc_audio.c:387:26: warning: restricted snd_pcm_format_t degrades to integer fsl_qmc_audio.c:389:59: warning: incorrect type in argument 1 (different base types) fsl_qmc_audio.c:389:59:expected restricted

Re: [RFC PATCH v11 08/29] KVM: Introduce per-page memory attributes

2023-07-26 Thread Sean Christopherson
On Mon, Jul 24, 2023, Xu Yilun wrote: > On 2023-07-18 at 16:44:51 -0700, Sean Christopherson wrote: > > @@ -1346,6 +1350,9 @@ static void kvm_destroy_vm(struct kvm *kvm) > > kvm_free_memslots(kvm, >__memslots[i][0]); > > kvm_free_memslots(kvm, >__memslots[i][1]); > > }

[PATCH v2 28/28] net: wan: fsl_qmc_hdlc: Add framer support

2023-07-26 Thread Herve Codina
Add framer support in the fsl_qmc_hdlc driver in order to be able to signal carrier changes to the network stack based on the framer status Also use this framer to provide information related to the E1/T1 line interface on IF_GET_IFACE and configure the line interface according to IF_IFACE_{E1,T1}

[PATCH v2 27/28] dt-bindings: net: fsl,qmc-hdlc: Add framer support

2023-07-26 Thread Herve Codina
A framer can be connected to the QMC HDLC. If present, this framer is the interface between the TDM used by the QMC HDLC and the E1/T1 line. The QMC HDLC can use this framer to get information about the line and configure the line. Add an optional framer property to reference the framer itself.

[PATCH v2 26/28] ASoC: codecs: Add support for the framer codec

2023-07-26 Thread Herve Codina
The framer codec interracts with a framer. It allows to use some of the framer timeslots as audio channels to transport audio data over the framer E1/T1/J1 lines. It also reports line carrier detection events through the ALSA jack detection feature. Signed-off-by: Herve Codina ---

[PATCH v2 25/28] MAINTAINERS: Add the Lantiq PEF2256 driver entry

2023-07-26 Thread Herve Codina
After contributing the driver, add myself as the maintainer for the Lantiq PEF2256 driver. Signed-off-by: Herve Codina --- MAINTAINERS | 9 + 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 14041d90f9c8..07a7d9fca3c4 100644 --- a/MAINTAINERS +++

[PATCH v2 24/28] pinctrl: Add support for the Lantic PEF2256 pinmux

2023-07-26 Thread Herve Codina
The Lantiq PEF2256 is a framer and line interface component designed to fulfill all required interfacing between an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. This pinmux support handles the pin muxing part (pins RP(A..D) and pins XP(A..D)) of the PEF2256. Signed-off-by:

[PATCH v2 23/28] net: wan: framer: Add support for the Lantiq PEF2256 framer

2023-07-26 Thread Herve Codina
The Lantiq PEF2256 is a framer and line interface component designed to fulfill all required interfacing between an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. Signed-off-by: Herve Codina --- drivers/net/wan/framer/Kconfig| 16 +

[PATCH v2 22/28] mfd: core: Ensure disabled devices are skiped without aborting

2023-07-26 Thread Herve Codina
The loop searching for a matching device based on its compatible string is aborted when a matching disabled device is found. This abort avoid to add devices as soon as one disabled device is found. Continue searching for an other device instead of aborting on the first disabled one fixes the

[PATCH v2 21/28] dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer

2023-07-26 Thread Herve Codina
The Lantiq PEF2256 is a framer and line interface component designed to fulfill all required interfacing between an analog E1/T1/J1 line and the digital PCM system highway/H.100 bus. Signed-off-by: Herve Codina --- .../bindings/net/lantiq,pef2256.yaml | 226 ++ 1 file

[PATCH v2 20/28] net: wan: Add framer framework support

2023-07-26 Thread Herve Codina
A framer is a component in charge of an E1/T1 line interface. Connected usually to a TDM bus, it converts TDM frames to/from E1/T1 frames. It also provides information related to the E1/T1 line. The framer framework provides a set of APIs for the framer drivers (framer provider) to create/destroy

[PATCH v2 19/28] wan: qmc_hdlc: Add runtime timeslots changes support

2023-07-26 Thread Herve Codina
QMC channels support runtime timeslots changes but nothing is done at the QMC HDLC driver to handle these changes. Use existing IFACE ioctl in order to configure the timeslots to use. Signed-off-by: Herve Codina --- drivers/net/wan/fsl_qmc_hdlc.c | 169 - 1 file

[PATCH v2 18/28] soc: fsl: cpm1: qmc: Introduce functions to change timeslots at runtime

2023-07-26 Thread Herve Codina
Introduce qmc_chan_{get,set}_ts_info() function to allow timeslots modification at runtime. The modification is provided using qmc_chan_set_ts_info() and will be applied on next qmc_chan_start(). qmc_chan_set_ts_info() must be called with the channel rx and/or tx stopped. Signed-off-by: Herve

[PATCH v2 17/28] soc: fsl: cpm1: qmc: Remove timeslots handling from setup_chan()

2023-07-26 Thread Herve Codina
Timeslots setting is done at channel start() and stop(). There is no more need to do that during setup_chan(). Simply remove timeslot setting from setup_chan(). Signed-off-by: Herve Codina --- drivers/soc/fsl/qe/qmc.c | 28 1 file changed, 28 deletions(-) diff

[PATCH v2 16/28] soc: fsl: cpm1: qmc: Handle timeslot entries at channel start() and stop()

2023-07-26 Thread Herve Codina
In order to support runtime timeslot route changes, enable the channel timeslot entries at channel start() and disable them at channel stop(). Signed-off-by: Herve Codina --- drivers/soc/fsl/qe/qmc.c | 175 --- 1 file changed, 163 insertions(+), 12

[PATCH v2 15/28] soc: fsl: cpm1: qmc: Introduce is_tsa_64rxtx flag

2023-07-26 Thread Herve Codina
In order to support runtime timeslot route changes, some operations will be different according the routing table used (common Rx and Tx table or one table for Rx and one for Tx). The is_tsa_64rxtx flag is introduced to avoid extra computation to determine the table format each time we need it.

[PATCH v2 14/28] soc: fsl: cpm1: qmc: Split Tx and Rx TSA entries setup

2023-07-26 Thread Herve Codina
The Tx and Rx entries for a given channel are set in one function. In order to modify Rx entries and Tx entries independently of one other, split this function in one for the Rx part and one for the Tx part. Signed-off-by: Herve Codina --- drivers/soc/fsl/qe/qmc.c | 49

[PATCH v2 13/28] soc: fsl: cpm1: qmc: Add support for disabling channel TSA entries

2023-07-26 Thread Herve Codina
In order to allow runtime timeslot route changes, disabling channel TSA entries needs to be supported. Add support for this new feature. Signed-off-by: Herve Codina --- drivers/soc/fsl/qe/qmc.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git

[PATCH v2 12/28] soc: fsl: cpm1: qmc: Check available timeslots in qmc_check_chans()

2023-07-26 Thread Herve Codina
The timeslots checked in qmc_check_chans() are the timeslots used. With the introduction of the available timeslots, the used timeslots are a subset of the available timeslots. The timeslots checked during the qmc_check_chans() call should be the available ones. Simply update and check the

[PATCH v2 11/28] soc: fsl: cpm1: qmc: Remove no more needed checks from qmc_check_chans()

2023-07-26 Thread Herve Codina
The newly introduced qmc_chan_setup_tsa* functions check that the channel entries are not already used. These checks are also performed by qmc_check_chans() and are no more needed. Remove them from qmc_check_chans(). Signed-off-by: Herve Codina --- drivers/soc/fsl/qe/qmc.c | 20

[PATCH v2 10/28] soc: fsl: cpm1: qmc: Introduce qmc_chan_setup_tsa*

2023-07-26 Thread Herve Codina
Introduce the qmc_chan_setup_tsa* functions to setup entries related to the given channel. Use them during QMC channels setup. Signed-off-by: Herve Codina --- drivers/soc/fsl/qe/qmc.c | 161 ++- 1 file changed, 125 insertions(+), 36 deletions(-) diff --git

[PATCH v2 09/28] soc: fsl: cpm1: qmc: Rename qmc_setup_tsa* to qmc_init_tsa*

2023-07-26 Thread Herve Codina
qmc_setup_tsa* are called once at initialisation. They initialize the QMC TSA table. In order to introduce setup function later on for dynamic timeslots management, rename the function to avoid later confusion. Signed-off-by: Herve Codina --- drivers/soc/fsl/qe/qmc.c | 16 1

[PATCH v2 08/28] soc: fsl: cpm1: qmc: Introduce available timeslots masks

2023-07-26 Thread Herve Codina
Available timeslots masks define timeslots available for the related channel. These timeslots are defined by the QMC binding. Timeslots used are initialized to available timeslots but can be a subset of available timeslots. This prepares the dynamic timeslots management (ie. changing timeslots at

[PATCH v2 07/28] MAINTAINERS: Add the Freescale QMC HDLC driver entry

2023-07-26 Thread Herve Codina
After contributing the driver, add myself as the maintainer for the Freescale QMC HDLC driver. Signed-off-by: Herve Codina --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index aee340630eca..14041d90f9c8 100644 --- a/MAINTAINERS +++

[PATCH v2 06/28] net: wan: Add support for QMC HDLC

2023-07-26 Thread Herve Codina
The QMC HDLC driver provides support for HDLC using the QMC (QUICC Multichannel Controller) to transfer the HDLC data. Signed-off-by: Herve Codina --- drivers/net/wan/Kconfig| 12 + drivers/net/wan/Makefile | 1 + drivers/net/wan/fsl_qmc_hdlc.c | 422

[PATCH v2 05/28] dt-bindings: net: Add support for QMC HDLC

2023-07-26 Thread Herve Codina
The QMC (QUICC mutichannel controller) is a controller present in some PowerQUICC SoC such as MPC885. The QMC HDLC uses the QMC controller to transfer HDLC data. Signed-off-by: Herve Codina --- .../devicetree/bindings/net/fsl,qmc-hdlc.yaml | 41 +++ 1 file changed, 41

[PATCH v2 04/28] soc: fsl: cpm1: qmc: Extend the API to provide Rx status

2023-07-26 Thread Herve Codina
In HDLC mode, some status flags related to the data read transfer can be set by the hardware and need to be known by a QMC consumer for further analysis. Extend the API in order to provide these transfer status flags at the read complete() call. In TRANSPARENT mode, these flags have no meaning.

[PATCH v2 03/28] soc: fsl: cpm1: qmc: Fix rx channel reset

2023-07-26 Thread Herve Codina
The qmc_chan_reset_rx() set the is_rx_stopped flag. This leads to an inconsistent state in the following sequence. qmc_chan_stop() qmc_chan_reset() Indeed, after the qmc_chan_reset() call, the channel must still be stopped. Only a qmc_chan_start() call can move the channel from stopped

[PATCH v2 01/28] soc: fsl: cpm1: tsa: Fix __iomem addresses declaration

2023-07-26 Thread Herve Codina
Running sparse (make C=1) on tsa.c raises a lot of warning such as: --- 8< --- warning: incorrect type in assignment (different address spaces) expected void *[noderef] si_regs got void [noderef] __iomem * --- 8< --- Indeed, some variable were declared 'type *__iomem var' instead

[PATCH v2 02/28] soc: fsl: cpm1: qmc: Fix __iomem addresses declaration

2023-07-26 Thread Herve Codina
Running sparse (make C=1) on qmc.c raises a lot of warning such as: ... warning: incorrect type in assignment (different address spaces) expected struct cpm_buf_desc [usertype] *[noderef] __iomem bd got struct cpm_buf_desc [noderef] [usertype] __iomem *txbd_free ... Indeed, some

[PATCH v2 00/28] Add support for QMC HDLC, framer infrastruture and PEF2256 framer

2023-07-26 Thread Herve Codina
Hi, I have a system where I need to handle an HDLC interface and some audio data. The HDLC data are transferred using a TDM bus on which a PEF2256 (E1/T1 framer) is present. The PEF2256 transfers data from/to the TDM bus to/from the E1 line. This PEF2256 is connected to a PowerQUICC SoC for the

Re: [PATCH mm-unstable v7 00/31] Split ptdesc from struct page

2023-07-26 Thread Matthew Wilcox
On Mon, Jul 24, 2023 at 09:41:36PM -0700, Hugh Dickins wrote: > On Mon, 24 Jul 2023, Vishal Moola (Oracle) wrote: > > > The MM subsystem is trying to shrink struct page. This patchset > > introduces a memory descriptor for page table tracking - struct ptdesc. > > > > This patchset introduces

Re: [RFC PATCH v11 00/29] KVM: guest_memfd() and per-page attributes

2023-07-26 Thread Sean Christopherson
On Wed, Jul 26, 2023, Nikunj A. Dadhania wrote: > Hi Sean, > > On 7/24/2023 10:30 PM, Sean Christopherson wrote: > >> Starting an SNP guest with 40G memory with memory interleave between > >> Node2 and Node3 > >> > >> $ numactl -i 2,3 ./bootg_snp.sh > >> > >> PID USER PR NI

[PATCH v6 11/13 -fix] powerpc/book3s64/radix: Add support for vmemmap optimization for radix

2023-07-26 Thread Aneesh Kumar K.V
>From 9252360e483246e13e6bb28cd6773af2b99eeb55 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Wed, 26 Jul 2023 10:54:14 +0530 Subject: [PATCH] -next build fixup Fix build error Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/include/asm/book3s/64/radix.h | 2 ++ 1 file changed, 2

Re: [PATCH v4 2/5] fs: Add fchmodat2()

2023-07-26 Thread Alexey Gladkov
On Wed, Jul 26, 2023 at 02:36:25AM +1000, Aleksa Sarai wrote: > On 2023-07-11, Alexey Gladkov wrote: > > On the userspace side fchmodat(3) is implemented as a wrapper > > function which implements the POSIX-specified interface. This > > interface differs from the underlying kernel system call,

Re: Add fchmodat2() - or add a more general syscall?

2023-07-26 Thread Christian Brauner
On Tue, Jul 25, 2023 at 07:39:51PM +0100, David Howells wrote: > Florian Weimer wrote: > > > > Rather than adding a fchmodat2() syscall, should we add a > > > "set_file_attrs()" syscall that takes a mask and allows you to set a bunch > > > of stuff all in one go? Basically, an interface to

Re: [PATCH v2] powerpc:platforms:Fix an NULL vs IS_ERR() bug for debugfs_create_dir()

2023-07-26 Thread 王明-软件底层技术部
在 2023/7/12 10:52, Wang Ming 写道: > The debugfs_create_dir() function returns error pointers. > It never returns NULL. Most incorrect error checks were fixed, > but the one in scom_debug_init() was forgotten, the other one in > scom_debug_init_one() was also forgotten. > > Fix the remaining error

Re: [RFC PATCH v11 10/29] mm: Add AS_UNMOVABLE to mark mapping as completely unmovable

2023-07-26 Thread Kirill A . Shutemov
On Tue, Jul 25, 2023 at 01:51:55PM +0100, Matthew Wilcox wrote: > On Tue, Jul 25, 2023 at 01:24:03PM +0300, Kirill A . Shutemov wrote: > > On Tue, Jul 18, 2023 at 04:44:53PM -0700, Sean Christopherson wrote: > > > diff --git a/mm/compaction.c b/mm/compaction.c > > > index

Re: [RFC PATCH v11 00/29] KVM: guest_memfd() and per-page attributes

2023-07-26 Thread Nikunj A. Dadhania
Hi Sean, On 7/24/2023 10:30 PM, Sean Christopherson wrote: > On Mon, Jul 24, 2023, Nikunj A. Dadhania wrote: >> On 7/19/2023 5:14 AM, Sean Christopherson wrote: >>> This is the next iteration of implementing fd-based (instead of vma-based) >>> memory for KVM guests. If you want the full

[PATCH v6 01/13 -fix] mm/hugepage pud: Allow arch-specific helper function to check huge page pud support

2023-07-26 Thread Aneesh Kumar K.V
>From 81719b31a4e86d2f7352da653175b7c508a94303 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Wed, 26 Jul 2023 13:45:28 +0530 Subject: [PATCH] mm/debug_vm_pgtable: Use the new has_transparent_pud_hugepage() Use the new helper to check pud hugepage support. Architecture like ppc64 will

Re: [PATCH v5 6/7] mm/hotplug: Embed vmem_altmap details in memory block

2023-07-26 Thread Aneesh Kumar K.V
David Hildenbrand writes: > On 25.07.23 12:02, Aneesh Kumar K.V wrote: >> With memmap on memory, some architecture needs more details w.r.t altmap >> such as base_pfn, end_pfn, etc to unmap vmemmap memory. Instead of >> computing them again when we remove a memory block, embed vmem_altmap >>

Re: [PATCH v5 23/25] iommu: Add ops->domain_alloc_paging()

2023-07-26 Thread Baolu Lu
On 2023/7/25 1:22, Jason Gunthorpe wrote: This callback requests the driver to create only a __IOMMU_DOMAIN_PAGING domain, so it saves a few lines in a lot of drivers needlessly checking the type. More critically, this allows us to sweep out all the IOMMU_DOMAIN_UNMANAGED and IOMMU_DOMAIN_DMA

Re: [PATCH v5 4/7] mm/hotplug: Support memmap_on_memory when memmap is not aligned to pageblocks

2023-07-26 Thread Aneesh Kumar K V
On 7/26/23 2:34 PM, David Hildenbrand wrote: >    /* @@ -1310,7 +1400,10 @@ int __ref add_memory_resource(int nid, struct resource *res, mhp_t mhp_flags)    {    struct mhp_params params = { .pgprot = pgprot_mhp(PAGE_KERNEL) };    enum memblock_flags

Re: [PATCH v5 22/25] iommu: Add __iommu_group_domain_alloc()

2023-07-26 Thread Baolu Lu
On 2023/7/25 1:22, Jason Gunthorpe wrote: Allocate a domain from a group. Automatically obtains the iommu_ops to use from the device list of the group. Convert the internal callers to use it. Tested-by: Steven Price Tested-by: Marek Szyprowski Tested-by: Nicolin Chen Signed-off-by: Jason

Re: [PATCH v5 21/25] iommu: Require a default_domain for all iommu drivers

2023-07-26 Thread Baolu Lu
On 2023/7/25 1:22, Jason Gunthorpe wrote: At this point every iommu driver will cause a default_domain to be selected, so we can finally remove this gap from the core code. The following table explains what each driver supports and what the resulting default_domain will be:

Re: [PATCH v5 16/25] iommu: Remove ops->set_platform_dma_ops()

2023-07-26 Thread Baolu Lu
On 2023/7/25 1:22, Jason Gunthorpe wrote: All drivers are now using IDENTITY or PLATFORM domains for what this did, we can remove it now. It is no longer possible to attach to a NULL domain. Tested-by: Heiko Stuebner Tested-by: Niklas Schnelle Tested-by: Steven Price Tested-by: Marek Szyprowski

Re: [PATCH v5 6/7] mm/hotplug: Embed vmem_altmap details in memory block

2023-07-26 Thread David Hildenbrand
On 25.07.23 12:02, Aneesh Kumar K.V wrote: With memmap on memory, some architecture needs more details w.r.t altmap such as base_pfn, end_pfn, etc to unmap vmemmap memory. Instead of computing them again when we remove a memory block, embed vmem_altmap details in struct memory_block if we are

Re: [PATCH v5 08/25] iommu: Reorganize iommu_get_default_domain_type() to respect def_domain_type()

2023-07-26 Thread Baolu Lu
On 2023/7/25 1:21, Jason Gunthorpe wrote: Except for dart every driver returns 0 or IDENTITY from def_domain_type(). The drivers that return IDENTITY have some kind of good reason, typically that quirky hardware really can't support anything other than IDENTITY. Arrange things so that if the

Re: [PATCH v5 4/7] mm/hotplug: Support memmap_on_memory when memmap is not aligned to pageblocks

2023-07-26 Thread David Hildenbrand
/* @@ -1310,7 +1400,10 @@ int __ref add_memory_resource(int nid, struct resource *res, mhp_t mhp_flags) { struct mhp_params params = { .pgprot = pgprot_mhp(PAGE_KERNEL) }; enum memblock_flags memblock_flags = MEMBLOCK_NONE; - struct vmem_altmap mhp_altmap = {}; +

[PATCH] powerpc/ep8248e: Mark driver as non removable

2023-07-26 Thread Uwe Kleine-König
Instead of resorting to BUG() ensure that the driver isn't unbound by suppressing its bind and unbind sysfs attributes. As the driver is built-in there is no way to remove a device once bound. As a nice side effect this allows to drop the remove function. Signed-off-by: Uwe Kleine-König ---

Re: [PATCH v5 02/25] iommu: Add IOMMU_DOMAIN_PLATFORM

2023-07-26 Thread Baolu Lu
On 2023/7/25 1:21, Jason Gunthorpe wrote: This is used when the iommu driver is taking control of the dma_ops, currently only on S390 and power spapr. It is designed to preserve the original ops->detach_dev() semantic that these S390 was built around. Provide an opaque domain type and a

Re: [PATCH v5 01/25] iommu: Add iommu_ops->identity_domain

2023-07-26 Thread Baolu Lu
On 2023/7/25 1:21, Jason Gunthorpe wrote: This allows a driver to set a global static to an IDENTITY domain and the core code will automatically use it whenever an IDENTITY domain is requested. By making it always available it means the IDENTITY can be used in error handling paths to force the