Page MenuHomeFreeBSD

LinuxKPI: restore several hard coded return values for the CONFIG_PM case
Needs ReviewPublic

Authored by bz on Mon, Oct 19, 9:40 PM.
Referenced Files
F176620420: D60878.id.diff
Tue, Oct 20, 7:27 AM
F176612812: D60878.diff
Tue, Oct 20, 5:59 AM
F176610343: D60878.id.diff
Tue, Oct 20, 5:32 AM
F176610206: D60878.id190326.diff
Tue, Oct 20, 5:30 AM
F176609831: D60878.id190326.diff
Tue, Oct 20, 5:26 AM
F176596457: D60878.id190326.diff
Tue, Oct 20, 2:48 AM
F176596332: D60878.diff
Tue, Oct 20, 2:46 AM
Subscribers

Details

Reviewers
markj
Group Reviewers
linuxkpi
Summary

drm-kmod sets CONFIG_PM (unclear if for other parts) but LinuxKPI
has no understanding of a dev->power implementation for pm_runtime.h.

The return values based on !CONFIG_PM thus cause problems to drm-kmod.
Return the previous values under CONFIG_PM but leave the TODO logging
as the actual implementation is missing and return values may not be
universally correct (beyond the known drm-kmod use cases).

The following functions having a return value but none sepcific for
CONFIG_PM as (based on drm-kmod master):
pm_runtime_resume only caller ignores the return value
pm_runtime_set_active two callers ignore the return value
pm_runtime_put_autosuspend all callers seem to ignore the return value
pm_runtime_autosuspend 2/3 callers ignore the return value;

3rd is #ifdef __linux__

pm_runtime_suspended 3/4 callers ... do check the return value

but the logic expects the false, which also
matches the previous value.

Fixes: 863fe7ae5152 ("LinuxKPI: re-implement pm_runtime.h")
Reported by: markj
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 78382
Build 75265: arc lint + arc unit