lib.h: Split off lib header for arch specific and generic

1) Clean up #ifdef/#endif for get_page_size().

2) Always use arch specific code for x86-64 to reduce libc usage.

3) For other archs, we will use src/arch/generic/lib.h header that
   contains libc wrapper.

At this point, on x86-64, we only use libc for memset(), malloc() and
free().

Cc: Nugra <richiisei@gmail.com>
Signed-off-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Link: https://lore.kernel.org/r/20220211155753.143698-4-ammarfaizi2@gnuweeb.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
3 files changed