Page MenuHomeFreeBSD

clock: Simplify subr_ticks and rename
ClosedPublic

Authored by markj on Fri, Jan 10, 5:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Jan 24, 1:00 AM
Unknown Object (File)
Mon, Jan 13, 11:12 PM
Unknown Object (File)
Sun, Jan 12, 4:58 AM
Unknown Object (File)
Sun, Jan 12, 4:27 AM
Unknown Object (File)
Sun, Jan 12, 3:05 AM
Unknown Object (File)
Sun, Jan 12, 2:51 AM
Unknown Object (File)
Sat, Jan 11, 6:53 PM
Unknown Object (File)
Sat, Jan 11, 3:00 PM
Subscribers

Details

Summary
  • We can use builtin constants for the size of int and long.
  • The file should have a .S prefix since we want to run it through the preprocessor, though apparently this happens anyway with .s...

Reported by: jrtc27
Fixes: 6b82130e6c9a ("clock: Add a long ticks variable, ticksl")

Diff Detail

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

Event Timeline

markj requested review of this revision.Fri, Jan 10, 5:25 PM
Makefile.inc1
1773

If the window of time is small enough do we need to bother?...

sys/kern/subr_ticks.S
22

You missed the change to this line, otherwise it's wrong for 32-bit little endian.

25

As mentioned in my later follow-up, this should be .bss

sys/kern/subr_ticks.S
22

Uh, 32-bit *big* endian, even

markj marked 3 inline comments as done.

Remove the .depend cleanup hack, fix the TICKS_OFFSET definition, move to .bss.

(but please mention BSS in the commit message)

This revision is now accepted and ready to land.Fri, Jan 10, 5:41 PM
This revision was automatically updated to reflect the committed changes.
sys/kern/subr_ticks.S
29–31

According to the gas document, arm .align n means something different from other arches .align n. This is why I suggested initially to use .p2align.

sys/kern/subr_ticks.S
29–31

Oh yeah. Use .balign. (.p2align works but it's more readable to use the actual number of bytes rather than log2)

Makefile.inc1
1773

Probably not, I was just trying to suppress a one-time warning about a stale .depend.

sys/kern/subr_ticks.S
29–31

I avoided .p2align to keep the definitions a bit simpler, indeed. See D48430.