Re: [PATCH v2] tty: Explicitly include correct DT includes

2023-07-24 Thread Uwe Kleine-König
Hello Rob, On Mon, Jul 24, 2023 at 02:54:38PM -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" incl

[RFC PATCH v2 7/7] ASoC: fsl_easrc: register m2m platform device

2023-07-24 Thread Shengjiu Wang
Register m2m platform device,that user can use M2M feature. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 13 + 1 file changed, 13 insertions(+) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index b735b24badc2..b5befefa8fbe 100644 --- a/sound/soc/

[RFC PATCH v2 6/7] ASoC: fsl_asrc: register m2m platform device

2023-07-24 Thread Shengjiu Wang
Register m2m platform device, that user can use M2M feature. Signed-off-by: Shengjiu Wang --- include/sound/fsl_asrc_common.h | 2 ++ sound/soc/fsl/fsl_asrc.c| 12 2 files changed, 14 insertions(+) diff --git a/include/sound/fsl_asrc_common.h b/include/sound/fsl_asrc_commo

[RFC PATCH v2 5/7] media: imx: fsl_asrc: Add memory to memory driver

2023-07-24 Thread Shengjiu Wang
Implement the ASRC memory to memory function using the v4l2 framework, user can use this function with v4l2 ioctl interface. User send the output and capture buffer to driver and driver store the converted data to the capture buffer. This feature can be shared by ASRC and EASRC drivers Signed-of

[RFC PATCH v2 4/7] media: v4l2: Add audio capture and output support

2023-07-24 Thread Shengjiu Wang
Audio signal processing has the requirement for memory to memory similar as Video. This patch is to add this support in v4l2 framework, defined new buffer type V4L2_BUF_TYPE_AUDIO_CAPTURE and V4L2_BUF_TYPE_AUDIO_OUTPUT, defined new format v4l2_audio_format for audio case usage. The created audio

[RFC PATCH v2 3/7] ASoC: fsl_asrc: move fsl_asrc_common.h to include/sound

2023-07-24 Thread Shengjiu Wang
Move fsl_asrc_common.h to include/sound that it can be included from other drivers. Signed-off-by: Shengjiu Wang --- {sound/soc/fsl => include/sound}/fsl_asrc_common.h | 0 sound/soc/fsl/fsl_asrc.h | 2 +- sound/soc/fsl/fsl_asrc_dma.c | 2 +- sound

[RFC PATCH v2 2/7] ASoC: fsl_easrc: define functions for memory to memory usage

2023-07-24 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage and export them as function pointer. Signed-off-by: Shengjiu Wang --- sound/soc/fsl/fsl_easrc.c | 214 ++ sound/soc/fsl/fsl_easrc.h | 6 ++ 2 files changed, 220 insertions(+)

[RFC PATCH v2 1/7] ASoC: fsl_asrc: define functions for memory to memory usage

2023-07-24 Thread Shengjiu Wang
ASRC can be used on memory to memory case, define several functions for m2m usage. m2m_start_part_one: first part of the start steps m2m_start_part_two: second part of the start steps m2m_stop_part_one: first part of stop steps m2m_stop_part_two: second part of stop steps m2m_check_format: check f

[RFC PATCH v2 0/7] Add audio support in v4l2 framework

2023-07-24 Thread Shengjiu Wang
Audio signal processing has the requirement for memory to memory similar as Video. This patch is to add this support in v4l2 framework, defined new buffer type V4L2_BUF_TYPE_AUDIO_CAPTURE and V4L2_BUF_TYPE_AUDIO_OUTPUT, defined new format v4l2_audio_format for audio case usage. The created audio

[PATCH 1/1] perf tests task_analyzer: Check perf build options for libtraceevent support

2023-07-24 Thread Aditya Gupta
Currently we depend on output of 'perf record -e "sched:sched_switch"', to check whether perf was built with libtraceevent support. Instead, a more straightforward approach can be to check the build options, using 'perf version --build-options', to check for libtraceevent support. When perf is co

Re: [PATCH v3 00/10] Add sysfs interface files to hv_gpci device to expose system information

2023-07-24 Thread Athira Rajeev
> On 19-Jul-2023, at 11:42 AM, Kajol Jain wrote: > > The hcall H_GET_PERF_COUNTER_INFO can be used to get data related to > chips, dimms and system topology, by passing different counter request > values. > Patchset adds sysfs files to "/sys/devices/hv_gpci/interface/" > of hv_gpci pmu driver,

Re: [PATCH v2 3/5] mmu_notifiers: Call invalidate_range() when invalidating TLBs

2023-07-24 Thread Alistair Popple
Michael Ellerman writes: > Alistair Popple writes: >> The invalidate_range() is going to become an architecture specific mmu >> notifier used to keep the TLB of secondary MMUs such as an IOMMU in >> sync with the CPU page tables. Currently it is called from separate >> code paths to the main C

Re: [PATCH V2 00/26] tools/perf: Fix shellcheck coding/formatting issues of perf tool shell scripts

2023-07-24 Thread Athira Rajeev
> On 20-Jul-2023, at 10:48 AM, kajoljain wrote: > > > > On 7/20/23 10:42, Athira Rajeev wrote: >> >> >>> On 19-Jul-2023, at 11:16 PM, Ian Rogers wrote: >>> >>> On Tue, Jul 18, 2023 at 11:17 PM kajoljain wrote: Hi, Looking for review comments on this patchset.

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

2023-07-24 Thread Hugh Dickins
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 ptdesc, splits ptdesc from struct page, and > converts many callers of page ta

[Bug 217702] makedumpfile can not open /proc/vmcore

2023-07-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=217702 Michael Ellerman (mich...@ellerman.id.au) changed: What|Removed |Added Status|NEW |RESOLVED

[PATCH mm-unstable v7 31/31] mm: Remove pgtable_{pmd, pte}_page_{ctor, dtor}() wrappers

2023-07-24 Thread Vishal Moola (Oracle)
These functions are no longer necessary. Remove them and cleanup Documentation referencing them. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- Documentation/mm/split_page_table_lock.rst| 12 +-- .../zh_CN/mm/split_page_table_lock.rst| 14 ++--

[PATCH mm-unstable v7 30/31] um: Convert {pmd, pte}_free_tlb() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Also cleans up some spacing issues. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- arch/um/include/asm/pgalloc.h | 18 +- 1 file changed, 9 insertions(+), 9 deleti

[PATCH mm-unstable v7 29/31] sparc: Convert pgtable_pte_page_{ctor, dtor}() to ptdesc equivalents

2023-07-24 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable pte constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- arch/sparc/mm/srmmu.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/sparc/mm/srmmu.c b/arch/spar

[PATCH mm-unstable v7 28/31] sparc64: Convert various functions to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- arch/sparc/mm/init_64.c | 17 + 1 file changed, 9 insertions

[PATCH mm-unstable v7 27/31] sh: Convert pte_free_tlb() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Also cleans up some spacing issues. Signed-off-by: Vishal Moola (Oracle) Reviewed-by: Geert Uytterhoeven Acked-by: John Paul Adrian Glaubitz Acked-by: Mike Rapoport (IBM) --- arch/sh/include/asm/pgallo

[PATCH mm-unstable v7 26/31] riscv: Convert alloc_{pmd, pte}_late() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH mm-unstable v7 25/31] openrisc: Convert __pte_free_tlb() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- arch/openrisc/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/openrisc/includ

[PATCH mm-unstable v7 24/31] nios2: Convert __pte_free_tlb() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) Acked-by: Dinh Nguyen --- arch/nios2/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/

[PATCH mm-unstable v7 23/31] mips: Convert various functions to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH mm-unstable v7 22/31] m68k: Convert various functions to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH mm-unstable v7 21/31] loongarch: Convert various functions to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH mm-unstable v7 20/31] hexagon: Convert __pte_free_tlb() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- arch/hexagon/include/asm/pgalloc.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/hexagon/include/

[PATCH mm-unstable v7 19/31] csky: Convert __pte_free_tlb() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
Part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents. Signed-off-by: Vishal Moola (Oracle) Acked-by: Guo Ren Acked-by: Mike Rapoport (IBM) --- arch/csky/include/asm/pgalloc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/csky

[PATCH mm-unstable v7 18/31] arm64: Convert various functions to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) Acked-by: Catalin Marinas --- arch/arm64/include/asm/tlb.h | 14 --

[PATCH mm-unstable v7 17/31] arm: Convert various functions to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. late_alloc() also uses the __get_free_pages() helper function. Convert this to use pagetable_alloc() and ptdesc_address() instead to help standardize

[PATCH mm-unstable v7 16/31] pgalloc: Convert various functions to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH mm-unstable v7 15/31] mm: Remove page table members from struct page

2023-07-24 Thread Vishal Moola (Oracle)
The page table members are now split out into their own ptdesc struct. Remove them from struct page. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linux/mm_types.h | 18 -- include/linux/pgtable.h | 3 --- 2 files changed, 21 deletions(-) diff

[PATCH mm-unstable v7 14/31] s390: Convert various pgalloc functions to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
As part of the conversions to replace pgtable constructor/destructors with ptdesc equivalents, convert various page table functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize p

[PATCH mm-unstable v7 13/31] x86: Convert various functions to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
In order to split struct ptdesc from struct page, convert various functions to use ptdescs. Some of the functions use the *get*page*() helper functions. Convert these to use pagetable_alloc() and ptdesc_address() instead to help standardize page tables further. Signed-off-by: Vishal Moola (Oracle

[PATCH mm-unstable v7 12/31] powerpc: Convert various functions to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
In order to split struct ptdesc from struct page, convert various functions to use ptdescs. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- arch/powerpc/mm/book3s64/mmu_context.c | 10 ++--- arch/powerpc/mm/book3s64/pgtable.c | 32 +++ arch/powerpc/mm/pgta

[PATCH mm-unstable v7 11/31] mm: Create ptdesc equivalents for pgtable_{pte,pmd}_page_{ctor,dtor}

2023-07-24 Thread Vishal Moola (Oracle)
Create pagetable_pte_ctor(), pagetable_pmd_ctor(), pagetable_pte_dtor(), and pagetable_pmd_dtor() and make the original pgtable constructor/destructors wrappers. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linux/mm.h | 56 ++

[PATCH mm-unstable v7 10/31] mm: Convert ptlock_free() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linux/mm.h | 10 +- mm/memory.c| 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(

[PATCH mm-unstable v7 09/31] mm: Convert pmd_ptlock_free() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linux/mm.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/

[PATCH mm-unstable v7 08/31] mm: Convert ptlock_init() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linux/mm.h | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/li

[PATCH mm-unstable v7 07/31] mm: Convert pmd_ptlock_init() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linux/mm.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/linux/

[PATCH mm-unstable v7 06/31] mm: Convert ptlock_ptr() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- arch/x86/xen/mmu_pv.c | 2 +- include/linux/mm.h| 14 +++--- 2 files changed, 8 insertions(+), 8 de

[PATCH mm-unstable v7 05/31] mm: Convert ptlock_alloc() to use ptdescs

2023-07-24 Thread Vishal Moola (Oracle)
This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linux/mm.h | 6 +++--- mm/memory.c| 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) di

[PATCH mm-unstable v7 04/31] mm: Convert pmd_pgtable_page() callers to use pmd_ptdesc()

2023-07-24 Thread Vishal Moola (Oracle)
Converts internal pmd_pgtable_page() callers to use pmd_ptdesc(). This removes some direct accesses to struct page, working towards splitting out struct ptdesc from struct page. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linux/mm.h | 4 ++-- 1 file changed, 2

[PATCH mm-unstable v7 03/31] mm: add utility functions for ptdesc

2023-07-24 Thread Vishal Moola (Oracle)
Introduce utility functions setting the foundation for ptdescs. These will also assist in the splitting out of ptdesc from struct page. Functions that focus on the descriptor are prefixed with ptdesc_* while functions that focus on the pagetable are prefixed with pagetable_*. pagetable_alloc() is

[PATCH mm-unstable v7 02/31] pgtable: Create struct ptdesc

2023-07-24 Thread Vishal Moola (Oracle)
Currently, page table information is stored within struct page. As part of simplifying struct page, create struct ptdesc for page table information. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linux/pgtable.h | 71 + 1 f

[PATCH mm-unstable v7 01/31] mm: Add PAGE_TYPE_OP folio functions

2023-07-24 Thread Vishal Moola (Oracle)
No folio equivalents for page type operations have been defined, so define them for later folio conversions. Also changes the Page##uname macros to take in const struct page* since we only read the memory here. Signed-off-by: Vishal Moola (Oracle) Acked-by: Mike Rapoport (IBM) --- include/linu

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

2023-07-24 Thread Vishal Moola (Oracle)
The MM subsystem is trying to shrink struct page. This patchset introduces a memory descriptor for page table tracking - struct ptdesc. This patchset introduces ptdesc, splits ptdesc from struct page, and converts many callers of page table constructor/destructors to use ptdescs. Ptdesc is a foun

Re: [PATCH v2 3/5] mmu_notifiers: Call invalidate_range() when invalidating TLBs

2023-07-24 Thread Michael Ellerman
Alistair Popple writes: > The invalidate_range() is going to become an architecture specific mmu > notifier used to keep the TLB of secondary MMUs such as an IOMMU in > sync with the CPU page tables. Currently it is called from separate > code paths to the main CPU TLB invalidations. This can lead

[Bug 217702] New: makedumpfile can not open /proc/vmcore

2023-07-24 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=217702 Bug ID: 217702 Summary: makedumpfile can not open /proc/vmcore Product: Platform Specific/Hardware Version: 2.5 Hardware: All OS: Linux Status: NEW Severi

[PATCH v3 1/1] ASoC: imx-audmux: fix return value checks of clk_prepare_enable()

2023-07-24 Thread Yuanjun Gong
check the return value of clk_prepare_enable(), and if clk_prepare_enable() gets an unexpected return value, imx_audmux_suspend() and imx_audmux_resume() should return the error value. Signed-off-by: Yuanjun Gong --- sound/soc/fsl/imx-audmux.c | 12 1 file changed, 8 insertions(+),

[PATCH v1 3/4] selftests/powerpc/ptrace: Fix typo in pid_max search error

2023-07-24 Thread Benjamin Gray
pid_max_addr() searches for the 'pid_max' symbol in /proc/kallsyms, and prints an error if it cannot find it. The error message has a typo, calling it pix_max. Signed-off-by: Benjamin Gray --- tools/testing/selftests/powerpc/ptrace/ptrace-perf-hwbreak.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v1 2/4] selftests/powerpc/ptrace: Explain why tests are skipped

2023-07-24 Thread Benjamin Gray
Many tests require specific hardware features/configurations that a typical machine might not have. As a result, it's common to see a test is skipped. But it is tedious to find out why a test is skipped when all it gives is the file location of the skip macro. Convert SKIP_IF() to SKIP_IF_MSG(), w

[PATCH v1 4/4] selftests/powerpc/ptrace: Declare test temporary variables as volatile

2023-07-24 Thread Benjamin Gray
While the target is volatile, the temporary variables used to access the target cast away the volatile. This is undefined behaviour, and a compiler may optimise away/reorder these accesses, breaking the test. This was observed with GCC 13.1.1, but it can be difficult to reproduce because of the de

[PATCH v1 1/4] Documentation/powerpc: Fix ptrace request names

2023-07-24 Thread Benjamin Gray
The documented ptrace request names are currently wrong/incomplete. Fix this to improve correctness and searchability. Signed-off-by: Benjamin Gray --- Documentation/powerpc/ptrace.rst | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/powerpc/ptrace.rst b/

[PATCH v1 0/4] Improve ptrace selftest usability

2023-07-24 Thread Benjamin Gray
While trying to test changes to the breakpoint implementation in the kernel, I tried to run the ptrace tests and met many unexplained skips and failures. This series addresses the pain points of trying to run these tests and learn what they are doing. Benjamin Gray (4): Documentation/powerpc: F

[PATCH] powerpc: Use shared font data

2023-07-24 Thread linux
From: "Dr. David Alan Gilbert" PowerPC has a 'btext' font used for the console which is almost identical to the shared font_sun8x16, so use it rather than duplicating the data. They were actually identical until about a decade ago when commit bcfbeecea11c ("drivers: console: font_: Change a g

Re: [PATCH v2 3/5] mmu_notifiers: Call invalidate_range() when invalidating TLBs

2023-07-24 Thread Alistair Popple
. This patch fixes that regression [0]. This should also close out > the syzbot crash too [1] > > [0] https://gist.github.com/mcgrof/b37fc8cf7e6e1b3935242681de1a83e2 > [1] https://lore.kernel.org/all/3afcb4060135a...@google.com/ > > Tested-by: Luis Chamberlain Thanks Luis. The above fix/respin is already in yesterdays linux-next (next-20230724) so hopefully you are no longer seeing issues. > Luis

Re: linux-next: Tree for Jul 24 (arch/powerpc/platforms/embedded6xx/mvme5100.c)

2023-07-24 Thread Randy Dunlap
On 7/23/23 21:08, Stephen Rothwell wrote: > Hi all, > > Changes since 20230721: > on ppc32: ../arch/powerpc/platforms/embedded6xx/mvme5100.c: In function 'mvme5100_add_bridge': ../arch/powerpc/platforms/embedded6xx/mvme5100.c:135:65: error: passing argument 5 of 'early_read_config_dword' fr

Re: [PATCH v5 14/25] iommu/msm: Implement an IDENTITY domain

2023-07-24 Thread Dmitry Baryshkov
On 24/07/2023 20:22, Jason Gunthorpe wrote: What msm does during omap_iommu_set_platform_dma() is actually putting the typo: msm driver doesn't use/provide omap_iommu_set_platform_dma(). iommu into identity mode. Move to the new core support for ARM_DMA_USE_IOMMU by defining ops->identity_do

Re: [PATCH] tools/perf: Fix addr location init during arch_skip_callchain_idx function

2023-07-24 Thread Arnaldo Carvalho de Melo
Em Mon, Jul 24, 2023 at 10:28:15PM +0530, Athira Rajeev escreveu: > perf record with callchain recording fails as below > in powerpc: > > ./perf record -a -gR sleep 10 > ./perf report > perf: Segmentation fault > > gdb trace points to thread__find_map > > 0 0x101df314 in

[PATCH v3] powerpc: Explicitly include correct DT includes

2023-07-24 Thread Rob Herring
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" include each other. They also include platform_device.h and of.h. As a result, there'

[PATCH v2] soc: fsl: Explicitly include correct DT includes

2023-07-24 Thread Rob Herring
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" include each other. They also include platform_device.h and of.h. As a result, there'

[PATCH v2] tty: Explicitly include correct DT includes

2023-07-24 Thread Rob Herring
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" include each other. They also include platform_device.h and of.h. As a result, there'

[PATCH v6 02/13] mm: Change pudp_huge_get_and_clear_full take vm_area_struct as arg

2023-07-24 Thread Aneesh Kumar K.V
We will use this in a later patch to do tlb flush when clearing pud entries on powerpc. This is similar to commit 93a98695f2f9 ("mm: change pmdp_huge_get_and_clear_full take vm_area_struct as arg") Reviewed-by: Christophe Leroy Signed-off-by: Aneesh Kumar K.V --- include/linux/pgtable.h | 4 ++-

[PATCH v6 06/13] mm/huge pud: Use transparent huge pud helpers only with CONFIG_TRANSPARENT_HUGEPAGE

2023-07-24 Thread Aneesh Kumar K.V
pudp_set_wrprotect and move_huge_pud helpers are only used when CONFIG_TRANSPARENT_HUGEPAGE is enabled. Similar to pmdp_set_wrprotect and move_huge_pmd_helpers use architecture override only if CONFIG_TRANSPARENT_HUGEPAGE is set Reviewed-by: Christophe Leroy Signed-off-by: Aneesh Kumar K.V ---

[PATCH v6 12/13] powerpc/book3s64/radix: Remove mmu_vmemmap_psize

2023-07-24 Thread Aneesh Kumar K.V
This is not used by radix anymore. Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/radix_pgtable.c | 11 --- arch/powerpc/mm/init_64.c| 21 ++--- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/arch/powerpc/mm/book3s64/radix_p

[PATCH v6 13/13] powerpc/book3s64/radix: Add debug message to give more details of vmemmap allocation

2023-07-24 Thread Aneesh Kumar K.V
Add some extra vmemmap pr_debug message that will indicate the type of vmemmap allocations. For ex: with DAX vmemmap optimization we can find the below details: [ 187.166580] radix-mmu: PAGE_SIZE vmemmap mapping [ 187.166587] radix-mmu: PAGE_SIZE vmemmap mapping [ 187.166591] radix-mmu: Tail pa

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

2023-07-24 Thread Aneesh Kumar K.V
With 2M PMD-level mapping, we require 32 struct pages and a single vmemmap page can contain 1024 struct pages (PAGE_SIZE/sizeof(struct page)). Hence with 64K page size, we don't use vmemmap deduplication for PMD-level mapping. Signed-off-by: Aneesh Kumar K.V --- Documentation/mm/vmemmap_dedup.rs

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

2023-07-24 Thread Aneesh Kumar K.V
This is in preparation to update radix to implement vmemmap optimization for devdax. Below are the rules w.r.t radix vmemmap mapping 1. First try to map things using PMD (2M) 2. With altmap if altmap cross-boundary check returns true, fall back to PAGE_SIZE 3. If we can't allocate PMD_SIZE back

[PATCH v6 09/13] powerpc/book3s64/mm: Enable transparent pud hugepage

2023-07-24 Thread Aneesh Kumar K.V
This is enabled only with radix translation and 1G hugepage size. This will be used with devdax device memory with a namespace alignment of 1G. Anon transparent hugepage is not supported even though we do have helpers checking pud_trans_huge(). We should never find that return true. The only expec

[PATCH v6 08/13] powerpc/mm/trace: Convert trace event to trace event class

2023-07-24 Thread Aneesh Kumar K.V
A follow-up patch will add a pud variant for this same event. Using event class makes that addition simpler. No functional change in this patch. Reviewed-by: Christophe Leroy Signed-off-by: Aneesh Kumar K.V --- arch/powerpc/mm/book3s64/hash_pgtable.c | 2 +- arch/powerpc/mm/book3s64/radix_pg

[PATCH v6 07/13] mm/vmemmap optimization: Split hugetlb and devdax vmemmap optimization

2023-07-24 Thread Aneesh Kumar K.V
Arm disabled hugetlb vmemmap optimization [1] because hugetlb vmemmap optimization includes an update of both the permissions (writeable to read-only) and the output address (pfn) of the vmemmap ptes. That is not supported without unmapping of pte(marking it invalid) by some architectures. With DA

[PATCH v6 05/13] mm: Add pud_same similar to __HAVE_ARCH_P4D_SAME

2023-07-24 Thread Aneesh Kumar K.V
This helps architectures to override pmd_same and pud_same independently. Signed-off-by: Aneesh Kumar K.V --- include/linux/pgtable.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/linux/pgtable.h b/include/linux/pgtable.h index 124427ece520..0af8bc4ce258 100644 --- a/include/lin

[PATCH v6 04/13] mm/vmemmap: Allow architectures to override how vmemmap optimization works

2023-07-24 Thread Aneesh Kumar K.V
Architectures like powerpc will like to use different page table allocators and mapping mechanisms to implement vmemmap optimization. Similar to vmemmap_populate allow architectures to implement vmemap_populate_compound_pages Signed-off-by: Aneesh Kumar K.V --- mm/sparse-vmemmap.c | 3 +++ 1 fil

[PATCH v6 03/13] mm/vmemmap: Improve vmemmap_can_optimize and allow architectures to override

2023-07-24 Thread Aneesh Kumar K.V
dax vmemmap optimization requires a minimum of 2 PAGE_SIZE area within vmemmap such that tail page mapping can point to the second PAGE_SIZE area. Enforce that in vmemmap_can_optimize() function. Architectures like powerpc also want to enable vmemmap optimization conditionally (only with radix MMU

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

2023-07-24 Thread Aneesh Kumar K.V
Architectures like powerpc would like to enable transparent huge page pud support only with radix translation. To support that add has_transparent_pud_hugepage() helper that architectures can override. Reviewed-by: Christophe Leroy Signed-off-by: Aneesh Kumar K.V --- drivers/nvdimm/pfn_devs.c |

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

2023-07-24 Thread Aneesh Kumar K.V
This patch series implements changes required to support DAX vmemmap optimization for ppc64. The vmemmap optimization is only enabled with radix MMU translation and 1GB PUD mapping with 64K page size. The patch series also split hugetlb vmemmap optimization as a separate Kconfig variable so that ar

Re: [PATCH v5 10/13] powerpc/book3s64/vmemmap: Switch radix to use a different vmemmap handling function

2023-07-24 Thread Andrew Morton
On Mon, 24 Jul 2023 23:59:27 +0530 "Aneesh Kumar K.V" wrote: > Please take this diff on top of this patch when adding this series to > -mm . "[10/13] powerpc/book3s64/vmemmap: Switch radix to use a different vmemmap handling function" has a conflict with "mm: move is_ioremap_addr() into new hea

Re: [PATCH v5 10/13] powerpc/book3s64/vmemmap: Switch radix to use a different vmemmap handling function

2023-07-24 Thread Aneesh Kumar K.V
"Aneesh Kumar K.V" writes: > This is in preparation to update radix to implement vmemmap optimization > for devdax. Below are the rules w.r.t radix vmemmap mapping > > 1. First try to map things using PMD (2M) > 2. With altmap if altmap cross-boundary check returns true, fall back to >PAGE_SI

Re: [PATCH] powerpc/mm/altmap: Fix altmap boundary check

2023-07-24 Thread David Hildenbrand
On 24.07.23 20:13, Aneesh Kumar K.V wrote: altmap->free includes the entire free space from which altmap blocks can be allocated. So when checking whether the kernel is doing altmap block free, compute the boundary correctly. Cc: David Hildenbrand Cc: Dan Williams Fixes: 9ef34630a461 ("powerpc

Re: [PATCH v2 3/5] mmu_notifiers: Call invalidate_range() when invalidating TLBs

2023-07-24 Thread Luis Chamberlain
Cc'ing fsdevel + xfs folks as this fixes a regression tests with XFS with generic/176. On Thu, Jul 20, 2023 at 10:52:59AM +1000, Alistair Popple wrote: > > SeongJae Park writes: > > > Hi Alistair, > > > > On Wed, 19 Jul 2023 22:18:44 +1000 Alistair Popple > > wrote: > > > >> The invalidate_ra

[PATCH] powerpc/mm/altmap: Fix altmap boundary check

2023-07-24 Thread Aneesh Kumar K.V
altmap->free includes the entire free space from which altmap blocks can be allocated. So when checking whether the kernel is doing altmap block free, compute the boundary correctly. Cc: David Hildenbrand Cc: Dan Williams Fixes: 9ef34630a461 ("powerpc/mm: Fallback to RAM if the altmap is unusabl

Re: [PATCH] mm/hotplug: Enable runtime update of memmap_on_memory parameter

2023-07-24 Thread David Hildenbrand
On 24.07.23 19:31, Andrew Morton wrote: On Fri, 21 Jul 2023 18:49:50 +0530 "Aneesh Kumar K.V" wrote: Signed-off-by: Aneesh Kumar K.V --- This is dependent on patches posted at https://lore.kernel.org/linux-mm/20230718024409.95742-1-aneesh.ku...@linux.ibm.com/ It appears that the above-link

Re: [PATCH] mm/hotplug: Enable runtime update of memmap_on_memory parameter

2023-07-24 Thread Andrew Morton
On Fri, 21 Jul 2023 18:49:50 +0530 "Aneesh Kumar K.V" wrote: > Signed-off-by: Aneesh Kumar K.V > --- > This is dependent on patches posted at > https://lore.kernel.org/linux-mm/20230718024409.95742-1-aneesh.ku...@linux.ibm.com/ It appears that the above-linked series is to be updated, so would

[PATCH v5 00/25] iommu: Make default_domain's mandatory

2023-07-24 Thread Jason Gunthorpe
[ It would be good to get this in linux-next, we have some good test coverage on the ARM side already, thanks! ] It has been a long time coming, this series completes the default_domain transition and makes it so that the core IOMMU code will always have a non-NULL default_domain for every driver

Re: [PATCH v4 4/6] mm/hotplug: Allow pageblock alignment via altmap reservation

2023-07-24 Thread Aneesh Kumar K.V
David Hildenbrand writes: > On 24.07.23 18:02, Aneesh Kumar K V wrote: >> On 7/24/23 9:11 PM, David Hildenbrand wrote: >>> On 24.07.23 17:16, Aneesh Kumar K V wrote: >>> > > /* >   * In "forced" memmap_on_memory mode, we always align the vmemmap size > up to cover >   * ful

[PATCH v5 02/25] iommu: Add IOMMU_DOMAIN_PLATFORM

2023-07-24 Thread Jason Gunthorpe
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 'default_domain' ops value that allows the driver to

[PATCH v5 11/25] iommu/tegra-smmu: Implement an IDENTITY domain

2023-07-24 Thread Jason Gunthorpe
What tegra-smmu does during tegra_smmu_set_platform_dma() is actually putting the iommu into identity mode. Move to the new core support for ARM_DMA_USE_IOMMU by defining ops->identity_domain. Signed-off-by: Jason Gunthorpe --- drivers/iommu/tegra-smmu.c | 37 ---

[PATCH v5 17/25] iommu/qcom_iommu: Add an IOMMU_IDENTITIY_DOMAIN

2023-07-24 Thread Jason Gunthorpe
This brings back the ops->detach_dev() code that commit 1b932ceddd19 ("iommu: Remove detach_dev callbacks") deleted and turns it into an IDENTITY domain. Signed-off-by: Jason Gunthorpe --- drivers/iommu/arm/arm-smmu/qcom_iommu.c | 39 + 1 file changed, 39 insertions(+) d

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

2023-07-24 Thread Jason Gunthorpe
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 checks from a lot of the drivers, simplifying

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

2023-07-24 Thread Jason Gunthorpe
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: ops->defaut_domain

[PATCH v5 15/25] iommufd/selftest: Make the mock iommu driver into a real driver

2023-07-24 Thread Jason Gunthorpe
I've avoided doing this because there is no way to make this happen without an intrusion into the core code. Up till now this has avoided needing the core code's probe path with some hackery - but now that default domains are becoming mandatory it is unavoidable. The core probe path must be run to

[PATCH v5 05/25] iommu/fsl_pamu: Implement a PLATFORM domain

2023-07-24 Thread Jason Gunthorpe
This driver is nonsensical. To not block migrating the core API away from NULL default_domains give it a hacky of a PLATFORM domain that keeps it working exactly as it always did. Leave some comments around to warn away any future people looking at this. Signed-off-by: Jason Gunthorpe --- drive

[PATCH v5 20/25] iommu/sun50i: Add an IOMMU_IDENTITIY_DOMAIN

2023-07-24 Thread Jason Gunthorpe
Prior to commit 1b932ceddd19 ("iommu: Remove detach_dev callbacks") the sun50i_iommu_detach_device() function was being called by ops->detach_dev(). This is an IDENTITY domain so convert sun50i_iommu_detach_device() into sun50i_iommu_identity_attach() and a full IDENTITY domain and thus hook it ba

[PATCH v5 13/25] iommu/omap: Implement an IDENTITY domain

2023-07-24 Thread Jason Gunthorpe
What omap does during omap_iommu_set_platform_dma() is actually putting the iommu into identity mode. Move to the new core support for ARM_DMA_USE_IOMMU by defining ops->identity_domain. This driver does not support IOMMU_DOMAIN_DMA, however it cannot be compiled on ARM64 either. Most likely it i

[PATCH v5 14/25] iommu/msm: Implement an IDENTITY domain

2023-07-24 Thread Jason Gunthorpe
What msm does during omap_iommu_set_platform_dma() is actually putting the iommu into identity mode. Move to the new core support for ARM_DMA_USE_IOMMU by defining ops->identity_domain. This driver does not support IOMMU_DOMAIN_DMA, however it cannot be compiled on ARM64 either. Most likely it is

[PATCH v5 19/25] iommu/mtk_iommu: Add an IOMMU_IDENTITIY_DOMAIN

2023-07-24 Thread Jason Gunthorpe
This brings back the ops->detach_dev() code that commit 1b932ceddd19 ("iommu: Remove detach_dev callbacks") deleted and turns it into an IDENTITY domain. Signed-off-by: Jason Gunthorpe --- drivers/iommu/mtk_iommu.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/driv

[PATCH v5 07/25] iommu/mtk_iommu_v1: Implement an IDENTITY domain

2023-07-24 Thread Jason Gunthorpe
What mtk does during mtk_iommu_v1_set_platform_dma() is actually putting the iommu into identity mode. Make this available as a proper IDENTITY domain. The mtk_iommu_v1_def_domain_type() from commit 8bbe13f52cb7 ("iommu/mediatek-v1: Add def_domain_type") explains this was needed to allow probe_fin

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

2023-07-24 Thread Jason Gunthorpe
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 driver says it needs IDENTITY then iommu_get_d

[PATCH v5 09/25] iommu: Allow an IDENTITY domain as the default_domain in ARM32

2023-07-24 Thread Jason Gunthorpe
Even though dma-iommu.c and CONFIG_ARM_DMA_USE_IOMMU do approximately the same stuff, the way they relate to the IOMMU core is quiet different. dma-iommu.c expects the core code to setup an UNMANAGED domain (of type IOMMU_DOMAIN_DMA) and then configures itself to use that domain. This becomes the

  1   2   >