From owner-freebsd-hackers@FreeBSD.ORG Thu Oct 27 05:48:30 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1F56016A41F for ; Thu, 27 Oct 2005 05:48:30 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id BBFFE43D4C for ; Thu, 27 Oct 2005 05:48:26 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 86832 invoked by uid 0); 27 Oct 2005 05:48:23 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 27 Oct 2005 05:48:23 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by prophet.alphaque.com (8.13.4/8.13.4) with ESMTP id j9R5lxJI001291; Thu, 27 Oct 2005 13:47:59 +0800 (MYT) (envelope-from dinesh@alphaque.com) Message-ID: <43606A0F.5000704@alphaque.com> Date: Thu, 27 Oct 2005 13:47:59 +0800 From: Dinesh Nair User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8b) Gecko/20050915 MIME-Version: 1.0 To: Scott Long References: <435E3003.4050609@alphaque.com> <200510251610.53127.jhb@freebsd.org> <435F1E77.30007@alphaque.com> <200510261320.16175.jhb@freebsd.org> <435FE416.1050703@samsco.org> In-Reply-To: <435FE416.1050703@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: correct use of bus_dmamap_sync X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Oct 2005 05:48:30 -0000 On 10/27/05 04:16 Scott Long said the following: >>> an example would be using (BUS_DMASYNC_POSTREAD|BUS_DMASYNC_PREWRITE) >>> which >>> would be 0x03 in freebsd 4.x and 0x06 in freebsd 5.x. the gotcha is that >>> 0x03 in freebsd 4.x is BUS_DMASYNC_POSTWRITE. so therefore, >>> BUS_DMASYNC_POSTREAD|BUS_DMASYNC_PREWRITE will be >>> BUS_DMASYNC_POSTWRITE in >>> 4.x which in the syscall is actually a no op. >> >> Yes, that is fugly. Just don't use the | versions for now I would guess. > > Trying to maintain source compatibility between 4.x and 5.x/6.x will > make you encounter a whole lot more problems than just this. could you elaborate on what busdma related problems there'd be, between 4.x and 5.x/6.x ? do, for example, the inner workings of the bus_dma* syscalls work the same on both ? -- Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+