On Mon, Jan 18, 2016 at 05:07:51PM +0000, Xie, Huawei wrote:
> .On 1/15/2016 12:34 PM, Yuanhan Liu wrote:
> > Modern (v1.0) virtio pci device defines several pci capabilities.
> > Each cap has a configure structure corresponding to it, and the
> > cap.bar and cap.offset fields tell us where to find it.
> >
> [snip]
> > +
> > +static inline void
> > +io_write64_twopart(uint64_t val, uint32_t *lo, uint32_t *hi)
> > +{
> > +   io_write32((uint32_t)val, lo);
> > +   io_write32(val >> 32,     hi);
> 
> Firstly your second iowrite32 doesn't do the conversion.

Because it's not necessary. The first one is for retrieving the low 32
bits.

> The conversion is duplicated.

What do you mean by "duplicated".

        --yliu

Reply via email to