Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1602097 > unrolled thread

Re: [RFC PATCH 17/33] irqchip/gic-v3-its: Add VLPI configuration hook

Started byAuger Eric <eric.auger@redhat.com>
First post2017-03-16 10:00 +0100
Last post2017-03-16 10:00 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [RFC PATCH 17/33] irqchip/gic-v3-its: Add VLPI configuration hook Auger Eric <eric.auger@redhat.com> - 2017-03-16 10:00 +0100

#1602097 — Re: [RFC PATCH 17/33] irqchip/gic-v3-its: Add VLPI configuration hook

FromAuger Eric <eric.auger@redhat.com>
Date2017-03-16 10:00 +0100
SubjectRe: [RFC PATCH 17/33] irqchip/gic-v3-its: Add VLPI configuration hook
Message-ID<tlzqi-4aX-13@gated-at.bofh.it>
Hi,

On 17/01/2017 11:20, Marc Zyngier wrote:
> Add the skeleton irq_set_vcpu_affinity method that will be used
> to configure VLPIs.
> 
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>

Eric

> ---
>  drivers/irqchip/irq-gic-v3-its.c | 33 +++++++++++++++++++++++++++++++++
>  1 file changed, 33 insertions(+)
> 
> diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
> index 0dbc8b0..1bd78ca 100644
> --- a/drivers/irqchip/irq-gic-v3-its.c
> +++ b/drivers/irqchip/irq-gic-v3-its.c
> @@ -36,6 +36,7 @@
>  
>  #include <linux/irqchip.h>
>  #include <linux/irqchip/arm-gic-v3.h>
> +#include <linux/irqchip/arm-gic-v4.h>
>  
>  #include <asm/cputype.h>
>  #include <asm/exception.h>
> @@ -771,6 +772,37 @@ static int its_irq_set_irqchip_state(struct irq_data *d,
>  	return 0;
>  }
>  
> +static int its_irq_set_vcpu_affinity(struct irq_data *d, void *vcpu_info)
> +{
> +	struct its_device *its_dev = irq_data_get_irq_chip_data(d);
> +	struct its_cmd_info *info = vcpu_info;
> +	u32 event = its_get_event_id(d);
> +
> +	/* Need a v4 ITS */
> +	if (!its_dev->its->is_v4 || !info)
> +		return -EINVAL;
> +
> +	switch (info->cmd_type) {
> +	case MAP_VLPI:
> +	{
> +		return 0;
> +	}
> +
> +	case UNMAP_VLPI:
> +	{
> +		return 0;
> +	}
> +
> +	case PROP_UPDATE_VLPI:
> +	{
> +		return 0;
> +	}
> +
> +	default:
> +		return -EINVAL;
> +	}
> +}
> +
>  static struct irq_chip its_irq_chip = {
>  	.name			= "ITS",
>  	.irq_mask		= its_mask_irq,
> @@ -779,6 +811,7 @@ static struct irq_chip its_irq_chip = {
>  	.irq_set_affinity	= its_set_affinity,
>  	.irq_compose_msi_msg	= its_irq_compose_msi_msg,
>  	.irq_set_irqchip_state	= its_irq_set_irqchip_state,
> +	.irq_set_vcpu_affinity	= its_irq_set_vcpu_affinity,
>  };
>  
>  /*
> 

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web