Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/aarch64/aarch64 Small simplification



details:   https://anonhg.NetBSD.org/src/rev/094ced40fd08
branches:  trunk
changeset: 949383:094ced40fd08
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Jan 11 17:12:13 2021 +0000

description:
Small simplification

diffstat:

 sys/arch/aarch64/aarch64/cpufunc.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (35 lines):

diff -r ce03762e0754 -r 094ced40fd08 sys/arch/aarch64/aarch64/cpufunc.c
--- a/sys/arch/aarch64/aarch64/cpufunc.c        Mon Jan 11 17:00:18 2021 +0000
+++ b/sys/arch/aarch64/aarch64/cpufunc.c        Mon Jan 11 17:12:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpufunc.c,v 1.26 2020/10/22 07:31:15 skrll Exp $       */
+/*     $NetBSD: cpufunc.c,v 1.27 2021/01/11 17:12:13 skrll Exp $       */
 
 /*
  * Copyright (c) 2017 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -30,7 +30,7 @@
 #include "opt_multiprocessor.h"
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.26 2020/10/22 07:31:15 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.27 2021/01/11 17:12:13 skrll Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -439,7 +439,6 @@
        struct cpu_info * const ci = curcpu();
        const uint64_t ctr = reg_ctr_el0_read();
        const uint64_t clidr = reg_clidr_el1_read();
-       const uint32_t midr __unused = reg_midr_el1_read();
 
        /* install default functions */
        ci->ci_cpufuncs.cf_set_ttbr0 = aarch64_set_ttbr0;
@@ -463,6 +462,8 @@
        }
 
 #ifdef CPU_THUNDERX
+       const uint32_t midr = reg_midr_el1_read();
+
        /* Cavium erratum 27456 */
        if ((midr == CPU_ID_THUNDERXP1d0) ||
            (midr == CPU_ID_THUNDERXP1d1) ||



Home | Main Index | Thread Index | Old Index