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
Unknown Object (File)
Tue, Apr 2, 7:42 PM
Unknown Object (File)
Tue, Apr 2, 5:57 PM
Unknown Object (File)
Tue, Apr 2, 8:54 AM
Unknown Object (File)
Mar 25 2024, 10:45 PM
Unknown Object (File)
Mar 3 2024, 7:32 AM
Unknown Object (File)
Mar 3 2024, 7:06 AM
Unknown Object (File)
Mar 2 2024, 4:47 PM
Unknown Object (File)
Feb 14 2024, 4:51 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.