On 08.06.20 12:42, [email protected] wrote:
> From: Nikhil Devshatwar <[email protected]>
> 
> Generalize the ivshmem-demo to work on different platforms
> with different number of peers.
> 
> Parse the target interrupt number from command line to allow
> to launch the demo with capability to select the target interrupt.
> Default value for target = 0 since root cell is always available.

Do not change the current behaviour (triangle). Just allow selecting an
alternative target via the command line.

Jan

> 
> Signed-off-by: Nikhil Devshatwar <[email protected]>
> ---
>  inmates/demos/ivshmem-demo.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/inmates/demos/ivshmem-demo.c b/inmates/demos/ivshmem-demo.c
> index e7a7f711..188c8af3 100644
> --- a/inmates/demos/ivshmem-demo.c
> +++ b/inmates/demos/ivshmem-demo.c
> @@ -36,7 +36,7 @@
>  
>  static int irq_counter[MAX_VECTORS];
>  static struct ivshmem_dev_data dev;
> -static unsigned int irq_base, vectors;
> +static unsigned int irq_base, vectors, target;
>  
>  struct ivshm_regs {
>       u32 id;
> @@ -173,7 +173,6 @@ static void init_device(struct ivshmem_dev_data *d)
>  static void send_irq(struct ivshmem_dev_data *d)
>  {
>       u32 int_no = d->msix_cap > 0 ? (d->id + 1) : 0;
> -     u32 target = d->id < 2 ? (d->id + 1) : 0;
>  
>       disable_irqs();
>       printk("\nIVSHMEM: sending IRQ %d to peer %d\n", int_no, target);
> @@ -187,6 +186,7 @@ void inmate_main(void)
>       int bdf;
>  
>       irq_base = cmdline_parse_int("irq_base", DEFAULT_IRQ_BASE);
> +     target = cmdline_parse_int("target", 0);
>  
>       irq_init(irq_handler);
>       pci_init();
> 

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

-- 
You received this message because you are subscribed to the Google Groups 
"Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jailhouse-dev/c904df3e-17f2-1892-9622-3d709ce83d1e%40siemens.com.

Reply via email to