lkml.org 
[lkml]   [2015]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCHv4 08/24] arm64: Keep track of CPU feature registers
On Mon, Oct 19, 2015 at 02:24:45PM +0100, Suzuki K. Poulose wrote:
> This patch adds an infrastructure to keep track of the CPU feature
> registers on the system. For each register, the infrastructure keeps
> track of the system wide safe value of the feature bits. Also, tracks
> the which fields of a register should be matched strictly across all
> the CPUs on the system for the SANITY check infrastructure.

[...]

> diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h
> index 85507fe..af0c187 100644
> --- a/arch/arm64/include/asm/cpufeature.h
> +++ b/arch/arm64/include/asm/cpufeature.h
> @@ -35,6 +35,37 @@
>
> #include <linux/kernel.h>
>
> +/* CPU feature register tracking */
> +enum ftr_type {
> + FTR_EXACT, /* Use a predefined safe value */
> + FTR_LOWER_SAFE, /* Smaller value is safe */
> + FTR_HIGHER_SAFE,/* Bigger value is safe */
> +};
> +
> +#define FTR_STRICT true /* SANITY check strict matching required */
> +#define FTR_NONSTRICT false /* SANITY check ignored */
> +
> +struct arm64_ftr_bits {
> + bool strict; /* CPU Sanity check: strict matching required ? */
> + enum ftr_type type;
> + u8 shift;
> + u8 width;
> + s64 safe_val; /* safe value for discrete features */
> +};
> +
> +/*
> + * @arm64_ftr_reg - Feature register
> + * @strict_mask Bits which should match across all CPUs for sanity.

nit: ^ whitespace, no need to fix unless respinning the series

> + * @sys_val Safe value across the CPUs (system view)
> + */
> +struct arm64_ftr_reg {

[...]

Cheers
---Dave



\
 
 \ /
  Last update: 2015-10-21 11:01    [W:0.141 / U:0.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site