From owner-freebsd-current@FreeBSD.ORG Tue Dec 13 23:06:15 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 42FCC16A41F; Tue, 13 Dec 2005 23:06:15 +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 97C8043D53; Tue, 13 Dec 2005 23:06:14 +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 jBDN5XpA023145; Tue, 13 Dec 2005 16:05:33 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Tue, 13 Dec 2005 16:05:32 -0700 (MST) Message-Id: <20051213.160532.41656770.imp@bsdimp.com> To: freebsd-current@freebsd.org, obrien@freebsd.org From: Warner Losh In-Reply-To: <20051213170015.GA60145@dragon.NUXI.org> References: <1134485368.15730.95.camel@buffy.york.ac.uk> <200512131101.44375.jhb@freebsd.org> <20051213170015.GA60145@dragon.NUXI.org> 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, 13 Dec 2005 16:05:33 -0700 (MST) Cc: glebius@freebsd.org Subject: Re: puc fails to attach serial ports X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Dec 2005 23:06:15 -0000 From: "David O'Brien" Subject: Re: puc fails to attach serial ports Date: Tue, 13 Dec 2005 09:00:15 -0800 > On Tue, Dec 13, 2005 at 11:01:42AM -0500, John Baldwin wrote: > > Because sio(4) only includes sio_puc.c in the kernel if you have 'puc' in your > > kernel config, and the puc kernel module only includes the puc files, it > > doesn't include sio_puc.c and ppc_puc.c. uart has the same issue as well. > > Looking at the three attachments, there's no reason for them to be dependent > > on puc, they don't actually call any symbols in the puc(4) kernel module > > itself, so they can be compiled into kernels w/o puc without causing any > > harm. Then loading puc as a module would work. Here's a patch: > > Isn't there another way? It just seems wrong to include *_puc bits in > the kernel if you don't have 'puc' in your kernel. There are some > working on trimming down the kernel for embedded purposes and this patch > seems counter to that effort. puc certainly isn't unique. pccard has exactly this same problem as well. However, with pccard, people rarely load it as a module. In general, if you want full dynamic behavior, you have to load everything as a module (this works very well, I do it for everything except ata on my laptop). If you want static behavior, you need to build stuff statically. If you want to cross threat the two, you might run into problems like this. Warner