From owner-freebsd-sparc Mon Jan 20 11:40:14 2003 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F70837B401 for ; Mon, 20 Jan 2003 11:40:12 -0800 (PST) Received: from mail.gmx.net (mail.gmx.net [213.165.65.60]) by mx1.FreeBSD.org (Postfix) with SMTP id BD46443F1E for ; Mon, 20 Jan 2003 11:40:10 -0800 (PST) (envelope-from tmoestl@gmx.net) Received: (qmail 17557 invoked by uid 0); 20 Jan 2003 19:40:09 -0000 Received: from p508E7032.dip.t-dialin.net (HELO galatea.local) (80.142.112.50) by mail.gmx.net (mp008-rz3) with SMTP; 20 Jan 2003 19:40:09 -0000 Received: from localhost ([127.0.0.1] helo=galatea.local) by galatea.local with esmtp (Exim 4.12 #1) id 18ahns-00011x-00; Mon, 20 Jan 2003 20:41:52 +0100 Received: (from tmm@localhost) by galatea.local (8.12.6/8.12.6/Submit) id h0KJfWJD003964; Mon, 20 Jan 2003 20:41:32 +0100 (CET) Date: Mon, 20 Jan 2003 20:41:32 +0100 From: Thomas Moestl To: Harti Brandt Cc: sparc@freebsd.org Subject: Re: Problem with iommu_dvmamap_create Message-ID: <20030120194132.GC240@crow.dom2ip.de> Mail-Followup-To: Harti Brandt , sparc@freebsd.org References: <20030117151958.U715@beagle.fokus.gmd.de> <20030117160857.GB304@crow.dom2ip.de> <20030117171317.F44530@beagle.fokus.gmd.de> <20030117171111.GC304@crow.dom2ip.de> <20030117181111.R45050@beagle.fokus.gmd.de> <20030117173303.GD304@crow.dom2ip.de> <20030120103814.X45050@beagle.fokus.gmd.de> <20030120151712.GA240@crow.dom2ip.de> <20030120161832.K45050@beagle.fokus.gmd.de> <20030120192946.GB240@crow.dom2ip.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="vtzGhvizbBRQ85DL" Content-Disposition: inline In-Reply-To: <20030120192946.GB240@crow.dom2ip.de> User-Agent: Mutt/1.4i Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, 2003/01/20 at 20:29:46 +0100, Thomas Moestl wrote: > Yes, but I strongly suspect that the bug is only hidden by it, > probably because it corrects the semantics of IOMMU_MAX_PRE_SEG, which > effectively results in preallocation being reduced by one segment. I > finally managed to reproduce similar behaviour, and think I might have > a real fix. Can you please revert the previous patch (just to get a > clean environment for reproducing the behaviour) and try again with > just the attached patch applied? Bah, actually attaching it might help. - Thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C --vtzGhvizbBRQ85DL Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="iommu-sz.diff" Index: sparc64/iommu.c =================================================================== RCS file: /ncvs/src/sys/sparc64/sparc64/iommu.c,v retrieving revision 1.14 diff -u -r1.14 iommu.c --- sparc64/iommu.c 6 Jan 2003 21:59:54 -0000 1.14 +++ sparc64/iommu.c 20 Jan 2003 19:17:47 -0000 @@ -288,6 +288,7 @@ struct iommu_state *first; vm_size_t size; vm_offset_t offs; + u_int64_t end; int i; /* @@ -317,13 +318,13 @@ * First IOMMU to be registered; set up resource mamangement * and allocate TSB memory. */ + end = is->is_dvmabase + (size << (IO_PAGE_SHIFT - IOTTE_SHIFT)); iommu_dvma_rman.rm_type = RMAN_ARRAY; iommu_dvma_rman.rm_descr = "DVMA Memory"; if (rman_init(&iommu_dvma_rman) != 0 || rman_manage_region(&iommu_dvma_rman, (is->is_dvmabase >> IO_PAGE_SHIFT) + resvpg, - (is->is_dvmabase + (size << - (IO_PAGE_SHIFT - IOTTE_SHIFT))) >> IO_PAGE_SHIFT) != 0) + (end >> IO_PAGE_SHIFT) - 1) != 0) panic("iommu_init: can't initialize dvma rman"); /* * Allocate memory for I/O page tables. They need to be --vtzGhvizbBRQ85DL-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message