Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1252565

Re: [PATCHv4 08/24] arm64: Keep track of CPU feature registers

From Dave Martin <Dave.Martin@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCHv4 08/24] arm64: Keep track of CPU feature registers
Date 2015-10-21 10:50 +0200
Message-ID <qlXfQ-6bq-1@gated-at.bofh.it> (permalink)
References <qliFI-5Ez-11@gated-at.bofh.it> <qliPp-5PM-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCHv4 08/24] arm64: Keep track of CPU feature registers "Suzuki K. Poulose" <suzuki.poulose@arm.com> - 2015-10-19 15:40 +0200
  Re: [PATCHv4 08/24] arm64: Keep track of CPU feature registers Dave Martin <Dave.Martin@arm.com> - 2015-10-21 10:50 +0200

csiph-web