linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Zhangjin Wu <falcon@tinylab.org>
To: falcon@tinylab.org
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, linux-riscv@lists.infradead.org,
	thomas@t-8ch.de, w@1wt.eu
Subject: [PATCH v3 0/3] nolibc: add part2 of support for rv32
Date: Tue,  6 Jun 2023 12:25:35 +0800	[thread overview]
Message-ID: <20230606042535.354118-1-falcon@tinylab.org> (raw)
In-Reply-To: <cover.1685780412.git.falcon@tinylab.org>

Hi, Arnd

Because this patchset is a 'big' change derived from the idea of suggestion
from you [3], I do very welcome your feedback about this change, just like
Thomas suggested, this requires more discussion before Willy plan to determine
merge it or not.

The first two convert all compile failures to a return of -ENOSYS, if you do
like it, welcome your Reviewed-by. These two are required by the coming new
time64 syscalls for rv32, because they depends on how we cope with the
unsupported syscalls, returning -ENOSYS is really better than simply fail the
compiling.

Hi, Thomas, If you are happy with them, welcome your Reviewed-by too, thanks.
If the first two are ok, then, I can focus on preparing the left time64
patchsets.

The third one is not that urgent, because some important syscalls are
still missing for rv32. It is added here only for compile test.

Thanks,
Zhangjin

> Hi, Willy
> 
> This is the v3 part2 of support for rv32, differs from the v2 part2 [1],
> we only fix up compile issues in this patchset.
> 
> With the v3 generic part1 [2] and this patchset, we can compile nolibc
> for rv32 now.
> 
> This is based on the idea of suggestions from Arnd [3], instead of
> '#error' on the unsupported syscall on a target platform, a 'return
> -ENOSYS' allow us to compile it at first and then allow we fix up the
> test failures reported by nolibc-test one by one.
> 
> The first two patches fix up all of the compile failures with '-ENOSYS'
> (and '#ifdef' if required):
> 
>   tools/nolibc: fix up #error compile failures with -ENOSYS
>   tools/nolibc: fix up undeclared syscall macros with #ifdef and -ENOSYS
> 
> The last one enables rv32 compile support:
>   
>   selftests/nolibc: riscv: customize makefile for rv32
> 
> The above compile support patch here is only for test currently, as
> Thomas suggested, for a full rv32 support, it should wait for the left
> parts.
> 
> Welcome your feedbacks, will wait for enough discussion on this patchset
> and then send the left parts one by one to fix up the test failures
> about waitid, llseek and time64 syscalls: ppoll_time64, clock_gettime64,
> pselect6_time64.
> 
> So, I do recommend to apply this patchset, it allows us to send the left
> parts independently, otherwise, all of them should be sent out for
> review together. with this patchset, the rv32 users may be able to use
> nolibc although some syscalls still missing :-)
> 
> Or at least we apply the first two, so, I can manually cherry-pick the
> compile support patch to do my local test, and the other platform
> developer may also benefit from them.
> 
> I'm cleaning up the left parts, but still require some time, I plan to
> split them to such parts:
> 
>   * part3: waitid, prepared, will send out later
>   * part4: llseek, prepared, will send out later
>   * part5: time64 syscalls, ppoll_time64 ok, will finish them next week
>            (It is a little hard to split them)
> 
> Best regards,
> Zhangjin
> ---
> 
> [1]: https://lore.kernel.org/linux-riscv/cover.1685387484.git.falcon@tinylab.org/T/#t
> [2]: https://lore.kernel.org/linux-riscv/cover.1685777982.git.falcon@tinylab.org/T/#t
> [3]: https://lore.kernel.org/linux-riscv/5e7d2adf-e96f-41ca-a4c6-5c87a25d4c9c@app.fastmail.com/
> 
> Zhangjin Wu (3):
>   tools/nolibc: fix up #error compile failures with -ENOSYS
>   tools/nolibc: fix up undeclared syscall macros with #ifdef and -ENOSYS
>   selftests/nolibc: riscv: customize makefile for rv32
> 
>  tools/include/nolibc/sys.h              | 38 ++++++++++++++++---------
>  tools/testing/selftests/nolibc/Makefile | 11 +++++--
>  2 files changed, 34 insertions(+), 15 deletions(-)

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2023-06-06  4:26 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-03  9:00 [PATCH v3 0/3] nolibc: add part2 of support for rv32 Zhangjin Wu
2023-06-03  9:01 ` [PATCH v3 1/3] tools/nolibc: fix up #error compile failures with -ENOSYS Zhangjin Wu
2023-06-06  7:35   ` Arnd Bergmann
2023-06-07  5:19     ` Zhangjin Wu
2023-06-07  8:45       ` Arnd Bergmann
2023-06-07  9:46         ` Zhangjin Wu
2023-06-07 10:02           ` Arnd Bergmann
2023-06-07 13:26             ` Zhangjin Wu
2023-06-03  9:04 ` [PATCH v3 2/3] tools/nolibc: fix up undeclared syscall macros with #ifdef and -ENOSYS Zhangjin Wu
2023-06-03  9:05 ` [PATCH v3 3/3] selftests/nolibc: riscv: customize makefile for rv32 Zhangjin Wu
2023-06-06  7:43   ` Arnd Bergmann
2023-06-06 11:12     ` Zhangjin Wu
2023-06-06 11:21       ` Arnd Bergmann
2023-06-06 12:07         ` Zhangjin Wu
2023-06-07  1:20           ` Zhangjin Wu
2023-06-07  4:17             ` Willy Tarreau
2023-06-07  6:33               ` Zhangjin Wu
2023-06-07  7:33                 ` Willy Tarreau
2023-06-07  8:11                   ` Zhangjin Wu
2023-06-07 10:44                     ` Willy Tarreau
2023-06-06  4:25 ` Zhangjin Wu [this message]
2023-06-06  4:42   ` [PATCH v3 0/3] nolibc: add part2 of support " Willy Tarreau
2023-06-06  6:34     ` Zhangjin Wu
2023-06-06  6:45       ` Willy Tarreau

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=20230606042535.354118-1-falcon@tinylab.org \
    --to=falcon@tinylab.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=thomas@t-8ch.de \
    --cc=w@1wt.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).