Commit b4eb08f
committed
sched/wqueue: Align hp_work_stack/lp_work_stack
Ensure each stack is properly aligned by rounding up the stack size.
This is critical when CONFIG_SCHED_HPNTHREADS > 1 or CONFIG_SCHED_LPNTHREADS > 1
to ensure all thread stacks start at properly aligned addresses.
Without proper alignment, subsequent threads' stacks may start at misaligned
addresses, which can cause:
- Hard faults on architectures with strict alignment requirements
- Performance degradation due to unaligned memory access
- TLS corruption when CONFIG_TLS_ALIGNED is enabled
Signed-off-by: pangzhen1 <pangzhen1@xiaomi.com>1 parent 508f0d4 commit b4eb08f
1 file changed
+20
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
562 | | - | |
563 | | - | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
564 | 571 | | |
565 | 572 | | |
566 | 573 | | |
567 | 574 | | |
568 | 575 | | |
569 | | - | |
| 576 | + | |
570 | 577 | | |
571 | 578 | | |
572 | 579 | | |
| |||
599 | 606 | | |
600 | 607 | | |
601 | 608 | | |
602 | | - | |
603 | | - | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
604 | 618 | | |
605 | 619 | | |
606 | 620 | | |
607 | 621 | | |
608 | 622 | | |
609 | | - | |
| 623 | + | |
610 | 624 | | |
611 | 625 | | |
612 | 626 | | |
| |||
0 commit comments