]>
Commit | Line | Data |
---|---|---|
0f23eb5b GKH |
1 | From c130153e453cba0f37ad10fa18a1aa9c9a598a59 Mon Sep 17 00:00:00 2001 |
2 | From: Nicholas Piggin <npiggin@gmail.com> | |
3 | Date: Thu, 5 Apr 2018 15:57:54 +1000 | |
4 | Subject: powerpc/64s: Fix pkey support in dt_cpu_ftrs, add CPU_FTR_PKEY bit | |
5 | ||
6 | From: Nicholas Piggin <npiggin@gmail.com> | |
7 | ||
8 | commit c130153e453cba0f37ad10fa18a1aa9c9a598a59 upstream. | |
9 | ||
10 | The pkey code added a CPU_FTR_PKEY bit, but did not add it to the | |
11 | dt_cpu_ftrs feature set. Although capability is supported by all | |
12 | processors in the base dt_cpu_ftrs set for 64s, it's a significant | |
13 | and sufficiently well defined feature to make it optional. So add | |
14 | it as a quirk for now, which can be versioned out then controlled | |
15 | by the firmware (once dt_cpu_ftrs gains versioning support). | |
16 | ||
17 | Fixes: cf43d3b26452 ("powerpc: Enable pkey subsystem") | |
18 | Cc: stable@vger.kernel.org # v4.16+ | |
19 | Cc: Ram Pai <linuxram@us.ibm.com> | |
20 | Signed-off-by: Nicholas Piggin <npiggin@gmail.com> | |
21 | Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> | |
22 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
23 | ||
24 | --- | |
25 | arch/powerpc/kernel/dt_cpu_ftrs.c | 7 +++++++ | |
26 | 1 file changed, 7 insertions(+) | |
27 | ||
28 | --- a/arch/powerpc/kernel/dt_cpu_ftrs.c | |
29 | +++ b/arch/powerpc/kernel/dt_cpu_ftrs.c | |
30 | @@ -658,6 +658,13 @@ static void __init cpufeatures_setup_sta | |
31 | cur_cpu_spec->cpu_features |= CPU_FTR_ARCH_300; | |
32 | cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_ARCH_3_00; | |
33 | } | |
34 | + | |
35 | + /* | |
36 | + * PKEY was not in the initial base or feature node | |
37 | + * specification, but it should become optional in the next | |
38 | + * cpu feature version sequence. | |
39 | + */ | |
40 | + cur_cpu_spec->cpu_features |= CPU_FTR_PKEY; | |
41 | } | |
42 | ||
43 | static bool __init cpufeatures_process_feature(struct dt_cpu_feature *f) |