diff options
author | Ammar Faizi <ammarfaizi2@gnuweeb.org> | 2022-04-15 05:41:39 +0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-04-18 09:24:08 -0600 |
commit | 48342e4c482349718eeecd34b3026d3d6aa78794 (patch) | |
tree | b7b1aa4a098c585583fa967d5daada9cc214f740 | |
parent | 2afb268164ba99ebe720add3632b4051651296b6 (diff) | |
download | liburing-48342e4c482349718eeecd34b3026d3d6aa78794.tar.gz liburing-48342e4c482349718eeecd34b3026d3d6aa78794.tar.bz2 |
arch/x86/lib: Provide `get_page_size()` function for x86 32-bit
A preparation to add nolibc support for x86 32-bit. Provide
get_page_size() function for x86 32-bit.
x86 32-bit and x86-64, both have the same page size 4K, and they can
share the same function definition. Just remove the #ifdef here.
Co-authored-by: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>
Signed-off-by: Alviro Iskandar Setiawan <alviro.iskandar@gnuweeb.org>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Link: https://lore.kernel.org/r/20220414224001.187778-3-ammar.faizi@intel.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | src/arch/x86/lib.h | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/arch/x86/lib.h b/src/arch/x86/lib.h index bacf74e..e6a74f3 100644 --- a/src/arch/x86/lib.h +++ b/src/arch/x86/lib.h @@ -7,26 +7,9 @@ #ifndef LIBURING_ARCH_X86_LIB_H #define LIBURING_ARCH_X86_LIB_H -#if defined(__x86_64__) - static inline long get_page_size(void) { return 4096; } -#else /* #if defined(__x86_64__) */ - -/* - * For x86 (32-bit), fallback to libc wrapper. - * We can't use CONFIG_NOLIBC for x86 (32-bit) at the moment. - * - * TODO: Add x86 (32-bit) nolibc support. - */ -#ifdef CONFIG_NOLIBC - #error "x86 (32-bit) is currently not supported for nolibc builds" -#endif -#include "../generic/lib.h" - -#endif /* #if defined(__x86_64__) */ - #endif /* #ifndef LIBURING_ARCH_X86_LIB_H */ |