Page MenuHomeFreeBSD

netmap: add cast to fix powerpc64 LINT kernel
ClosedPublic

Authored by emaste on Nov 28 2016, 9:15 PM.
Tags
None
Referenced Files
F146396345: D8669.id22588.diff
Mon, Mar 2, 9:05 AM
F146353938: D8669.id22588.diff
Mon, Mar 2, 12:30 AM
Unknown Object (File)
Sat, Feb 28, 2:36 PM
Unknown Object (File)
Mon, Feb 23, 6:25 AM
Unknown Object (File)
Jan 18 2026, 11:41 AM
Unknown Object (File)
Jan 12 2026, 11:37 AM
Unknown Object (File)
Jan 9 2026, 7:22 PM
Unknown Object (File)
Dec 25 2025, 4:15 AM
Subscribers
None

Details

Summary

Attempt to fix powerpc64 LINT kernel broken by rS308000. Netmap's use of a uint64_t wchan seems odd, but in the interest of minimizing this change just cast through uintptr_t to silence the compiler warning.

(universe has been broken for a month due to this)

Diff Detail

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

Event Timeline

emaste retitled this revision from to netmap: add cast to fix powerpc64 LINT kernel.
emaste updated this object.
emaste edited the test plan for this revision. (Show Details)
emaste added reviewers: gnn, jhb.
jhb edited edge metadata.

I can't find where wchan is actually assigned a value. Oh, it's gross:

dev/netmap/netmap_freebsd.c:            nmk->worker_ctx.cfg = *((struct ptnetmap_cfgentry_bhyve *)opaque);

(I guess userland gets to set the value? That's kind of interesting). I think this is fine because you cast the value on both sleep and wakeup, so if we lose the upper 32 bits we consistently lose them.

This revision is now accepted and ready to land.Nov 28 2016, 11:34 PM
This revision was automatically updated to reflect the committed changes.