From owner-freebsd-current Fri Sep 7 11:20:38 2001 Delivered-To: freebsd-current@freebsd.org Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by hub.freebsd.org (Postfix) with ESMTP id 8A5C637B403; Fri, 7 Sep 2001 11:20:34 -0700 (PDT) Received: from vicor-nb.com (dhcp122.vicor-nb.com [208.206.78.122]) by mail.vicor-nb.com (Postfix) with ESMTP id 2D6401B21D; Fri, 7 Sep 2001 11:20:34 -0700 (PDT) Message-ID: <3B99123E.FEA51AD6@vicor-nb.com> Date: Fri, 07 Sep 2001 11:30:22 -0700 From: Julian Elischer Organization: VICOR X-Mailer: Mozilla 4.76 [en] (X11; U; FreeBSD 4.3-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Bruce Evans Cc: John Baldwin , current@FreeBSD.ORG Subject: Re: RFC: hack volatile bzero and bcopy References: <20010907203306.J38152-100000@alphplex.bde.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Bruce Evans wrote: > > > > This just breaks the warning. well this is th idea, because I think that bcopy is probably a safe operation on the volatile structures if the driver knows that they are presently owned by it.. (e.g. mailboxes) The correct answer would be, as you suggest, bus-space operations but that's more work than this driver really warrants at this stage. It's just be acceptable in my eyes to "break the warnings" as you put it. (remember, pointless warnings distract from real warnings). > > In the case of if_ie.c and bcopy(), bcopy() is not suitable for copying > memory that doesn't behave like RAM. Some optimized versions of it > do out of order and/or repeated copies. This might be very bad for > volatile device memory. I think rewriting if_ie.c to use bus_space > would make most of the warnings go away automatically. out-of order is probably ok for a buffer if you know that it's presently yours to write into. I'd like to to some of the following: 1/ add the hack to places that do this to reduce distracting warning messages or 2/ add to the prototype of bzero and bcopy so that volatile pointers are acceptable arguments. (I don't see any reason to not do this). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message