Thread (122 messages) 122 messages, 8 authors, 2016-02-03

Re: [PATCH v4 7/8] virtio: add 1.0 support

From: Yuanhan Liu <hidden>
Date: 2016-01-19 01:35:13

On Mon, Jan 18, 2016 at 05:07:51PM +0000, Xie, Huawei wrote:
.On 1/15/2016 12:34 PM, Yuanhan Liu wrote:
quoted
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]
quoted
+
+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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help