Re: [PATCH 4/5] KVM: s390: abstract conversion between isc and enum irq_types

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

 



On 08.11.2017 09:41, Christian Borntraeger wrote:
> From: Michael Mueller <mimu@xxxxxxxxxxxxxxxxxx>
> 
> The abstraction of the conversion between an isc value and an irq_type
> by means of functions isc_to_irq_type() and irq_type_to_isc() allows
> to clarify the respective operations where used.
> 
> Signed-off-by: Michael Mueller <mimu@xxxxxxxxxxxxxxxxxx>
> Reviewed-by: Halil Pasic <pasic@xxxxxxxxxxxxxxxxxx>
> Reviewed-by: Pierre Morel <pmorel@xxxxxxxxxxxxxxxxxx>
> Reviewed-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
> ---
>  arch/s390/kvm/interrupt.c | 18 ++++++++++++++----
>  1 file changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/s390/kvm/interrupt.c b/arch/s390/kvm/interrupt.c
> index 23d8fb2..a3da4f3 100644
> --- a/arch/s390/kvm/interrupt.c
> +++ b/arch/s390/kvm/interrupt.c
> @@ -213,6 +213,16 @@ static inline unsigned long pending_irqs(struct kvm_vcpu *vcpu)
>  	       vcpu->arch.local_int.pending_irqs;
>  }
>  
> +static inline int isc_to_irq_type(unsigned long isc)
> +{
> +	return IRQ_PEND_IO_ISC_0 + isc;
> +}
> +
> +static inline int irq_type_to_isc(unsigned long irq_type)
> +{
> +	return irq_type - IRQ_PEND_IO_ISC_0;
> +}
> +

(I would move it directly below is_ioirq()), so all IRQ_PEND_IO_ISC_0
users are at one place).

Let's make the r-b list longer.

Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>


-- 

Thanks,

David / dhildenb
--
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