linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Yann Sionneau <ysionneau@kalray.eu>
Cc: "Will Deacon" <will@kernel.org>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Nick Piggin" <npiggin@gmail.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Paul Walmsley" <paul.walmsley@sifive.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-mm@kvack.org, linux-riscv@lists.infradead.org,
	"Clement Leger" <clement.leger@bootlin.com>,
	"Guillaume Thouvenin" <gthouvenin@kalray.eu>,
	"Jean-Christophe Pince" <jcpince@gmail.com>,
	"Jules Maselbas" <jmaselbas@kalray.eu>,
	"Julian Vetter" <jvetter@kalray.eu>,
	"Julien Hascoet" <jhascoet@kalray.eu>,
	"Louis Morhet" <lmorhet@kalray.eu>,
	"Marc Poulhiès" <dkm@kataplop.net>,
	"Marius Gligor" <mgligor@kalray.eu>,
	"Vincent Chardon" <vincent.chardon@elsys-design.com>
Subject: Re: [RFC PATCH 11/25] kvx: Add memory management
Date: Wed, 4 Jan 2023 13:37:12 +0200	[thread overview]
Message-ID: <Y7Vk6K5GS5yCkXOZ@kernel.org> (raw)
In-Reply-To: <20230103164359.24347-12-ysionneau@kalray.eu>

On Tue, Jan 03, 2023 at 05:43:45PM +0100, Yann Sionneau wrote:
> Add memory management support for kvx, including: cache and tlb
> management, page fault handling, ioremap/mmap and streaming dma support.
> 
> CC: Will Deacon <will@kernel.org>
> CC: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
> CC: Andrew Morton <akpm@linux-foundation.org>
> CC: Nick Piggin <npiggin@gmail.com>
> CC: Peter Zijlstra <peterz@infradead.org>
> CC: Paul Walmsley <paul.walmsley@sifive.com>
> CC: Palmer Dabbelt <palmer@dabbelt.com>
> CC: Albert Ou <aou@eecs.berkeley.edu>
> CC: linux-kernel@vger.kernel.org
> CC: linux-arch@vger.kernel.org
> CC: linux-mm@kvack.org
> CC: linux-riscv@lists.infradead.org
> Co-developed-by: Clement Leger <clement.leger@bootlin.com>
> Signed-off-by: Clement Leger <clement.leger@bootlin.com>
> Co-developed-by: Guillaume Thouvenin <gthouvenin@kalray.eu>
> Signed-off-by: Guillaume Thouvenin <gthouvenin@kalray.eu>
> Co-developed-by: Jean-Christophe Pince <jcpince@gmail.com>
> Signed-off-by: Jean-Christophe Pince <jcpince@gmail.com>
> Co-developed-by: Jules Maselbas <jmaselbas@kalray.eu>
> Signed-off-by: Jules Maselbas <jmaselbas@kalray.eu>
> Co-developed-by: Julian Vetter <jvetter@kalray.eu>
> Signed-off-by: Julian Vetter <jvetter@kalray.eu>
> Co-developed-by: Julien Hascoet <jhascoet@kalray.eu>
> Signed-off-by: Julien Hascoet <jhascoet@kalray.eu>
> Co-developed-by: Louis Morhet <lmorhet@kalray.eu>
> Signed-off-by: Louis Morhet <lmorhet@kalray.eu>
> Co-developed-by: Marc Poulhiès <dkm@kataplop.net>
> Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
> Co-developed-by: Marius Gligor <mgligor@kalray.eu>
> Signed-off-by: Marius Gligor <mgligor@kalray.eu>
> Co-developed-by: Vincent Chardon <vincent.chardon@elsys-design.com>
> Signed-off-by: Vincent Chardon <vincent.chardon@elsys-design.com>
> Co-developed-by: Yann Sionneau <ysionneau@kalray.eu>
> Signed-off-by: Yann Sionneau <ysionneau@kalray.eu>
> ---
>  arch/kvx/include/asm/cache.h         |  46 +++
>  arch/kvx/include/asm/cacheflush.h    | 181 +++++++++
>  arch/kvx/include/asm/fixmap.h        |  47 +++
>  arch/kvx/include/asm/hugetlb.h       |  36 ++
>  arch/kvx/include/asm/l2_cache.h      |  75 ++++
>  arch/kvx/include/asm/l2_cache_defs.h |  64 ++++
>  arch/kvx/include/asm/mem_map.h       |  44 +++
>  arch/kvx/include/asm/mmu.h           | 296 +++++++++++++++
>  arch/kvx/include/asm/mmu_context.h   | 156 ++++++++
>  arch/kvx/include/asm/mmu_stats.h     |  38 ++
>  arch/kvx/include/asm/page.h          | 187 ++++++++++
>  arch/kvx/include/asm/page_size.h     |  29 ++
>  arch/kvx/include/asm/pgalloc.h       | 101 +++++
>  arch/kvx/include/asm/pgtable-bits.h  | 102 ++++++
>  arch/kvx/include/asm/pgtable.h       | 451 +++++++++++++++++++++++
>  arch/kvx/include/asm/rm_fw.h         |  16 +
>  arch/kvx/include/asm/sparsemem.h     |  15 +
>  arch/kvx/include/asm/symbols.h       |  16 +
>  arch/kvx/include/asm/tlb.h           |  24 ++
>  arch/kvx/include/asm/tlb_defs.h      | 131 +++++++
>  arch/kvx/include/asm/tlbflush.h      |  58 +++
>  arch/kvx/include/asm/vmalloc.h       |  10 +
>  arch/kvx/mm/cacheflush.c             | 154 ++++++++
>  arch/kvx/mm/dma-mapping.c            |  95 +++++
>  arch/kvx/mm/extable.c                |  24 ++
>  arch/kvx/mm/fault.c                  | 264 ++++++++++++++
>  arch/kvx/mm/hugetlbpage.c            | 317 ++++++++++++++++
>  arch/kvx/mm/init.c                   | 527 +++++++++++++++++++++++++++
>  arch/kvx/mm/kernel_rwx.c             | 228 ++++++++++++
>  arch/kvx/mm/mmap.c                   |  31 ++
>  arch/kvx/mm/mmu.c                    | 204 +++++++++++
>  arch/kvx/mm/mmu_stats.c              |  94 +++++
>  arch/kvx/mm/tlb.c                    | 433 ++++++++++++++++++++++
>  33 files changed, 4494 insertions(+)

Please strip functionality that's not essential for boot and the re-add it
after the very core code is merged. I'd say multiple page size, hugetlb and
strict RWX are not necessary to start with.

I'd also suggest to have separate patches for different parts, like cache
and tlb management, page tables and page fault fault handling, ioremap/mmap
and streaming dma support.

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2023-01-04 11:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-03 16:43 [RFC PATCH 00/25] Upstream kvx Linux port Yann Sionneau
2023-01-03 16:43 ` [RFC PATCH 02/25] kvx: Add ELF-related definitions Yann Sionneau
2023-01-03 21:35   ` Eric W. Biederman
2023-01-18  8:48     ` Yann Sionneau
2023-01-03 16:43 ` [RFC PATCH 11/25] kvx: Add memory management Yann Sionneau
2023-01-04 11:37   ` Mike Rapoport [this message]
2023-01-03 16:43 ` [RFC PATCH 14/25] kvx: Add ELF relocations and module support Yann Sionneau
2023-01-03 20:52 ` [RFC PATCH 00/25] Upstream kvx Linux port Rob Herring
2023-01-04 15:58 ` Arnd Bergmann
2023-01-05 10:40   ` Jules Maselbas
2023-01-05 12:05     ` Arnd Bergmann
2023-01-05 14:12       ` Steven Rostedt
2023-01-07  6:25 ` Jeff Xie
2023-01-09 13:21   ` Yann Sionneau
2023-01-09 15:11     ` Jeff Xie
2023-01-09 15:30       ` Yann Sionneau
2023-01-09 15:53         ` Jeff Xie
2023-01-16  7:31           ` Jeff Xie

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y7Vk6K5GS5yCkXOZ@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=clement.leger@bootlin.com \
    --cc=dkm@kataplop.net \
    --cc=gthouvenin@kalray.eu \
    --cc=jcpince@gmail.com \
    --cc=jhascoet@kalray.eu \
    --cc=jmaselbas@kalray.eu \
    --cc=jvetter@kalray.eu \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lmorhet@kalray.eu \
    --cc=mgligor@kalray.eu \
    --cc=npiggin@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=peterz@infradead.org \
    --cc=vincent.chardon@elsys-design.com \
    --cc=will@kernel.org \
    --cc=ysionneau@kalray.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox