devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jules Maselbas <jmaselbas@kalray.eu>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Yann Sionneau" <ysionneau@kalray.eu>,
	"Albert Ou" <aou@eecs.berkeley.edu>,
	"Alexander Shishkin" <alexander.shishkin@linux.intel.com>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Aneesh Kumar" <aneesh.kumar@linux.ibm.com>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"Arnaldo Carvalho de Melo" <acme@kernel.org>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	bpf@vger.kernel.org, "Christian Brauner" <brauner@kernel.org>,
	devicetree@vger.kernel.org,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"Eric Paris" <eparis@redhat.com>,
	"Ingo Molnar" <mingo@redhat.com>,
	"Jan Kiszka" <jan.kiszka@siemens.com>,
	"Jason Baron" <jbaron@akamai.com>, "Jiri Olsa" <jolsa@kernel.org>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Josh Poimboeuf" <jpoimboe@kernel.org>,
	"Kees Cook" <keescook@chromium.org>,
	"Kieran Bingham" <kbingham@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	Linux-Arch <linux-arch@vger.kernel.org>,
	linux-arm-kernel@lists.infradead.org, linux-audit@redhat.com,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org, linux-perf-users@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-riscv@lists.infradead.org,
	"Marc Zyngier" <maz@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Masami Hiramatsu" <mhiramat@kernel.org>,
	"Namhyung Kim" <namhyung@kernel.org>,
	"Nicholas Piggin" <npiggin@gmail.com>,
	"Oleg Nesterov" <oleg@redhat.com>,
	"Palmer Dabbelt" <palmer@dabbelt.com>,
	"Paul Moore" <paul@paul-moore.com>,
	"Paul Walmsley" <paul.walmsley@sifive.com>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Sebastian Reichel" <sre@kernel.org>,
	"Steven Rostedt" <rostedt@goodmis.org>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Waiman Long" <longman@redhat.com>,
	"Will Deacon" <will@kernel.org>,
	"Alex Michon" <amichon@kalray.eu>,
	"Ashley Lesdalons" <alesdalons@kalray.eu>,
	"Benjamin Mugnier" <mugnier.benjamin@gmail.com>,
	"Clement Leger" <clement.leger@bootlin.com>,
	"Guillaume Missonnier" <gmissonnier@kalray.eu>,
	"Guillaume Thouvenin" <gthouvenin@kalray.eu>,
	"Jean-Christophe Pince" <jcpince@gmail.com>,
	"Jonathan Borne" <jborne@kalray.eu>,
	"Julian Vetter" <jvetter@kalray.eu>,
	"Julien Hascoet" <jhascoet@kalray.eu>,
	"Julien Villette" <jvillette@kalray.eu>,
	"Louis Morhet" <lmorhet@kalray.eu>,
	"Luc Michel" <lmichel@kalray.eu>,
	"Marc Poulhiès" <dkm@kataplop.net>,
	"Marius Gligor" <mgligor@kalray.eu>,
	"Samuel Jones" <sjones@kalray.eu>,
	"Thomas Costis" <tcostis@kalray.eu>,
	"Vincent Chardon" <vincent.chardon@elsys-design.com>
Subject: Re: [RFC PATCH 00/25] Upstream kvx Linux port
Date: Thu, 5 Jan 2023 11:40:19 +0100	[thread overview]
Message-ID: <20230105104019.GA7446@tellis.lin.mbt.kalray.eu> (raw)
In-Reply-To: <7c531595-e987-422b-bcf7-48ad0ba49ce6@app.fastmail.com>

Hi,

On Wed, Jan 04, 2023 at 04:58:25PM +0100, Arnd Bergmann wrote:
> On Tue, Jan 3, 2023, at 17:43, Yann Sionneau wrote:
> > This patch series adds support for the kv3-1 CPU architecture of the kvx family
> > found in the Coolidge (aka MPPA3-80) SoC of Kalray.
> >
> > This is an RFC, since kvx support is not yet upstreamed into gcc/binutils,
> > therefore this patch series cannot be merged into Linux for now.
> >
> > The goal is to have preliminary reviews and to fix problems early.
> >
> > The Kalray VLIW processor family (kvx) has the following features:
> > * 32/64 bits execution mode
> > * 6-issue VLIW architecture
> > * 64 x 64bits general purpose registers
> > * SIMD instructions
> > * little-endian
> > * deep learning co-processor
> 
> Thanks for posting these, I had been wondering about the
> state of the port. Overall this looks really nice, I can
> see that you and the team have looked at other ports
> and generally made the right decisions.

Thank you and all for the reviews. We are currently going
through every remarks and we are trying to do our best to
send a new patch series with everything addressed.

> I commented on the syscall patch directly, I think it's
> important to stop using the deprecated syscalls as soon
> as possible to avoid having dependencies in too many
> libc binaries. Almost everything else can be changed
> easily as you get closer to upstream inclusion.
> 
> I did not receive most of the other patches as I'm
> not subscribed to all the mainline lists. For future 
> submissions, can you add the linux-arch list to Cc for
> all patches?

We misused get_maintainers.pl, running it on each patch instead
of using it on the whole series. next time every one will be in
copy of every patch in the series and including linux-arch.

> Reading the rest of the series through lore.kernel.org,
> most of the comments I have are for improvements that
> you may find valuable rather than serious mistakes:
> 
> - the {copy_to,copy_from,clear}_user functions are
>   well worth optimizing better than the byte-at-a-time
>   version you have, even just a C version built around
>   your __get_user/__put_user inline asm should help, and
>   could be added to lib/usercopy.c.

right, we are using memcpy for {copy_to,copy_from}_user_page
which has a simple optimized version introduced in
(kvx: Add some library functions).
I wonder if it is possible to do the same for copy_*_user functions.

> - The __raw_{read,write}{b,w,l,q} helpers should
>   normally be defined as inline asm instead of
>   volatile pointer dereferences, I've seen cases where
>   the compiler ends up splitting the access or does
>   other things you may not want on MMIO areas.
>
> - I would recomment implementing HAVE_ARCH_VMAP_STACK
>   as well as IRQ stacks, both of these help to
>   avoid data corruption from stack overflow that you
>   will eventually run into.
> 
> - You use qspinlock as the only available spinlock
>   implementation, but only support running on a
>   single cluster of 16 cores. It may help to use
>   the generic ticket spinlock instead, or leave it
>   as a Kconfig option, in particular since you only
>   have the emulated xchg16() atomic for qspinlock.
> 
> - Your defconfig file enables CONFIG_EMBEDDED, which
>   in turn enables CONFIG_EXPERT. This is probably
>   not what you want, so better turn off both of these.
> 
> - The GENERIC_CALIBRATE_DELAY should not be necessary
>   since you have a get_cycles() based delay loop.
>   Just set loops_per_jiffy to the correct value based
>   on the frequency of the cycle counter, to save
>   a little time during boot and get a more accurate
>   delay loop.
>
Ack !

   Jules





  reply	other threads:[~2023-01-05 10:55 UTC|newest]

Thread overview: 15+ 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 09/25] kvx: irqchip: Add support for irq controllers Yann Sionneau
2023-01-03 21:28   ` Rob Herring
2023-01-03 16:43 ` [RFC PATCH 24/25] kvx: Add support for CPU Perf Monitors 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 [this message]
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=20230105104019.GA7446@tellis.lin.mbt.kalray.eu \
    --to=jmaselbas@kalray.eu \
    --cc=acme@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=alesdalons@kalray.eu \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=amichon@kalray.eu \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=ardb@kernel.org \
    --cc=arnd@arndb.de \
    --cc=boqun.feng@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=brauner@kernel.org \
    --cc=clement.leger@bootlin.com \
    --cc=corbet@lwn.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dkm@kataplop.net \
    --cc=ebiederm@xmission.com \
    --cc=eparis@redhat.com \
    --cc=gmissonnier@kalray.eu \
    --cc=gthouvenin@kalray.eu \
    --cc=jan.kiszka@siemens.com \
    --cc=jbaron@akamai.com \
    --cc=jborne@kalray.eu \
    --cc=jcpince@gmail.com \
    --cc=jhascoet@kalray.eu \
    --cc=jolsa@kernel.org \
    --cc=jpoimboe@kernel.org \
    --cc=jvetter@kalray.eu \
    --cc=jvillette@kalray.eu \
    --cc=kbingham@kernel.org \
    --cc=keescook@chromium.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-audit@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lmichel@kalray.eu \
    --cc=lmorhet@kalray.eu \
    --cc=longman@redhat.com \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=mgligor@kalray.eu \
    --cc=mhiramat@kernel.org \
    --cc=mingo@redhat.com \
    --cc=mugnier.benjamin@gmail.com \
    --cc=namhyung@kernel.org \
    --cc=npiggin@gmail.com \
    --cc=oleg@redhat.com \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=paul@paul-moore.com \
    --cc=peterz@infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=sjones@kalray.eu \
    --cc=sre@kernel.org \
    --cc=tcostis@kalray.eu \
    --cc=tglx@linutronix.de \
    --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;
as well as URLs for NNTP newsgroup(s).