Date: Tue, 1 Mar 2016 10:57:30 +0000 (UTC) From: Svatopluk Kraus <skra@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296261 - in head/sys: kern sys Message-ID: <201603011057.u21AvU1a040987@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: skra Date: Tue Mar 1 10:57:29 2016 New Revision: 296261 URL: https://svnweb.freebsd.org/changeset/base/296261 Log: Mark other parts of interrupt framework as INTR_SOLO option specific. Note that isrc_arg member of struct intr_irqsrc is used only for INTR_SOLO and IPI filter. This should be remembered if IPI filters and their arguments will be stored on another place. This option could be unusable very soon, if interrupt controllers implementations will not be implemented considering it. Modified: head/sys/kern/subr_intr.c head/sys/sys/intr.h Modified: head/sys/kern/subr_intr.c ============================================================================== --- head/sys/kern/subr_intr.c Tue Mar 1 10:39:19 2016 (r296260) +++ head/sys/kern/subr_intr.c Tue Mar 1 10:57:29 2016 (r296261) @@ -713,7 +713,11 @@ isrc_event_create(struct intr_irqsrc *is * Make sure that we do not mix the two ways * how we handle interrupt sources. Let contested event wins. */ +#ifdef INTR_SOLO if (isrc->isrc_filter != NULL || isrc->isrc_event != NULL) { +#else + if (isrc->isrc_event != NULL) { +#endif mtx_unlock(&isrc_table_lock); intr_event_destroy(ie); return (isrc->isrc_event != NULL ? EBUSY : 0); @@ -1013,7 +1017,7 @@ intr_irq_remove_handler(device_t dev, u_ isrc = isrc_lookup(irq); if (isrc == NULL || isrc->isrc_handlers == 0) return (EINVAL); - +#ifdef INTR_SOLO if (isrc->isrc_filter != NULL) { if (isrc != cookie) return (EINVAL); @@ -1028,7 +1032,7 @@ intr_irq_remove_handler(device_t dev, u_ mtx_unlock(&isrc_table_lock); return (0); } - +#endif if (isrc != intr_handler_source(cookie)) return (EINVAL); @@ -1079,7 +1083,7 @@ intr_irq_describe(u_int irq, void *cooki isrc = isrc_lookup(irq); if (isrc == NULL || isrc->isrc_handlers == 0) return (EINVAL); - +#ifdef INTR_SOLO if (isrc->isrc_filter != NULL) { if (isrc != cookie) return (EINVAL); @@ -1089,7 +1093,7 @@ intr_irq_describe(u_int irq, void *cooki mtx_unlock(&isrc_table_lock); return (0); } - +#endif error = intr_event_describe_handler(isrc->isrc_event, cookie, descr); if (error == 0) { mtx_lock(&isrc_table_lock); @@ -1108,10 +1112,10 @@ intr_irq_bind(u_int irq, int cpu) isrc = isrc_lookup(irq); if (isrc == NULL || isrc->isrc_handlers == 0) return (EINVAL); - +#ifdef INTR_SOLO if (isrc->isrc_filter != NULL) return (intr_isrc_assign_cpu(isrc, cpu)); - +#endif return (intr_event_bind(isrc->isrc_event, cpu)); } Modified: head/sys/sys/intr.h ============================================================================== --- head/sys/sys/intr.h Tue Mar 1 10:39:19 2016 (r296260) +++ head/sys/sys/intr.h Tue Mar 1 10:57:29 2016 (r296261) @@ -79,7 +79,9 @@ struct intr_irqsrc { u_long * isrc_count; u_int isrc_handlers; struct intr_event * isrc_event; +#ifdef INTR_SOLO intr_irq_filter_t * isrc_filter; +#endif intr_ipi_filter_t * isrc_ipifilter; void * isrc_arg; #ifdef FDT
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603011057.u21AvU1a040987>