Page MenuHomeFreeBSD

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

Authored by bz on May 20 2022, 9:56 PM.
Tags
None
Referenced Files
F138057068: D35276.id106813.diff
Fri, Nov 28, 1:22 PM
Unknown Object (File)
Wed, Nov 26, 10:40 AM
Unknown Object (File)
Fri, Nov 21, 4:53 PM
Unknown Object (File)
Fri, Nov 21, 3:37 PM
Unknown Object (File)
Tue, Nov 11, 11:25 PM
Unknown Object (File)
Fri, Nov 7, 12:00 PM
Unknown Object (File)
Fri, Nov 7, 5:49 AM
Unknown Object (File)
Thu, Nov 6, 6:15 AM

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
Lint Not Applicable
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
348

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
348

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
348

Making this change is fine!

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

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.Jun 3 2022, 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.