Re: RFC: hack volatile bzero and bcopy

2001-09-08 Thread Bruce Evans
On Fri, 7 Sep 2001, Bakul Shah wrote: > > out-of order is probably ok for a buffer if you know that it's > > presently yours to write into. > > If the area being bcopied/bzeroed has this behavior why not > remove the volatile from the struct ptrs instead of "fixing" > bcopy/bzero? One reason is

Re: RFC: hack volatile bzero and bcopy

2001-09-07 Thread Warner Losh
In message <[EMAIL PROTECTED]> Bruce Evans writes: : 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 thin

Re: RFC: hack volatile bzero and bcopy

2001-09-07 Thread Bakul Shah
> 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) *probably* safe? For truly volatile memory bzero & bcopy are *not* safe. Anyone remember the origial 6800

Re: RFC: hack volatile bzero and bcopy

2001-09-07 Thread Julian Elischer
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 o

Re: RFC: hack volatile bzero and bcopy

2001-09-07 Thread Bruce Evans
[I replied to parts of this in reponse to a later message] On Thu, 6 Sep 2001, Julian Elischer wrote: > typedef void Xcopy( void volatile *, void volatile *, int); > #define VBCOPY(A,B,L) (*(Xcopy *)&bcopy)((A),(B),(L)) > typedef void Xzero( void volatile *, int); > #define VBZERO(A,L) (*(Xzero

RE: RFC: hack volatile bzero and bcopy

2001-09-07 Thread Bruce Evans
On Thu, 6 Sep 2001, John Baldwin wrote: > On 07-Sep-01 Julian Elischer wrote: > > > > Here is a hack to remove the 20 or so warning messages from if_ie.c No hacks please. I fixed some of these locally a few years ago without using any hacks, but gave up. if_ie.c should be rewritten to not use

RE: RFC: hack volatile bzero and bcopy

2001-09-06 Thread Julian Elischer
Actually I just discoverd that you can do: int function (volatile const *); (I guess you say you will not writ eto it, but that it may change of its own volition at times) anyhow setting this in bcopy would remove a heck of a lot of warnings in the kernel. On Thu, 6 Sep 2001, John Baldwin wrot

RE: RFC: hack volatile bzero and bcopy

2001-09-06 Thread John Baldwin
On 07-Sep-01 Julian Elischer wrote: > > Here is a hack to remove the 20 or so warning messages from if_ie.c > > Most of them are due to the supply of volatile pointers to bcopy and > bzero. > > I do the following to produce macros that call bzero and bcopy, but > don't produce > warning messa