Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/include Add a nice 64-bit mstohz() and clea...



details:   https://anonhg.NetBSD.org/src/rev/455fe5401e41
branches:  trunk
changeset: 525245:455fe5401e41
user:      eeh <eeh%NetBSD.org@localhost>
date:      Mon Apr 08 21:05:30 2002 +0000

description:
Add a nice 64-bit mstohz() and clean out some cruft.

diffstat:

 sys/arch/sparc64/include/param.h |  36 +++++++-----------------------------
 1 files changed, 7 insertions(+), 29 deletions(-)

diffs (64 lines):

diff -r 9f3a0023d31b -r 455fe5401e41 sys/arch/sparc64/include/param.h
--- a/sys/arch/sparc64/include/param.h  Mon Apr 08 20:15:59 2002 +0000
+++ b/sys/arch/sparc64/include/param.h  Mon Apr 08 21:05:30 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: param.h,v 1.28 2002/02/26 15:13:26 simonb Exp $ */
+/*     $NetBSD: param.h,v 1.29 2002/04/08 21:05:30 eeh Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -45,7 +45,7 @@
  */
 
 /*
- * Copyright (c) 1996-1999 Eduardo Horvath
+ * Copyright (c) 1996-2002 Eduardo Horvath
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -251,40 +251,18 @@
  */
 #define        bdbtofsb(bn)    ((bn) / (BLKDEV_IOSIZE / DEV_BSIZE))
 
-/*
- * dvmamap manages a range of DVMA addresses intended to create double
- * mappings of physical memory. In a way, `dvmamap' is a submap of the
- * VM map `phys_map'. The difference is the use of the `resource map'
- * routines to manage page allocation, allowing DVMA addresses to be
- * allocated and freed from within interrupt routines.
- *
- * Note that `phys_map' can still be used to allocate memory-backed pages
- * in DVMA space.
- */
 #ifdef _KERNEL
 #ifndef _LOCORE
-#if 0
-extern vaddr_t dvma_base;
-extern vaddr_t dvma_end;
-extern struct map      *dvmamap;
-/*
- * The dvma resource map is defined in page units, which are numbered 1 to N.
- * Use these macros to convert to/from virtual addresses.
- */
-#define rctov(n)               (ctob(((n)-1))+dvma_base)
-#define vtorc(v)               ((btoc((v)-dvma_base))+1)
-
-extern caddr_t kdvma_mapin __P((caddr_t, int, int));
-extern caddr_t dvma_malloc __P((size_t, void *, int));
-extern void    dvma_free __P((caddr_t, size_t, void *));
-#endif
 
 extern void    delay __P((unsigned int));
 #define        DELAY(n)        delay(n)
 
+#ifdef __arch64__
+/* If we're using a 64-bit kernel use 64-bit math */
+#define mstohz(ms) ((ms + 0UL) * hz / 1000)
+#endif
+
 extern int cputyp;
-extern int cpumod;
-extern int mmumod;
 
 #endif /* _LOCORE */
 #endif /* _KERNEL */



Home | Main Index | Thread Index | Old Index