xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: xen-devel <xen-devel@lists.xenproject.org>
Cc: Brian Woods <brian.woods@amd.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: [PATCH] AMD/IOMMU: initialize IRQ tasklet only once
Date: Fri, 31 May 2019 09:52:04 -0600	[thread overview]
Message-ID: <5CF14DA40200007800234108@prv1-mh.provo.novell.com> (raw)

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

WARNING: multiple messages have this Message-ID (diff)
From: "Jan Beulich" <JBeulich@suse.com>
To: "xen-devel" <xen-devel@lists.xenproject.org>
Cc: Brian Woods <brian.woods@amd.com>,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: [Xen-devel] [PATCH] AMD/IOMMU: initialize IRQ tasklet only once
Date: Fri, 31 May 2019 09:52:04 -0600	[thread overview]
Message-ID: <5CF14DA40200007800234108@prv1-mh.provo.novell.com> (raw)
Message-ID: <20190531155204.WUiMitXJb3qJpnhq9ylKFWWDcIcvbQChd0Gw21WYdYI@z> (raw)

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

             reply	other threads:[~2019-05-31 15:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 15:52 Jan Beulich [this message]
2019-05-31 15:52 ` [Xen-devel] [PATCH] AMD/IOMMU: initialize IRQ tasklet only once 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5CF14DA40200007800234108@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=brian.woods@amd.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).