From owner-freebsd-current Mon Jan 24 16:34:12 2000 Delivered-To: freebsd-current@freebsd.org Received: from eclogite.eps.nagoya-u.ac.jp (eclogite.eps.nagoya-u.ac.jp [133.6.124.145]) by hub.freebsd.org (Postfix) with ESMTP id 6FE7B152BC; Mon, 24 Jan 2000 16:34:04 -0800 (PST) (envelope-from kato@ganko.eps.nagoya-u.ac.jp) Received: from localhost (gneiss.eps.nagoya-u.ac.jp [133.6.124.148]) by eclogite.eps.nagoya-u.ac.jp (8.9.3/3.7W) with ESMTP id JAA72536; Tue, 25 Jan 2000 09:33:24 +0900 (JST) To: luoqi@watermarkgroup.com Cc: FreeBSD-current@FreeBSD.ORG, FreeBSD-hackers@FreeBSD.ORG, kato@ganko.eps.nagoya-u.ac.jp, FreeBSD98-hackers@jp.freebsd.org, nyan@jp.freebsd.org Subject: Re: indirection in bus space From: KATO Takenori In-Reply-To: Your message of "Mon, 24 Jan 2000 14:16:23 -0500 (EST)" <200001241916.OAA08645@lor.watermarkgroup.com> References: <200001241916.OAA08645@lor.watermarkgroup.com> X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) X-PGP-Fingerprint: 03 72 85 36 62 46 23 03 52 B1 10 22 44 10 0D 9E Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20000125093254J.kato@gneiss.eps.nagoya-u.ac.jp> Date: Tue, 25 Jan 2000 09:32:54 +0900 X-Dispatcher: imput version 980905(IM100) Lines: 42 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Luoqi Chen wrote: > We shouldn't need bus_simple_create_bsh(). All drivers ought to use > rman_get_bushandle()/rman_get_bustag() to retrieve the bus handle and tag, > and use them in bus_space_read/write calls to perform device io. Drivers > that don't do that should be fixed. Yes. I think it is correct way. It means porting isp, amd and adv drivers to newbus, but I'm not familiar with these drivers. So I added bus_simple_creat_bsh function to reduce modification. > Why have two files bus_at386.h and bus_pc98.h? I386_BUS_PIO_IND should be > able to live with I386_BUS_PIO and I386_BUS_MEMIO happily together. Because they are different in the type of bus_space_tag_t from each other. It is the u_long in PC/AT and the structure in PC-98. For example, bus_space_read_1()s of them are: PC/AT: bus_space_read_1(...) { ... return (inb(handle + offset)); ... } PC-98: bus_space_read_1(...) { ... return (inb(bsh.bsh_iat[offset])); ... } -----------------------------------------------+--------------------------+ KATO Takenori | FreeBSD | Dept. Earth Planet. Sci, Nagoya Univ. | The power to serve! | Nagoya, 464-8602, Japan | http://www.FreeBSD.org/ | |http://www.jp.FreeBSD.org/| ++++ FreeBSD(98) 3.3R-Rev. 01 available! +==========================+ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message