From 1edce49e66c5bf29d03b46fdf420e1a2903b4a4b Mon Sep 17 00:00:00 2001 From: is Date: Wed, 5 Apr 2000 19:38:33 +0000 Subject: [PATCH] Bug fixes for 68020only or 68030only machines, by Aymeric Vincent. --- sys/arch/m68k/include/cacheops.h | 6 +++--- sys/arch/m68k/m68k/cacheops.c | 31 ++++++++++++------------------- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/sys/arch/m68k/include/cacheops.h b/sys/arch/m68k/include/cacheops.h index 30f8bba6b173..57b5cacfddea 100644 --- a/sys/arch/m68k/include/cacheops.h +++ b/sys/arch/m68k/include/cacheops.h @@ -1,4 +1,4 @@ -/* $NetBSD: cacheops.h,v 1.7 2000/01/15 17:08:03 aymeric Exp $ */ +/* $NetBSD: cacheops.h,v 1.8 2000/04/05 19:38:33 is Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -137,6 +137,7 @@ void _DCIA __P((void)); void _DCIS __P((void)); void _DCIU __P((void)); void _DCIAS __P((paddr_t)); +void _PCIA __P((void)); #define TBIA() _TBIA() #define TBIS(va) _TBIS((va)) @@ -148,10 +149,10 @@ void _DCIAS __P((paddr_t)); #define DCIS() _DCIS() #define DCIU() _DCIU() #define DCIAS(pa) _DCIAS((pa)) +#define PCIA() _PCIA() #if defined(M68040)||defined(M68060) -void _PCIA __P((void)); void _DCFA __P((void)); void _ICPL __P((paddr_t)); void _ICPP __P((paddr_t)); @@ -161,7 +162,6 @@ void _DCPA __P((void)); void _DCFL __P((paddr_t)); void _DCFP __P((paddr_t)); -#define PCIA() _PCIA() #define DCFA() _DCFA() #define ICPL(pa) _ICPL((pa)) #define ICPP(pa) _ICPP((pa)) diff --git a/sys/arch/m68k/m68k/cacheops.c b/sys/arch/m68k/m68k/cacheops.c index 4b528a84e47f..ff9cf7bdffe2 100644 --- a/sys/arch/m68k/m68k/cacheops.c +++ b/sys/arch/m68k/m68k/cacheops.c @@ -1,4 +1,4 @@ -/* $NetBSD: cacheops.c,v 1.4 1999/09/25 19:27:35 is Exp $ */ +/* $NetBSD: cacheops.c,v 1.5 2000/04/05 19:38:34 is Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -287,20 +287,10 @@ void _PCIA() } } +#if defined(M68040) || defined(M68060) void _DCFA() { switch (cputype) { - default: -#ifdef M68020 - case CPU_68020: - DCFA_20(); - break; -#endif -#ifdef M68030 - case CPU_68030: - DCFA_30(); - break; -#endif #ifdef M68040 case CPU_68040: DCFA_40(); @@ -313,6 +303,7 @@ void _DCFA() #endif } } +#endif /* M68040 || M68060 */ void _TBIS(va) vaddr_t va; @@ -370,18 +361,19 @@ void _DCIAS(pa) } } +#if defined(M68040) || defined(M68060) void _DCPA() { switch (cputype) { default: -#ifdef M68020 - case CPU_68020: - DCPA_20(); +#ifdef M68040 + case CPU_68040: + DCPA_40(); break; #endif -#ifdef M68030 - case CPU_68030: - DCPA_30(); +#ifdef M68060 + case CPU_68060: + DCPA_60(); break; #endif } @@ -494,5 +486,6 @@ void _DCFP(pa) #endif } } +#endif /* M68040 || M68060 */ -#endif /* defined(_TBIA) */ +#endif /* defined(_MULTI_CPU) */