Move intr_describe() out of #ifdef SMP; the function is always required.

Reviewed by:	jhb
This commit is contained in:
kib 2009-10-16 12:00:59 +00:00
parent a1878de77c
commit 2892f80896
2 changed files with 34 additions and 34 deletions

View File

@ -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.

View File

@ -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.