From owner-freebsd-arch@FreeBSD.ORG Mon Sep 22 02:10:51 2003 Return-Path: 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 D8BA716A4C0 for ; Mon, 22 Sep 2003 02:10:51 -0700 (PDT) Received: from herring.nlsystems.com (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6D20443FA3 for ; Mon, 22 Sep 2003 02:10:50 -0700 (PDT) (envelope-from dfr@nlsystems.com) Received: from [10.0.0.2] (herring.nlsystems.com [10.0.0.2]) by herring.nlsystems.com (8.12.9/8.12.8) with ESMTP id h8M9AbY9065337 for ; Mon, 22 Sep 2003 10:10:38 +0100 (BST) (envelope-from dfr@nlsystems.com) From: Doug Rabson To: arch@freebsd.org Content-Type: text/plain Message-Id: <1064221837.15078.14.camel@herring.nlsystems.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.0 Date: 22 Sep 2003 10:10:37 +0100 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=-2.3 required=5.0 tests=EXCUSE_3,USER_AGENT_XIMIAN version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) Subject: kobj multiple inheritance X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Sep 2003 09:10:52 -0000 I believe that I have the kobj multiple inheritance changes about ready for committing now. I have locked up the class handling in kobj and I've re-done the method dispatch so that it is MP-safe without needing locks (I would appreciate a close look at that part by another pair of eyes). You can get the current state of this patch at http://people.freebsd.org/~dfr/kobj-mi-22092003.diff. I've included in this patch a couple of uses of the two main new features. I have changed the cardbus driver so that it derives from the pci driver. This allows many pci methods to be removed from the cardbus method table and should allow many of those methods to be staticised in the pci driver again. I have also edited a bunch of pci drivers with explicit cardbus attachments so that they just list as pci drivers (where the cardbus attachment is identical to the pci attachment). This demonstrates the other inheritance feature which searches for drivers in both the bus devclass and the bus devclass' parent. This effectively allows all pci drivers to get into the cardbus probe. If a particular driver needs to treat its cardbus attachment specially, it can still do this by adding a special cardbus driver (e.g. with a cardbus specific probe or attach method) to the cardbus devclass (exactly as it does now).