From owner-freebsd-sparc64@FreeBSD.ORG Sun Aug 23 22:26:45 2009 Return-Path: Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 91864106564A for ; Sun, 23 Aug 2009 22:26:45 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.27]) by mx1.freebsd.org (Postfix) with ESMTP id 423B18FC1C for ; Sun, 23 Aug 2009 22:26:45 +0000 (UTC) Received: by qw-out-2122.google.com with SMTP id 3so1093565qwe.7 for ; Sun, 23 Aug 2009 15:26:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=1EYgex2WF3J+zZavUXQp0bB+AtqrnGR0aGXCbHSQ5Hc=; b=VNaNGiryrdLgqV+VBcEgOb6YTDoEUDKZVNKW+zNy9ZHG3XlxEO+9Ywu7aEffhLmu5+ ivclO2yJyJ/WMNZmFnK3CKb2+gv0wp1u3OOm+t7f5J288UyfeqMQimCrNd1XmI/FjL+x w4PoQz58QJqJ+jET6X9n3DRwQi/QE/nDu77nE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=uQEcb3s0/W6FnN45DjHa1ENOIf+uZNyLQcaO/DbvqmPFRiK85gej2YPCm6r+5SAw19 2cC7UKred3sBI2mIyFrpYQbXB8EXEqpnwAnMCaM+c6nrxcI9FbmRMcx0PreP7XnSR8D6 g9l+Hi+BG6n95U85xSfEZ5RfEpejpL86o+cfU= Received: by 10.224.51.231 with SMTP id e39mr2240266qag.337.1251066404436; Sun, 23 Aug 2009 15:26:44 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 6sm260594qwd.21.2009.08.23.15.26.41 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 23 Aug 2009 15:26:42 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Sun, 23 Aug 2009 15:26:06 -0700 From: Pyun YongHyeon Date: Sun, 23 Aug 2009 15:26:06 -0700 To: Marius Strobl Message-ID: <20090823222606.GA1185@michelle.cdnetworks.com> References: <4A7C6B50.3070503@networkz.ch> <20090817205340.GA75477@alchemy.franken.de> <20090817215612.GB75477@alchemy.franken.de> <20090818192748.GA6585@alchemy.franken.de> <20090819175610.GA20481@michelle.cdnetworks.com> <20090819204603.GL25891@alchemy.franken.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090819204603.GL25891@alchemy.franken.de> User-Agent: Mutt/1.4.2.3i Cc: freebsd-sparc64@freebsd.org Subject: Re: Audio on Sunblade 100 X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Aug 2009 22:26:45 -0000 On Wed, Aug 19, 2009 at 10:46:03PM +0200, Marius Strobl wrote: [...] > > > Ok, I think I've identified the incorrect bus_dma(9) settings > > > with the help of Tatsuo YOKOGAWA's ali(4) (which as least for > > > the alignment requirement also matches the NetBSD autri(4). A > > > new patch is at: > > > http://people.freebsd.org/~marius/t4dwave_M5451_32-bit.diff > > > > The patch looks good to me but I have two questions. The alignment > > restriction specified in bus_dma_tag_create(9) really works even > > if the alignment is greater than PAGE_SIZE? I vaguely remember > > the alignment was not satisfied last time I tried it on i386 if I > > specified 256K. > > Hrm, from a quick check of the i386 busdma and the sparc64 > busdma and IOMMU code I see no indication why such an > alignment shouldn't work as expected, neither do relevant > man pages like bus_dma(9) and contigmalloc(9) indicate a > restriction to PAGE_SIZE. Based on the addresses of the > buffers I get on sparc64 (f.e. 0xc0000000 and 0xc0020000) > I'd also say it just works. But before possibly commiting > this change I've to also run-time check it on i386 anyway. > I tried it on amd64 CURRENT and it still fails to align if I set 16K as alignment. So I guess i386 may also have the same issue. As you said I also wonder why contigmalloc(9) does not honor the alignment.