Skip to content

Commit 156e0d5

Browse files
Suzuki K Poulosewildea01
authored andcommitted
arm64: cpufeature: Document the rules of safe value for features
Document the rules for choosing the safe value for different types of features. Cc: Dave Martin <dave.martin@arm.com> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: Will Deacon <will.deacon@arm.com> Cc: Mark Rutland <mark.rutland@arm.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
1 parent eab43e8 commit 156e0d5

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

arch/arm64/include/asm/cpufeature.h

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,20 @@
2929
#include <linux/jump_label.h>
3030
#include <linux/kernel.h>
3131

32-
/* CPU feature register tracking */
32+
/*
33+
* CPU feature register tracking
34+
*
35+
* The safe value of a CPUID feature field is dependent on the implications
36+
* of the values assigned to it by the architecture. Based on the relationship
37+
* between the values, the features are classified into 3 types - LOWER_SAFE,
38+
* HIGHER_SAFE and EXACT.
39+
*
40+
* The lowest value of all the CPUs is chosen for LOWER_SAFE and highest
41+
* for HIGHER_SAFE. It is expected that all CPUs have the same value for
42+
* a field when EXACT is specified, failing which, the safe value specified
43+
* in the table is chosen.
44+
*/
45+
3346
enum ftr_type {
3447
FTR_EXACT, /* Use a predefined safe value */
3548
FTR_LOWER_SAFE, /* Smaller value is safe */

0 commit comments

Comments
 (0)