From: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> To: LKML <linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> Cc: Jens Axboe <axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org>, Marc Zyngier <marc.zyngier-5wv7dgnIgG8@public.gmane.org>, Michael Ellerman <mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org>, Ingo Molnar <mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>, Keith Busch <keith.busch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>, Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, Christoph Hellwig <hch-jcswGhMUV9g@public.gmane.org> Subject: [patch 11/55] iommu/vt-d: Use named irq domain interface Date: Tue, 20 Jun 2017 01:37:11 +0200 Message-ID: <20170619235444.063083997@linutronix.de> (raw) In-Reply-To: <20170619233700.547167146@linutronix.de> [-- Attachment #0: iommu-vt-d--Use-named-irq-domain-interface.patch --] [-- Type: text/plain, Size: 1662 bytes --] Signed-off-by: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> Cc: Joerg Roedel <joro-zLv9SwRftAIdnm+yROfE0A@public.gmane.org> Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org --- drivers/iommu/intel_irq_remapping.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) --- a/drivers/iommu/intel_irq_remapping.c +++ b/drivers/iommu/intel_irq_remapping.c @@ -500,8 +500,9 @@ static void iommu_enable_irq_remapping(s static int intel_setup_irq_remapping(struct intel_iommu *iommu) { struct ir_table *ir_table; - struct page *pages; + struct fwnode_handle *fn; unsigned long *bitmap; + struct page *pages; if (iommu->ir_table) return 0; @@ -525,15 +526,24 @@ static int intel_setup_irq_remapping(str goto out_free_pages; } - iommu->ir_domain = irq_domain_add_hierarchy(arch_get_ir_parent_domain(), - 0, INTR_REMAP_TABLE_ENTRIES, - NULL, &intel_ir_domain_ops, - iommu); + fn = irq_domain_alloc_named_id_fwnode("INTEL-IR", iommu->seq_id); + if (!fn) + goto out_free_bitmap; + + iommu->ir_domain = + irq_domain_create_hierarchy(arch_get_ir_parent_domain(), + 0, INTR_REMAP_TABLE_ENTRIES, + fn, &intel_ir_domain_ops, + iommu); + kfree(fn); if (!iommu->ir_domain) { pr_err("IR%d: failed to allocate irqdomain\n", iommu->seq_id); goto out_free_bitmap; } - iommu->ir_msi_domain = arch_create_msi_irq_domain(iommu->ir_domain); + iommu->ir_msi_domain = + arch_create_remap_msi_irq_domain(iommu->ir_domain, + "INTEL-IR-MSI", + iommu->seq_id); ir_table->base = page_address(pages); ir_table->bitmap = bitmap;
next prev parent reply index Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20170619233700.547167146@linutronix.de> 2017-06-19 23:37 ` [patch 02/55] iommu/amd: Add name to irq chip Thomas Gleixner [not found] ` <20170619235443.343236995-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> 2017-06-21 15:51 ` Joerg Roedel 2017-06-19 23:37 ` [patch 03/55] iommu/vt-d: " Thomas Gleixner [not found] ` <20170619235443.431939968-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> 2017-06-21 15:51 ` Joerg Roedel 2017-06-19 23:37 ` [patch 10/55] x86/msi: Provide new iommu irqdomain interface Thomas Gleixner 2017-06-19 23:37 ` Thomas Gleixner [this message] [not found] ` <20170619235444.063083997-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> 2017-06-21 15:52 ` [patch 11/55] iommu/vt-d: Use named irq domain interface Joerg Roedel 2017-06-19 23:37 ` [patch 12/55] iommu/amd: " Thomas Gleixner [not found] ` <20170619235444.142270582-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org> 2017-06-21 15:52 ` Joerg Roedel
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=20170619235444.063083997@linutronix.de \ --to=tglx-hfztesqfncyowbw4kg4ksq@public.gmane.org \ --cc=axboe-tSWWG44O7X1aa/9Udqfwiw@public.gmane.org \ --cc=hch-jcswGhMUV9g@public.gmane.org \ --cc=iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org \ --cc=keith.busch-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \ --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \ --cc=marc.zyngier-5wv7dgnIgG8@public.gmane.org \ --cc=mingo-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \ --cc=mpe-Gsx/Oe8HsFggBc27wqDAHg@public.gmane.org \ --cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.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
IOMMU Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-iommu/0 linux-iommu/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-iommu linux-iommu/ https://lore.kernel.org/linux-iommu \ iommu@lists.linux-foundation.org public-inbox-index linux-iommu Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.linux-foundation.lists.iommu AGPL code for this site: git clone https://public-inbox.org/public-inbox.git