Commit cbe5aee
PM: EM: Assign a unique ID when creating a performance domain
It is necessary to refer to a specific performance domain from a
userspace. For example, the energy model of a particular performance
domain is updated.
To this end, assign a unique ID to each performance domain to address it,
and manage them in a global linked list to look up a specific one by
matching ID. IDA is used for ID assignment, and the mutex is used to
protect the global list from concurrent access.
Note that the mutex (em_pd_list_mutex) is not supposed to hold while
holding em_pd_mutex to avoid ABBA deadlock.
Signed-off-by: Changwoo Min <changwoo@igalia.com>
Reviewed-by: Lukasz Luba <lukasz.luba@arm.com>
Link: https://patch.msgid.link/20251020220914.320832-2-changwoo@igalia.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>1 parent 211ddde commit cbe5aee
2 files changed
Lines changed: 33 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
71 | 73 | | |
72 | 74 | | |
73 | 75 | | |
| 76 | + | |
| 77 | + | |
74 | 78 | | |
75 | 79 | | |
76 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
| |||
396 | 406 | | |
397 | 407 | | |
398 | 408 | | |
399 | | - | |
| 409 | + | |
400 | 410 | | |
401 | 411 | | |
402 | 412 | | |
| |||
420 | 430 | | |
421 | 431 | | |
422 | 432 | | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
423 | 440 | | |
424 | 441 | | |
425 | 442 | | |
| |||
444 | 461 | | |
445 | 462 | | |
446 | 463 | | |
| 464 | + | |
447 | 465 | | |
448 | 466 | | |
449 | 467 | | |
| |||
660 | 678 | | |
661 | 679 | | |
662 | 680 | | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
663 | 685 | | |
664 | 686 | | |
665 | 687 | | |
| |||
678 | 700 | | |
679 | 701 | | |
680 | 702 | | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
681 | 707 | | |
682 | 708 | | |
683 | 709 | | |
| |||
689 | 715 | | |
690 | 716 | | |
691 | 717 | | |
| 718 | + | |
| 719 | + | |
692 | 720 | | |
693 | 721 | | |
694 | 722 | | |
| |||
0 commit comments