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
Unknown Object (File)
Sat, Aug 22, 9:07 AM
Unknown Object (File)
Sat, Aug 22, 9:05 AM
Unknown Object (File)
Fri, Aug 21, 9:51 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.