From owner-freebsd-hackers Thu May 24 19:12:25 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 4D3D937B422 for ; Thu, 24 May 2001 19:12:22 -0700 (PDT) (envelope-from imp@billy-club.village.org) Received: from billy-club.village.org (billy-club.village.org [10.0.0.3]) by rover.village.org (8.11.3/8.11.3) with ESMTP id f4P2CL667895; Thu, 24 May 2001 20:12:21 -0600 (MDT) (envelope-from imp@billy-club.village.org) Received: from billy-club.village.org (localhost [127.0.0.1]) by billy-club.village.org (8.11.2/8.8.3) with ESMTP id f4P2CQl40015; Thu, 24 May 2001 20:12:26 -0600 (MDT) Message-Id: <200105250212.f4P2CQl40015@billy-club.village.org> To: j mckitrick Subject: Re: softc with resource sharing Cc: Alexander Langer , freebsd-hackers@FreeBSD.ORG In-reply-to: Your message of "Thu, 24 May 2001 12:23:35 BST." <20010524122335.A87551@dogma.freebsd-uk.eu.org> References: <20010524122335.A87551@dogma.freebsd-uk.eu.org> <20010524033453.A57329@dogma.freebsd-uk.eu.org> <20010524113815.C981@zerogravity.kawo2.rwth-aachen.d> Date: Thu, 24 May 2001 20:12:26 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message <20010524122335.A87551@dogma.freebsd-uk.eu.org> j mckitrick writes: : Well, all of the resources have already been allocated when the ppc device : has been attached. The hardware port and interrupt have already been : reserved and stored in the softc data structure for ppc. All devices : attached to ppc, like ppbus, are currently calling macros that call : hardcoded inb/outb calls in sys/isa/ppcreg.h. I am trying to figure out if : i should rewrite the macros to use the correct bus_space calls, or store the : info lower down, with each device's softc where it is more accessible. At : this point, all access to the parallel port IO registers is passed to the : ppc device, and i am wondering if this should change and be handled be each : device instead. You should likely rewrite the macros to either call a method in the parent device (eg ppbus_read_1()). The alternative would be to allocate the resource shared many times and manage it like that. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message