Module Name:    src
Committed By:   nakayama
Date:           Mon Apr  5 22:36:27 UTC 2021

Modified Files:
        src/sys/arch/sparc64/include: cpu.h
        src/sys/arch/sparc64/sparc64: cpu.c

Log Message:
Fix build w/o options SUN4V.


To generate a diff of this commit:
cvs rdiff -u -r1.131 -r1.132 src/sys/arch/sparc64/include/cpu.h
cvs rdiff -u -r1.139 -r1.140 src/sys/arch/sparc64/sparc64/cpu.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc64/include/cpu.h
diff -u src/sys/arch/sparc64/include/cpu.h:1.131 src/sys/arch/sparc64/include/cpu.h:1.132
--- src/sys/arch/sparc64/include/cpu.h:1.131	Sat Apr  3 17:01:24 2021
+++ src/sys/arch/sparc64/include/cpu.h	Mon Apr  5 22:36:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.131 2021/04/03 17:01:24 palle Exp $ */
+/*	$NetBSD: cpu.h,v 1.132 2021/04/05 22:36:27 nakayama Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -198,7 +198,7 @@ struct cpu_info {
 
 	/* TSB description (sun4v). */
 	struct tsb_desc         *ci_tsb_desc;
-	
+
 	/* MMU Fault Status Area (sun4v).
 	 * Will be initialized to the physical address of the bottom of
 	 * the interrupt stack.
@@ -440,9 +440,6 @@ void	switchtoctx_usiii(int);
 void	next_tick(long);
 void	next_stick(long);
 void	next_stick_init(void);
-#ifdef SUN4V
-void    cpu_idle_sun4v(void);
-#endif
 /* trap.c */
 void	cpu_vmspace_exec(struct lwp *, vaddr_t, vaddr_t);
 int	rwindow_save(struct lwp *);

Index: src/sys/arch/sparc64/sparc64/cpu.c
diff -u src/sys/arch/sparc64/sparc64/cpu.c:1.139 src/sys/arch/sparc64/sparc64/cpu.c:1.140
--- src/sys/arch/sparc64/sparc64/cpu.c:1.139	Sat Apr  3 17:01:24 2021
+++ src/sys/arch/sparc64/sparc64/cpu.c	Mon Apr  5 22:36:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.139 2021/04/03 17:01:24 palle Exp $ */
+/*	$NetBSD: cpu.c,v 1.140 2021/04/05 22:36:27 nakayama Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.139 2021/04/03 17:01:24 palle Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.140 2021/04/05 22:36:27 nakayama Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -95,6 +95,7 @@ struct cpu_bootargs *cpu_args;	/* alloca
 struct pool_cache *fpstate_cache;
 
 static struct cpu_info *alloc_cpuinfo(u_int);
+static void cpu_idle_sun4v(void);
 
 /* The following are used externally (sysctl_hw). */
 char	machine[] = MACHINE;		/* from <machine/param.h> */
@@ -700,16 +701,15 @@ cpu_attach(device_t parent, device_t dev
 	 * cpu_idle setup (currently only necessary for sun4v)
 	 */
 	if (CPU_ISSUN4V) {
-	  ci->ci_idlespin = cpu_idle_sun4v;
+		ci->ci_idlespin = cpu_idle_sun4v;
 	}
 }
 
-#ifdef SUN4V
-void cpu_idle_sun4v(void)
+static void
+cpu_idle_sun4v(void)
 {
-  hv_cpu_yield();
+	hv_cpu_yield();
 }
-#endif
 
 int
 cpu_myid(void)

Reply via email to