1 /* $NetBSD: cacheops.h,v 1.2 1997/09/15 11:12:13 leo Exp $ */ 2 3 /*- 4 * Copyright (c) 1997 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Leo Weppelman 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. All advertising materials mentioning features or use of this software 19 * must display the following acknowledgement: 20 * This product includes software developed by the NetBSD 21 * Foundation, Inc. and its contributors. 22 * 4. Neither the name of The NetBSD Foundation nor the names of its 23 * contributors may be used to endorse or promote products derived 24 * from this software without specific prior written permission. 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 * POSSIBILITY OF SUCH DAMAGE. 37 */ 38 39 #if notyet /* XXX */ 40 #include <machine/cpuconf.h> 41 #endif 42 43 #include <m68k/cacheops_20.h> 44 #include <m68k/cacheops_30.h> 45 #include <m68k/cacheops_40.h> 46 #include <m68k/cacheops_60.h> 47 48 #if defined(M68020) && !(defined(M68030)||defined(M68040)||defined(M68060)) 49 50 #define TBIA() TBIA_20() 51 #define TBIS(va) TBIS_20((va)) 52 #define TBIAS() TBIAS_20() 53 #define TBIAU() TBIAU_20() 54 #define ICIA() ICIA_20() 55 #define ICPA() ICPA_20() 56 #define DCIA() DCIA_20() 57 #define DCIS() DCIS_20() 58 #define DCIU() DCIU_20() 59 #define DCIAS() DCIAS_20() 60 #define PCIA() PCIA_20() 61 62 #elif defined(M68030) && !(defined(M68020)||defined(M68040)||defined(M68060)) 63 64 #define TBIS(va) TBIS_30((va)) 65 #define TBIAS() TBIAS_30() 66 #define TBIAU() TBIAU_30() 67 #define ICIA() ICIA_30() 68 #define ICPA() ICPA_30() 69 #define DCIA() DCIA_30() 70 #define DCIS() DCIS_30() 71 #define DCIU() DCIU_30() 72 #define DCIAS() DCIAS_30() 73 #define PCIA() PCIA_30() 74 75 #elif defined(M68040) && !(defined(M68020)||defined(M68030)||defined(M68060)) 76 77 #define TBIA() TBIA_40() 78 #define TBIS(va) TBIS_40((va)) 79 #define TBIAS() TBIAS_40() 80 #define TBIAU() TBIAU_40() 81 #define ICIA() ICIA_40() 82 #define ICPA() ICPA_40() 83 #define DCIA() DCIA_40() 84 #define DCIS() DCIS_40() 85 #define DCIU() DCIU_40() 86 #define DCIAS(va) DCIAS_40((va)) 87 #define PCIA() PCIA_40() 88 #define DCFA() DCFA_40() 89 #define ICPL(va) ICPL_40((va)) 90 #define ICPP(va) ICPP_40((va)) 91 #define DCPL(va) DCPL_40((va)) 92 #define DCPP(va) DCPP_40((va)) 93 #define DCPA() DCPA_40() 94 #define DCFL(va) DCFL_40((va)) 95 #define DCFP(va) DCFP_40((va)) 96 97 #elif defined(M68060) && !(defined(M68020)||defined(M68030)||defined(M68040)) 98 99 #define TBIA() TBIA_60() 100 #define TBIS(va) TBIS_60((va)) 101 #define TBIAS() TBIAS_60() 102 #define TBIAU() TBIAU_60() 103 #define ICIA() ICIA_60() 104 #define ICPA() ICPA_60() 105 #define DCIA() DCIA_60() 106 #define DCIS() DCIS_60() 107 #define DCIU() DCIU_60() 108 #define DCIAS(va) DCIAS_60((va)) 109 #define PCIA() PCIA_60() 110 #define DCFA() DCFA_60() 111 #define ICPL(va) ICPL_60((va)) 112 #define ICPP(va) ICPP_60((va)) 113 #define DCPL(va) DCPL_60((va)) 114 #define DCPP(va) DCPP_60((va)) 115 #define DCPA() DCPA_60() 116 #define DCFL(va) DCFL_60((va)) 117 #define DCFP(va) DCFP_60((va)) 118 119 #else /* Multi-CPU config */ 120 121 /* XXX: From cpuconf.h? */ 122 #ifndef _MULTI_CPU 123 #define _MULTI_CPU 124 #endif 125 126 void _TBIA __P((void)); 127 void _TBIS __P((vm_offset_t)); 128 void _TBIAS __P((void)); 129 void _TBIAU __P((void)); 130 void _ICIA __P((void)); 131 void _ICPA __P((void)); 132 void _DCIA __P((void)); 133 void _DCIS __P((void)); 134 void _DCIU __P((void)); 135 void _DCIAS __P((vm_offset_t)); 136 137 #define TBIA() _TBIA() 138 #define TBIS(va) _TBIS((va)) 139 #define TBIAS() _TBIAS() 140 #define TBIAU() _TBIAU() 141 #define ICIA() _ICIA() 142 #define ICPA() _ICPA() 143 #define DCIA() _DCIA() 144 #define DCIS() _DCIS() 145 #define DCIU() _DCIU() 146 #define DCIAS(va) _DCIAS((va)) 147 148 #if defined(M68040)||defined(M68060) 149 150 void _PCIA __P((void)); 151 void _DCFA __P((void)); 152 void _ICPL __P((vm_offset_t)); 153 void _ICPP __P((vm_offset_t)); 154 void _DCPL __P((vm_offset_t)); 155 void _DCPP __P((vm_offset_t)); 156 void _DCPA __P((void)); 157 void _DCFL __P((vm_offset_t)); 158 void _DCFP __P((vm_offset_t)); 159 160 #define PCIA() _PCIA() 161 #define DCFA() _DCFA() 162 #define ICPL(va) _ICPL((va)) 163 #define ICPP(va) _ICPP((va)) 164 #define DCPL(va) _DCPL((va)) 165 #define DCPP(va) _DCPP((va)) 166 #define DCPA() _DCPA() 167 #define DCFL(va) _DCFL((va)) 168 #define DCFP(va) _DCFP((va)) 169 170 #endif /* defined(M68040)||defined(M68060) */ 171 172 #endif 173