From owner-freebsd-ppc@FreeBSD.ORG Fri Aug 25 00:35:37 2006 Return-Path: X-Original-To: ppc@freebsd.org Delivered-To: freebsd-ppc@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F4DC16A4E0 for ; Fri, 25 Aug 2006 00:35:37 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00AA443D45 for ; Fri, 25 Aug 2006 00:35:36 +0000 (GMT) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.5.7-GR) with ESMTP id CBG93056 (AUTH peterg@ptree32.com.au); Fri, 25 Aug 2006 10:35:30 +1000 (EST) Message-ID: <44EE45EC.3040403@freebsd.org> Date: Thu, 24 Aug 2006 17:35:56 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Marcel Moolenaar References: <44ED2448.7030503@freebsd.org> <46D747A2-7126-450A-83E4-DA7367706F18@xcllnt.net> In-Reply-To: <46D747A2-7126-450A-83E4-DA7367706F18@xcllnt.net> Content-Type: multipart/mixed; boundary="------------040909010108020405070102" Cc: ppc@freebsd.org Subject: Re: gdb(1) in the tree X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Aug 2006 00:35:37 -0000 This is a multi-part message in MIME format. --------------040909010108020405070102 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Marcel, >> I'll see if I can work out what NetBSD does. Would you be able to give the attached patch a try ? later, Peter. --------------040909010108020405070102 Content-Type: text/plain; name="mmu_oea.c.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="mmu_oea.c.patch" Index: mmu_oea.c =================================================================== RCS file: /home/ncvs/src/sys/powerpc/powerpc/mmu_oea.c,v retrieving revision 1.111 diff -u -r1.111 mmu_oea.c --- mmu_oea.c 1 Aug 2006 19:06:05 -0000 1.111 +++ mmu_oea.c 25 Aug 2006 00:32:17 -0000 @@ -2012,6 +2012,22 @@ pg = PHYS_TO_VM_PAGE(pvo->pvo_pte.pte_lo & PTE_RPGN); if (pg != NULL) { + /* + * From NetBSD pmap.c r1.37 + * If the page was changed and it is mapped exec, + * invalidate it + */ + if ((ptelo & PTE_CHG) && + (moea_attr_fetch(pg) & PTE_EXEC)) { + struct pvo_head *pvoh = vm_page_to_pvoh(pg); + if (LIST_EMPTY(pvoh)) { + moea_attr_clear(pg, PTE_EXEC); + } else { + moea_syncicache(VM_PAGE_TO_PHYS(pg), + PAGE_SIZE); + } + } + moea_attr_save(pg, pvo->pvo_pte.pte_lo & (PTE_REF | PTE_CHG)); } --------------040909010108020405070102--