Commit b57bd2d
powerpc: Improve FSCR init and context switching
This fixes a few issues with FSCR init and switching.
In commit 152d523 ("powerpc: Create context switch helpers
save_sprs() and restore_sprs()") we moved the setting of the FSCR
register from inside an CPU_FTR_ARCH_207S section to inside just a
CPU_FTR_ARCH_DSCR section. Hence we are setting FSCR on POWER6/7 where
the FSCR doesn't exist. This is harmless but we shouldn't do it.
Also, we can simplify the FSCR context switch. We don't need to go
through the calculation involving dscr_inherit. We can just restore
what we saved last time.
We also set an initial value in INIT_THREAD, so that pid 1 which is
cloned from that gets a sane value.
Based on patch by Jack Miller.
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>1 parent 103b782 commit b57bd2d
3 files changed
+7
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| 350 | + | |
350 | 351 | | |
351 | 352 | | |
352 | 353 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1031 | 1031 | | |
1032 | 1032 | | |
1033 | 1033 | | |
1034 | | - | |
1035 | | - | |
1036 | | - | |
| 1034 | + | |
1037 | 1035 | | |
1038 | | - | |
1039 | | - | |
1040 | 1036 | | |
1041 | 1037 | | |
1042 | 1038 | | |
1043 | | - | |
1044 | | - | |
1045 | | - | |
1046 | 1039 | | |
1047 | 1040 | | |
1048 | 1041 | | |
| |||
1053 | 1046 | | |
1054 | 1047 | | |
1055 | 1048 | | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
1056 | 1052 | | |
1057 | 1053 | | |
1058 | 1054 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1419 | 1419 | | |
1420 | 1420 | | |
1421 | 1421 | | |
1422 | | - | |
| 1422 | + | |
| 1423 | + | |
1423 | 1424 | | |
1424 | 1425 | | |
1425 | 1426 | | |
| |||
0 commit comments