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
F106099317: D8669.diff
Wed, Dec 25, 9:35 AM
Unknown Object (File)
Oct 25 2024, 9:02 AM
Unknown Object (File)
Oct 25 2024, 12:17 AM
Unknown Object (File)
Oct 10 2024, 12:20 PM
Unknown Object (File)
Sep 11 2024, 3:02 PM
Unknown Object (File)
Sep 8 2024, 5:49 PM
Unknown Object (File)
Sep 7 2024, 8:29 PM
Unknown Object (File)
Sep 7 2024, 4:57 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.