summaryrefslogtreecommitdiffstats
path: root/sys/powerpc
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1998-06-14 13:46:10 +0000
committerdfr <dfr@FreeBSD.org>1998-06-14 13:46:10 +0000
commitdc295ed278eb0235154462b23615e89213bc591c (patch)
tree0734d180ccb27bfdde5cd04d1961394e2e0ac94f /sys/powerpc
parenta7d3dec6df55d42bcb12806631798932380ce34b (diff)
downloadFreeBSD-src-dc295ed278eb0235154462b23615e89213bc591c.zip
FreeBSD-src-dc295ed278eb0235154462b23615e89213bc591c.tar.gz
Major changes to the generic device framework for FreeBSD/alpha:
* Eliminate bus_t and make it possible for all devices to have attached children. * Support dynamically extendable interfaces for drivers to replace both the function pointers in driver_t and bus_ops_t (which has been removed entirely. Two system defined interfaces have been defined, 'device' which is mandatory for all devices and 'bus' which is recommended for all devices which support attached children. * In addition, the alpha port defines two simple interfaces 'clock' for attaching various real time clocks to the system and 'mcclock' for the many different variations of mc146818 clocks which can be attached to different alpha platforms. This eliminates two more function pointer tables in favour of the generic method dispatch system provided by the device framework. Future device interfaces may include: * cdev and bdev interfaces for devfs to use in replacement for specfs and the fixed interfaces bdevsw and cdevsw. * scsi interface to replace struct scsi_adapter (not sure how this works in CAM but I imagine there is something similar there). * various tailored interfaces for different bus types such as pci, isa, pccard etc.
Diffstat (limited to 'sys/powerpc')
-rw-r--r--sys/powerpc/powerpc/genassym.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/powerpc/powerpc/genassym.c b/sys/powerpc/powerpc/genassym.c
index 520bd41..50ebf1d 100644
--- a/sys/powerpc/powerpc/genassym.c
+++ b/sys/powerpc/powerpc/genassym.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)genassym.c 5.11 (Berkeley) 5/10/91
- * $Id: genassym.c,v 1.54 1998/04/06 18:59:14 peter Exp $
+ * $Id: genassym.c,v 1.1 1998/06/10 10:52:39 dfr Exp $
*/
#include <sys/param.h>
@@ -64,8 +64,10 @@
int main __P((void));
int printf __P((const char *, ...));
+#define BIG(val) ((val) > 999LL || (val) < -999LL)
+
#define P(name, val) \
- printf(val > 999 ? "#define\t%s 0x%lx\n" : "#define\t%s %ld\n", name, val)
+ printf(BIG(val) ? "#define\t%s 0x%qx\n" : "#define\t%s %qd\n", name, val)
/* XXX Danger Will Robinson */
struct prochd {
@@ -73,9 +75,9 @@ struct prochd {
struct proc *ph_rlink;
};
-#define OFF(name, type, elem) P(#name, (long)&((type*)0)->elem)
-#define CONST2(name, val) P(#name, val)
-#define CONST1(name) P(#name, name)
+#define OFF(name, type, elem) P(#name, (long long) &((type*)0)->elem)
+#define CONST2(name, val) P(#name, (long long) val)
+#define CONST1(name) P(#name, (long long) name)
int
main()
OpenPOWER on IntegriCloud