Page MenuHomeFreeBSD

Don't use static on DPCPU data in arm64 modules
ClosedPublic

Authored by andrew on Jul 5 2018, 6:26 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 1:44 AM
Unknown Object (File)
Sat, Apr 27, 1:43 AM
Unknown Object (File)
Sat, Apr 27, 1:43 AM
Unknown Object (File)
Sat, Apr 27, 12:40 AM
Unknown Object (File)
Sat, Apr 27, 12:04 AM
Unknown Object (File)
Feb 19 2024, 7:42 PM
Unknown Object (File)
Jan 5 2024, 5:39 PM
Unknown Object (File)
Dec 25 2023, 9:41 AM

Details

Summary

It is broken ad it doesn't emit a relocation for the in-kernel linker to
adjust. To work around this remove the static keyword from the
DPCPU_DEFINE_STATIC macro on arm64 when building modules.

PR: 225816

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Please also incorporate the one line subject summary into the description for the commit message.

sys/sys/pcpu.h
96 ↗(On Diff #44930)

I think this should mention that this is an issue for file local static variables only and making them global the issue goes away.
Also, I'd remove the "arm64" from the comment and say "certain architectures" to keep it general as this might effect more of them?
I might also add a note that this is a "workaround" until better ways might be found?

This revision is now accepted and ready to land.Jul 16 2018, 4:47 PM
This revision was automatically updated to reflect the committed changes.