diff options
author | Tudor Laurentiu <b10716@freescale.com> | 2014-08-19 07:25:05 -0400 |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-09-04 19:51:43 -0400 |
commit | de99f53d3af0e1bb9bc6c9e3107d72f3af6e05e9 (patch) | |
tree | 3469daf7f91ea35b275ef1f69c6c8852111d62b8 /arch/powerpc/sysdev/fsl_msi.c | |
parent | 543c043cbae79164aa087f96294cb37fc4a19a59 (diff) |
powerpc/fsl_msi: show more meaningful names in /proc/interrupts
Rename the irq controller associated with a MSI
interrupt to fsl-msi-<V>, where <V> is the virq
of the cascade irq backing up this MSI interrupt.
This way, one can set the affinity of a MSI
through the cascade irq associated with said MSI
interrupt.
Given this example /proc/interrupts snippet:
CPU0 CPU1 CPU2 CPU3
16: 0 0 0 0 OpenPIC 16 Edge mpic-error-int
17: 0 4 0 0 fsl-msi-224 0 Edge eth0-rx-0
18: 0 5 0 0 fsl-msi-225 1 Edge eth0-tx-0
19: 0 2 0 0 fsl-msi-226 2 Edge eth0
[...]
224: 0 11 0 0 OpenPIC 224 Edge fsl-msi-cascade
225: 0 0 0 0 OpenPIC 225 Edge fsl-msi-cascade
226: 0 0 0 0 OpenPIC 226 Edge fsl-msi-cascade
[...]
To change the affinity of MSI interrupt 17
(having the irq controller named "fsl-msi-224")
instead of writing /proc/irq/17/smp_affinity, use
the associated MSI cascade irq, in this case,
interrupt 224, e.g.:
echo 6 > /proc/irq/224/smp_affinity
Note that a MSI cascade irq covers several MSI
interrupts, so changing the affinity on the
cascade will impact all of the associated MSI
interrupts.
Signed-off-by: Laurentiu Tudor <Laurentiu.Tudor@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
Cc: Mihai Caraman <mihai.caraman@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc/sysdev/fsl_msi.c')
-rw-r--r-- | arch/powerpc/sysdev/fsl_msi.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysdev/fsl_msi.c index 0cfc32a63039..e2ee226464f8 100644 --- a/arch/powerpc/sysdev/fsl_msi.c +++ b/arch/powerpc/sysdev/fsl_msi.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/slab.h> | 19 | #include <linux/slab.h> |
20 | #include <linux/of_platform.h> | 20 | #include <linux/of_platform.h> |
21 | #include <linux/interrupt.h> | 21 | #include <linux/interrupt.h> |
22 | #include <linux/seq_file.h> | ||
22 | #include <sysdev/fsl_soc.h> | 23 | #include <sysdev/fsl_soc.h> |
23 | #include <asm/prom.h> | 24 | #include <asm/prom.h> |
24 | #include <asm/hw_irq.h> | 25 | #include <asm/hw_irq.h> |
@@ -67,11 +68,24 @@ static void fsl_msi_end_irq(struct irq_data *d) | |||
67 | { | 68 | { |
68 | } | 69 | } |
69 | 70 | ||
71 | static void fsl_msi_print_chip(struct irq_data *irqd, struct seq_file *p) | ||
72 | { | ||
73 | struct fsl_msi *msi_data = irqd->domain->host_data; | ||
74 | irq_hw_number_t hwirq = irqd_to_hwirq(irqd); | ||
75 | int cascade_virq, srs; | ||
76 | |||
77 | srs = (hwirq >> msi_data->srs_shift) & MSI_SRS_MASK; | ||
78 | cascade_virq = msi_data->cascade_array[srs]->virq; | ||
79 | |||
80 | seq_printf(p, " fsl-msi-%d", cascade_virq); | ||
81 | } | ||
82 | |||
83 | |||
70 | static struct irq_chip fsl_msi_chip = { | 84 | static struct irq_chip fsl_msi_chip = { |
71 | .irq_mask = mask_msi_irq, | 85 | .irq_mask = mask_msi_irq, |
72 | .irq_unmask = unmask_msi_irq, | 86 | .irq_unmask = unmask_msi_irq, |
73 | .irq_ack = fsl_msi_end_irq, | 87 | .irq_ack = fsl_msi_end_irq, |
74 | .name = "FSL-MSI", | 88 | .irq_print_chip = fsl_msi_print_chip, |
75 | }; | 89 | }; |
76 | 90 | ||
77 | static int fsl_msi_host_map(struct irq_domain *h, unsigned int virq, | 91 | static int fsl_msi_host_map(struct irq_domain *h, unsigned int virq, |