-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
device: add api to check if device initialized or not #25053
Conversation
The only failed case is not related to this PR, re-tun CI
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change to use the prefix that all other operations on devices use.
Don't put everything into the loop twice.
break; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this loop repeated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this loop repeated?
@pabigot we should put the core devices at the first, but we don't know how many core devices are initialized like before. The first loop is to find the core devices and then other devices.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this is targeting v1.14 but doesn't say that anywhere. It needs to be added to master and backported.
why is this against the 1.4 branch and not master? |
@andrewboie @pabigot because master is doing the refactor of device module and also PM module. Thanks |
Add api to check if device initialized success or not and power management will create device list based on this API. Signed-off-by: Wentong Wu <wentong.wu@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to say "no" to this until we have guidance on the conditions for changing a stable release to add capability that is not currently supported in master.
In particular while device_is_initialized()
is locally adequate, it is inconsistent with device_check_status()
which is being proposed in #23589 (+ #24873) in the context of #22941. At this time that API hasn't gotten enough attention to determine whether it's the right approach.
If something needs to be done in 1.14 there should be an issue describing exactly what needs to be done, and why it's important enough to do even when it's not compatible with master. #24750 is generic, and is currently neither classified as a bug nor prioritized.
@nashif @carlescufi please provide programmatic guidance.
I am not commenting the bug and the fix itself, but there is no need to add an API for a bug fix. Just check device->driver_api pointer where relevant directly (as it is being done in various places). It's not "nice" indeed, but adding an API won't fit with 1.14 maintenance I think. |
Add api to check if device initialized success or not and
power management will create device list based on this API.
Fixes: #24750
Signed-off-by: Wentong Wu wentong.wu@intel.com