Page MenuHomeFreeBSD

LinuxKPI: move pm_message_t from kernel.h to pm.h
ClosedPublic

Authored by bz on May 20 2022, 9:56 PM.

Details

Summary

Move pm_message_t from kernel.h to pm.h and remove a private define
in usb.h as well as adjust the implementation in linux_usb.c.
This cleans up what I believe to be a historic shortcut.

This is needed for future wireless driver updates.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Obtained from: bz_git_iwlwifi (Dec 2020) (partly)

Test Plan

Note: https://github.com/freebsd/drm-kmod/pull/169 should be in place
in main and stable/13 before this can land.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

bz requested review of this revision.May 20 2022, 9:56 PM
imp added inline comments.
sys/compat/linuxkpi/common/src/linux_usb.c
347

This seems to be a change as well... I think that due to the sins of the ABIs that they are the same, but am not 100% sure, so I thought I'd ask if this was intended or not...

This revision is now accepted and ready to land.May 20 2022, 10:02 PM
bz marked an inline comment as done.May 20 2022, 10:07 PM
bz added a subscriber: hselasky.
bz added inline comments.
sys/compat/linuxkpi/common/src/linux_usb.c
347

Yes, it's needed to clean up as previously the argument was typedef'ed to void * in usb.h and should have been NULL and not 0.
If I understood @hselasky correctly the LinuxKPI USB code is currently basically unused. If I got this wrong, then please make sure I am aware.

sys/compat/linuxkpi/common/src/linux_usb.c
347

Making this change is fine!

sys/compat/linuxkpi/common/src/linux_usb.c
347

The struct will be passed as a single integer register anyway due to its size, so it won't break binary.

bz marked 2 inline comments as done.Fri, Jun 3, 2:58 PM
bz added a subscriber: wulf.

@wulf thankfully merged the dependent change into drm-kmod a few days ago; I'll commit this once the ports are updated as well to not break things.

PR 264449 fr ports updates.

This revision was automatically updated to reflect the committed changes.