diff options
author | marius <marius@FreeBSD.org> | 2008-04-23 20:04:38 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2008-04-23 20:04:38 +0000 |
commit | f7fcfdc595633492f520f12db8f7447003ab54b3 (patch) | |
tree | c31fd4bcad0b90fa7240c1cfbbfc8bc6975d7cd6 /sys/sparc64/include | |
parent | 14c9906df574afb418e2fbc4ebbf3743c8a541a8 (diff) | |
download | FreeBSD-src-f7fcfdc595633492f520f12db8f7447003ab54b3.zip FreeBSD-src-f7fcfdc595633492f520f12db8f7447003ab54b3.tar.gz |
o Rename ic_eoi to ic_clear to emphasize the functions it points
don't send and EOI which works like on amd64/i386 and blocks all
interrupts on the relevant interrupt controller.
o Replace the post_filter and post_inthread hooks registered when
creating the interrupt events with just ic_clear as on sparc64 we
don't need to do any disable->EOI->enable dance to unblock all but
the relevant interrupt while running the filter or handler; just
not clearing the interrupt already has the same effect.
o Merge from amd64/i386:
- Split the intr_table_lock into an sx lock used for most things,
and a spin lock to protect intrcnt_index.
- Add support for binding interrupts to CPUs, including for the
bus_bind_intr(9) interface, a assign_cpu hook and initially
shuffling interrupts arround in a round-robin fashion.
Reviewed by: jhb
MFC after: 1 month
Diffstat (limited to 'sys/sparc64/include')
-rw-r--r-- | sys/sparc64/include/bus_common.h | 11 | ||||
-rw-r--r-- | sys/sparc64/include/intr_machdep.h | 7 |
2 files changed, 13 insertions, 5 deletions
diff --git a/sys/sparc64/include/bus_common.h b/sys/sparc64/include/bus_common.h index fce7584..de6b22c 100644 --- a/sys/sparc64/include/bus_common.h +++ b/sys/sparc64/include/bus_common.h @@ -56,10 +56,13 @@ #define INTSLOT(x) (((x) >> 3) & 0x7) #define INTPRI(x) ((x) & 0x7) #define INTINO(x) ((x) & INTMAP_INO_MASK) -#define INTMAP_ENABLE(mr, mid) \ - (((mr) & ~INTMAP_TID_MASK) | ((mid) << INTMAP_TID_SHIFT) | INTMAP_V) -#define INTMAP_VEC(ign, inr) \ - (((ign) << INTMAP_IGN_SHIFT) | (inr)) +#define INTMAP_ENABLE(mr, mid) \ + (INTMAP_TID((mr), (mid)) | INTMAP_V) +#define INTMAP_TID(mr, mid) \ + (((mr) & ~INTMAP_TID_MASK) | ((mid) << INTMAP_TID_SHIFT)) +#define INTMAP_VEC(ign, inr) \ + ((((ign) << INTMAP_IGN_SHIFT) & INTMAP_IGN_MASK) | \ + ((inr) & INTMAP_INR_MASK)) /* counter-timer support. */ void sparc64_counter_init(bus_space_tag_t tag, bus_space_handle_t handle, diff --git a/sys/sparc64/include/intr_machdep.h b/sys/sparc64/include/intr_machdep.h index 12badfb..7f29808 100644 --- a/sys/sparc64/include/intr_machdep.h +++ b/sys/sparc64/include/intr_machdep.h @@ -68,7 +68,8 @@ struct intr_request { struct intr_controller { void (*ic_enable)(void *); void (*ic_disable)(void *); - void (*ic_eoi)(void *); + void (*ic_assign)(void *); + void (*ic_clear)(void *); }; struct intr_vector { @@ -87,6 +88,10 @@ 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); void intr_setup(int level, ih_func_t *ihf, int pri, iv_func_t *ivf, void *iva); void intr_init1(void); |