From owner-svn-src-all@FreeBSD.ORG Fri Feb 4 16:30:13 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC9E21065674; Fri, 4 Feb 2011 16:30:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B12E28FC17; Fri, 4 Feb 2011 16:30:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p14GUDmF090526; Fri, 4 Feb 2011 16:30:13 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p14GUDd3090523; Fri, 4 Feb 2011 16:30:13 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201102041630.p14GUDd3090523@svn.freebsd.org> From: John Baldwin Date: Fri, 4 Feb 2011 16:30:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r218283 - in stable/8/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Feb 2011 16:30:14 -0000 Author: jhb Date: Fri Feb 4 16:30:13 2011 New Revision: 218283 URL: http://svn.freebsd.org/changeset/base/218283 Log: MFC 217292: - Retire some unused ithread priorities: PI_TTYHIGH, PI_TAPE, and PI_DISKLOW. While here, rename PI_TTYLOW to PI_TTY. - Add a macro PI_SWI() that takes a SWI_* constant as an argument and returns the suitable thread priority. To preserve the KBI, I did not renumber priorities but simply removed unused ones. Modified: stable/8/sys/kern/kern_intr.c stable/8/sys/sys/priority.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/kern/kern_intr.c ============================================================================== --- stable/8/sys/kern/kern_intr.c Fri Feb 4 16:04:43 2011 (r218282) +++ stable/8/sys/kern/kern_intr.c Fri Feb 4 16:30:13 2011 (r218283) @@ -130,22 +130,18 @@ intr_priority(enum intr_type flags) INTR_TYPE_CAM | INTR_TYPE_MISC | INTR_TYPE_CLK | INTR_TYPE_AV); switch (flags) { case INTR_TYPE_TTY: - pri = PI_TTYLOW; + pri = PI_TTY; break; case INTR_TYPE_BIO: - /* - * XXX We need to refine this. BSD/OS distinguishes - * between tape and disk priorities. - */ pri = PI_DISK; break; case INTR_TYPE_NET: pri = PI_NET; break; case INTR_TYPE_CAM: - pri = PI_DISK; /* XXX or PI_CAM? */ + pri = PI_DISK; break; - case INTR_TYPE_AV: /* Audio/video */ + case INTR_TYPE_AV: pri = PI_AV; break; case INTR_TYPE_CLK: @@ -1081,7 +1077,7 @@ swi_add(struct intr_event **eventp, cons *eventp = ie; } error = intr_event_add_handler(ie, name, NULL, handler, arg, - (pri * RQ_PPQ) + PI_SOFT, flags, cookiep); + PI_SWI(pri), flags, cookiep); if (error) return (error); if (pri == SWI_CLOCK) { @@ -1648,18 +1644,13 @@ db_dump_intrhand(struct intr_handler *ih case PI_AV: db_printf("AV "); break; - case PI_TTYHIGH: - case PI_TTYLOW: + case PI_TTY: db_printf("TTY "); break; - case PI_TAPE: - db_printf("TAPE"); - break; case PI_NET: db_printf("NET "); break; case PI_DISK: - case PI_DISKLOW: db_printf("DISK"); break; case PI_DULL: Modified: stable/8/sys/sys/priority.h ============================================================================== --- stable/8/sys/sys/priority.h Fri Feb 4 16:04:43 2011 (r218282) +++ stable/8/sys/sys/priority.h Fri Feb 4 16:30:13 2011 (r218283) @@ -85,14 +85,12 @@ #define PI_REALTIME (PRI_MIN_ITHD + 0) #define PI_AV (PRI_MIN_ITHD + 4) -#define PI_TTYHIGH (PRI_MIN_ITHD + 8) -#define PI_TAPE (PRI_MIN_ITHD + 12) #define PI_NET (PRI_MIN_ITHD + 16) #define PI_DISK (PRI_MIN_ITHD + 20) -#define PI_TTYLOW (PRI_MIN_ITHD + 24) -#define PI_DISKLOW (PRI_MIN_ITHD + 28) +#define PI_TTY (PRI_MIN_ITHD + 24) #define PI_DULL (PRI_MIN_ITHD + 32) #define PI_SOFT (PRI_MIN_ITHD + 36) +#define PI_SWI(x) (PI_SOFT + (x) * RQ_PPQ) #define PRI_MIN_KERN (64) #define PRI_MAX_KERN (PRI_MIN_REALTIME - 1)