Displaying 6 results from an estimated 6 matches for "cwrite".
Did you mean:
write
2020 Aug 06
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
..., *(ptr))) \
>>> (*ptr) = 1; \
>> A silly question,? compare to using set()/get() directly, what's the value
>> of the accessors macro here?
>>
>> Thanks
> get/set don't convert to the native endian, I guess that's why
> drivers use cread/cwrite. It is also nice that there's type
> safety, checking the correct integer width is used.
Yes, but this is simply because a macro is used here, how about just
doing things similar like virtio_cread_bytes():
static inline void virtio_cread(struct virtio_device *vdev,
??? ??? ??? ??? ?????...
2020 Aug 06
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
..., *(ptr))) \
>>> (*ptr) = 1; \
>> A silly question,? compare to using set()/get() directly, what's the value
>> of the accessors macro here?
>>
>> Thanks
> get/set don't convert to the native endian, I guess that's why
> drivers use cread/cwrite. It is also nice that there's type
> safety, checking the correct integer width is used.
Yes, but this is simply because a macro is used here, how about just
doing things similar like virtio_cread_bytes():
static inline void virtio_cread(struct virtio_device *vdev,
??? ??? ??? ??? ?????...
2020 Aug 05
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
On 2020/8/4 ??4:58, Michael S. Tsirkin wrote:
> Currently all config space fields are of the type __uXX.
> This confuses people and some drivers (notably vdpa)
> access them using CPU endian-ness - which only
> works well for legacy or LE platforms.
>
> Update virtio_cread/virtio_cwrite macros to allow __virtioXX
> and __leXX field types. Follow-up patches will convert
> config space to use these types.
>
> Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
> ---
> include/linux/virtio_config.h | 50 +++++++++++++++++++++++++++++++++--
> 1 file cha...
2020 Aug 05
2
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
On 2020/8/4 ??4:58, Michael S. Tsirkin wrote:
> Currently all config space fields are of the type __uXX.
> This confuses people and some drivers (notably vdpa)
> access them using CPU endian-ness - which only
> works well for legacy or LE platforms.
>
> Update virtio_cread/virtio_cwrite macros to allow __virtioXX
> and __leXX field types. Follow-up patches will convert
> config space to use these types.
>
> Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
> ---
> include/linux/virtio_config.h | 50 +++++++++++++++++++++++++++++++++--
> 1 file cha...
2020 Aug 06
0
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...tr) = 1; \
> > > A silly question,? compare to using set()/get() directly, what's the value
> > > of the accessors macro here?
> > >
> > > Thanks
> > get/set don't convert to the native endian, I guess that's why
> > drivers use cread/cwrite. It is also nice that there's type
> > safety, checking the correct integer width is used.
>
>
> Yes, but this is simply because a macro is used here, how about just doing
> things similar like virtio_cread_bytes():
>
> static inline void virtio_cread(struct virtio_de...
2020 Aug 05
0
[PATCH v2 03/24] virtio: allow __virtioXX, __leXX in config space
...Tsirkin wrote:
> > Currently all config space fields are of the type __uXX.
> > This confuses people and some drivers (notably vdpa)
> > access them using CPU endian-ness - which only
> > works well for legacy or LE platforms.
> >
> > Update virtio_cread/virtio_cwrite macros to allow __virtioXX
> > and __leXX field types. Follow-up patches will convert
> > config space to use these types.
> >
> > Signed-off-by: Michael S. Tsirkin <mst at redhat.com>
> > ---
> > include/linux/virtio_config.h | 50 ++++++++++++++++++++++...