Repository navigation
Commit 6b0ba55
schedule: dp: look up the DP scheduler by core in the LL user thread
With CONFIG_SOF_USERSPACE_APPLICATION and CONFIG_SOF_USERSPACE_LL,
scheduler_dp_ll_post_tick() runs in the LL user thread on every LL tick
and finds the DP scheduler with scheduler_get_user_data(). This now
reads the kernel-only copy of the user scheduler list, so the LL thread
takes a load/store privilege exception (EXCCAUSE 26) as soon as audio
starts.
Pass the core of the calling LL scheduler to scheduler_dp_ll_post_tick()
and look up the DP scheduler with arch_user_schedulers_get_for_core(),
which is safe to call from user threads. Use the same core for the DP
lock instead of cpu_get_id(), which reads a privileged register.
Fixes: 91c2148 ("schedule: keep user scheduler descriptors read-only to user threads")
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>1 parent 52c7405 commit 6b0ba55
3 files changed
Lines changed: 11 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
150 | 152 | | |
151 | | - | |
| 153 | + | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
58 | 61 | | |
59 | 62 | | |
60 | 63 | | |
| |||
64 | 67 | | |
65 | 68 | | |
66 | 69 | | |
67 | | - | |
| 70 | + | |
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
72 | | - | |
| 75 | + | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
| 305 | + | |
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
| |||
0 commit comments