* [PATCH] powerpc/vio: dispose of virq mapping on vdevice unregister
@ 2017-09-29 0:19 Tyrel Datwyler
2017-10-19 20:41 ` Tyrel Datwyler
2017-11-07 23:30 ` Michael Ellerman
0 siblings, 2 replies; 4+ messages in thread
From: Tyrel Datwyler @ 2017-09-29 0:19 UTC (permalink / raw)
To: mpe; +Cc: benh, linuxppc-dev, nfont, Tyrel Datwyler, stable
When a vdevice is DLPAR removed from the system the vio subsystem doesn't
bother unmapping the virq from the irq_domain. As a result we have a virq
mapped to a hardware irq that is no longer valid for the irq_domain. A side
effect is that we are left with /proc/irq/<irq#> affinity entries, and
attempts to modify the smp_affinity of the irq will fail.
In the following observed example the kernel log is spammed by
ics_rtas_set_affinity errors after the removal of a VSCSI adapter. This is a
result of irqbalance trying to adjust the affinity every 10 seconds.
rpadlpar_io: slot U8408.E8E.10A7ACV-V5-C25 removed
ics_rtas_set_affinity: ibm,set-xive irq=655385 returns -3
ics_rtas_set_affinity: ibm,set-xive irq=655385 returns -3
This patch fixes the issue by calling irq_dispose_mapping() on the virq of the
viodev on unregister.
Cc: stable@vger.kernel.org
Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
---
arch/powerpc/kernel/vio.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 5f8dcda..a3228d6 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -1577,6 +1577,8 @@ static struct device_attribute vio_dev_attrs[] = {
void vio_unregister_device(struct vio_dev *viodev)
{
device_unregister(&viodev->dev);
+ if (viodev->family == VDEVICE)
+ irq_dispose_mapping(viodev->irq);
}
EXPORT_SYMBOL(vio_unregister_device);
--
1.7.12.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/vio: dispose of virq mapping on vdevice unregister
2017-09-29 0:19 [PATCH] powerpc/vio: dispose of virq mapping on vdevice unregister Tyrel Datwyler
@ 2017-10-19 20:41 ` Tyrel Datwyler
2017-10-25 10:52 ` Michael Ellerman
2017-11-07 23:30 ` Michael Ellerman
1 sibling, 1 reply; 4+ messages in thread
From: Tyrel Datwyler @ 2017-10-19 20:41 UTC (permalink / raw)
To: mpe; +Cc: benh, linuxppc-dev, nfont, stable
Ping...
Anybody, see any issues with this patch?
-Tyrel
On 09/28/2017 05:19 PM, Tyrel Datwyler wrote:
> When a vdevice is DLPAR removed from the system the vio subsystem doesn't
> bother unmapping the virq from the irq_domain. As a result we have a virq
> mapped to a hardware irq that is no longer valid for the irq_domain. A side
> effect is that we are left with /proc/irq/<irq#> affinity entries, and
> attempts to modify the smp_affinity of the irq will fail.
>
> In the following observed example the kernel log is spammed by
> ics_rtas_set_affinity errors after the removal of a VSCSI adapter. This is a
> result of irqbalance trying to adjust the affinity every 10 seconds.
>
> rpadlpar_io: slot U8408.E8E.10A7ACV-V5-C25 removed
> ics_rtas_set_affinity: ibm,set-xive irq=655385 returns -3
> ics_rtas_set_affinity: ibm,set-xive irq=655385 returns -3
>
> This patch fixes the issue by calling irq_dispose_mapping() on the virq of the
> viodev on unregister.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
> ---
> arch/powerpc/kernel/vio.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
> index 5f8dcda..a3228d6 100644
> --- a/arch/powerpc/kernel/vio.c
> +++ b/arch/powerpc/kernel/vio.c
> @@ -1577,6 +1577,8 @@ static struct device_attribute vio_dev_attrs[] = {
> void vio_unregister_device(struct vio_dev *viodev)
> {
> device_unregister(&viodev->dev);
> + if (viodev->family == VDEVICE)
> + irq_dispose_mapping(viodev->irq);
> }
> EXPORT_SYMBOL(vio_unregister_device);
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] powerpc/vio: dispose of virq mapping on vdevice unregister
2017-10-19 20:41 ` Tyrel Datwyler
@ 2017-10-25 10:52 ` Michael Ellerman
0 siblings, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2017-10-25 10:52 UTC (permalink / raw)
To: Tyrel Datwyler; +Cc: benh, linuxppc-dev, nfont, stable
Tyrel Datwyler <tyreld@linux.vnet.ibm.com> writes:
> Ping...
>
> Anybody, see any issues with this patch?
No it looks OK to me.
I'll put it in next. I'm going to drop the stable tag for now, I'd like
it to get some more testing. We can request a backport later.
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: powerpc/vio: dispose of virq mapping on vdevice unregister
2017-09-29 0:19 [PATCH] powerpc/vio: dispose of virq mapping on vdevice unregister Tyrel Datwyler
2017-10-19 20:41 ` Tyrel Datwyler
@ 2017-11-07 23:30 ` Michael Ellerman
1 sibling, 0 replies; 4+ messages in thread
From: Michael Ellerman @ 2017-11-07 23:30 UTC (permalink / raw)
To: Tyrel Datwyler; +Cc: linuxppc-dev, Tyrel Datwyler, stable, nfont
On Fri, 2017-09-29 at 00:19:20 UTC, Tyrel Datwyler wrote:
> When a vdevice is DLPAR removed from the system the vio subsystem doesn't
> bother unmapping the virq from the irq_domain. As a result we have a virq
> mapped to a hardware irq that is no longer valid for the irq_domain. A side
> effect is that we are left with /proc/irq/<irq#> affinity entries, and
> attempts to modify the smp_affinity of the irq will fail.
>
> In the following observed example the kernel log is spammed by
> ics_rtas_set_affinity errors after the removal of a VSCSI adapter. This is a
> result of irqbalance trying to adjust the affinity every 10 seconds.
>
> rpadlpar_io: slot U8408.E8E.10A7ACV-V5-C25 removed
> ics_rtas_set_affinity: ibm,set-xive irq=655385 returns -3
> ics_rtas_set_affinity: ibm,set-xive irq=655385 returns -3
>
> This patch fixes the issue by calling irq_dispose_mapping() on the virq of the
> viodev on unregister.
>
> Signed-off-by: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/b8f89fea599d91e674497aad572613
cheers
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-07 23:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-29 0:19 [PATCH] powerpc/vio: dispose of virq mapping on vdevice unregister Tyrel Datwyler
2017-10-19 20:41 ` Tyrel Datwyler
2017-10-25 10:52 ` Michael Ellerman
2017-11-07 23:30 ` Michael Ellerman
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).