lkml.org 
[lkml]   [2015]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/2] virtio_pci_modern: type-safe io accessors
Date
Rusty Russell <rusty@rustcorp.com.au> writes:

> "Michael S. Tsirkin" <mst@redhat.com> writes:
>> The spec is very clear on this:
>>
>> 4.1.3.1 Driver Requirements: PCI Device Layout
>>
>> The driver MUST access each field using the “natural” access method,
>> i.e. 32-bit accesses for 32-bit fields, 16-bit accesses for 16-bit
>> fields and 8-bit accesses for 8-bit fields.
>>
>> Add type-safe wrappers to prevent access with incorrect width.
>
> Applied both (for *next* merge window).

... and fixed this:

>> +static inline void vp_iowrite32(u32 value, u32 __iomem *addr)
>> +{
>> + iowrite16(value, addr);
>> +}

Thanks,
Rusty.


\
 
 \ /
  Last update: 2015-02-16 06:41    [W:0.031 / U:0.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site