Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/cortex Make intr affinity work with MSIs again
details: https://anonhg.NetBSD.org/src/rev/589219789aff
branches: trunk
changeset: 744804:589219789aff
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Thu Feb 13 02:12:06 2020 +0000
description:
Make intr affinity work with MSIs again
diffstat:
sys/arch/arm/cortex/gicv3.c | 9 +++++----
sys/arch/arm/cortex/gicv3_its.c | 7 +++----
2 files changed, 8 insertions(+), 8 deletions(-)
diffs (75 lines):
diff -r 762d76d91f29 -r 589219789aff sys/arch/arm/cortex/gicv3.c
--- a/sys/arch/arm/cortex/gicv3.c Thu Feb 13 00:42:59 2020 +0000
+++ b/sys/arch/arm/cortex/gicv3.c Thu Feb 13 02:12:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3.c,v 1.23 2020/02/13 00:42:59 jmcneill Exp $ */
+/* $NetBSD: gicv3.c,v 1.24 2020/02/13 02:12:06 jmcneill Exp $ */
/*-
* Copyright (c) 2018 Jared McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
#define _INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.23 2020/02/13 00:42:59 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3.c,v 1.24 2020/02/13 02:12:06 jmcneill Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -634,6 +634,7 @@
struct gicv3_softc * const sc = LPITOSOFTC(pic);
struct gicv3_lpi_callback *cb;
+ kcpuset_zero(affinity);
LIST_FOREACH(cb, &sc->sc_lpi_callbacks, list)
cb->get_affinity(cb->priv, irq, affinity);
}
@@ -647,11 +648,11 @@
LIST_FOREACH(cb, &sc->sc_lpi_callbacks, list) {
error = cb->set_affinity(cb->priv, irq, affinity);
- if (error)
+ if (error != EPASSTHROUGH)
return error;
}
- return error;
+ return EINVAL;
}
#endif
diff -r 762d76d91f29 -r 589219789aff sys/arch/arm/cortex/gicv3_its.c
--- a/sys/arch/arm/cortex/gicv3_its.c Thu Feb 13 00:42:59 2020 +0000
+++ b/sys/arch/arm/cortex/gicv3_its.c Thu Feb 13 02:12:06 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gicv3_its.c,v 1.26 2020/02/13 00:42:59 jmcneill Exp $ */
+/* $NetBSD: gicv3_its.c,v 1.27 2020/02/13 02:12:06 jmcneill Exp $ */
/*-
* Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
#define _INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gicv3_its.c,v 1.26 2020/02/13 00:42:59 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gicv3_its.c,v 1.27 2020/02/13 02:12:06 jmcneill Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
@@ -806,7 +806,6 @@
struct gicv3_its * const its = priv;
struct cpu_info *ci;
- kcpuset_zero(affinity);
ci = its->its_targets[irq];
if (ci)
kcpuset_set(affinity, cpu_index(ci));
@@ -825,7 +824,7 @@
pa = its->its_pa[irq];
if (pa == NULL)
- return EINVAL;
+ return EPASSTHROUGH;
ci = cpu_lookup(kcpuset_ffs(affinity) - 1);
its->its_targets[irq] = ci;
Home |
Main Index |
Thread Index |
Old Index