diff options
Diffstat (limited to 'sys/arch/amiga')
-rw-r--r-- | sys/arch/amiga/amiga/amiga_init.c | 24 | ||||
-rw-r--r-- | sys/arch/amiga/amiga/locore.s | 86 | ||||
-rw-r--r-- | sys/arch/amiga/amiga/sys_machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/amiga/amiga/trap.c | 16 | ||||
-rw-r--r-- | sys/arch/amiga/amiga/vm_machdep.c | 15 | ||||
-rw-r--r-- | sys/arch/amiga/dev/bzsc.c | 4 | ||||
-rw-r--r-- | sys/arch/amiga/dev/bztzsc.c | 4 | ||||
-rw-r--r-- | sys/arch/amiga/dev/flsc.c | 4 | ||||
-rw-r--r-- | sys/arch/amiga/dev/sbic.c | 4 | ||||
-rw-r--r-- | sys/arch/amiga/dev/sfas.c | 6 |
10 files changed, 81 insertions, 88 deletions
diff --git a/sys/arch/amiga/amiga/amiga_init.c b/sys/arch/amiga/amiga/amiga_init.c index 2bf697be996..67a66f3d6bb 100644 --- a/sys/arch/amiga/amiga/amiga_init.c +++ b/sys/arch/amiga/amiga/amiga_init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amiga_init.c,v 1.20 2001/11/06 19:53:13 miod Exp $ */ +/* $OpenBSD: amiga_init.c,v 1.21 2001/11/30 22:08:13 miod Exp $ */ /* $NetBSD: amiga_init.c,v 1.56 1997/06/10 18:22:24 veego Exp $ */ /* @@ -174,8 +174,6 @@ alloc_z2mem(amount) * */ -int kernel_copyback = 1; - void start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync) int id; @@ -326,7 +324,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync) avail -= vstart; #if defined(M68040) || defined(M68060) - if (RELOC(mmutype, int) == MMU_68040) + if (RELOC(mmutype, int) <= MMU_68040) kstsize = MAXKL2SIZE / (NPTEPG/SG4_LEV2SIZE); else #endif @@ -400,7 +398,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync) * initialize segment table and page table map */ #if defined(M68040) || defined(M68060) - if (RELOC(mmutype, int) == MMU_68040) { + if (RELOC(mmutype, int) <= MMU_68040) { /* * First invalidate the entire "segment table" pages * (levels 1 and 2 have the same "invalid" values). @@ -568,16 +566,13 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync) * these machines (for the 68040 not strictly necessary, but * recommended by Motorola; for the 68060 mandatory) */ - if (RELOC(mmutype, int) == MMU_68040) { - - if (RELOC(kernel_copyback, int)) - pg_proto |= PG_CCB; - + if (RELOC(mmutype, int) <= MMU_68040) { /* * ASSUME: segment table and statically allocated page tables * of the kernel are contiguously allocated, start at * Sysseg and end at the current value of vstart. */ + pg_proto |= PG_CCB; for (; i<RELOC(Sysseg, u_int); i+= NBPG, pg_proto += NBPG) *pg++ = pg_proto; @@ -586,8 +581,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync) *pg++ = pg_proto; pg_proto = (pg_proto & ~PG_CI); - if (RELOC(kernel_copyback, int)) - pg_proto |= PG_CCB; + pg_proto |= PG_CCB; } #endif /* @@ -599,7 +593,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync) /* * invalidate remainder of kernel PT */ - while (pg < (u_int *) (ptpa + ptsize)) + while (pg < (paddr_t) (ptpa + ptsize)) *pg++ = PG_NV; /* @@ -805,7 +799,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync) * prepare to enable the MMU */ #if defined(M68040) || defined(M68060) - if (RELOC(mmutype, int) == MMU_68040) { + if (RELOC(mmutype, int) <= MMU_68040) { /* * movel Sysseg_pa,a0; * movec a0,SRP; @@ -814,7 +808,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync) * movec d0,TC */ - if (id & AMIGA_68060) { + if (RELOC(mmutype, int) <= MMU_68060) { /* do i need to clear the branch cache? */ asm volatile ( ".word 0x4e7a,0x0002;" "orl #0x400000,d0;" diff --git a/sys/arch/amiga/amiga/locore.s b/sys/arch/amiga/amiga/locore.s index d6a3055e650..673db834e53 100644 --- a/sys/arch/amiga/amiga/locore.s +++ b/sys/arch/amiga/amiga/locore.s @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.s,v 1.31 2001/08/12 23:52:59 miod Exp $ */ +/* $OpenBSD: locore.s,v 1.32 2001/11/30 22:08:13 miod Exp $ */ /* $NetBSD: locore.s,v 1.89 1997/07/17 16:22:54 is Exp $ */ /* @@ -297,7 +297,7 @@ _fpemuli: _fpunsupp: #if defined(M68040) cmpl #MMU_68040,_mmutype | 68040? - jne _illinst | no, treat as illinst + jgt _illinst | no, treat as illinst #ifdef FPSP .globl fpsp_unsupp jmp fpsp_unsupp | yes, go handle it @@ -953,6 +953,7 @@ Lsetcpu040: #ifndef BB060STUPIDROM btst #7,sp@(3) jeq Lstartnot040 + movl #MMU_68060,a0@ movl #CPU_68060,a1@ | set cputype orl #IC60_CABC,d0 | XXX and clear all 060 branch cache #else @@ -963,6 +964,7 @@ Lsetcpu040: tstl d0 jeq Lstartnot040 bset #7,sp@(3) | note it is '60 family in machineid + movl #MMU_68060,a0@ movl #CPU_68060,a1@ | and in the cputype orl #IC60_CABC,d0 | XXX and clear all 060 branch cache .word 0x4e7a,0x1808 | movc pcr,d1 @@ -1019,8 +1021,8 @@ Lunshadow: .word 0xf4f8 | cpusha bc - push & invalidate caches movl #CACHE40_ON,d0 #ifdef M68060 - btst #7,_machineid+3 - jeq Lcacheon + cmpl #MMU_68060,_mmutype + jne Lcacheon movl #CACHE60_ON,d0 #endif Lcacheon: @@ -1063,15 +1065,17 @@ Lcacheon: addql #4,sp | pop args cmpl #MMU_68040,_mmutype | 68040? - jne Lnoflush | no, skip + jgt Lnoflush | no, skip .word 0xf478 | cpusha dc .word 0xf498 | cinva ic +#ifdef M68060 | XXX dont need these; the cinva ic also clears the branch cache. -| btst #7,_machineid+3 -| jeq Lnoflush +| cmpl #MMU_68060,_mmutype +| jne Lnoflush | movc cacr,d0 | orl #IC60_CUBC,d0 | movc d0,cacr +#endif Lnoflush: movl sp@(FR_SP),a0 | grab and load movl a0,usp | user SP @@ -1293,8 +1297,8 @@ Lsw2: fsave a2@ | save FP state #if defined(M68020) || defined(M68030) || defined(M68040) #ifdef M68060 - btst #7,_machineid+3 - jne Lsavfp60 + cmpl #MMU_68060,_mmutype | is 68060? + jeq Lsavfp60 #endif tstb a2@ | null state frame? jeq Lswnofpsave | yes, all done @@ -1353,8 +1357,8 @@ Lresnonofpatall: lea a1@(PCB_FPCTX),a0 | pointer to FP save area #if defined(M68020) || defined(M68030) || defined(M68040) #ifdef M68060 - btst #7,_machineid+3 - jne Lresfp60rest1 + cmpl #MMU_68060,_mmutype + jeq Lresfp60rest1 #endif tstb a0@ | null state frame? jeq Lresfprest2 | yes, easy @@ -1401,8 +1405,8 @@ ENTRY(savectx) fsave a0@ | save FP state #if defined(M68020) || defined(M68030) || defined(M68040) #ifdef M68060 - btst #7,_machineid+3 - jne Lsavctx60 + cmpl #MMU_68060,_mmutype + jeq Lsavctx60 #endif tstb a0@ | null state frame? jeq Lsavedone | yes, all done @@ -1515,7 +1519,7 @@ Lclrloop: ENTRY(TBIA) __TBIA: cmpl #MMU_68040,_mmutype - jeq Ltbia040 + jle Ltbia040 pflusha | flush entire TLB tstl _mmutype jpl Lmc68851a | 68851 implies no d-cache @@ -1526,8 +1530,8 @@ Lmc68851a: Ltbia040: .word 0xf518 | pflusha #ifdef M68060 - btst #7,_machineid+3 - jeq Ltbiano60 + cmpl #MMU_68060,_mmutype + jne Ltbiano60 movc cacr,d0 orl #IC60_CABC,d0 | and clear all branch cache entries movc d0,cacr @@ -1545,7 +1549,7 @@ ENTRY(TBIS) #endif movl sp@(4),a0 | get addr to flush cmpl #MMU_68040,_mmutype - jeq Ltbis040 + jle Ltbis040 tstl _mmutype jpl Lmc68851b | is 68851? pflush #0,#0,a0@ | flush address from both sides @@ -1563,8 +1567,8 @@ Ltbis040: movc d0,dfc .word 0xf508 | pflush a0@ #ifdef M68060 - btst #7,_machineid+3 - jeq Ltbisno60 + cmpl #MMU_68060,_mmutype + jne Ltbisno60 movc cacr,d0 orl #IC60_CABC,d0 | and clear all branch cache entries movc d0,cacr @@ -1581,7 +1585,7 @@ ENTRY(TBIAS) jne __TBIA | yes, flush everything #endif cmpl #MMU_68040,_mmutype - jeq Ltbias040 + jle Ltbias040 tstl _mmutype jpl Lmc68851c | 68851? pflush #4,#4 | flush supervisor TLB entries @@ -1595,8 +1599,8 @@ Ltbias040: | 68040 cannot specify supervisor/user on pflusha, so we flush all .word 0xf518 | pflusha #ifdef M68060 - btst #7,_machineid+3 - jeq Ltbiasno60 + cmpl #MMU_68060,_mmutype + jne Ltbiasno60 movc cacr,d0 orl #IC60_CABC,d0 | and clear all branch cache entries movc d0,cacr @@ -1613,7 +1617,7 @@ ENTRY(TBIAU) jne __TBIA | yes, flush everything #endif cmpl #MMU_68040,_mmutype - jeq Ltbiau040 + jle Ltbiau040 tstl _mmutype jpl Lmc68851d | 68851? pflush #0,#4 | flush user TLB entries @@ -1627,8 +1631,8 @@ Ltbiau040: | 68040 cannot specify supervisor/user on pflusha, so we flush all .word 0xf518 | pflusha #ifdef M68060 - btst #7,_machineid+3 - jeq Ltbiauno60 + cmpl #MMU_68060,_mmutype + jne Ltbiauno60 movc cacr,d0 orl #IC60_CUBC,d0 | but only user branch cache entries movc d0,cacr @@ -1644,7 +1648,7 @@ ENTRY(ICPA) #if defined(M68030) || defined(M68020) #if defined(M68040) || defined(M68060) cmpl #MMU_68040,_mmutype - jeq Licia040 + jle Licia040 #endif movl #IC_CLEAR,d0 movc d0,cacr | invalidate i-cache @@ -1666,7 +1670,7 @@ Licia040: ENTRY(DCIA) __DCIA: cmpl #MMU_68040,_mmutype - jne Ldciax + jgt Ldciax .word 0xf478 | cpusha dc Ldciax: rts @@ -1674,7 +1678,7 @@ Ldciax: ENTRY(DCIS) __DCIS: cmpl #MMU_68040,_mmutype - jne Ldcisx + jgt Ldcisx .word 0xf478 | cpusha dc nop Ldcisx: @@ -1683,7 +1687,7 @@ Ldcisx: ENTRY(DCIU) __DCIU: cmpl #MMU_68040,_mmutype - jne Ldciux + jgt Ldciux .word 0xf478 | cpusha dc Ldciux: rts @@ -1692,7 +1696,7 @@ Ldciux: ENTRY(DCIAS) __DCIAS: cmpl #MMU_68040,_mmutype - jne Ldciasx + jle Ldciasx movl sp@(4),a0 .word 0xf468 | cpushl dc,a0@ Ldciasx: @@ -1731,7 +1735,7 @@ ENTRY(PCIA) #if defined(M68030) || defined(M68030) #if defined(M68040) || defined(M68060) cmpl #MMU_68040,_mmutype - jeq Lpcia040 + jle Lpcia040 #endif movl #DC_CLEAR,d0 movc d0,cacr | invalidate on-chip d-cache @@ -1788,8 +1792,8 @@ ENTRY(loadustp) moveq #PGSHIFT,d1 lsll d1,d0 | convert to addr #ifdef M68060 - btst #7,_machineid+3 - jne Lldustp060 + cmpl #MMU_68060,_mmutype + jeq Lldustp060 #endif cmpl #MMU_68040,_mmutype jeq Lldustp040 @@ -1821,8 +1825,8 @@ ENTRY(m68881_save) fsave a0@ | save state #if defined(M68020) || defined(M68030) || defined(M68040) #ifdef M68060 - btst #7,_machineid+3 - jne Lm68060fpsave + cmpl #MMU_68060,_mmutype + jeq Lm68060fpsave #endif tstb a0@ | null state frame? jeq Lm68881sdone | yes, all done @@ -1848,8 +1852,8 @@ ENTRY(m68881_restore) movl sp@(4),a0 | save area pointer #if defined(M68020) || defined(M68030) || defined(M68040) #if defined(M68060) - btst #7,_machineid+3 - jne Lm68060fprestore + cmpl #MMU_68060,_mmutype + jeq Lm68060fprestore #endif tstb a0@ | null state frame? jeq Lm68881rdone | yes, easy @@ -1881,7 +1885,7 @@ Lm68060fprdone: _doboot: movl #CACHE_OFF,d0 cmpl #MMU_68040,_mmutype | is it 68040 - jne Ldoboot0 + jgt Ldoboot0 .word 0xf4f8 | cpusha bc - push and invalidate caches nop movl #CACHE40_OFF,d0 @@ -1923,7 +1927,7 @@ Ldb2: | ok, turn off MMU.. Ldoreboot: cmpl #MMU_68040,_mmutype | is it 68040 - jeq Lmmuoff040 + jle Lmmuoff040 lea zero,a0 pmove a0@,tc | Turn off MMU lea nullrp,a0 @@ -2021,7 +2025,7 @@ Lreload_ok: movl #CACHE_OFF,d0 cmpl #MMU_68040,_mmutype - jne Lreload1 + jgt Lreload1 .word 0xf4f8 | cpusha bc - push and invalidate caches nop movl #CACHE40_OFF,d0 @@ -2052,7 +2056,7 @@ Lreload_copy: | ok, turn off MMU.. cmpl #MMU_68040,_mmutype - jeq Lreload040 + jle Lreload040 lea zero,a3 pmove a3@,tc | Turn off MMU lea nullrp,a3 diff --git a/sys/arch/amiga/amiga/sys_machdep.c b/sys/arch/amiga/amiga/sys_machdep.c index 727b08e59be..78da8c51ea2 100644 --- a/sys/arch/amiga/amiga/sys_machdep.c +++ b/sys/arch/amiga/amiga/sys_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_machdep.c,v 1.11 2001/11/06 19:53:14 miod Exp $ */ +/* $OpenBSD: sys_machdep.c,v 1.12 2001/11/30 22:08:13 miod Exp $ */ /* $NetBSD: sys_machdep.c,v 1.16 1997/05/19 10:14:47 veego Exp $ */ /* @@ -71,7 +71,7 @@ cachectl(req, addr, len) { int error = 0; #if defined(M68040) || defined(M68060) - if (mmutype == MMU_68040) { + if (mmutype <= MMU_68040) { register int inc = 0; int doall = 0; caddr_t end = 0; @@ -182,7 +182,7 @@ dma_cachectl(addr, len) int len; { #if defined(M68040) || defined(M68060) - if (mmutype == MMU_68040) { + if (mmutype <= MMU_68040) { register int inc = 0; int pa = 0; caddr_t end; diff --git a/sys/arch/amiga/amiga/trap.c b/sys/arch/amiga/amiga/trap.c index 0198f1bc79b..9fea7a5905a 100644 --- a/sys/arch/amiga/amiga/trap.c +++ b/sys/arch/amiga/amiga/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.28 2001/11/28 16:13:27 art Exp $ */ +/* $OpenBSD: trap.c,v 1.29 2001/11/30 22:08:13 miod Exp $ */ /* $NetBSD: trap.c,v 1.56 1997/07/16 00:01:47 is Exp $ */ /* @@ -307,9 +307,9 @@ trapmmufault(type, code, v, fp, p, sticks) if (v < NBPG) /* XXX PAGE0 */ mmudebug |= 0x100; /* XXX PAGE0 */ #endif - if (mmudebug && mmutype == MMU_68040) { + if (mmudebug && mmutype <= MMU_68040) { #ifdef M68060 - if (machineid & AMIGA_68060) { + if (mmutype == MMU_68060) { if (--donomore == 0 || mmudebug & 1) printf ("68060 access error: pc %x, code %b," " ea %x\n", fp->f_pc, @@ -347,7 +347,7 @@ trapmmufault(type, code, v, fp, p, sticks) if (type == T_MMUFLT && (!p || !p->p_addr || p->p_addr->u_pcb.pcb_onfault == 0 || ( #ifdef M68060 - machineid & AMIGA_68060 ? code & FSLW_TM_SV : + mmutype == MMU_68060 ? code & FSLW_TM_SV : #endif mmutype == MMU_68040 ? (code & SSW_TMMASK) == FC_SUPERD : (code & (SSW_DF|FC_SUPERD)) == (SSW_DF|FC_SUPERD)))) @@ -357,7 +357,7 @@ trapmmufault(type, code, v, fp, p, sticks) if ( #ifdef M68060 - machineid & AMIGA_68060 ? code & FSLW_RW_W : + mmutype == MMU_68060 ? code & FSLW_RW_W : #endif mmutype == MMU_68040 ? (code & SSW_RW040) == 0 : (code & (SSW_DF|SSW_RW)) == SSW_DF) { /* what about RMW? */ @@ -398,11 +398,7 @@ trapmmufault(type, code, v, fp, p, sticks) printf("vmfault %s %lx returned %d\n", map == kernel_map ? "kernel" : "user", va, rv); #endif -#ifdef M68060 - if ((machineid & AMIGA_68060) == 0 && mmutype == MMU_68040) { -#else - if (mmutype == MMU_68040) { -#endif + if (mmutype == MMU_68040) { /* explicitely NOT MMU_68060 */ if (rv) { goto nogo; } diff --git a/sys/arch/amiga/amiga/vm_machdep.c b/sys/arch/amiga/amiga/vm_machdep.c index 8cf82fa91a8..4d786b427c8 100644 --- a/sys/arch/amiga/amiga/vm_machdep.c +++ b/sys/arch/amiga/amiga/vm_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vm_machdep.c,v 1.25 2001/11/06 19:53:14 miod Exp $ */ +/* $OpenBSD: vm_machdep.c,v 1.26 2001/11/30 22:08:13 miod Exp $ */ /* $NetBSD: vm_machdep.c,v 1.30 1997/05/19 10:14:50 veego Exp $ */ /* @@ -48,17 +48,16 @@ #include <sys/proc.h> #include <sys/signalvar.h> #include <sys/malloc.h> -#include <sys/vnode.h> #include <sys/buf.h> -#include <sys/core.h> -#include <sys/exec_aout.h> -#include <m68k/reg.h> +#include <sys/vnode.h> +#include <sys/user.h> +#include <sys/exec.h> #include <machine/cpu.h> +#include <machine/pte.h> +#include <machine/reg.h> -#include <sys/user.h> #include <uvm/uvm_extern.h> -#include <machine/pte.h> /* * Finish a fork operation, with process p2 nearly set up. @@ -183,7 +182,7 @@ physaccess(vaddr, paddr, size, prot) register u_int page; /* if cache not inhibited, set cacheable & copyback */ - if (mmutype == MMU_68040 && (prot & PG_CI) == 0) + if (mmutype <= MMU_68040 && (prot & PG_CI) == 0) prot |= PG_CCB; else if (cputype == CPU_68060 && (prot & PG_CI)) prot |= PG_CIN; diff --git a/sys/arch/amiga/dev/bzsc.c b/sys/arch/amiga/dev/bzsc.c index c9c5a86a516..5461ad49cf8 100644 --- a/sys/arch/amiga/dev/bzsc.c +++ b/sys/arch/amiga/dev/bzsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bzsc.c,v 1.8 2001/11/06 01:47:02 art Exp $ */ +/* $OpenBSD: bzsc.c,v 1.9 2001/11/30 22:08:16 miod Exp $ */ /* $NetBSD: bzsc.c,v 1.14 1996/12/23 09:09:53 veego Exp $ */ @@ -332,7 +332,7 @@ do { chain[n].ptr = (p); chain[n].len = (l); chain[n++].flg = (f); } while(0) set_link(n, (vm_offset_t)p, l, SFAS_CHAIN_BUMP); else if ( #if defined(M68040) || defined(M68060) - ((mmutype == MMU_68040) && ((vm_offset_t)p >= 0xFFFC0000)) && + ((mmutype <= MMU_68040) && ((vm_offset_t)p >= 0xFFFC0000)) && #endif ((vm_offset_t)p >= 0xFF000000)) { int len; diff --git a/sys/arch/amiga/dev/bztzsc.c b/sys/arch/amiga/dev/bztzsc.c index 2bfcd8ff52c..6420f03762d 100644 --- a/sys/arch/amiga/dev/bztzsc.c +++ b/sys/arch/amiga/dev/bztzsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bztzsc.c,v 1.4 2001/11/06 01:47:02 art Exp $ */ +/* $OpenBSD: bztzsc.c,v 1.5 2001/11/30 22:08:16 miod Exp $ */ /* $NetBSD: bztzsc.c,v 1.2 1996/12/23 09:09:54 veego Exp $ */ /* @@ -344,7 +344,7 @@ do { chain[n].ptr = (p); chain[n].len = (l); chain[n++].flg = (f); } while(0) set_link(n, (vm_offset_t)p, l, SFAS_CHAIN_BUMP); else if ((p >= (void *)0xFF000000) #if defined(M68040) || defined(M68060) - && ((mmutype == MMU_68040) && (p >= (void *)0xFFFC0000)) + && ((mmutype <= MMU_68040) && (p >= (void *)0xFFFC0000)) #endif ) { while(l != 0) { diff --git a/sys/arch/amiga/dev/flsc.c b/sys/arch/amiga/dev/flsc.c index 954d9331bdc..4989593b33a 100644 --- a/sys/arch/amiga/dev/flsc.c +++ b/sys/arch/amiga/dev/flsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: flsc.c,v 1.10 2001/11/06 01:47:02 art Exp $ */ +/* $OpenBSD: flsc.c,v 1.11 2001/11/30 22:08:16 miod Exp $ */ /* $NetBSD: flsc.c,v 1.14 1996/12/23 09:10:00 veego Exp $ */ /* @@ -361,7 +361,7 @@ do { chain[n].ptr = (p); chain[n].len = (l); chain[n++].flg = (f); } while(0) set_link(n, (vm_offset_t)p, l, SFAS_CHAIN_BUMP); else if ((p >= (void *)0xFF000000) #if defined(M68040) || defined(M68060) - && ((mmutype == MMU_68040) && (p >= (void *)0xFFFC0000)) + && ((mmutype <= MMU_68040) && (p >= (void *)0xFFFC0000)) #endif ) { while(l != 0) { diff --git a/sys/arch/amiga/dev/sbic.c b/sys/arch/amiga/dev/sbic.c index 1d540674a43..7493889fa83 100644 --- a/sys/arch/amiga/dev/sbic.c +++ b/sys/arch/amiga/dev/sbic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sbic.c,v 1.14 2001/11/06 19:53:14 miod Exp $ */ +/* $OpenBSD: sbic.c,v 1.15 2001/11/30 22:08:16 miod Exp $ */ /* $NetBSD: sbic.c,v 1.28 1996/10/13 03:07:29 christos Exp $ */ /* @@ -1789,7 +1789,7 @@ sbicgo(dev, xs) * push the data cache ( I think this won't work (EH)) */ #if defined(M68040) || defined(M68060) - if (mmutype == MMU_68040 && usedma && count) { + if (mmutype <= MMU_68040 && usedma && count) { dma_cachectl(addr, count); if (((u_int)addr & 0xF) || (((u_int)addr + count) & 0xF)) dev->sc_flags |= SBICF_DCFLUSH; diff --git a/sys/arch/amiga/dev/sfas.c b/sys/arch/amiga/dev/sfas.c index 1bf72b72b04..a51a2955e98 100644 --- a/sys/arch/amiga/dev/sfas.c +++ b/sys/arch/amiga/dev/sfas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sfas.c,v 1.13 2001/11/06 01:47:02 art Exp $ */ +/* $OpenBSD: sfas.c,v 1.14 2001/11/30 22:08:16 miod Exp $ */ /* $NetBSD: sfas.c,v 1.12 1996/10/13 03:07:33 christos Exp $ */ /* @@ -345,7 +345,7 @@ sfas_scsicmd(struct scsi_xfer *xs) */ if (!(flags & SCSI_POLL) && ( #if defined(M68040) || defined(M68060) - ((mmutype == MMU_68040) && ((vm_offset_t)xs->data >= 0xFFFC0000)) && + ((mmutype <= MMU_68040) && ((vm_offset_t)xs->data >= 0xFFFC0000)) && #endif ((vm_offset_t)xs->data >= 0xFF000000))) { vm_offset_t sva; @@ -913,7 +913,7 @@ sfas_setup_nexus(dev, nexus, pendp, cbuf, clen, buf, len, mode) } /* Flush the caches. (If needed) */ - if ((mmutype == MMU_68040) && len && !(mode & SFAS_SELECT_I)) + if ((mmutype <= MMU_68040) && len && !(mode & SFAS_SELECT_I)) dma_cachectl(buf, len); } |