[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2f4a244d-e88c-4378-8b1b-71204964dab6@t-8ch.de>
Date: Mon, 30 Sep 2024 07:23:39 +0200
From: Thomas Weißschuh <linux@...ssschuh.net>
To: Willy Tarreau <w@....eu>
Cc: Guo Ren <guoren@...nel.org>, Shuah Khan <shuah@...nel.org>,
linux-kernel@...r.kernel.org, linux-csky@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 4/5] tools/nolibc: add csky support
Hi Willy,
On 2024-09-30 05:49:46+0000, Willy Tarreau wrote:
> On Sun, Sep 29, 2024 at 11:47:39PM +0200, Thomas Weißschuh wrote:
> > Add support for the C-SKY architecture, which is very similar to
> > LoongArch.
> > Only v2 ABI is supported.
> > Optimizations are disabled as the compiler[0] seems to misoptimize the
> > code, especially the r4 register gets clobbered.
> > Compile the initramfs directly into the kernel, as qemu does not support
> > passing the initrd via OF.
> >
> > There is no qemu mainline support for qemu.
> > Testing was done with commit 1f172a2c7cd5c2e7 of the downstream csky qemu [1].
> > Some tiny changes were necessary on top [2].
> >
> > [0] gcc 13.2.0 and 14.2.0 from kernel.org crosstools
> > [1] https://github.com/XUANTIE-RV/qemu/
> > [2]
>
> I think you wanted to place a link or something above for [2].
[2] was supposed to be inline patches for QEMU, I'll try to make that a
bit clearer.
> > diff --git a/target/csky/cpu-param.h b/target/csky/cpu-param.h
> > index 80554cc0fc03..9181b602a26f 100644
> > --- a/target/csky/cpu-param.h
> > +++ b/target/csky/cpu-param.h
> (...)
> > diff --git a/target/csky/op_vdsp2.c b/target/csky/op_vdsp2.c
> > index a9985a03be33..d953f5ea94fe 100644
> > --- a/target/csky/op_vdsp2.c
> > +++ b/target/csky/op_vdsp2.c
>
> Also, the first two patches look like fixes for the arch itself, they
> should really go outside of the nolibc development tree, at least
> because they might have to be backported to some stable branches,
> or later fixed/reverted in case they wouldn't be optimal.
As mentioned above, these are patches for qemu, not Linux.
I don't know enough about QEMU or C-SKY to know if these are the
generally correct fixes. But they seem to work well enough for nolibc.
Guo, if these QEMU patches look reasonable to you I can also submit them.
> Aside this, it's been a long time since we last added an architecture
> and it's pleasant to see how easy it has become over time, even when
> requiring specific settings ;-)
Agreed!
Thomas
Powered by blists - more mailing lists