Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Sep 2001 11:30:22 -0700
From:      Julian Elischer <julian@vicor-nb.com>
To:        Bruce Evans <bde@zeta.org.au>
Cc:        John Baldwin <jhb@FreeBSD.ORG>, current@FreeBSD.ORG
Subject:   Re: RFC: hack volatile bzero and bcopy
Message-ID:  <3B99123E.FEA51AD6@vicor-nb.com>
References:  <20010907203306.J38152-100000@alphplex.bde.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B99123E.FEA51AD6>