From: Jens Axboe <[email protected]>
To: Ammar Faizi <[email protected]>,
Pavel Begunkov <[email protected]>,
io-uring Mailing List <[email protected]>
Cc: Bedirhan KURT <[email protected]>,
Louvian Lyndal <[email protected]>
Subject: Re: [PATCH v2 liburing 2/4] Add arch dependent directory and files
Date: Sun, 10 Oct 2021 05:16:49 -0600 [thread overview]
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
On 10/10/21 12:39 AM, Ammar Faizi wrote:
> Create a new directory `src/arch` to save arch dependent sources.
> Add support start from x86-64, add syscalls crafted in Assembly code
> and lib (currently the lib only contains get page size function).
>
> Link: https://github.com/axboe/liburing/issues/443
> Signed-off-by: Ammar Faizi <[email protected]>
> ---
> src/arch/x86/lib.h | 26 ++++++
> src/arch/x86/syscall.h | 200 +++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 226 insertions(+)
> create mode 100644 src/arch/x86/lib.h
> create mode 100644 src/arch/x86/syscall.h
>
> diff --git a/src/arch/x86/lib.h b/src/arch/x86/lib.h
> new file mode 100644
> index 0000000..0d4b321
> --- /dev/null
> +++ b/src/arch/x86/lib.h
> @@ -0,0 +1,26 @@
> +/* SPDX-License-Identifier: MIT */
> +
> +#ifndef LIBURING_ARCH_X86_LIB_H
> +#define LIBURING_ARCH_X86_LIB_H
> +
> +#ifndef LIBURING_LIB_H
> +# error "This file should be included from src/lib.h (liburing)"
> +#endif
> +
> +#if defined(__x86_64__)
> +
> +static inline long __arch_impl_get_page_size(void)
> +{
> + return 4096;
> +}
> +
> +#else /* #if defined(__x86_64__) */
> +
> +/*
> + * TODO: Add x86 (32-bit) support here.
> + */
> +#error "x86 (32-bit) is currently not supported"
Can we change this to:
#error "x86 (32-bit) is currently not supported for nolibc builds"
to make it a bit more specific. Apart from that, this looks good.
--
Jens Axboe
next prev parent reply other threads:[~2021-10-10 11:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-10 6:39 [PATCHSET v2 liburing 0/4] Add nolibc support for x86-64 arch Ammar Faizi
2021-10-10 6:39 ` [PATCH v2 liburing 1/4] test/thread-exit: Fix use after free bug Ammar Faizi
2021-10-10 11:25 ` Jens Axboe
2021-10-10 6:39 ` [PATCH v2 liburing 2/4] Add arch dependent directory and files Ammar Faizi
2021-10-10 11:16 ` Jens Axboe [this message]
2021-10-10 6:39 ` [PATCH v2 liburing 3/4] Add no libc build support Ammar Faizi
2021-10-10 11:19 ` Jens Axboe
2021-10-10 6:39 ` [PATCH v2 liburing 4/4] Add CONFIG_NOLIBC variable and macro Ammar Faizi
2021-10-10 11:22 ` Jens Axboe
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 \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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