* [patch 02/55] iommu/amd: Add name to irq chip
[not found] <20170619233700.547167146@linutronix.de>
@ 2017-06-19 23:37 ` Thomas Gleixner
[not found] ` <20170619235443.343236995-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2017-06-19 23:37 ` [patch 03/55] iommu/vt-d: " Thomas Gleixner
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2017-06-19 23:37 UTC (permalink / raw)
To: LKML
Cc: Jens Axboe, Marc Zyngier, Michael Ellerman, Ingo Molnar,
Keith Busch, Peter Zijlstra,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Christoph Hellwig
[-- Attachment #1: iommu-amd--Add-name-to-irq-chip.patch --]
[-- Type: text/plain, Size: 970 bytes --]
Add the missing name, so debugging will work proper.
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/amd_iommu.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -4386,10 +4386,11 @@ static void ir_compose_msi_msg(struct ir
}
static struct irq_chip amd_ir_chip = {
- .irq_ack = ir_ack_apic_edge,
- .irq_set_affinity = amd_ir_set_affinity,
- .irq_set_vcpu_affinity = amd_ir_set_vcpu_affinity,
- .irq_compose_msi_msg = ir_compose_msi_msg,
+ .name = "AMD-IR",
+ .irq_ack = ir_ack_apic_edge,
+ .irq_set_affinity = amd_ir_set_affinity,
+ .irq_set_vcpu_affinity = amd_ir_set_vcpu_affinity,
+ .irq_compose_msi_msg = ir_compose_msi_msg,
};
int amd_iommu_create_irq_domain(struct amd_iommu *iommu)
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 03/55] iommu/vt-d: Add name to irq chip
[not found] <20170619233700.547167146@linutronix.de>
2017-06-19 23:37 ` [patch 02/55] iommu/amd: Add name to irq chip Thomas Gleixner
@ 2017-06-19 23:37 ` Thomas Gleixner
[not found] ` <20170619235443.431939968-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2017-06-19 23:37 ` [patch 10/55] x86/msi: Provide new iommu irqdomain interface Thomas Gleixner
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2017-06-19 23:37 UTC (permalink / raw)
To: LKML
Cc: Marc Zyngier, Christoph Hellwig, Ingo Molnar, Peter Zijlstra,
Michael Ellerman, Jens Axboe, Keith Busch, Joerg Roedel, iommu
[-- Attachment #1: iommu-vt-d--Add-name-to-irq-chip.patch --]
[-- Type: text/plain, Size: 951 bytes --]
Add the missing name, so debugging will work proper.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: iommu@lists.linux-foundation.org
---
drivers/iommu/intel_irq_remapping.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/drivers/iommu/intel_irq_remapping.c
+++ b/drivers/iommu/intel_irq_remapping.c
@@ -1205,10 +1205,11 @@ static int intel_ir_set_vcpu_affinity(st
}
static struct irq_chip intel_ir_chip = {
- .irq_ack = ir_ack_apic_edge,
- .irq_set_affinity = intel_ir_set_affinity,
- .irq_compose_msi_msg = intel_ir_compose_msi_msg,
- .irq_set_vcpu_affinity = intel_ir_set_vcpu_affinity,
+ .name = "INTEL-IR",
+ .irq_ack = ir_ack_apic_edge,
+ .irq_set_affinity = intel_ir_set_affinity,
+ .irq_compose_msi_msg = intel_ir_compose_msi_msg,
+ .irq_set_vcpu_affinity = intel_ir_set_vcpu_affinity,
};
static void intel_irq_remapping_prepare_irte(struct intel_ir_data *data,
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 10/55] x86/msi: Provide new iommu irqdomain interface
[not found] <20170619233700.547167146@linutronix.de>
2017-06-19 23:37 ` [patch 02/55] iommu/amd: Add name to irq chip Thomas Gleixner
2017-06-19 23:37 ` [patch 03/55] iommu/vt-d: " Thomas Gleixner
@ 2017-06-19 23:37 ` Thomas Gleixner
2017-06-19 23:37 ` [patch 11/55] iommu/vt-d: Use named irq domain interface Thomas Gleixner
2017-06-19 23:37 ` [patch 12/55] iommu/amd: " Thomas Gleixner
4 siblings, 0 replies; 9+ messages in thread
From: Thomas Gleixner @ 2017-06-19 23:37 UTC (permalink / raw)
To: LKML
Cc: Jens Axboe, Marc Zyngier, Michael Ellerman, Ingo Molnar,
Keith Busch, Peter Zijlstra,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Christoph Hellwig
[-- Attachment #1: x86-msi--Provide-new-iommu-irqdomain-interface.patch --]
[-- Type: text/plain, Size: 1762 bytes --]
Provide a new interface for creating the iommu remapping domains, so that
the caller can supply a name and a id in order to create named irqdomains.
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
---
arch/x86/include/asm/irq_remapping.h | 2 ++
arch/x86/kernel/apic/msi.c | 15 +++++++++++++++
2 files changed, 17 insertions(+)
--- a/arch/x86/include/asm/irq_remapping.h
+++ b/arch/x86/include/asm/irq_remapping.h
@@ -56,6 +56,8 @@ irq_remapping_get_irq_domain(struct irq_
/* Create PCI MSI/MSIx irqdomain, use @parent as the parent irqdomain. */
extern struct irq_domain *arch_create_msi_irq_domain(struct irq_domain *parent);
+extern struct irq_domain *
+arch_create_remap_msi_irq_domain(struct irq_domain *par, const char *n, int id);
/* Get parent irqdomain for interrupt remapping irqdomain */
static inline struct irq_domain *arch_get_ir_parent_domain(void)
--- a/arch/x86/kernel/apic/msi.c
+++ b/arch/x86/kernel/apic/msi.c
@@ -167,10 +167,25 @@ static struct msi_domain_info pci_msi_ir
.handler_name = "edge",
};
+struct irq_domain *arch_create_remap_msi_irq_domain(struct irq_domain *parent,
+ const char *name, int id)
+{
+ struct fwnode_handle *fn;
+ struct irq_domain *d;
+
+ fn = irq_domain_alloc_named_id_fwnode(name, id);
+ if (!fn)
+ return NULL;
+ d = pci_msi_create_irq_domain(fn, &pci_msi_ir_domain_info, parent);
+ kfree(fn);
+ return d;
+}
+
struct irq_domain *arch_create_msi_irq_domain(struct irq_domain *parent)
{
return pci_msi_create_irq_domain(NULL, &pci_msi_ir_domain_info, parent);
}
+
#endif
#ifdef CONFIG_DMAR_TABLE
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 11/55] iommu/vt-d: Use named irq domain interface
[not found] <20170619233700.547167146@linutronix.de>
` (2 preceding siblings ...)
2017-06-19 23:37 ` [patch 10/55] x86/msi: Provide new iommu irqdomain interface Thomas Gleixner
@ 2017-06-19 23:37 ` Thomas Gleixner
[not found] ` <20170619235444.063083997-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2017-06-19 23:37 ` [patch 12/55] iommu/amd: " Thomas Gleixner
4 siblings, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2017-06-19 23:37 UTC (permalink / raw)
To: LKML
Cc: Jens Axboe, Marc Zyngier, Michael Ellerman, Ingo Molnar,
Keith Busch, Peter Zijlstra,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Christoph Hellwig
[-- Attachment #1: 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;
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 12/55] iommu/amd: Use named irq domain interface
[not found] <20170619233700.547167146@linutronix.de>
` (3 preceding siblings ...)
2017-06-19 23:37 ` [patch 11/55] iommu/vt-d: Use named irq domain interface Thomas Gleixner
@ 2017-06-19 23:37 ` Thomas Gleixner
[not found] ` <20170619235444.142270582-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
4 siblings, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2017-06-19 23:37 UTC (permalink / raw)
To: LKML
Cc: Jens Axboe, Marc Zyngier, Michael Ellerman, Ingo Molnar,
Keith Busch, Peter Zijlstra,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
Christoph Hellwig
[-- Attachment #1: iommu-amd--Use-named-irq-domain-interface.patch --]
[-- Type: text/plain, Size: 1114 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/amd_iommu.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -4395,13 +4395,20 @@ static struct irq_chip amd_ir_chip = {
int amd_iommu_create_irq_domain(struct amd_iommu *iommu)
{
- iommu->ir_domain = irq_domain_add_tree(NULL, &amd_ir_domain_ops, iommu);
+ struct fwnode_handle *fn;
+
+ fn = irq_domain_alloc_named_id_fwnode("AMD-IR", iommu->index);
+ if (!fn)
+ return -ENOMEM;
+ iommu->ir_domain = irq_domain_create_tree(fn, &amd_ir_domain_ops, iommu);
+ kfree(fn);
if (!iommu->ir_domain)
return -ENOMEM;
iommu->ir_domain->parent = arch_get_ir_parent_domain();
- iommu->msi_domain = arch_create_msi_irq_domain(iommu->ir_domain);
-
+ iommu->msi_domain = arch_create_remap_msi_irq_domain(iommu->ir_domain,
+ "AMD-IR-MSI",
+ iommu->index);
return 0;
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 02/55] iommu/amd: Add name to irq chip
[not found] ` <20170619235443.343236995-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
@ 2017-06-21 15:51 ` Joerg Roedel
0 siblings, 0 replies; 9+ messages in thread
From: Joerg Roedel @ 2017-06-21 15:51 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Jens Axboe, Marc Zyngier, Michael Ellerman, LKML,
Christoph Hellwig, Keith Busch, Peter Zijlstra,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Ingo Molnar
On Tue, Jun 20, 2017 at 01:37:02AM +0200, Thomas Gleixner wrote:
> Add the missing name, so debugging will work proper.
>
> 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
Acked-by: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 03/55] iommu/vt-d: Add name to irq chip
[not found] ` <20170619235443.431939968-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
@ 2017-06-21 15:51 ` Joerg Roedel
0 siblings, 0 replies; 9+ messages in thread
From: Joerg Roedel @ 2017-06-21 15:51 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Jens Axboe, Marc Zyngier, Michael Ellerman, LKML,
Christoph Hellwig, Keith Busch, Peter Zijlstra,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Ingo Molnar
On Tue, Jun 20, 2017 at 01:37:03AM +0200, Thomas Gleixner wrote:
> Add the missing name, so debugging will work proper.
>
> 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
Acked-by: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 11/55] iommu/vt-d: Use named irq domain interface
[not found] ` <20170619235444.063083997-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
@ 2017-06-21 15:52 ` Joerg Roedel
0 siblings, 0 replies; 9+ messages in thread
From: Joerg Roedel @ 2017-06-21 15:52 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Jens Axboe, Marc Zyngier, Michael Ellerman, LKML,
Christoph Hellwig, Keith Busch, Peter Zijlstra,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Ingo Molnar
On Tue, Jun 20, 2017 at 01:37:11AM +0200, Thomas Gleixner wrote:
> 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
Acked-by: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 12/55] iommu/amd: Use named irq domain interface
[not found] ` <20170619235444.142270582-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
@ 2017-06-21 15:52 ` Joerg Roedel
0 siblings, 0 replies; 9+ messages in thread
From: Joerg Roedel @ 2017-06-21 15:52 UTC (permalink / raw)
To: Thomas Gleixner
Cc: Jens Axboe, Marc Zyngier, Michael Ellerman, LKML,
Christoph Hellwig, Keith Busch, Peter Zijlstra,
iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, Ingo Molnar
On Tue, Jun 20, 2017 at 01:37:12AM +0200, Thomas Gleixner wrote:
> 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
Acked-by: Joerg Roedel <jroedel-l3A5Bk7waGM@public.gmane.org>
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2017-06-21 15:52 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[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 ` [patch 11/55] iommu/vt-d: Use named irq domain interface Thomas Gleixner
[not found] ` <20170619235444.063083997-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
2017-06-21 15:52 ` 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
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).