From owner-cvs-src@FreeBSD.ORG Thu Jun 8 22:22:25 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2B45816A46F; Thu, 8 Jun 2006 22:22:25 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8673A43D53; Thu, 8 Jun 2006 22:22:24 +0000 (GMT) (envelope-from marius@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k58L2PZk072248; Thu, 8 Jun 2006 21:02:25 GMT (envelope-from marius@repoman.freebsd.org) Received: (from marius@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k58L2PwU072247; Thu, 8 Jun 2006 21:02:25 GMT (envelope-from marius) Message-Id: <200606082102.k58L2PwU072247@repoman.freebsd.org> From: Marius Strobl Date: Thu, 8 Jun 2006 21:02:25 +0000 (UTC) To: src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/sparc64/sbus sbus.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jun 2006 22:22:25 -0000 marius 2006-06-08 21:02:25 UTC FreeBSD src repository Modified files: sys/sparc64/sbus sbus.c Log: - Merge sys/sparc64/pci/psycho.c rev. 1.8: Map the device memory belonging to resources of type SYS_RES_MEMORY into KVA upon activation so that rman_get_virtual() works as expected. - In sbus_alloc_resource() checking whether toffs is 0 as an indication that no applicable child range was found isn't appropriate as it's perfectly valid for the requested SYS_RES_MEMORY resource to start at the beginning of a child range. So check for the RMAN still being NULL instead. - As a minor runtime speed optimization break out of the loop where we search for the applicable child range in sbus_alloc_resource() as soon as it's found. - Let sbus_setup_intr() return ENOMEM rather than 0 if it can't allocate memory for the interrupt clearing info. - Actually do what the comment in sbus_setup_intr() says and disable the respective interrupt while fiddling with it. - Remove some superfluous INTVEC() around inr, which already only contains the interrupt vector, in sbus_setup_intr(). - While here, fix a style(9) bug in sbus_setup_intr() (don't use function calls in initializers). The first two changes are required for a CG6 driver. MFC after: 2 weeks Revision Changes Path 1.39 +26 -7 src/sys/sparc64/sbus/sbus.c