diff options
author | attilio <attilio@FreeBSD.org> | 2012-04-26 20:24:25 +0000 |
---|---|---|
committer | attilio <attilio@FreeBSD.org> | 2012-04-26 20:24:25 +0000 |
commit | 0b98e6d835caa6e794deb417e434762d6a00031b (patch) | |
tree | ee191eec81bcd147f9a5eb58b8dbd0b99c89a4f8 /sys/sparc64 | |
parent | 6eb12b42ba18698f1441188207485bf0d2414382 (diff) | |
download | FreeBSD-src-0b98e6d835caa6e794deb417e434762d6a00031b.zip FreeBSD-src-0b98e6d835caa6e794deb417e434762d6a00031b.tar.gz |
Clean up the intr* MD KPI from the SMP dependency, removing a cause of
discrepancy between modules and kernel, but deal with SMP differences
within the functions themselves.
As an added bonus this also helps in terms of code readability.
Requested by: gibbs
Reviewed by: jhb, marius
MFC after: 1 week
Diffstat (limited to 'sys/sparc64')
-rw-r--r-- | sys/sparc64/include/intr_machdep.h | 2 | ||||
-rw-r--r-- | sys/sparc64/sparc64/intr_machdep.c | 16 | ||||
-rw-r--r-- | sys/sparc64/sparc64/machdep.c | 2 |
3 files changed, 16 insertions, 4 deletions
diff --git a/sys/sparc64/include/intr_machdep.h b/sys/sparc64/include/intr_machdep.h index 6e472f7..9319d8c 100644 --- a/sys/sparc64/include/intr_machdep.h +++ b/sys/sparc64/include/intr_machdep.h @@ -91,9 +91,7 @@ struct intr_vector { extern ih_func_t *intr_handlers[]; extern struct intr_vector intr_vectors[]; -#ifdef SMP void intr_add_cpu(u_int cpu); -#endif int intr_bind(int vec, u_char cpu); int intr_describe(int vec, void *ih, const char *descr); void intr_setup(int level, ih_func_t *ihf, int pri, iv_func_t *ivf, diff --git a/sys/sparc64/sparc64/intr_machdep.c b/sys/sparc64/sparc64/intr_machdep.c index ed644fc..2a2d33b 100644 --- a/sys/sparc64/sparc64/intr_machdep.c +++ b/sys/sparc64/sparc64/intr_machdep.c @@ -554,4 +554,20 @@ intr_shuffle_irqs(void *arg __unused) } SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs, NULL); +#else /* !SMP */ + +/* Return EOPNOTSUPP in the UP case. */ +int +intr_bind(int vec __unused, u_char cpu __unused) +{ + + return (EOPNOTSUPP); +} + +/* Use an empty stub for compatibility. */ +void +intr_add_cpu(u_int cpu __unused) +{ + +} #endif diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index fd5d338..63be007 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -197,12 +197,10 @@ cpu_startup(void *arg) cpu_identify(rdpr(ver), PCPU_GET(clock), curcpu); -#ifdef SMP /* * Add BSP as an interrupt target. */ intr_add_cpu(0); -#endif } void |