Re: [PATCH 4/4] KVM: s390: Add a channel I/O based virtio transport driver.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 13/12/12 12:06, Alexander Graf wrote:
> 
> On 12.12.2012, at 21:12, Christian Borntraeger wrote:
> 
>> On 12/12/12 19:31, Alexander Graf wrote:
>> +static inline long do_kvm_notify(struct subchannel_id schid,
>>>> +                 unsigned long queue_index)
>>>> +{
>>>> +    register unsigned long __nr asm("1") = KVM_S390_VIRTIO_CCW_NOTIFY;
>>>> +    register struct subchannel_id __schid asm("2") = schid;
>>>
>>> How does the compiler know that the struct fits within a register?
>>>
>>
>> Well it knows that sizeof struct subchannel_id is 4.
> 
> How so? The asm/ccwdev.h header simply says
> 
>   struct subchannel_id;

see original patch:

>>> +#include <asm/cio.h>
>>> +#include <asm/ccwdev.h>
>>> +#include <asm/schid.h>
>>> +
>>> +/*
>>> + * virtio related functions
>>> + */
>>> +

asm/schid.h includes uapi/asm/schid.h and that contains the definition.

--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux