Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic sparc64 doesn't have a scalar bus_space_handle_t, ...



details:   https://anonhg.NetBSD.org/src/rev/65df4212b4a8
branches:  trunk
changeset: 446525:65df4212b4a8
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Dec 09 16:00:40 2018 +0000

description:
sparc64 doesn't have a scalar bus_space_handle_t, so cope with this.
Also, add a comment about why we're using the dummy / nil space handle
in the first place.

diffstat:

 sys/dev/ic/com.c |  15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 9bf3043f6618 -r 65df4212b4a8 sys/dev/ic/com.c
--- a/sys/dev/ic/com.c  Sun Dec 09 15:08:05 2018 +0000
+++ b/sys/dev/ic/com.c  Sun Dec 09 16:00:40 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: com.c,v 1.352 2018/12/08 21:14:37 thorpej Exp $ */
+/* $NetBSD: com.c,v 1.353 2018/12/09 16:00:40 thorpej Exp $ */
 
 /*-
  * Copyright (c) 1998, 1999, 2004, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.352 2018/12/08 21:14:37 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: com.c,v 1.353 2018/12/09 16:00:40 thorpej Exp $");
 
 #include "opt_com.h"
 #include "opt_ddb.h"
@@ -2508,7 +2508,16 @@
 {
        struct com_regs regs;
 
-       com_init_regs(&regs, iot, (bus_space_handle_t)0/*XXX*/, iobase);
+       /*XXX*/
+       bus_space_handle_t dummy_bsh;
+       memset(&dummy_bsh, 0, sizeof(dummy_bsh));
+
+       /*
+        * dummy_bsh required because com_init_regs() wants it.  A
+        * real bus_space_handle will be filled in by cominit() later.
+        * XXXJRT Detangle this mess eventually, plz.
+        */
+       com_init_regs(&regs, iot, dummy_bsh/*XXX*/, iobase);
 
        return comcnattach1(&regs, rate, frequency, type, cflag);
 }



Home | Main Index | Thread Index | Old Index