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



"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.


.mrg.


Home | Main Index | Thread Index | Old Index