Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/emips/ebus Remove the only use of __qdivrem inside ...
details: https://anonhg.NetBSD.org/src/rev/7195fa18bb70
branches: trunk
changeset: 326974:7195fa18bb70
user: martin <martin%NetBSD.org@localhost>
date: Mon Feb 24 14:26:11 2014 +0000
description:
Remove the only use of __qdivrem inside kernels
diffstat:
sys/arch/emips/ebus/clock_ebus.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diffs (45 lines):
diff -r 136bd8068ae1 -r 7195fa18bb70 sys/arch/emips/ebus/clock_ebus.c
--- a/sys/arch/emips/ebus/clock_ebus.c Mon Feb 24 12:21:27 2014 +0000
+++ b/sys/arch/emips/ebus/clock_ebus.c Mon Feb 24 14:26:11 2014 +0000
@@ -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 @@
* 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 @@
/*
* 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
Home |
Main Index |
Thread Index |
Old Index