From owner-p4-projects@FreeBSD.ORG Sat Oct 18 19:13:32 2003 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4076F16A4C0; Sat, 18 Oct 2003 19:13:32 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0288816A4B3 for ; Sat, 18 Oct 2003 19:13:32 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C92043F75 for ; Sat, 18 Oct 2003 19:13:31 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id h9J2DVXJ078189 for ; Sat, 18 Oct 2003 19:13:31 -0700 (PDT) (envelope-from jmallett@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id h9J2DUeq078182 for perforce@freebsd.org; Sat, 18 Oct 2003 19:13:30 -0700 (PDT) (envelope-from jmallett@freebsd.org) Date: Sat, 18 Oct 2003 19:13:30 -0700 (PDT) Message-Id: <200310190213.h9J2DUeq078182@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jmallett@freebsd.org using -f From: Juli Mallett To: Perforce Change Reviews Subject: PERFORCE change 39947 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2003 02:13:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=39947 Change 39947 by jmallett@jmallett_dalek on 2003/10/18 19:12:50 Remove managed stuff, artifact from alpha pmap. Affected files ... .. //depot/projects/mips/sys/mips/include/pte.h#9 edit .. //depot/projects/mips/sys/mips/mips/pmap.c#17 edit .. //depot/projects/mips/sys/mips/mips/tlb.c#2 edit Differences ... ==== //depot/projects/mips/sys/mips/include/pte.h#9 (text+ko) ==== @@ -108,11 +108,9 @@ * RO: Read only. Never set PG_D on this page, and don't * listen to requests to write to it. * W: Wired. - * M: Managed. */ #define PG_RO (0x01 << MIPS_TLB_SWSHIFT) #define PG_W (0x02 << MIPS_TLB_SWSHIFT) -#define PG_M (0x04 << MIPS_TLB_SWSHIFT) /* * Amalgamations of flags in software: @@ -127,7 +125,6 @@ #define pte_set(pte,bit) ((*(pte)) |= (bit)) #define pte_test(pte,bit) (((*(pte)) & (bit)) == (bit)) -#define pte_managed(pte) (pte_test((pte), PG_M)) #define pte_valid(pte) (pte_test((pte), PG_V)) #define pte_ro(pte) (pte_test((pte), PG_RO)) #define pte_dirty(pte) (pte_test((pte), PG_D)) ==== //depot/projects/mips/sys/mips/mips/pmap.c#17 (text+ko) ==== @@ -141,7 +141,6 @@ */ #define pmap_pte_ro(pte) ((*(pte) & PG_RO) != 0) #define pmap_pte_w(pte) ((*(pte) & PG_W) != 0) -#define pmap_pte_managed(pte) ((*(pte) & PG_M) != 0) #define pmap_pte_v(pte) ((*(pte) & PG_V) != 0) #define pmap_pte_pa(pte) MIPS_PTE_TO_PA(*(pte)) #define pmap_pte_prot(pte) (*(pte) & PG_PROT) @@ -1135,18 +1134,14 @@ pmap->pm_stats.wired_count -= 1; pmap->pm_stats.resident_count -= 1; - if (pmap_pte_managed(&oldpte)) { - m = PHYS_TO_VM_PAGE(pmap_pte_pa(&oldpte)); - if ((oldpte & PG_RO) == 0) { - if (pmap_track_modified(va)) - vm_page_dirty(m); - } - if ((oldpte & PG_D) == 0) - vm_page_flag_set(m, PG_REFERENCED); - return pmap_remove_entry(pmap, m, va); - } else { - /* return pmap_unuse_pt(pmap, va, NULL); */ + m = PHYS_TO_VM_PAGE(pmap_pte_pa(&oldpte)); + if ((oldpte & PG_RO) == 0) { + if (pmap_track_modified(va)) + vm_page_dirty(m); } + if ((oldpte & PG_D) == 0) + vm_page_flag_set(m, PG_REFERENCED); + return pmap_remove_entry(pmap, m, va); return 0; } @@ -1358,9 +1353,9 @@ } if (pte_dirty(pte)) { /* - * If it's not read-only, is managed, and modified, dirty it. + * If it's not read-only and is modified, dirty it. */ - if (pte_managed(pte) && !pte_ro(pte) && pte_dirty(pte)) { + if (!pte_ro(pte) && pte_dirty(pte)) { KASSERT(pmap_track_modified(va), ("pmap modified")); vm_page_dirty(PHYS_TO_VM_PAGE(opa)); } @@ -1823,10 +1818,6 @@ #endif pa = pmap_pte_pa(pte); - KASSERT(pmap_pte_managed(pte), - ("pmap_emulate_reference(%p, 0x%lx, %d, %d): pa 0x%lx not managed", - curthread, v, user, write, pa)); - /* * Twiddle the appropriate bits to reflect the reference * and/or modification.. @@ -1894,8 +1885,6 @@ vm_offset_t pa; val = MINCORE_INCORE; - if (!pmap_pte_managed(pte)) - return val; pa = pmap_pte_pa(pte); ==== //depot/projects/mips/sys/mips/mips/tlb.c#2 (text+ko) ==== @@ -178,12 +178,6 @@ /* * Do we really want to dirty this page? */ -#if 0 /* XXX ? */ - if (!pte_managed(pte)) - panic("tlb modified unmanaged page"); -#endif - if (!pte_valid(pte)) - panic("tlb modified invalid page"); if (pte_ro(pte)) panic("write to ro page"); if (pte_dirty(pte))