[PATCH v3 05/29] arc: Add <bits/pagesize.h>

Vineet Gupta vineet.gupta@linux.dev
Sun Sep 29 21:55:13 GMT 2024


On 9/29/24 08:59, Florian Weimer wrote:
> According to arch/arc/Kconfig in the Linux kernel sources, arc
> supports pagge sizes 4 KiB, 8 KiB, 16 KiB.  However,
> the toolchain defaults are not compatible with 16 KiB pages, so
> xfail the future elf/tst-load-alignment test.
>
> (Note: Alternatively, we could fix the maximum page size at 8 KiB,
> if that's closer to reality.)

Indeed 16K size was more esoteric and dates back to older ARC700 cpus (not supported in glibc anyways)
And 8K is indeed the default for ARCompact and ARCv2 ISA cores.

-Vineet

> ---
>  sysdeps/arc/bits/pagesize.h          | 2 ++
>  sysdeps/unix/sysv/linux/arc/Makefile | 5 +++++
>  2 files changed, 7 insertions(+)
>  create mode 100644 sysdeps/arc/bits/pagesize.h
>
> diff --git a/sysdeps/arc/bits/pagesize.h b/sysdeps/arc/bits/pagesize.h
> new file mode 100644
> index 0000000000..16a4d49136
> --- /dev/null
> +++ b/sysdeps/arc/bits/pagesize.h
> @@ -0,0 +1,2 @@
> +#define __GLIBC_PAGE_SHIFT_MIN 12
> +#define __GLIBC_PAGE_SHIFT_MAX 14
> diff --git a/sysdeps/unix/sysv/linux/arc/Makefile b/sysdeps/unix/sysv/linux/arc/Makefile
> index dd3da52c39..cfade7a347 100644
> --- a/sysdeps/unix/sysv/linux/arc/Makefile
> +++ b/sysdeps/unix/sysv/linux/arc/Makefile
> @@ -1,3 +1,8 @@
> +ifeq ($(subdir),elf)
> +# The toolchain defaults to 8K pages even though Linux supports 16K pages.
> +test-xfail-tst-load-alignment = yes
> +endif
> +
>  ifeq ($(subdir),stdlib)
>  gen-as-const-headers += ucontext_i.sym
>  endif



More information about the Libc-alpha mailing list