Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 Remove more #ifdef SUN4V to make co...



details:   https://anonhg.NetBSD.org/src/rev/dc150d62336d
branches:  trunk
changeset: 803619:dc150d62336d
user:      nakayama <nakayama%NetBSD.org@localhost>
date:      Wed Nov 05 13:30:11 2014 +0000

description:
Remove more #ifdef SUN4V to make compilable w/o options SUN4V.

diffstat:

 sys/arch/sparc64/sparc64/cache.h    |   6 +-----
 sys/arch/sparc64/sparc64/cpu.c      |   8 ++------
 sys/arch/sparc64/sparc64/ipifuncs.c |  14 ++------------
 3 files changed, 5 insertions(+), 23 deletions(-)

diffs (137 lines):

diff -r c54fe04d44f7 -r dc150d62336d sys/arch/sparc64/sparc64/cache.h
--- a/sys/arch/sparc64/sparc64/cache.h  Wed Nov 05 12:28:46 2014 +0000
+++ b/sys/arch/sparc64/sparc64/cache.h  Wed Nov 05 13:30:11 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cache.h,v 1.24 2014/11/04 18:11:42 palle Exp $ */
+/*     $NetBSD: cache.h,v 1.25 2014/11/05 13:30:11 nakayama Exp $ */
 
 /*
  * Copyright (c) 2011 Matthew R. Green
@@ -82,9 +82,7 @@
  */
 
 #include <machine/psl.h>
-#ifdef SUN4V
 #include <machine/hypervisor.h>
-#endif
 
 /* Various cache size/line sizes */
 extern int     ecache_min_line_size;
@@ -120,7 +118,6 @@
 void sp_tlb_flush_all_us(void);
 void sp_tlb_flush_all_usiii(void);
 
-#ifdef SUN4V
 static __inline__ void
 sp_tlb_flush_pte_sun4v(vaddr_t va, int ctx)
 {
@@ -129,7 +126,6 @@
        if ( hv_rc != H_EOK )
                panic("hv_mmu_demap_page(%p,%d) failed - rc = %" PRIx64 "\n", (void*)va, ctx, hv_rc);
 }
-#endif
 
 static __inline__ void
 sp_tlb_flush_pte(vaddr_t va, int ctx)
diff -r c54fe04d44f7 -r dc150d62336d sys/arch/sparc64/sparc64/cpu.c
--- a/sys/arch/sparc64/sparc64/cpu.c    Wed Nov 05 12:28:46 2014 +0000
+++ b/sys/arch/sparc64/sparc64/cpu.c    Wed Nov 05 13:30:11 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.119 2014/11/04 18:11:42 palle Exp $ */
+/*     $NetBSD: cpu.c,v 1.120 2014/11/05 13:30:11 nakayama Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.119 2014/11/04 18:11:42 palle Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.120 2014/11/05 13:30:11 nakayama Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -74,14 +74,10 @@
 #include <machine/openfirm.h>
 
 #include <sparc64/sparc64/cache.h>
-#ifdef SUN4V
 #include <sparc64/hypervisor.h>
-#endif
 
-#ifdef SUN4V
 #define SUN4V_MONDO_QUEUE_SIZE 32
 #define SUN4V_QUEUE_ENTRY_SIZE 64
-#endif
 
 int ecache_min_line_size;
 
diff -r c54fe04d44f7 -r dc150d62336d sys/arch/sparc64/sparc64/ipifuncs.c
--- a/sys/arch/sparc64/sparc64/ipifuncs.c       Wed Nov 05 12:28:46 2014 +0000
+++ b/sys/arch/sparc64/sparc64/ipifuncs.c       Wed Nov 05 13:30:11 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ipifuncs.c,v 1.52 2014/11/04 18:11:42 palle Exp $ */
+/*     $NetBSD: ipifuncs.c,v 1.53 2014/11/05 13:30:11 nakayama Exp $ */
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.52 2014/11/04 18:11:42 palle Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipifuncs.c,v 1.53 2014/11/05 13:30:11 nakayama Exp $");
 
 #include "opt_ddb.h"
 
@@ -53,9 +53,7 @@
 #endif
 #endif
 
-#ifdef SUN4V
 #define SPARC64_IPI_RETRIES    10000
-#endif
 
 /* CPU sets containing halted, paused and resumed cpus */
 static volatile sparc64_cpuset_t cpus_halted;
@@ -69,9 +67,7 @@
 
 /* Send IPI functions for supported platforms */
 static void    sparc64_send_ipi_sun4u(int, ipifunc_t, uint64_t, uint64_t);
-#ifdef SUN4V
 static void    sparc64_send_ipi_sun4v(int, ipifunc_t, uint64_t, uint64_t);
-#endif
  
 /*
  * These are the "function" entry points in locore.s/mp_subr.s to handle IPI's.
@@ -80,14 +76,10 @@
 void   sparc64_ipi_pause(void *, void *);
 void   sparc64_ipi_flush_pte_us(void *, void *);
 void   sparc64_ipi_flush_pte_usiii(void *, void *);
-#ifdef SUN4V
 void   sparc64_ipi_flush_pte_sun4v(void *, void *);
-#endif
 void   sparc64_ipi_dcache_flush_page_us(void *, void *);
 void   sparc64_ipi_dcache_flush_page_usiii(void *, void *);
-#ifdef SUN4V
 void   sparc64_ipi_dcache_flush_page_sun4v(void *, void *);
-#endif
 void   sparc64_ipi_blast_dcache(void *, void *);
 void   sparc64_ipi_ccall(void *, void *);
 
@@ -289,7 +281,6 @@
                        " (tried %d times)", cpu_number(), upaid, i);
 }
 
-#ifdef SUN4V
 /*
  * Send an interprocessor interrupt - sun4v.
  */
@@ -314,7 +305,6 @@
                panic("Unable to send mondo %lx to cpu %d: %d",
                    (long unsigned int)func, cpuid, err);
 }
-#endif
 
 /*
  * Wait for IPI operation to complete.



Home | Main Index | Thread Index | Old Index