From 2892f80896c5939a96617bd5f959b8bd80b38704 Mon Sep 17 00:00:00 2001 From: kib Date: Fri, 16 Oct 2009 12:00:59 +0000 Subject: Move intr_describe() out of #ifdef SMP; the function is always required. Reviewed by: jhb --- sys/amd64/amd64/intr_machdep.c | 34 +++++++++++++++++----------------- sys/i386/i386/intr_machdep.c | 34 +++++++++++++++++----------------- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/sys/amd64/amd64/intr_machdep.c b/sys/amd64/amd64/intr_machdep.c index e72e13a..6ab80df 100644 --- a/sys/amd64/amd64/intr_machdep.c +++ b/sys/amd64/amd64/intr_machdep.c @@ -400,6 +400,23 @@ atpic_reset(void) } #endif +/* Add a description to an active interrupt handler. */ +int +intr_describe(u_int vector, void *ih, const char *descr) +{ + struct intsrc *isrc; + int error; + + isrc = intr_lookup_source(vector); + if (isrc == NULL) + return (EINVAL); + error = intr_event_describe_handler(isrc->is_event, ih, descr); + if (error) + return (error); + intrcnt_updatename(isrc); + return (0); +} + #ifdef DDB /* * Dump data about interrupt handlers @@ -466,23 +483,6 @@ intr_bind(u_int vector, u_char cpu) return (intr_event_bind(isrc->is_event, cpu)); } -/* Add a description to an active interrupt handler. */ -int -intr_describe(u_int vector, void *ih, const char *descr) -{ - struct intsrc *isrc; - int error; - - isrc = intr_lookup_source(vector); - if (isrc == NULL) - return (EINVAL); - error = intr_event_describe_handler(isrc->is_event, ih, descr); - if (error) - return (error); - intrcnt_updatename(isrc); - return (0); -} - /* * Add a CPU to our mask of valid CPUs that can be destinations of * interrupts. diff --git a/sys/i386/i386/intr_machdep.c b/sys/i386/i386/intr_machdep.c index 5a74a9d..75be205 100644 --- a/sys/i386/i386/intr_machdep.c +++ b/sys/i386/i386/intr_machdep.c @@ -366,6 +366,23 @@ intr_init(void *dummy __unused) } SYSINIT(intr_init, SI_SUB_INTR, SI_ORDER_FIRST, intr_init, NULL); +/* Add a description to an active interrupt handler. */ +int +intr_describe(u_int vector, void *ih, const char *descr) +{ + struct intsrc *isrc; + int error; + + isrc = intr_lookup_source(vector); + if (isrc == NULL) + return (EINVAL); + error = intr_event_describe_handler(isrc->is_event, ih, descr); + if (error) + return (error); + intrcnt_updatename(isrc); + return (0); +} + #ifdef DDB /* * Dump data about interrupt handlers @@ -432,23 +449,6 @@ intr_bind(u_int vector, u_char cpu) return (intr_event_bind(isrc->is_event, cpu)); } -/* Add a description to an active interrupt handler. */ -int -intr_describe(u_int vector, void *ih, const char *descr) -{ - struct intsrc *isrc; - int error; - - isrc = intr_lookup_source(vector); - if (isrc == NULL) - return (EINVAL); - error = intr_event_describe_handler(isrc->is_event, ih, descr); - if (error) - return (error); - intrcnt_updatename(isrc); - return (0); -} - /* * Add a CPU to our mask of valid CPUs that can be destinations of * interrupts. -- cgit v1.1