diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2014-11-02 09:32:42 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-11-14 01:24:20 -0500 |
commit | 9e819963b45f79e87f5a8c44960a66c0727c80e6 (patch) | |
tree | 5ca6d6789d14e51beb73c21d891e511bc442f277 | |
parent | d8ee6f34fdd28ade6b7b3a9be175bc5c0c3cfb38 (diff) |
powerpc: Disable CPU_FTR_TM if TM is disabled by firmware
Firmware is allowed to communicate to us via the "ibm,pa-features" property
that TM (Transactional Memory) support is disabled.
Currently this doesn't happen on any platform we're aware of, but we should
honor it anyway.
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
-rw-r--r-- | arch/powerpc/kernel/prom.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 6af05fc1dec9..6a799b3cc6b4 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -160,6 +160,12 @@ static struct ibm_pa_feature { | |||
160 | {CPU_FTR_NODSISRALIGN, 0, 0, 1, 1, 1}, | 160 | {CPU_FTR_NODSISRALIGN, 0, 0, 1, 1, 1}, |
161 | {0, MMU_FTR_CI_LARGE_PAGE, 0, 1, 2, 0}, | 161 | {0, MMU_FTR_CI_LARGE_PAGE, 0, 1, 2, 0}, |
162 | {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0}, | 162 | {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0}, |
163 | /* | ||
164 | * If the kernel doesn't support TM (ie. CONFIG_PPC_TRANSACTIONAL_MEM=n), | ||
165 | * we don't want to turn on CPU_FTR_TM here, so we use CPU_FTR_TM_COMP | ||
166 | * which is 0 if the kernel doesn't support TM. | ||
167 | */ | ||
168 | {CPU_FTR_TM_COMP, 0, 0, 22, 0, 0}, | ||
163 | }; | 169 | }; |
164 | 170 | ||
165 | static void __init scan_features(unsigned long node, const unsigned char *ftrs, | 171 | static void __init scan_features(unsigned long node, const unsigned char *ftrs, |