Xen-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] AMD/IOMMU: initialize IRQ tasklet only once
@ 2019-05-31 15:52 Jan Beulich
  2019-05-31 15:52 ` [Xen-devel] " Jan Beulich
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jan Beulich @ 2019-05-31 15:52 UTC (permalink / raw)
  To: xen-devel; +Cc: Brian Woods, Suravee Suthikulpanit

Don't do this once per IOMMU, nor after setting up the IOMMU interrupt
(which will want to schedule this tasklet). In fact it can be
initialized at build time.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -31,7 +31,8 @@
 
 static int __initdata nr_amd_iommus;
 
-static struct tasklet amd_iommu_irq_tasklet;
+static void do_amd_iommu_irq(unsigned long data);
+static DECLARE_SOFTIRQ_TASKLET(amd_iommu_irq_tasklet, do_amd_iommu_irq, 0);
 
 unsigned int __read_mostly ivrs_bdf_entries;
 u8 __read_mostly ivhd_type;
@@ -1056,8 +1057,6 @@ static int __init amd_iommu_init_one(str
     printk("AMD-Vi: IOMMU %d Enabled.\n", nr_amd_iommus );
     nr_amd_iommus++;
 
-    softirq_tasklet_init(&amd_iommu_irq_tasklet, do_amd_iommu_irq, 0);
-
     return 0;
 
 error_out:



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Xen-devel] [PATCH] AMD/IOMMU: initialize IRQ tasklet only once
  2019-05-31 15:52 [PATCH] AMD/IOMMU: initialize IRQ tasklet only once Jan Beulich
@ 2019-05-31 15:52 ` " Jan Beulich
  2019-05-31 16:09 ` Andrew Cooper
  2019-06-18 17:29 ` Woods, Brian
  2 siblings, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2019-05-31 15:52 UTC (permalink / raw)
  To: xen-devel; +Cc: Brian Woods, Suravee Suthikulpanit

Don't do this once per IOMMU, nor after setting up the IOMMU interrupt
(which will want to schedule this tasklet). In fact it can be
initialized at build time.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/drivers/passthrough/amd/iommu_init.c
+++ b/xen/drivers/passthrough/amd/iommu_init.c
@@ -31,7 +31,8 @@
 
 static int __initdata nr_amd_iommus;
 
-static struct tasklet amd_iommu_irq_tasklet;
+static void do_amd_iommu_irq(unsigned long data);
+static DECLARE_SOFTIRQ_TASKLET(amd_iommu_irq_tasklet, do_amd_iommu_irq, 0);
 
 unsigned int __read_mostly ivrs_bdf_entries;
 u8 __read_mostly ivhd_type;
@@ -1056,8 +1057,6 @@ static int __init amd_iommu_init_one(str
     printk("AMD-Vi: IOMMU %d Enabled.\n", nr_amd_iommus );
     nr_amd_iommus++;
 
-    softirq_tasklet_init(&amd_iommu_irq_tasklet, do_amd_iommu_irq, 0);
-
     return 0;
 
 error_out:



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] AMD/IOMMU: initialize IRQ tasklet only once
  2019-05-31 15:52 [PATCH] AMD/IOMMU: initialize IRQ tasklet only once Jan Beulich
  2019-05-31 15:52 ` [Xen-devel] " Jan Beulich
@ 2019-05-31 16:09 ` Andrew Cooper
  2019-05-31 16:09   ` [Xen-devel] " Andrew Cooper
  2019-06-18 17:29 ` Woods, Brian
  2 siblings, 1 reply; 5+ messages in thread
From: Andrew Cooper @ 2019-05-31 16:09 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Brian Woods, Suravee Suthikulpanit

On 31/05/2019 08:52, Jan Beulich wrote:
> Don't do this once per IOMMU, nor after setting up the IOMMU interrupt
> (which will want to schedule this tasklet). In fact it can be
> initialized at build time.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xen-devel] [PATCH] AMD/IOMMU: initialize IRQ tasklet only once
  2019-05-31 16:09 ` Andrew Cooper
@ 2019-05-31 16:09   ` " Andrew Cooper
  0 siblings, 0 replies; 5+ messages in thread
From: Andrew Cooper @ 2019-05-31 16:09 UTC (permalink / raw)
  To: Jan Beulich, xen-devel; +Cc: Brian Woods, Suravee Suthikulpanit

On 31/05/2019 08:52, Jan Beulich wrote:
> Don't do this once per IOMMU, nor after setting up the IOMMU interrupt
> (which will want to schedule this tasklet). In fact it can be
> initialized at build time.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Xen-devel] [PATCH] AMD/IOMMU: initialize IRQ tasklet only once
  2019-05-31 15:52 [PATCH] AMD/IOMMU: initialize IRQ tasklet only once Jan Beulich
  2019-05-31 15:52 ` [Xen-devel] " Jan Beulich
  2019-05-31 16:09 ` Andrew Cooper
@ 2019-06-18 17:29 ` Woods, Brian
  2 siblings, 0 replies; 5+ messages in thread
From: Woods, Brian @ 2019-06-18 17:29 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel, Woods, Brian, Suthikulpanit, Suravee

On Fri, May 31, 2019 at 09:52:04AM -0600, Jan Beulich wrote:
> [CAUTION: External Email]
> 
> Don't do this once per IOMMU, nor after setting up the IOMMU interrupt
> (which will want to schedule this tasklet). In fact it can be
> initialized at build time.
> 
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Brian Woods <brian.woods@amd.com>

> --- a/xen/drivers/passthrough/amd/iommu_init.c
> +++ b/xen/drivers/passthrough/amd/iommu_init.c
> @@ -31,7 +31,8 @@
> 
>  static int __initdata nr_amd_iommus;
> 
> -static struct tasklet amd_iommu_irq_tasklet;
> +static void do_amd_iommu_irq(unsigned long data);
> +static DECLARE_SOFTIRQ_TASKLET(amd_iommu_irq_tasklet, do_amd_iommu_irq, 0);
> 
>  unsigned int __read_mostly ivrs_bdf_entries;
>  u8 __read_mostly ivhd_type;
> @@ -1056,8 +1057,6 @@ static int __init amd_iommu_init_one(str
>      printk("AMD-Vi: IOMMU %d Enabled.\n", nr_amd_iommus );
>      nr_amd_iommus++;
> 
> -    softirq_tasklet_init(&amd_iommu_irq_tasklet, do_amd_iommu_irq, 0);
> -
>      return 0;
> 
>  error_out:
> 
> 

-- 
Brian Woods

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, back to index

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-31 15:52 [PATCH] AMD/IOMMU: initialize IRQ tasklet only once Jan Beulich
2019-05-31 15:52 ` [Xen-devel] " Jan Beulich
2019-05-31 16:09 ` Andrew Cooper
2019-05-31 16:09   ` [Xen-devel] " Andrew Cooper
2019-06-18 17:29 ` Woods, Brian

Xen-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/xen-devel/0 xen-devel/git/0.git
	git clone --mirror https://lore.kernel.org/xen-devel/1 xen-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 xen-devel xen-devel/ https://lore.kernel.org/xen-devel \
		xen-devel@lists.xenproject.org xen-devel@archiver.kernel.org
	public-inbox-index xen-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.xenproject.lists.xen-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox