From owner-freebsd-arch@FreeBSD.ORG Tue Sep 20 18:58:02 2005 Return-Path: X-Original-To: arch@freebsd.org Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB3A816A41F for ; Tue, 20 Sep 2005 18:58:02 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5569C43D46 for ; Tue, 20 Sep 2005 18:58:02 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j8KIsmqZ040506; Tue, 20 Sep 2005 12:54:49 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 20 Sep 2005 12:55:06 -0600 (MDT) Message-Id: <20050920.125506.102576631.imp@bsdimp.com> To: phk@phk.freebsd.dk From: "M. Warner Losh" In-Reply-To: <5975.1127215219@critter.freebsd.dk> References: <5975.1127215219@critter.freebsd.dk> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Tue, 20 Sep 2005 12:54:49 -0600 (MDT) Cc: arch@freebsd.org Subject: Re: Improving bus/resource API X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Sep 2005 18:58:03 -0000 First, you need to do s/dwiw/dwim/g. dwiw has little traction, but dwim is an old lisp term. I believe I've said this before. I'd collect the bs{r,w}_{1,2,4,8} routines in a central place. They are all the same #define. Also, there's no provision for the more exotic variations. Bug: There's a disconnect between the resource spec and what you've implemented. You're replaced the normal flags (typically RF_ACTIVE) with non-normal ones (0). You've also encoded the size and offsets of struct resource into every driver. Given the new breakup of this, it might not be too bad. However, that has caused us problems in the past. This is my primary issue with these patches. Warner