Page MenuHomeFreeBSD

subr_devmap: Reduce the use of the static devmap
ClosedPublic

Authored by andrew on Apr 25 2025, 10:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 22, 6:38 PM
Unknown Object (File)
Sun, Jun 22, 2:53 AM
Unknown Object (File)
Sat, Jun 21, 3:12 PM
Unknown Object (File)
Sat, Jun 21, 8:23 AM
Unknown Object (File)
Fri, Jun 20, 4:02 PM
Unknown Object (File)
Fri, Jun 20, 3:23 AM
Unknown Object (File)
Thu, Jun 19, 2:39 AM
Unknown Object (File)
Tue, Jun 17, 3:53 PM

Details

Summary

We only create the static devmap on arm. Stop building this code on
other architectures.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

mhorne added a subscriber: mhorne.

Thanks, this is great.

To me it is preferable to replace the repeated #ifdef __arm__ instances with a named flag, e.g. #ifdef DEVMAP_HAS_STATIC. If it is annoying to achieve then no problem.

sys/kern/subr_devmap.c
236

Best to indicate the condition at the end of a long section.

This revision is now accepted and ready to land.Apr 29 2025, 2:07 PM

Thanks, this is great.

To me it is preferable to replace the repeated #ifdef __arm__ instances with a named flag, e.g. #ifdef DEVMAP_HAS_STATIC. If it is annoying to achieve then no problem.

We could add a __HAVE_STATIC_DEVMAP in <machine/param.h>. Similar to what we do for __HAVE_ACPI.

In D50016#1142030, @jhb wrote:

Thanks, this is great.

To me it is preferable to replace the repeated #ifdef __arm__ instances with a named flag, e.g. #ifdef DEVMAP_HAS_STATIC. If it is annoying to achieve then no problem.

We could add a __HAVE_STATIC_DEVMAP in <machine/param.h>. Similar to what we do for __HAVE_ACPI.

I love it. I wish we did this more often, honestly, but in the early days that was shouted down. While it may
cause some churn as we may eventually have all of our architectures on or off, that should be minimal.

This revision now requires review to proceed.Apr 30 2025, 10:29 AM
This revision is now accepted and ready to land.Apr 30 2025, 12:18 PM