From owner-svn-src-stable-10@FreeBSD.ORG Sun Jan 5 22:47:13 2014 Return-Path: Delivered-To: svn-src-stable-10@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9462CACC; Sun, 5 Jan 2014 22:47:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 672571B2F; Sun, 5 Jan 2014 22:47:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s05MlDA8015351; Sun, 5 Jan 2014 22:47:13 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s05MlDId015350; Sun, 5 Jan 2014 22:47:13 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201401052247.s05MlDId015350@svn.freebsd.org> From: Alexander Motin Date: Sun, 5 Jan 2014 22:47:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r260346 - stable/10/sys/dev/isp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Jan 2014 22:47:13 -0000 Author: mav Date: Sun Jan 5 22:47:12 2014 New Revision: 260346 URL: http://svnweb.freebsd.org/changeset/base/260346 Log: MFC r257930: Some more registers access optimizations: - Process ATIO queue only if interrupt status tells so; - Do not update queue out pointers after each processed command, do it only once at the end of the loop. Modified: stable/10/sys/dev/isp/isp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/isp/isp.c ============================================================================== --- stable/10/sys/dev/isp/isp.c Sun Jan 5 22:45:46 2014 (r260345) +++ stable/10/sys/dev/isp/isp.c Sun Jan 5 22:47:12 2014 (r260346) @@ -5082,7 +5082,9 @@ again: /* * Check for ATIO Queue entries. */ - if (IS_24XX(isp)) { + if (IS_24XX(isp) && + ((isr & BIU2400_R2HST_ISTAT_MASK) == ISP2400R2HST_ATIO_RSPQ_UPDATE || + (isr & BIU2400_R2HST_ISTAT_MASK) == ISP2400R2HST_ATIO_RQST_UPDATE)) { iptr = ISP_READ(isp, BIU2400_ATIO_RSPINP); optr = isp->isp_atioodx; @@ -5107,9 +5109,11 @@ again: break; } optr = ISP_NXT_QENTRY(oop, RESULT_QUEUE_LEN(isp)); + } + if (isp->isp_atioodx != optr) { ISP_WRITE(isp, BIU2400_ATIO_RSPOUTP, optr); + isp->isp_atioodx = optr; } - isp->isp_atioodx = optr; } #endif @@ -5284,7 +5288,6 @@ again: optr = ISP_NXT_QENTRY(tsto, RESULT_QUEUE_LEN(isp)); } if (r > 0) { - ISP_WRITE(isp, isp->isp_respoutrp, optr); ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */ last_etype = etype; continue; @@ -5319,7 +5322,6 @@ again: if (sp->req_header.rqs_flags & RQSFLAG_MASK) { if (sp->req_header.rqs_flags & RQSFLAG_CONTINUATION) { isp_print_bytes(isp, "unexpected continuation segment", QENTRY_LEN, sp); - ISP_WRITE(isp, isp->isp_respoutrp, optr); last_etype = etype; continue; } @@ -5343,7 +5345,6 @@ again: } if (sp->req_header.rqs_flags & RQSFLAG_BADORDER) { isp_print_bytes(isp, "invalid IOCB ordering", QENTRY_LEN, sp); - ISP_WRITE(isp, isp->isp_respoutrp, optr); last_etype = etype; continue; } @@ -5352,7 +5353,6 @@ again: if (!ISP_VALID_HANDLE(isp, sp->req_handle)) { isp_prt(isp, ISP_LOGERR, "bad request handle 0x%x (iocb type 0x%x)", sp->req_handle, etype); ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */ - ISP_WRITE(isp, isp->isp_respoutrp, optr); last_etype = etype; continue; } @@ -5369,7 +5369,6 @@ again: isp_prt(isp, ISP_LOGERR, "cannot find handle 0x%x (status 0x%x)", sp->req_handle, ts); } ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */ - ISP_WRITE(isp, isp->isp_respoutrp, optr); last_etype = etype; continue; }