Module Name:    src
Committed By:   martin
Date:           Mon Feb 24 14:26:11 UTC 2014

Modified Files:
        src/sys/arch/emips/ebus: clock_ebus.c

Log Message:
Remove the only use of __qdivrem inside kernels


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/emips/ebus/clock_ebus.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/emips/ebus/clock_ebus.c
diff -u src/sys/arch/emips/ebus/clock_ebus.c:1.7 src/sys/arch/emips/ebus/clock_ebus.c:1.8
--- src/sys/arch/emips/ebus/clock_ebus.c:1.7	Sun Nov 10 18:27:15 2013
+++ src/sys/arch/emips/ebus/clock_ebus.c	Mon Feb 24 14:26:11 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock_ebus.c,v 1.7 2013/11/10 18:27:15 christos Exp $	*/
+/*	$NetBSD: clock_ebus.c,v 1.8 2014/02/24 14:26:11 martin Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: clock_ebus.c,v 1.7 2013/11/10 18:27:15 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock_ebus.c,v 1.8 2014/02/24 14:26:11 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -117,8 +117,6 @@ __eclock_init(device_t dev)
  * NB: At 10MHz, our 64bits FreeRunning is worth 58,426 years.
  */
 
-extern u_quad_t __qdivrem(u_quad_t uq, u_quad_t vq, u_quad_t *arq);
-
 
 static int
 eclock_gettime(struct todr_chip_handle *todr, struct timeval *tv)
@@ -140,14 +138,14 @@ eclock_gettime(struct todr_chip_handle *
 	/*
 	 * Big fight with the compiler here, it gets very confused by 64bits.
 	 */
-#if 0
+#if 1
 	/*
 	 * This is in C: 
 	 */
 	{
 		uint64_t freeS, freeU;
-		freeS = free / (10 * 1000 * 1000);
-		freeU = free % (10 * 1000 * 1000);
+		freeS = free / 10000000UL;
+		freeU = free % 10000000UL;
 		tv->tv_sec  = freeS;
 		tv->tv_usec = freeU / 10;
 #if 0

Reply via email to