Commit f7e45d9
Ard Biesheuvel
arm64: kernel: use literal for relocated address of __secondary_switched
We can simply use a relocated 64-bit literal to store the address of
__secondary_switched(), and the relocation code will ensure that it
holds the correct value at secondary entry time, as long as we make sure
that the literal is not dereferenced until after we have enabled the MMU.
So jump via a small __secondary_switch() function covered by the ID map
that performs the literal load and branch-to-register.
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
(cherry picked from commit e5ebeec879b726c755af0c1c15f3699b53268cd5)
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>1 parent 7a28120 commit f7e45d9
1 file changed
Lines changed: 7 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
469 | | - | |
470 | | - | |
471 | | - | |
| 469 | + | |
472 | 470 | | |
473 | 471 | | |
474 | 472 | | |
| |||
672 | 670 | | |
673 | 671 | | |
674 | 672 | | |
675 | | - | |
676 | | - | |
677 | | - | |
| 673 | + | |
678 | 674 | | |
679 | 675 | | |
680 | | - | |
681 | 676 | | |
682 | 677 | | |
683 | 678 | | |
| |||
750 | 745 | | |
751 | 746 | | |
752 | 747 | | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
0 commit comments