Skip to content

Commit 43d0d37

Browse files
apopplempe
authored andcommitted
powerpc/dt_cpu_ftrs: Advertise support for ISA v3.1 if selected
On powernv hardware support for ISAv3.1 is advertised via a cpu feature bit in the device tree. This patch enables the associated HWCAP bit if the device tree indicates ISAv3.1 is available. Signed-off-by: Alistair Popple <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3fd5836 commit 43d0d37

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

arch/powerpc/kernel/dt_cpu_ftrs.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
/* Device-tree visible constants follow */
2727
#define ISA_V2_07B 2070
2828
#define ISA_V3_0B 3000
29+
#define ISA_V3_1 3100
2930

3031
#define USABLE_PR (1U << 0)
3132
#define USABLE_OS (1U << 1)
@@ -662,6 +663,11 @@ static void __init cpufeatures_setup_start(u32 isa)
662663
cur_cpu_spec->cpu_features |= CPU_FTR_ARCH_300;
663664
cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_ARCH_3_00;
664665
}
666+
667+
if (isa >= 3100) {
668+
cur_cpu_spec->cpu_features |= CPU_FTR_ARCH_31;
669+
cur_cpu_spec->cpu_user_features2 |= PPC_FEATURE2_ARCH_3_1;
670+
}
665671
}
666672

667673
static bool __init cpufeatures_process_feature(struct dt_cpu_feature *f)

0 commit comments

Comments
 (0)