diff options
author | attilio <attilio@FreeBSD.org> | 2012-05-03 21:44:01 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2012-05-03 21:44:01 +0000 |
commit | b8cdf306fdaa71dc249156aac00fb9e58436c014 (patch) | |
tree | ae4c799ab9e627a002f079ad6c0ae43852579015 | |
parent | 18b00ce05256ac1bef00083a0ce9a34fcb4c49a9 (diff) | |
download | FreeBSD-src-b8cdf306fdaa71dc249156aac00fb9e58436c014.zip FreeBSD-src-b8cdf306fdaa71dc249156aac00fb9e58436c014.tar.gz |
Revert part of r234723 by re-enabling the SMP protection for
intr_bind() on x86.
This has been requested by jhb and I strongly disagree with this,
but as long as he is the x86 and interrupt subsystem maintainer I will
follow his directives.
The disagreement cames from what we should really consider as a
public KPI. IMHO, if we really need a selection between the kernel
functions, we may need an explicit protection like _KERNEL_KPI, which
defines which subset of the kernel function might really be considered
as part of the KPI (for thirdy part modules) and which not.
As long as we don't have this mechanism I just consider any possible
function as usable by thirdy part code, thus intr_bind() included.
MFC after: 1 week
-rw-r--r-- | sys/amd64/include/intr_machdep.h | 2 | ||||
-rw-r--r-- | sys/i386/include/intr_machdep.h | 2 | ||||
-rw-r--r-- | sys/x86/x86/intr_machdep.c | 8 |
3 files changed, 4 insertions, 8 deletions
diff --git a/sys/amd64/include/intr_machdep.h b/sys/amd64/include/intr_machdep.h index 3dd572d..9d066b1 100644 --- a/sys/amd64/include/intr_machdep.h +++ b/sys/amd64/include/intr_machdep.h @@ -144,7 +144,9 @@ void intr_add_cpu(u_int cpu); int intr_add_handler(const char *name, int vector, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); +#ifdef SMP int intr_bind(u_int vector, u_char cpu); +#endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); int intr_describe(u_int vector, void *ih, const char *descr); diff --git a/sys/i386/include/intr_machdep.h b/sys/i386/include/intr_machdep.h index 0312ff1..b5ba3c1 100644 --- a/sys/i386/include/intr_machdep.h +++ b/sys/i386/include/intr_machdep.h @@ -134,7 +134,9 @@ void elcr_write_trigger(u_int irq, enum intr_trigger trigger); void intr_add_cpu(u_int cpu); int intr_add_handler(const char *name, int vector, driver_filter_t filter, driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep); +#ifdef SMP int intr_bind(u_int vector, u_char cpu); +#endif int intr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); int intr_describe(u_int vector, void *ih, const char *descr); diff --git a/sys/x86/x86/intr_machdep.c b/sys/x86/x86/intr_machdep.c index a33f4b5..71e9006 100644 --- a/sys/x86/x86/intr_machdep.c +++ b/sys/x86/x86/intr_machdep.c @@ -566,14 +566,6 @@ intr_next_cpu(void) return (PCPU_GET(apic_id)); } -/* Return EOPNOTSUPP in the UP case. */ -int -intr_bind(u_int vector __unused, u_char cpu __unused) -{ - - return (EOPNOTSUPP); -} - /* Use an empty stub for compatibility. */ void intr_add_cpu(u_int cpu __unused) |