From 95d96c3bec5617ce2da0b0212fa606a33167fc20 Mon Sep 17 00:00:00 2001 From: chopps Date: Wed, 28 Dec 1994 09:08:41 +0000 Subject: [PATCH] support for recent changes (non-contig mem..) from osymh@gemini.oscs.montana.edu (Michael L. Hitch) --- sys/arch/amiga/include/param.h | 24 ++++++++++++++++++++---- sys/arch/amiga/include/pmap.h | 6 +++++- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/sys/arch/amiga/include/param.h b/sys/arch/amiga/include/param.h index abc6666161f9..808f3745b1ea 100644 --- a/sys/arch/amiga/include/param.h +++ b/sys/arch/amiga/include/param.h @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.15 1994/10/26 02:06:20 cgd Exp $ */ +/* $NetBSD: param.h,v 1.16 1994/12/28 09:08:41 chopps Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -155,17 +155,33 @@ */ #include +#if 0 #define _debug_spl(s) \ ({ \ register int _spl_r; \ \ __asm __volatile ("clrl %0; movew sr,%0; movew %1,sr" : \ "&=d" (_spl_r) : "di" (s)); \ - if ((_spl_r&PSL_IPL) > (s&PSL_IPL)) \ + if ((_spl_r&PSL_IPL) > ((s)&PSL_IPL)&&((s)&PSL_IPL)!=PSL_IPL1) \ printf ("%s:%d:spl(%d) ==> spl(%d)!!\n",__FILE__,__LINE__, \ - ((PSL_IPL&_spl_r)>>8), ((PSL_IPL&s)>>8)); \ + ((PSL_IPL&_spl_r)>>8), ((PSL_IPL&(s))>>8)); \ _spl_r; \ }) +#else +/* + * Don't lower IPL below current IPL (unless new IPL is 6) + */ +#define _debug_spl(s) \ +({ \ + register int _spl_r; \ +\ + __asm __volatile ("clrl %0; movew sr,%0" : \ + "&=d" (_spl_r)); \ + if ((((s)&PSL_IPL) >= PSL_IPL6) || (_spl_r&PSL_IPL) < ((s)&PSL_IPL) || ((s)&PSL_IPL) <= PSL_IPL1) \ + __asm __volatile ("movew %0,sr" : : "di" (s)); \ + _spl_r; \ +}) +#endif #define _spl_no_check(s) \ ({ \ @@ -175,7 +191,7 @@ "&=d" (_spl_r) : "di" (s)); \ _spl_r; \ }) -#if defined (DEBUG) +#if defined (DEBUGXX) /* No workee */ #define _spl _debug_spl #else #define _spl _spl_no_check diff --git a/sys/arch/amiga/include/pmap.h b/sys/arch/amiga/include/pmap.h index 196b745378b4..9ab9fa4f2f44 100644 --- a/sys/arch/amiga/include/pmap.h +++ b/sys/arch/amiga/include/pmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.10 1994/10/26 02:06:25 cgd Exp $ */ +/* $NetBSD: pmap.h,v 1.11 1994/12/28 09:08:45 chopps Exp $ */ /* * Copyright (c) 1987 Carnegie-Mellon University @@ -96,7 +96,11 @@ pv_entry_t pv_table; /* array of entries, one per page */ u_int *Sysmap; char *vmmap; /* map for mem, dumps, etc. */ +#ifdef MACHINE_NONCONTIG +#define pa_index(pa) pmap_page_index(pa) +#else #define pa_index(pa) atop(pa - vm_first_phys) +#endif #define pa_to_pvh(pa) (&pv_table[pa_index(pa)]) #define pmap_resident_count(pmap) ((pmap)->pm_stats.resident_count) #endif KERNEL