Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Moved the macros amiga_cpu_sync() and amiga_membarr...
details: https://anonhg.NetBSD.org/src/rev/2d544b897a91
branches: trunk
changeset: 751956:2d544b897a91
user: phx <phx%NetBSD.org@localhost>
date: Tue Feb 09 18:13:09 2010 +0000
description:
Moved the macros amiga_cpu_sync() and amiga_membarrier() from amiga/device.h
to the MD include/cpu.h.
Also make sure that grf_cvreg.h includes cpu.h as it is needed by Xamiga
in xsrc/xfree/xc/programs/Xserver/hw/netbsd/amiga/s3/amigaCV.h.
diffstat:
sys/arch/amiga/amiga/device.h | 20 +-------------------
sys/arch/amiga/dev/atzsc.c | 5 +++--
sys/arch/amiga/dev/grf_cvreg.h | 4 +++-
sys/arch/amiga/dev/gtsc.c | 5 +++--
sys/arch/amiga/include/cpu.h | 12 +++++++++++-
sys/arch/amigappc/include/cpu.h | 18 ++++++++++++++++--
6 files changed, 37 insertions(+), 27 deletions(-)
diffs (163 lines):
diff -r 64ee7700b2b0 -r 2d544b897a91 sys/arch/amiga/amiga/device.h
--- a/sys/arch/amiga/amiga/device.h Tue Feb 09 17:33:31 2010 +0000
+++ b/sys/arch/amiga/amiga/device.h Tue Feb 09 18:13:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: device.h,v 1.12 2010/02/05 12:13:36 phx Exp $ */
+/* $NetBSD: device.h,v 1.13 2010/02/09 18:13:09 phx Exp $ */
/*
* Copyright (c) 1994 Christian E. Hopps
@@ -49,22 +49,4 @@
#define getsoftc(cdnam, unit) device_lookup_private(&(cdnam), (unit))
-/*
- * Reorder protection when accessing device registers.
- */
-#if defined(__m68k__)
-#define amiga_membarrier()
-#elif defined(__powerpc__)
-#define amiga_membarrier() __asm volatile ("eieio")
-#endif
-
-/*
- * Finish all bus operations and flush pipelines.
- */
-#if defined(__m68k__)
-#define amiga_cpu_sync() __asm volatile ("nop")
-#elif defined(__powerpc__)
-#define amiga_cpu_sync() __asm volatile ("sync; isync")
-#endif
-
#endif /* _AMIGA_DEVICE_H_ */
diff -r 64ee7700b2b0 -r 2d544b897a91 sys/arch/amiga/dev/atzsc.c
--- a/sys/arch/amiga/dev/atzsc.c Tue Feb 09 17:33:31 2010 +0000
+++ b/sys/arch/amiga/dev/atzsc.c Tue Feb 09 18:13:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: atzsc.c,v 1.41 2010/02/07 12:52:04 he Exp $ */
+/* $NetBSD: atzsc.c,v 1.42 2010/02/09 18:13:10 phx Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -66,13 +66,14 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: atzsc.c,v 1.41 2010/02/07 12:52:04 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atzsc.c,v 1.42 2010/02/09 18:13:10 phx Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/device.h>
#include <sys/intr.h>
+#include <machine/cpu.h>
#include <dev/scsipi/scsi_all.h>
#include <dev/scsipi/scsipi_all.h>
#include <dev/scsipi/scsiconf.h>
diff -r 64ee7700b2b0 -r 2d544b897a91 sys/arch/amiga/dev/grf_cvreg.h
--- a/sys/arch/amiga/dev/grf_cvreg.h Tue Feb 09 17:33:31 2010 +0000
+++ b/sys/arch/amiga/dev/grf_cvreg.h Tue Feb 09 18:13:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: grf_cvreg.h,v 1.15 2010/02/05 12:13:36 phx Exp $ */
+/* $NetBSD: grf_cvreg.h,v 1.16 2010/02/09 18:13:10 phx Exp $ */
/*
* Copyright (c) 1995 Michael Teske
@@ -34,6 +34,8 @@
#ifndef _GRF_CVREG_H
#define _GRF_CVREG_H
+#include <machine/cpu.h>
+
/*
* This is derived from ciruss driver source
*/
diff -r 64ee7700b2b0 -r 2d544b897a91 sys/arch/amiga/dev/gtsc.c
--- a/sys/arch/amiga/dev/gtsc.c Tue Feb 09 17:33:31 2010 +0000
+++ b/sys/arch/amiga/dev/gtsc.c Tue Feb 09 18:13:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gtsc.c,v 1.39 2010/02/05 12:13:36 phx Exp $ */
+/* $NetBSD: gtsc.c,v 1.40 2010/02/09 18:13:10 phx Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -66,13 +66,14 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gtsc.c,v 1.39 2010/02/05 12:13:36 phx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gtsc.c,v 1.40 2010/02/09 18:13:10 phx Exp $");
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/device.h>
#include <sys/intr.h>
+#include <machine/cpu.h>
#include <dev/scsipi/scsi_all.h>
#include <dev/scsipi/scsipi_all.h>
#include <dev/scsipi/scsiconf.h>
diff -r 64ee7700b2b0 -r 2d544b897a91 sys/arch/amiga/include/cpu.h
--- a/sys/arch/amiga/include/cpu.h Tue Feb 09 17:33:31 2010 +0000
+++ b/sys/arch/amiga/include/cpu.h Tue Feb 09 18:13:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.74 2009/11/23 00:11:43 rmind Exp $ */
+/* $NetBSD: cpu.h,v 1.75 2010/02/09 18:13:10 phx Exp $ */
/*
* Copyright (c) 1982, 1990 The Regents of the University of California.
@@ -237,4 +237,14 @@
#endif /* _KERNEL */
+/*
+ * Reorder protection when accessing device registers.
+ */
+#define amiga_membarrier()
+
+/*
+ * Finish all bus operations and flush pipelines.
+ */
+#define amiga_cpu_sync() __asm volatile ("nop")
+
#endif /* !_MACHINE_CPU_H_ */
diff -r 64ee7700b2b0 -r 2d544b897a91 sys/arch/amigappc/include/cpu.h
--- a/sys/arch/amigappc/include/cpu.h Tue Feb 09 17:33:31 2010 +0000
+++ b/sys/arch/amigappc/include/cpu.h Tue Feb 09 18:13:09 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.h,v 1.17 2010/02/02 19:16:57 phx Exp $ */
+/* $NetBSD: cpu.h,v 1.18 2010/02/09 18:13:10 phx Exp $ */
/*
* Copyright (C) 1995-1997 Wolfgang Solfrank.
@@ -36,6 +36,9 @@
#if defined(_KERNEL)
#define CPU_MAXNUM 1
+/*
+ * Amiga models
+ */
#define A1200 1200
#define A3000 3000
#define A4000 4000
@@ -62,7 +65,18 @@
* Prototypes from powerpc/powerpc/trap.c
*/
int badaddr_read(void *, size_t, int *);
-#endif
+
+#endif /* _KERNEL */
+
+/*
+ * Reorder protection when accessing device registers.
+ */
+#define amiga_membarrier() __asm volatile ("eieio")
+
+/*
+ * Finish all bus operations and flush pipelines.
+ */
+#define amiga_cpu_sync() __asm volatile ("sync; isync")
#include <powerpc/cpu.h>
Home |
Main Index |
Thread Index |
Old Index