fix build error with LLVM
This commit is contained in:
parent
055829b56d
commit
4237298128
@ -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>
|
||||
@ -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 @@ procfs_getcpuinfstr(char *buf, size_t *lenp)
|
||||
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);
|
||||
|
@ -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 @@ void cpu_hatch(struct cpu_info *);
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user