Subject: Re: Couldn't build a kernel...
To: Aymeric Vincent <Aymeric.Vincent@Crans.ens-cachan.fr>
From: Ignatios Souvatzis <is@jocelyn.rhein.de>
List: port-amiga
Date: 03/30/2000 23:11:31
On Wed, Mar 29, 2000 at 11:36:53AM +0200, Aymeric Vincent wrote:
> ...
> I found a batch of small mistakes in the m68k cacheops stuff. BTW, my
> bet is that you were trying to compile a kernel for 68020's and
> 68030's only... I can't try the changes I made right now, but could
> you please check this and commit it, Ignatios, please?
> [ or I'll commit it in a few days after I'll have had a chance to
>   compile it ]
> 
> ... 

This makes me wonder: how do m68k architectures with external caches 
handle the cacheops stuff?

	-is
> 
> 
> Index: include/cacheops.h
> ===================================================================
> RCS file: /cvsroot/syssrc/sys/arch/m68k/include/cacheops.h,v
> retrieving revision 1.7
> diff -u -r1.7 cacheops.h
> --- cacheops.h	2000/01/15 17:08:03	1.7
> +++ cacheops.h	2000/03/29 09:29:29
> @@ -137,6 +137,7 @@
>  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 @@
>  #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	_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))
> Index: m68k/cacheops.c
> ===================================================================
> RCS file: /cvsroot/syssrc/sys/arch/m68k/m68k/cacheops.c,v
> retrieving revision 1.4
> diff -u -r1.4 cacheops.c
> --- cacheops.c	1999/09/25 19:27:35	1.4
> +++ cacheops.c	2000/03/29 09:29:29
> @@ -287,20 +287,10 @@
>  	}
>  }
>  
> +#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 @@
>  #endif
>  	}
>  }
> +#endif /* M68040 || M68060 */
>  
>  void _TBIS(va)
>  	vaddr_t	va;
> @@ -370,18 +361,19 @@
>  	}
>  }
>  
> +#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 @@
>  #endif
>  	}
>  }
> +#endif /* M68040 || M68060 */
>  
> -#endif /* defined(_TBIA) */
> +#endif /* defined(_MULTI_CPU) */