From owner-freebsd-stable Sun Feb 28 9:45:32 1999 Delivered-To: freebsd-stable@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id A80111526A for ; Sun, 28 Feb 1999 09:45:17 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.1/8.9.1) with ESMTP id JAA17147; Sun, 28 Feb 1999 09:44:56 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.2/8.9.1) id JAA12017; Sun, 28 Feb 1999 09:44:56 -0800 (PST) (envelope-from jdp@polstra.com) Date: Sun, 28 Feb 1999 09:44:56 -0800 (PST) Message-Id: <199902281744.JAA12017@vashon.polstra.com> To: castor@geocast.net Subject: Re: bus_dmamap_load & compiler glitch In-Reply-To: Organization: Polstra & Co., Seattle, WA Cc: stable@freebsd.org Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article , Castor Fu wrote: > I'm trying to use the bus_dma interface with 3.1-RELEASE and > the bus_dmamap_load routine appears to compile incorrectly with > the default C compiler and default flags. > > It somehow fouls up in detecting the first segment and generates > two segments, the first of which is garbage. > > Has anyone seen anything like this? I realize these routines are > not used much yet in current drivers. > > Putting in a few printfs seems to get the compiler to do the right thing. What optimization level are you using? Anything higher than "-O" is not guaranteed to work. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Nobody ever went broke underestimating the taste of the American public." -- H. L. Mencken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message