Re: [PATCH v5] drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()

2023-09-22 Thread Christophe Leroy
Le 19/09/2023 à 16:25, Alexandra Diupina a écrit : > Process the result of hdlc_open() and call uhdlc_close() > in case of an error. It is necessary to pass the error > code up the control flow, similar to a possible > error in request_irq(). > Also add a hdlc_close() call to the uhdlc_close() >

Re: [PATCH v3 06/13] mm/execmem: introduce execmem_data_alloc()

2023-09-22 Thread Christophe Leroy
Le 22/09/2023 à 00:52, Song Liu a écrit : > On Mon, Sep 18, 2023 at 12:31 AM Mike Rapoport wrote: >> > [...] >> diff --git a/include/linux/execmem.h b/include/linux/execmem.h >> index 519bdfdca595..09d45ac786e9 100644 >> --- a/include/linux/execmem.h >> +++ b/include/linux/execmem.h >> @@ -29,6

Re: [PATCH v5] drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()

2023-09-22 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by David S. Miller : On Tue, 19 Sep 2023 17:25:02 +0300 you wrote: > Process the result of hdlc_open() and call uhdlc_close() > in case of an error. It is necessary to pass the error > code up the control flow, similar to a possible > error i

Re: [PATCH v4 1/5] fbdev: Avoid file argument in fb_pgprotect()

2023-09-22 Thread Thomas Zimmermann
Hi Javier Am 20.09.23 um 10:01 schrieb Javier Martinez Canillas: Thomas Zimmermann writes: Hello Thomas, Only PowerPC's fb_pgprotect() needs the file argument, although the implementation does not use it. Pass NULL to the internal Can you please mention the function that's the implementati

Re: [PATCH v1 8/8] arm64: hugetlb: Fix set_huge_pte_at() to work with all swap entries

2023-09-22 Thread Qi Zheng
Hi Ryan, On 2023/9/22 15:40, Ryan Roberts wrote: On 22/09/2023 03:54, Qi Zheng wrote: Hi Ryan, On 2023/9/22 00:20, Ryan Roberts wrote: When called with a swap entry that does not embed a PFN (e.g. PTE_MARKER_POISONED or PTE_MARKER_UFFD_WP), the previous implementation of set_huge_pte_at() wou

[PATCH v1 7/8] arm64: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Ryan Roberts
In order to fix a bug, arm64 needs access to the vma inside it's implementation of set_huge_pte_at(). Provide for this by converting the mm parameter to be a vma. Any implementations that require the mm can access it via vma->vm_mm. This commit makes the required arm64 modifications. Separate comm

[PATCH v1 1/8] parisc: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Ryan Roberts
In order to fix a bug, arm64 needs access to the vma inside it's implementation of set_huge_pte_at(). Provide for this by converting the mm parameter to be a vma. Any implementations that require the mm can access it via vma->vm_mm. This commit makes the required parisc modifications. Separate com

[PATCH v1 3/8] riscv: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Ryan Roberts
In order to fix a bug, arm64 needs access to the vma inside it's implementation of set_huge_pte_at(). Provide for this by converting the mm parameter to be a vma. Any implementations that require the mm can access it via vma->vm_mm. This commit makes the required riscv modifications. Separate comm

[PATCH v1 8/8] arm64: hugetlb: Fix set_huge_pte_at() to work with all swap entries

2023-09-22 Thread Ryan Roberts
When called with a swap entry that does not embed a PFN (e.g. PTE_MARKER_POISONED or PTE_MARKER_UFFD_WP), the previous implementation of set_huge_pte_at() would either cause a BUG() to fire (if CONFIG_DEBUG_VM is enabled) or cause a dereference of an invalid address and subsequent panic. arm64's h

[PATCH v1 6/8] mm: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Ryan Roberts
In order to fix a bug, arm64 needs access to the vma inside it's implementation of set_huge_pte_at(). Provide for this by converting the mm parameter to be a vma. Any implementations that require the mm can access it via vma->vm_mm. This commit makes the required modifications to the core mm. Sepa

[PATCH v1 2/8] powerpc: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Ryan Roberts
In order to fix a bug, arm64 needs access to the vma inside it's implementation of set_huge_pte_at(). Provide for this by converting the mm parameter to be a vma. Any implementations that require the mm can access it via vma->vm_mm. This commit makes the required powerpc modifications. Separate co

[PATCH v1 4/8] s390: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Ryan Roberts
In order to fix a bug, arm64 needs access to the vma inside it's implementation of set_huge_pte_at(). Provide for this by converting the mm parameter to be a vma. Any implementations that require the mm can access it via vma->vm_mm. This commit makes the required s390 modifications. Separate commi

[PATCH v1 5/8] sparc: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Ryan Roberts
In order to fix a bug, arm64 needs access to the vma inside it's implementation of set_huge_pte_at(). Provide for this by converting the mm parameter to be a vma. Any implementations that require the mm can access it via vma->vm_mm. This commit makes the required sparc modifications. Separate comm

[PATCH v1 0/8] Fix set_huge_pte_at() panic on arm64

2023-09-22 Thread Ryan Roberts
Hi All, This series fixes a bug in arm64's implementation of set_huge_pte_at(), which can result in an unprivileged user causing a kernel panic. The problem was triggered when running the new uffd poison mm selftest for HUGETLB memory. This test (and the uffd poison feature) was merged for v6.6-rc

Re: [PATCH v1 0/8] Fix set_huge_pte_at() panic on arm64

2023-09-22 Thread Ryan Roberts
On 21/09/2023 17:30, Andrew Morton wrote: > On Thu, 21 Sep 2023 17:19:59 +0100 Ryan Roberts wrote: > >> Hi All, >> >> This series fixes a bug in arm64's implementation of set_huge_pte_at(), which >> can result in an unprivileged user causing a kernel panic. The problem was >> triggered when runni

Re: [PATCH v1 2/8] powerpc: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Ryan Roberts
On 22/09/2023 07:44, Christophe Leroy wrote: > > > Le 21/09/2023 à 20:43, Christophe Leroy a écrit : >> >> >> Le 21/09/2023 à 18:20, Ryan Roberts a écrit : >>> In order to fix a bug, arm64 needs access to the vma inside it's >>> implementation of set_huge_pte_at(). Provide for this by converting

Re: [PATCH v1 2/8] powerpc: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Ryan Roberts
On 22/09/2023 07:56, Christophe Leroy wrote: > > > Le 21/09/2023 à 18:20, Ryan Roberts a écrit : >> In order to fix a bug, arm64 needs access to the vma inside it's >> implementation of set_huge_pte_at(). Provide for this by converting the >> mm parameter to be a vma. Any implementations that req

Re: [PATCH v1 8/8] arm64: hugetlb: Fix set_huge_pte_at() to work with all swap entries

2023-09-22 Thread Ryan Roberts
On 22/09/2023 03:54, Qi Zheng wrote: > Hi Ryan, > > On 2023/9/22 00:20, Ryan Roberts wrote: >> When called with a swap entry that does not embed a PFN (e.g. >> PTE_MARKER_POISONED or PTE_MARKER_UFFD_WP), the previous implementation >> of set_huge_pte_at() would either cause a BUG() to fire (if >>

Re: [PATCH v1 0/8] Fix set_huge_pte_at() panic on arm64

2023-09-22 Thread Ryan Roberts
On 21/09/2023 18:38, Catalin Marinas wrote: > On Thu, Sep 21, 2023 at 05:35:54PM +0100, Ryan Roberts wrote: >> On 21/09/2023 17:30, Andrew Morton wrote: >>> On Thu, 21 Sep 2023 17:19:59 +0100 Ryan Roberts >>> wrote: Ryan Roberts (8): parisc: hugetlb: Convert set_huge_pte_at() to take

[PATCH v6 00/30] Add support for QMC HDLC, framer infrastructure and PEF2256 framer

2023-09-22 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 c

[PATCH v6 01/30] soc: fsl: cpm1: tsa: Fix __iomem addresses declaration

2023-09-22 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 o

[PATCH v6 02/30] soc: fsl: cpm1: qmc: Fix __iomem addresses declaration

2023-09-22 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 va

[PATCH v6 03/30] soc: fsl: cpm1: qmc: Fix rx channel reset

2023-09-22 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 stat

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

2023-09-22 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. K

[PATCH v6 05/30] soc: fsl: cpm1: qmc: Remove inline function specifiers

2023-09-22 Thread Herve Codina
The inline function specifier is present on some functions but it is better to let the compiler decide inlining or not these functions. Remove inline specifiers. Fixes: 3178d58e0b97 ("soc: fsl: cpm1: Add support for QMC") Signed-off-by: Herve Codina Suggested-by: Andrew Lunn Reviewed-by: Christ

[PATCH v6 06/30] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Fix example property name

2023-09-22 Thread Herve Codina
The given example mentions the 'fsl,mode' property whereas the correct property name, the one described, is 'fsl,operational-mode'. Fix the example to use the correct property name. Fixes: a9b121327c93 ("dt-bindings: soc: fsl: cpm_qe: Add QMC controller") Signed-off-by: Herve Codina Acked-by: Co

Re: [PATCH] powerpc/stacktrace: Fix arch_stack_walk_reliable()

2023-09-22 Thread Petr Mladek
On Fri 2023-09-22 09:24:41, Michael Ellerman wrote: > The changes to copy_thread() made in commit eed7c420aac7 ("powerpc: > copy_thread differentiate kthreads and user mode threads") inadvertently > broke arch_stack_walk_reliable() because it has knowledge of the stack > layout. > > Fix it by chan

[PATCH v6 07/30] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Add 'additionalProperties: false' in child nodes

2023-09-22 Thread Herve Codina
Additional properties in child node should not be allowed. Prevent them adding 'additionalProperties: false' Signed-off-by: Herve Codina Acked-by: Conor Dooley Acked-by: Rob Herring --- .../devicetree/bindings/soc/fsl/cpm_qe/fsl,cpm1-scc-qmc.yaml | 1 + 1 file changed, 1 insertion(+) dif

[PATCH v6 08/30] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Add support for QMC HDLC

2023-09-22 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. Additionally, a framer can be connected to the QMC HDLC. If present, this framer is the interface between the TDM bus used by the QMC HD

[PATCH v6 09/30] soc: fsl: cpm1: qmc: Add support for child devices

2023-09-22 Thread Herve Codina
QMC child devices support is needed to avoid orphan DT nodes that use a simple DT phandle to reference a QMC channel. Allow to instantiate child devices and also extend the API to get the qmc_chan using a child device. Signed-off-by: Herve Codina --- drivers/soc/fsl/qe/qmc.c | 91 ++

[PATCH v6 10/30] net: wan: Add support for QMC HDLC

2023-09-22 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 Reviewed-by: Christophe Leroy --- drivers/net/wan/Kconfig| 12 + drivers/net/wan/Makefile | 1 + drivers/net/wan/fsl_qmc_hdlc.c | 4

[PATCH v6 11/30] MAINTAINERS: Add the Freescale QMC HDLC driver entry

2023-09-22 Thread Herve Codina
After contributing the driver, add myself as the maintainer for the Freescale QMC HDLC driver. Signed-off-by: Herve Codina --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 90f13281d297..8b987f2c8633 100644 --- a/MAINTAINERS +++ b/MAINTAIN

[PATCH v6 12/30] soc: fsl: cpm1: qmc: Introduce available timeslots masks

2023-09-22 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 v6 13/30] soc: fsl: cpm1: qmc: Rename qmc_setup_tsa* to qmc_init_tsa*

2023-09-22 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 Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc

[PATCH v6 14/30] soc: fsl: cpm1: qmc: Introduce qmc_chan_setup_tsa*

2023-09-22 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 Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 161 ++- 1 file changed, 125 insertions(+),

[PATCH v6 15/30] soc: fsl: cpm1: qmc: Remove no more needed checks from qmc_check_chans()

2023-09-22 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 Reviewed-by: Christophe Leroy --- drivers/soc/fsl

[PATCH v6 16/30] soc: fsl: cpm1: qmc: Check available timeslots in qmc_check_chans()

2023-09-22 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 availab

[PATCH v6 17/30] soc: fsl: cpm1: qmc: Add support for disabling channel TSA entries

2023-09-22 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 Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletio

[PATCH v6 18/30] soc: fsl: cpm1: qmc: Split Tx and Rx TSA entries setup

2023-09-22 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 Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c

[PATCH v6 19/30] soc: fsl: cpm1: qmc: Introduce is_tsa_64rxtx flag

2023-09-22 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. It

[PATCH v6 20/30] soc: fsl: cpm1: qmc: Handle timeslot entries at channel start() and stop()

2023-09-22 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 Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 175 --- 1 file changed, 16

[PATCH v6 21/30] soc: fsl: cpm1: qmc: Remove timeslots handling from setup_chan()

2023-09-22 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 Reviewed-by: Christophe Leroy --- drivers/soc/fsl/qe/qmc.c | 28 1 file chan

[PATCH v6 22/30] soc: fsl: cpm1: qmc: Introduce functions to change timeslots at runtime

2023-09-22 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 Cod

[PATCH v6 23/30] wan: qmc_hdlc: Add runtime timeslots changes support

2023-09-22 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 Reviewed-by: Christophe Leroy --- drivers/net/wan/fsl_qmc_hdlc.c | 169 +++

[PATCH v6 24/30] net: wan: Add framer framework support

2023-09-22 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 v6 25/30] dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer

2023-09-22 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 Reviewed-by: Christophe Leroy --- .../bindings/net/lantiq,pef2256.yaml | 21

[PATCH v6 26/30] net: wan: framer: Add support for the Lantiq PEF2256 framer

2023-09-22 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 Reviewed-by: Christophe Leroy Reviewed-by: Linus Walleij --- drivers/net/wan/framer

[PATCH v6 27/30] pinctrl: Add support for the Lantic PEF2256 pinmux

2023-09-22 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 kind of component can be found in old telecommunication system. It was used to digital transmission of many si

[PATCH v6 28/30] MAINTAINERS: Add the Lantiq PEF2256 driver entry

2023-09-22 Thread Herve Codina
After contributing the driver, add myself as the maintainer for the Lantiq PEF2256 driver. Signed-off-by: Herve Codina Reviewed-by: Christophe Leroy --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8b987f2c8633..d8f2433e326e 100644 ---

[PATCH v6 29/30] ASoC: codecs: Add support for the framer codec

2023-09-22 Thread Herve Codina
The framer codec interacts 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 Reviewed-by: Christo

[PATCH v6 30/30] net: wan: fsl_qmc_hdlc: Add framer support

2023-09-22 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 v5 1/5] fbdev: Avoid file argument in fb_pgprotect()

2023-09-22 Thread Thomas Zimmermann
Only PowerPC's fb_pgprotect() needs the file argument, although the implementation in either phys_mem_access_prot() or pci_phys_mem_access_prot() does not use it. Pass NULL to the internal helper in preparation of further updates. A later patch will remove the file parameter from fb_pgprotect(). W

[PATCH v5 2/5] fbdev: Replace fb_pgprotect() with pgprot_framebuffer()

2023-09-22 Thread Thomas Zimmermann
Rename the fbdev mmap helper fb_pgprotect() to pgprot_framebuffer(). The helper sets VMA page-access flags for framebuffers in device I/O memory. Also clean up the helper's parameters and return value. Instead of the VMA instance, pass the individial parameters separately: existing page-access fla

[PATCH v5 3/5] arch/powerpc: Remove trailing whitespaces

2023-09-22 Thread Thomas Zimmermann
Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Arnd Bergmann Reviewed-by: Philippe Mathieu-Daudé --- arch/powerpc/include/asm/machdep.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/powerpc/include/asm/machdep.h b/a

[PATCH v5 0/5] ppc, fbdev: Clean up fbdev mmap helper

2023-09-22 Thread Thomas Zimmermann
Clean up and rename fb_pgprotect() to work without struct file. Then refactor the implementation for PowerPC. This change has been discussed at [1] in the context of refactoring fbdev's mmap code. The first two patches update fbdev and replace fbdev's fb_pgprotect() with pgprot_framebuffer() on al

[PATCH v5 5/5] arch/powerpc: Call internal __phys_mem_access_prot() in fbdev code

2023-09-22 Thread Thomas Zimmermann
Call __phys_mem_access_prot() from the fbdev mmap helper pgprot_framebuffer(). Allows to avoid the file argument of NULL. Signed-off-by: Thomas Zimmermann Reviewed-by: Arnd Bergmann --- arch/powerpc/include/asm/fb.h | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/

[PATCH v5 4/5] arch/powerpc: Remove file parameter from phys_mem_access_prot code

2023-09-22 Thread Thomas Zimmermann
Remove 'file' parameter from struct machdep_calls.phys_mem_access_prot and its implementation in pci_phys_mem_access_prot(). The file is not used on PowerPC. By removing it, a later patch can simplify fbdev's mmap code, which uses phys_mem_access_prot() on PowerPC. Signed-off-by: Thomas Zimmermann

Re: [PATCH v1 2/8] powerpc: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Christophe Leroy
Le 22/09/2023 à 09:33, Ryan Roberts a écrit : > On 22/09/2023 07:56, Christophe Leroy wrote: >> >> >> Le 21/09/2023 à 18:20, Ryan Roberts a écrit : >>> In order to fix a bug, arm64 needs access to the vma inside it's >>> implementation of set_huge_pte_at(). Provide for this by converting the >>>

Re: [PATCH v1 3/8] riscv: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Alexandre Ghiti
Hi Ryan, On 21/09/2023 18:20, Ryan Roberts wrote: In order to fix a bug, arm64 needs access to the vma inside it's implementation of set_huge_pte_at(). Provide for this by converting the mm parameter to be a vma. Any implementations that require the mm can access it via vma->vm_mm. This commit

Re: [PATCH] powerpc: add `cur_cpu_spec` symbol to vmcoreinfo

2023-09-22 Thread Aditya Gupta
On Thu, Sep 21, 2023 at 07:30:00PM +1000, Michael Ellerman wrote: > On Mon, 11 Sep 2023 14:44:09 +0530, Aditya Gupta wrote: > > Presently, while reading a vmcore, makedumpfile uses > > `cur_cpu_spec.mmu_features` to decide whether the crashed system had > > RADIX MMU or not. > > > > Currently, mak

Re: [PATCH v5 2/5] fbdev: Replace fb_pgprotect() with pgprot_framebuffer()

2023-09-22 Thread Javier Martinez Canillas
Thomas Zimmermann writes: > Rename the fbdev mmap helper fb_pgprotect() to pgprot_framebuffer(). > The helper sets VMA page-access flags for framebuffers in device I/O > memory. > > Also clean up the helper's parameters and return value. Instead of > the VMA instance, pass the individial paramete

Re: [RFC PATCH v3 6/9] media: v4l2: Add audio capture and output support

2023-09-22 Thread Shengjiu Wang
On Wed, Sep 20, 2023 at 6:12 PM Hans Verkuil wrote: > > Hi Shengjiu, > > I just noticed you posted a v4, but I expect that my comments below are still > valid... > > On 14/09/2023 07:54, Shengjiu Wang wrote: > > Audio signal processing has the requirement for memory to > > memory similar as Video

Re: [PATCH v1 3/8] riscv: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Ryan Roberts
On 22/09/2023 08:54, Alexandre Ghiti wrote: > Hi Ryan, > > On 21/09/2023 18:20, Ryan Roberts wrote: >> In order to fix a bug, arm64 needs access to the vma inside it's >> implementation of set_huge_pte_at(). Provide for this by converting the >> mm parameter to be a vma. Any implementations that r

Re: [PATCH v1 2/8] powerpc: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Ryan Roberts
On 22/09/2023 09:10, Christophe Leroy wrote: > > > Le 22/09/2023 à 09:33, Ryan Roberts a écrit : >> On 22/09/2023 07:56, Christophe Leroy wrote: >>> >>> >>> Le 21/09/2023 à 18:20, Ryan Roberts a écrit : In order to fix a bug, arm64 needs access to the vma inside it's implementation of s

[powerpc:next] BUILD SUCCESS c945e6f453a361b0e9daddd2be9c099d1b80d6f8

2023-09-22 Thread kernel test robot
gcc arm allyesconfig gcc arm defconfig gcc arm randconfig-001-20230921 gcc arm randconfig-001-20230922 gcc arm64allmodconfig gcc arm64

Re: [RFC PATCH v4 09/11] media: uapi: Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control

2023-09-22 Thread Hans Verkuil
Hi Shengjiu, On 22/09/2023 04:51, Shengjiu Wang wrote: > On Thu, Sep 21, 2023 at 10:09 PM Hans Verkuil wrote: >> >> On 21/09/2023 13:13, Shengjiu Wang wrote: >>> On Thu, Sep 21, 2023 at 3:11 PM Hans Verkuil wrote: On 21/09/2023 08:55, Shengjiu Wang wrote: > On Wed, Sep 20, 2023 at

Re: [PATCH v3 06/13] mm/execmem: introduce execmem_data_alloc()

2023-09-22 Thread Song Liu
On Fri, Sep 22, 2023 at 12:17 AM Christophe Leroy wrote: > > > > Le 22/09/2023 à 00:52, Song Liu a écrit : > > On Mon, Sep 18, 2023 at 12:31 AM Mike Rapoport wrote: > >> > > [...] > >> diff --git a/include/linux/execmem.h b/include/linux/execmem.h > >> index 519bdfdca595..09d45ac786e9 100644 > >>

Re: [PATCH v1 2/8] powerpc: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Christophe Leroy
Le 22/09/2023 à 10:41, Ryan Roberts a écrit : > On 22/09/2023 09:10, Christophe Leroy wrote: >> >> >>> I'm happy to take your proposed approach if that's your preference. Another >>> option is to use a dummy VMA, as I have done in the core code, for the one >>> call >>> site that calls set_huge_

Re: [PATCH v1 0/8] Fix set_huge_pte_at() panic on arm64

2023-09-22 Thread Greg Kroah-Hartman
On Thu, Sep 21, 2023 at 05:35:54PM +0100, Ryan Roberts wrote: > On 21/09/2023 17:30, Andrew Morton wrote: > > On Thu, 21 Sep 2023 17:19:59 +0100 Ryan Roberts > > wrote: > > > >> Hi All, > >> > >> This series fixes a bug in arm64's implementation of set_huge_pte_at(), > >> which > >> can result

Re: [PATCH v1 8/8] arm64: hugetlb: Fix set_huge_pte_at() to work with all swap entries

2023-09-22 Thread Ryan Roberts
On 22/09/2023 08:54, Qi Zheng wrote: > Hi Ryan, > > On 2023/9/22 15:40, Ryan Roberts wrote: >> On 22/09/2023 03:54, Qi Zheng wrote: >>> Hi Ryan, >>> >>> On 2023/9/22 00:20, Ryan Roberts wrote: When called with a swap entry that does not embed a PFN (e.g. PTE_MARKER_POISONED or PTE_MARKER

Re: [PATCH v1 2/8] powerpc: hugetlb: Convert set_huge_pte_at() to take vma

2023-09-22 Thread Ryan Roberts
On 22/09/2023 10:14, Christophe Leroy wrote: > > > Le 22/09/2023 à 10:41, Ryan Roberts a écrit : >> On 22/09/2023 09:10, Christophe Leroy wrote: >>> >>> I'm happy to take your proposed approach if that's your preference. Another option is to use a dummy VMA, as I have done in the core c

Re: [PATCH v1 8/8] arm64: hugetlb: Fix set_huge_pte_at() to work with all swap entries

2023-09-22 Thread Qi Zheng
Hi Ryan, On 2023/9/22 17:35, Ryan Roberts wrote: On 22/09/2023 08:54, Qi Zheng wrote: Hi Ryan, On 2023/9/22 15:40, Ryan Roberts wrote: On 22/09/2023 03:54, Qi Zheng wrote: Hi Ryan, On 2023/9/22 00:20, Ryan Roberts wrote: When called with a swap entry that does not embed a PFN (e.g. PTE_MAR

Re: [PATCH] i2c: replace deprecated strncpy

2023-09-22 Thread Wolfram Sang
On Wed, Sep 20, 2023 at 11:07:35AM +, Justin Stitt wrote: > `strncpy` is deprecated for use on NUL-terminated destination strings [1]. > > We should prefer more robust and less ambiguous string interfaces. > > `info.type` is expected to be NUL-terminated judging by its use in > `i2c_new_clien

Re: [PATCH v3 06/13] mm/execmem: introduce execmem_data_alloc()

2023-09-22 Thread Christophe Leroy
Le 22/09/2023 à 10:55, Song Liu a écrit : > On Fri, Sep 22, 2023 at 12:17 AM Christophe Leroy > wrote: >> >> >> >> Le 22/09/2023 à 00:52, Song Liu a écrit : >>> On Mon, Sep 18, 2023 at 12:31 AM Mike Rapoport wrote: >>> [...] diff --git a/include/linux/execmem.h b/include/linux/execmem

Re: [PATCH v3 09/13] powerpc: extend execmem_params for kprobes allocations

2023-09-22 Thread Christophe Leroy
Hi Mike, Le 18/09/2023 à 09:29, Mike Rapoport a écrit : > From: "Mike Rapoport (IBM)" > > powerpc overrides kprobes::alloc_insn_page() to remove writable > permissions when STRICT_MODULE_RWX is on. > > Add definition of EXECMEM_KRPOBES to execmem_params to allow using the > generic kprobes::all

Re: [PATCH v3 08/13] riscv: extend execmem_params for generated code allocations

2023-09-22 Thread Alexandre Ghiti
Hi Mike, On 18/09/2023 09:29, Mike Rapoport wrote: From: "Mike Rapoport (IBM)" The memory allocations for kprobes and BPF on RISC-V are not placed in the modules area and these custom allocations are implemented with overrides of alloc_insn_page() and bpf_jit_alloc_exec(). Slightly reorder e

Re: [RFC PATCH v4 09/11] media: uapi: Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control

2023-09-22 Thread Shengjiu Wang
On Fri, Sep 22, 2023 at 4:54 PM Hans Verkuil wrote: > > Hi Shengjiu, > > On 22/09/2023 04:51, Shengjiu Wang wrote: > > On Thu, Sep 21, 2023 at 10:09 PM Hans Verkuil wrote: > >> > >> On 21/09/2023 13:13, Shengjiu Wang wrote: > >>> On Thu, Sep 21, 2023 at 3:11 PM Hans Verkuil wrote: > >

Re: [RFC PATCH v4 09/11] media: uapi: Add V4L2_CID_USER_IMX_ASRC_RATIO_MOD control

2023-09-22 Thread Hans Verkuil
On 22/09/2023 12:52, Shengjiu Wang wrote: > On Fri, Sep 22, 2023 at 4:54 PM Hans Verkuil wrote: >> >> Hi Shengjiu, >> >> On 22/09/2023 04:51, Shengjiu Wang wrote: >>> On Thu, Sep 21, 2023 at 10:09 PM Hans Verkuil wrote: On 21/09/2023 13:13, Shengjiu Wang wrote: > On Thu, Sep 21, 202

[PATCH v2 0/2] Fix set_huge_pte_at() panic on arm64

2023-09-22 Thread Ryan Roberts
Hi All, This series fixes a bug in arm64's implementation of set_huge_pte_at(), which can result in an unprivileged user causing a kernel panic. The problem was triggered when running the new uffd poison mm selftest for HUGETLB memory. This test (and the uffd poison feature) was merged for v6.5-rc

[PATCH v2 1/2] mm: hugetlb: Add huge page size param to set_huge_pte_at()

2023-09-22 Thread Ryan Roberts
In order to fix a bug, arm64 needs to be told the size of the huge page for which the pte is being set in set_huge_pte_at(). Provide for this by adding an `unsigned long sz` parameter to the function. This follows the same pattern as huge_pte_clear(). This commit makes the required interface modif

[PATCH v2 2/2] arm64: hugetlb: Fix set_huge_pte_at() to work with all swap entries

2023-09-22 Thread Ryan Roberts
When called with a swap entry that does not embed a PFN (e.g. PTE_MARKER_POISONED or PTE_MARKER_UFFD_WP), the previous implementation of set_huge_pte_at() would either cause a BUG() to fire (if CONFIG_DEBUG_VM is enabled) or cause a dereference of an invalid address and subsequent panic. arm64's h

[PATCH] powerpc: Only define __parse_fpscr() when required

2023-09-22 Thread Christophe Leroy
Clang 17 reports: arch/powerpc/kernel/traps.c:1167:19: error: unused function '__parse_fpscr' [-Werror,-Wunused-function] __parse_fpscr() is called from two sites. First call is guarded by #ifdef CONFIG_PPC_FPU_REGS Second call is guarded by CONFIG_MATH_EMULATION which selects CONFIG_PPC_FPU_RE

Re: [PATCH v6 25/30] dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer

2023-09-22 Thread Rob Herring
On Fri, 22 Sep 2023 09:59:00 +0200, Herve Codina wrote: > 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 > Reviewed-by: Chr

Re: [PATCH v2 1/2] mm: hugetlb: Add huge page size param to set_huge_pte_at()

2023-09-22 Thread Alexandre Ghiti
On 22/09/2023 13:58, Ryan Roberts wrote: In order to fix a bug, arm64 needs to be told the size of the huge page for which the pte is being set in set_huge_pte_at(). Provide for this by adding an `unsigned long sz` parameter to the function. This follows the same pattern as huge_pte_clear(). Thi

Re: [PATCH v6 25/30] dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer

2023-09-22 Thread Herve Codina
Hi Rob, On Fri, 22 Sep 2023 07:33:32 -0500 Rob Herring wrote: > On Fri, 22 Sep 2023 09:59:00 +0200, Herve Codina wrote: > > 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

Re: [PATCH v2 1/2] mm: hugetlb: Add huge page size param to set_huge_pte_at()

2023-09-22 Thread Ryan Roberts
On 22/09/2023 14:33, Alexandre Ghiti wrote: > On 22/09/2023 13:58, Ryan Roberts wrote: >> In order to fix a bug, arm64 needs to be told the size of the huge page >> for which the pte is being set in set_huge_pte_at(). Provide for this by >> adding an `unsigned long sz` parameter to the function. Th

Re: [RFC PATCH v12 07/33] KVM: Add KVM_EXIT_MEMORY_FAULT exit to report faults to userspace

2023-09-22 Thread Sean Christopherson
On Fri, Sep 22, 2023, Xiaoyao Li wrote: > On 9/14/2023 9:55 AM, Sean Christopherson wrote: > > From: Chao Peng > > > > Add a new KVM exit type to allow userspace to handle memory faults that > > KVM cannot resolve, but that userspace *may* be able to handle (without > > terminating the guest). >

Re: [PATCH v2 2/2] arm64: hugetlb: Fix set_huge_pte_at() to work with all swap entries

2023-09-22 Thread Will Deacon
On Fri, Sep 22, 2023 at 12:58:04PM +0100, Ryan Roberts wrote: > When called with a swap entry that does not embed a PFN (e.g. > PTE_MARKER_POISONED or PTE_MARKER_UFFD_WP), the previous implementation > of set_huge_pte_at() would either cause a BUG() to fire (if > CONFIG_DEBUG_VM is enabled) or caus

Re: [PATCH v2 2/2] arm64: hugetlb: Fix set_huge_pte_at() to work with all swap entries

2023-09-22 Thread Ryan Roberts
On 22/09/2023 17:14, Will Deacon wrote: > On Fri, Sep 22, 2023 at 12:58:04PM +0100, Ryan Roberts wrote: >> When called with a swap entry that does not embed a PFN (e.g. >> PTE_MARKER_POISONED or PTE_MARKER_UFFD_WP), the previous implementation >> of set_huge_pte_at() would either cause a BUG() to f

[PATCH 0/8] iommu: Convert dart & iommufd to the new domain_alloc_paging()

2023-09-22 Thread Jason Gunthorpe
Continue converting drivers to the new interface. Introduce ops->blocked_domain to hold the global static BLOCKED domain and convert all drivers supporting BLOCKED to use it. This makes it trivial for dart and iommufd to convert over to domain_alloc_paging(). There are six drivers remaining: dri

[PATCH 3/8] iommu/vt-d: Use ops->blocked_domain

2023-09-22 Thread Jason Gunthorpe
Trivially migrate to the ops->blocked_domain for the existing global static. Signed-off-by: Jason Gunthorpe --- drivers/iommu/intel/iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index 0d0cb2534972a2..b79188

[PATCH 2/8] iommu/vt-d: Update the definition of the blocking domain

2023-09-22 Thread Jason Gunthorpe
The global static should pre-define the type and the NOP free function can be now left as NULL. Signed-off-by: Jason Gunthorpe --- drivers/iommu/intel/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index c

[PATCH 1/8] iommu: Move IOMMU_DOMAIN_BLOCKED global statics to ops->blocked_domain

2023-09-22 Thread Jason Gunthorpe
Following the pattern of identity domains, just assign the BLOCKED domain global statics to a value in ops. Update the core code to use the global static directly. Update powerpc to use the new scheme and remove its empty domain_alloc callback. Signed-off-by: Jason Gunthorpe --- arch/powerpc/ke

[PATCH 4/8] iommufd: Convert to alloc_domain_paging()

2023-09-22 Thread Jason Gunthorpe
Move the global static blocked domain to the ops and convert the unmanaged domain to domain_alloc_paging. Signed-off-by: Jason Gunthorpe --- drivers/iommu/iommufd/selftest.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/iommufd/selftest.c b/drivers

[PATCH 8/8] iommu/dart: Call apple_dart_finalize_domain() as part of alloc_paging()

2023-09-22 Thread Jason Gunthorpe
In many cases the dev argument will now be !NULL so we should use it to finalize the domain at allocation. Make apple_dart_finalize_domain() accept the correct type. Signed-off-by: Jason Gunthorpe --- drivers/iommu/apple-dart.c | 26 ++ 1 file changed, 18 insertions(+),

[PATCH 6/8] iommu/dart: Move the blocked domain support to a global static

2023-09-22 Thread Jason Gunthorpe
Move to the new static global for blocked domains. Move the blocked specific code to apple_dart_attach_dev_blocked(). Signed-off-by: Jason Gunthorpe --- drivers/iommu/apple-dart.c | 36 ++-- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/drivers/i

[PATCH 7/8] iommu/dart: Convert to domain_alloc_paging()

2023-09-22 Thread Jason Gunthorpe
Since the IDENTITY and BLOCKED behaviors were moved to global statics all that remains is the paging domain. Rename to apple_dart_attach_dev_paging() and remove the left over cruft. Signed-off-by: Jason Gunthorpe --- drivers/iommu/apple-dart.c | 33 +++-- 1 file chang

[PATCH 5/8] iommu/dart: Use static global identity domains

2023-09-22 Thread Jason Gunthorpe
Move to the new static global for identity domains. Move the identity specific code to apple_dart_attach_dev_identity(). Signed-off-by: Jason Gunthorpe --- drivers/iommu/apple-dart.c | 41 -- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/driv

Re: [PATCH v6 25/30] dt-bindings: net: Add the Lantiq PEF2256 E1/T1/J1 framer

2023-09-22 Thread Rob Herring
On Fri, Sep 22, 2023 at 8:46 AM Herve Codina wrote: > > Hi Rob, > > On Fri, 22 Sep 2023 07:33:32 -0500 > Rob Herring wrote: > > > On Fri, 22 Sep 2023 09:59:00 +0200, Herve Codina wrote: > > > The Lantiq PEF2256 is a framer and line interface component designed to > > > fulfill all required interf

Re: [PATCH v6 08/30] dt-bindings: soc: fsl: cpm_qe: cpm1-scc-qmc: Add support for QMC HDLC

2023-09-22 Thread Rob Herring
On Fri, 22 Sep 2023 09:58:43 +0200, Herve Codina wrote: > 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. > > Additionally, a framer can be connected to the QMC HDLC. > If presen

  1   2   >