Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sparc/include BUS_ADDR(): avoid signed conversions.
details: https://anonhg.NetBSD.org/src/rev/1707662b8c26
branches: trunk
changeset: 526002:1707662b8c26
user: pk <pk%NetBSD.org@localhost>
date: Tue Apr 23 07:17:29 2002 +0000
description:
BUS_ADDR(): avoid signed conversions.
diffstat:
sys/arch/sparc/include/bus.h | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (19 lines):
diff -r 6adf612903d7 -r 1707662b8c26 sys/arch/sparc/include/bus.h
--- a/sys/arch/sparc/include/bus.h Tue Apr 23 06:48:46 2002 +0000
+++ b/sys/arch/sparc/include/bus.h Tue Apr 23 07:17:29 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bus.h,v 1.29 2002/03/21 00:30:41 eeh Exp $ */
+/* $NetBSD: bus.h,v 1.30 2002/04/23 07:17:29 pk Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -83,7 +83,8 @@
/* bus_addr_t is extended to 64-bits and has the iospace encoded in it */
#define BUS_ADDR_IOSPACE(x) ((x)>>32)
#define BUS_ADDR_PADDR(x) ((x)&0xffffffff)
-#define BUS_ADDR(io, pa) ((((u_int64_t)(io))<<32)|(pa))
+#define BUS_ADDR(io, pa) \
+ ((((u_int64_t)(u_int32_t)(io))<<32) | (u_int32_t)(pa))
/*
* Access methods for bus resources and address space.
Home |
Main Index |
Thread Index |
Old Index