From owner-svn-src-head@FreeBSD.ORG Thu Oct 31 03:12:49 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 298136AC; Thu, 31 Oct 2013 03:12:49 +0000 (UTC) (envelope-from ian@FreeBSD.org) 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 15BC92A0E; Thu, 31 Oct 2013 03:12:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9V3CmCw079707; Thu, 31 Oct 2013 03:12:48 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9V3CmXn079706; Thu, 31 Oct 2013 03:12:48 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201310310312.r9V3CmXn079706@svn.freebsd.org> From: Ian Lepore Date: Thu, 31 Oct 2013 03:12:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r257418 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Oct 2013 03:12:49 -0000 Author: ian Date: Thu Oct 31 03:12:48 2013 New Revision: 257418 URL: http://svnweb.freebsd.org/changeset/base/257418 Log: Don't iterate through the bits of the pending interrupt register if the whole register is zero. Most of the registers will be zero most of the time. Modified: head/sys/arm/freescale/imx/tzic.c Modified: head/sys/arm/freescale/imx/tzic.c ============================================================================== --- head/sys/arm/freescale/imx/tzic.c Thu Oct 31 02:35:00 2013 (r257417) +++ head/sys/arm/freescale/imx/tzic.c Thu Oct 31 03:12:48 2013 (r257418) @@ -163,7 +163,7 @@ arm_get_next_irq(int last_irq) for (i = 0; i < 4; i++) { pending = tzic_read_4(TZIC_PND(i)); - for (b = 0; b < 32; b++) + for (b = 0; pending != 0 && b < 32; b++) if (pending & (1 << b)) { return (i * 32 + b); }