[PATCH 1/1] cpu: msr: disabled test for non-Intel/AMD architectures
Alex Hung
alex.hung at canonical.com
Tue Jan 3 08:27:47 UTC 2012
Hi,
The patch looks good. Ack from me.
On 12/06/2011 02:20 AM, Colin King wrote:
> From: Colin Ian King<colin.king at canonical.com>
>
> Signed-off-by: Colin Ian King<colin.king at canonical.com>
> ---
> src/cpu/msr/msr.c | 8 ++++++++
> 1 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/src/cpu/msr/msr.c b/src/cpu/msr/msr.c
> index d2c16a8..06a756f 100644
> --- a/src/cpu/msr/msr.c
> +++ b/src/cpu/msr/msr.c
> @@ -19,6 +19,8 @@
>
> #include "fwts.h"
>
> +#ifdef FWTS_ARCH_INTEL
> +
> typedef void (*msr_callback_check)(fwts_framework *fw, uint64_t val);
>
> static int ncpus;
> @@ -32,6 +34,10 @@ static int msr_init(fwts_framework *fw)
> fwts_log_error(fw, "Cannot get CPU info");
> return FWTS_ERROR;
> }
> + if (cpuinfo->vendor_id == NULL) {
> + fwts_log_error(fw, "Cannot get CPU vendor_id");
> + return FWTS_ERROR;
> + }
> intel_cpu = strstr(cpuinfo->vendor_id, "Intel") != NULL;
> amd_cpu = strstr(cpuinfo->vendor_id, "AuthenticAMD") != NULL;
>
> @@ -555,3 +561,5 @@ static fwts_framework_ops msr_ops = {
> };
>
> FWTS_REGISTER(msr,&msr_ops, FWTS_TEST_ANYTIME, FWTS_BATCH | FWTS_ROOT_PRIV);
> +
> +#endif
More information about the fwts-devel
mailing list