From owner-p4-projects@FreeBSD.ORG Fri Nov 14 13:52:04 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9368E1065675; Fri, 14 Nov 2008 13:52:04 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 570FC1065673 for ; Fri, 14 Nov 2008 13:52:04 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id D9B818FC13 for ; Fri, 14 Nov 2008 13:52:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) X-Spam-Flag: SKIP X-Spam-Yversion: Spamooborona-2.1.0 Received: from orphanage.alkar.net (account mav@alkar.net [212.86.226.11] verified) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPA id 227754243; Fri, 14 Nov 2008 15:52:03 +0200 Message-ID: <491D8282.5060506@FreeBSD.org> Date: Fri, 14 Nov 2008 15:52:02 +0200 From: Alexander Motin User-Agent: Thunderbird 2.0.0.14 (X11/20080612) MIME-Version: 1.0 To: Hans Petter Selasky References: <200811080910.mA89AgTZ048172@repoman.freebsd.org> <200811140915.18846.hselasky@c2i.net> In-Reply-To: <200811140915.18846.hselasky@c2i.net> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Mailman-Approved-At: Fri, 14 Nov 2008 14:17:32 +0000 Cc: Perforce Change Reviews Subject: Re: PERFORCE change 152649 for review - busdma problem X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Nov 2008 13:52:04 -0000 Hi. Hans Petter Selasky wrote: > I am going to revert this patch and suggest a new one. I am not sure how to > best implement it, but will it be Ok if I make the offset adjustment only for > alignment <= 1 byte ? Alignment <= 1 byte means no (any possible) alignment. So busdma may use any physical address within permitted range. Adding strict requirement that this address should be aligned withing page same as logical address will IMHO be too restrictive and as I understand will lead to additional physical memory consumption. I am not very understand the problem and how are you going to manage it. As I understand, the problem is that you can specify offset for non-first scatter/gather segment only as page address. Is it correct? So which in-page offset used for that segments? If zero, you should just specify busdma to align all segments to the page boundary. If it should be the same as after the last sent data, then I can hardly imagine how are you going to manage this to implement real scatter/gather for misaligned data. > Is there any documentation or specification that needs to be updated? Sorry, I am not a busdma expert, I was just digging it several times while working on some drivers. -- Alexander Motin