diff options
author | Paul Mackerras <paulus@ozlabs.org> | 2017-01-30 13:21:35 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2017-01-31 11:11:44 +0300 |
commit | 3f4ab2f83b4e443c66549206eb88a9fa5a85d647 (patch) | |
tree | 6c93b3256d99f7a3e328215c2a6f68ffe2b58e9e /arch/powerpc/platforms/pseries/firmware.c | |
parent | 18569c1f134e1c5c88228f043c09678ae6052b7c (diff) | |
download | linux-3f4ab2f83b4e443c66549206eb88a9fa5a85d647.tar.xz |
powerpc/pseries: Fixes for the "ibm,architecture-vec-5" options
This fixes the byte index values for some of the option bits in
the "ibm,architectur-vec-5" property. The "platform facilities options"
bits are in byte 17 not byte 14, so the upper 8 bits of their
definitions need to be 0x11 not 0x0E. The "sub processor support" option
is in byte 21 not byte 15.
Note none of these options are actually looked up in
"ibm,architecture-vec-5" at this time, so there is no bug.
When checking whether option bits are set, we should check that
the offset of the byte being checked is less than the vector
length that we got from the hypervisor.
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/pseries/firmware.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/firmware.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/firmware.c b/arch/powerpc/platforms/pseries/firmware.c index ea7f09bd73b1..7d67623203b8 100644 --- a/arch/powerpc/platforms/pseries/firmware.c +++ b/arch/powerpc/platforms/pseries/firmware.c @@ -126,7 +126,7 @@ static void __init fw_vec5_feature_init(const char *vec5, unsigned long len) index = OV5_INDX(vec5_fw_features_table[i].feature); feat = OV5_FEAT(vec5_fw_features_table[i].feature); - if (vec5[index] & feat) + if (index < len && (vec5[index] & feat)) powerpc_firmware_features |= vec5_fw_features_table[i].val; } |