Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/dev/pci
In article <23974.1611441140%splode.eterna.com.au@localhost>,
matthew green <mrg%eterna.com.au@localhost> wrote:
>"Christos Zoulas" writes:
>> Module Name: src
>> Committed By: christos
>> Date: Sat Jan 23 20:00:19 UTC 2021
>>
>> Modified Files:
>> src/sys/dev/pci: virtio_pci.c
>>
>> Log Message:
>> Provide a generic bus_space_write_8 function that is bi-endian.
>
>this seems dangerous to me. we don't define it on
>some platforms because we can't, so having it faked
>out here seems like someone later will be confused
>and the wrong thing will happen.
>
>i would rather have something like
>
>virtio_write8(...)
>{
>#ifdef __HAVE_BUS_SPACE_8
> just use the real thing
>#else
> use the dual-_4 version that is ok _for this device_
>#endif
>}
>
>and then use this wrapper in the rest of the code.
This implementation is internal to virtio_pci and is guaranteed to work
by the spec, how will someone else us it?
christos
Home |
Main Index |
Thread Index |
Old Index