Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/aarch64 fix build error with LLVM



details:   https://anonhg.NetBSD.org/src/rev/ed07193777f2
branches:  trunk
changeset: 1014740:ed07193777f2
user:      ryo <ryo%NetBSD.org@localhost>
date:      Thu Oct 01 06:40:16 2020 +0000

description:
fix build error with LLVM

diffstat:

 sys/arch/aarch64/aarch64/procfs_machdep.c |  8 +++++---
 sys/arch/aarch64/include/cpu.h            |  4 ++--
 2 files changed, 7 insertions(+), 5 deletions(-)

diffs (49 lines):

diff -r f83d355d14d6 -r ed07193777f2 sys/arch/aarch64/aarch64/procfs_machdep.c
--- a/sys/arch/aarch64/aarch64/procfs_machdep.c Thu Oct 01 02:00:04 2020 +0000
+++ b/sys/arch/aarch64/aarch64/procfs_machdep.c Thu Oct 01 06:40:16 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: procfs_machdep.c,v 1.2 2020/09/30 08:43:47 ryo Exp $ */
+/* $NetBSD: procfs_machdep.c,v 1.3 2020/10/01 06:40:16 ryo Exp $ */
 
 /*-
  * Copyright (c) 2020 Ryo Shimizu <ryo%nerv.org@localhost>
@@ -27,9 +27,11 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.2 2020/09/30 08:43:47 ryo Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.3 2020/10/01 06:40:16 ryo Exp $");
 
 #include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/cpu.h>
 #include <miscfs/procfs/procfs.h>
 #include <aarch64/armreg.h>
 
@@ -188,7 +190,7 @@
        total = 0;
 
        for (CPU_INFO_FOREACH(cii, ci)) {
-               OUTPUT_BUF("processor\t: %lu\n", cii);
+               OUTPUT_BUF("processor\t: %d\n", cii);
 
                len = procfs_cpuinfo_features(ci, buf, left);
                FORWARD_BUF(len);
diff -r f83d355d14d6 -r ed07193777f2 sys/arch/aarch64/include/cpu.h
--- a/sys/arch/aarch64/include/cpu.h    Thu Oct 01 02:00:04 2020 +0000
+++ b/sys/arch/aarch64/include/cpu.h    Thu Oct 01 06:40:16 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.27 2020/09/14 10:06:35 ryo Exp $ */
+/* $NetBSD: cpu.h,v 1.28 2020/10/01 06:40:16 ryo Exp $ */
 
 /*-
  * Copyright (c) 2014, 2020 The NetBSD Foundation, Inc.
@@ -156,7 +156,7 @@
 extern struct cpu_info *cpu_info[];
 extern struct cpu_info cpu_info_store[];
 
-#define CPU_INFO_ITERATOR      cpuid_t
+#define CPU_INFO_ITERATOR      int
 #if defined(MULTIPROCESSOR) || defined(_MODULE)
 #define cpu_number()           (curcpu()->ci_index)
 #define CPU_IS_PRIMARY(ci)     ((ci)->ci_index == 0)



Home | Main Index | Thread Index | Old Index