Commit c61797f2 authored by Quentin Perret's avatar Quentin Perret
Browse files

ANDROID: sched: Keep sched_class::set_cpus_allowed stable



The sched_class struct is part of the stable KMI, so let's revert to the
protoype of ->set_cpus_allowed() prior to the introduction of struct
affinity_context.

To do so, hardcode the only use of the indirected set_cpus_allowed()
callback in core.c to pass the affinity_context around without touching
sched_class. There should be no other users of ->set_cpus_allowed() in
the kernel tree, so the only other potential users are out-of-tree
modules. There is no obvious way to deal with them, so provide a
set_cpus_allowed_common_cb() wrapper which construct the affinity
context on the stack without the user_mask which will work in best
effort, and WARN() to make sure potential users are aware.

Bug: 254812379
Signed-off-by: default avatarQuentin Perret <qperret@google.com>
Change-Id: I6f096006c0a4b74a9c1ed0553739253bfd175c25
parent 448eb7ef
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment