Subject: Kernel compile problems with bus_space_handle_t
To: None <port-sparc64@netbsd.org>
From: Tim Goodwin <tjg@star.le.ac.uk>
List: port-sparc64
Date: 03/21/2002 15:06:55
[ Please be gentle with me, I'm new here! ]

I'm trying to get a NetBSD/sparc64 development box up and running with
-current.  It seems that just yesterday, the type definition for
`bus_space_handle_t' changed from u_int64_t to a structure (this is in
/sys/arch/sparc64/include/bus.h).

This causes problems with a cast in dma_sbus.c, esp_sbus.c (and
various others), all in /sys/dev/sbus/:

167-    /* Map registers */
168-    if (sa->sa_npromvaddrs != 0)
169:            sc->sc_regs = (bus_space_handle_t)sa->sa_promvaddrs[0];
170-    else {
171-            if (sbus_bus_map(sa->sa_bustag,

None too surprisingly, the compiler complains about this cast:

/usr/src/sys/arch/sparc64/compile/NEON/../../../../dev/sbus/dma_sbus.c: In function `dmaattach_sbus':
/usr/src/sys/arch/sparc64/compile/NEON/../../../../dev/sbus/dma_sbus.c:169: conversion to non-scalar type requested

Hope this is useful to someone...

Tim.