Re: CVS commit: src/sys/dev/pci

2021-01-23 Thread Jason Thorpe
> On Jan 23, 2021, at 5:40 PM, Christos Zoulas wrote: > >> it's a bad example. someone might copy it into another >> driver that _doesn't_ work with this version, but may seem >> to fix a build error. >> >> that's why i wanted to wrap the usage to make it clear if >> someone were to copy it e

Re: CVS commit: src/sys/dev/pci

2021-01-23 Thread Christos Zoulas
In article <17141.1611452...@splode.eterna.com.au>, matthew green wrote: >Christos Zoulas writes: >> In article <20210123230600.52be160...@jupiter.mumble.net>, >> Taylor R Campbell wrote: >> > >> >Conversely, how do you know whether this hacked-up implementation >> >which tears the write into t

re: CVS commit: src/sys/dev/pci

2021-01-23 Thread matthew green
Christos Zoulas writes: > In article <20210123230600.52be160...@jupiter.mumble.net>, > Taylor R Campbell wrote: > > > >Conversely, how do you know whether this hacked-up implementation > >which tears the write into two will actually work? Maybe it works for > >virtio but there are likely other d

Re: CVS commit: src/sys/dev/pci

2021-01-23 Thread Christos Zoulas
In article <20210123230600.52be160...@jupiter.mumble.net>, Taylor R Campbell wrote: > >Conversely, how do you know whether this hacked-up implementation >which tears the write into two will actually work? Maybe it works for >virtio but there are likely other devices out there for which it will >

Re: CVS commit: src/sys/dev/pci

2021-01-23 Thread Taylor R Campbell
> Date: Sat, 23 Jan 2021 22:59:22 - (UTC) > From: chris...@astron.com (Christos Zoulas) > > In article <23974.1611441...@splode.eterna.com.au>, > matthew green wrote: > >this seems dangerous to me. we don't define it on > >some platforms because we can't, so having it faked > >out here seem

Re: CVS commit: src/sys/dev/pci

2021-01-23 Thread Christos Zoulas
In article <23974.1611441...@splode.eterna.com.au>, matthew green 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

re: CVS commit: src/sys/dev/pci

2021-01-23 Thread matthew green
"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 def

Re: CVS commit: src/sys/dev/pci

2021-01-23 Thread Christos Zoulas
In article , Reinoud Zandijk wrote: >On Fri, Jan 22, 2021 at 04:54:51PM +1100, matthew green wrote: >> > +#ifndef _LP64 >> >> _LP64 is a terrible way to make this choice. >> >> heaps of our 32 bit platforms implement the _8 variants. > >Can't we then just make sure they have the 8 bit variant?

Re: CVS commit: src/sys/dev/pci

2021-01-23 Thread Christos Zoulas
In article , Nick Hudson wrote: >On 22/01/2021 04:48, Christos Zoulas wrote: >> +#if _QUAD_HIGHWORD >> +bus_space_write_4(iot, ioh, offset, (uint32_t)(value & 0x)); >> +bus_space_write_4(iot, ioh, offset + 4, (uint32_t)(value >> 32)); >> +#else >> +bus_space_write_4(iot, ioh,