Page MenuHomeFreeBSD

arm64: Use .arch armv8-4.a with GNU as for extensions to tlbi
Needs ReviewPublic

Authored by jhb on Fri, Aug 21, 9:42 PM.
Tags
None
Referenced Files
F169044984: D59105.id184700.diff
Mon, Aug 31, 5:45 AM
F168965192: D59105.id.diff
Sun, Aug 30, 11:57 PM
Unknown Object (File)
Sun, Aug 30, 6:29 AM
Unknown Object (File)
Sat, Aug 29, 8:31 PM
Unknown Object (File)
Sat, Aug 29, 8:28 PM
Unknown Object (File)
Sat, Aug 29, 5:30 AM
Unknown Object (File)
Sat, Aug 29, 12:04 AM
Unknown Object (File)
Thu, Aug 27, 8:15 PM
Subscribers

Details

Summary

GNU as does not support a tlb-rmi architecture extension to selectively
enable access to this part of ARMv8.4-A. Instead, it has to be enabled
by selecting a suitable -march.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75957
Build 72840: arc lint + arc unit

Event Timeline

jhb requested review of this revision.Fri, Aug 21, 9:42 PM

Using .arch here is not entirely future proof, but does work. The Linux kernel doesn't use .arch_extension. It figures out the highest configured -march= value, and for binutils it passes that to GNU as via -Wa,-march=<mumble> but for clang it uses .arch <mumble> via a special wrapper macro. That approach though spans the entire kernel build for GNU as, whereas this approach only affects pmap.c so will hopefully be easier to update if needed in the future.

For some related reading: https://www.sourceware.org/bugzilla/show_bug.cgi?id=26339

Why not use the new SYS_ARG macro? The tlbi instructions are in the sys instruction space.

I created macros in D59147 & D59148 to use the SYS_ARG macro

I'm curious as to why this isn't also a problem for the uses of .arch_extension in arm64/vfp.c, arm64/mte.c, and include/atomic.h?