From owner-freebsd-hackers@FreeBSD.ORG Tue Jun 14 01:26:55 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 521D216A41C for ; Tue, 14 Jun 2005 01:26:55 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.village.org (vc4-2-0-66.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0DCF343D49 for ; Tue, 14 Jun 2005 01:26:54 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j5DNM1Lb098405; Mon, 13 Jun 2005 17:22:02 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 13 Jun 2005 17:23:07 -0600 (MDT) Message-Id: <20050613.172307.81090793.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200506131412.38967.hselasky@c2i.net> References: <200506131412.38967.hselasky@c2i.net> 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 Cc: freebsd-hackers@freebsd.org Subject: Re: Obvious bug in /sys/i386/include/bus.h X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jun 2005 01:26:55 -0000 In message: <200506131412.38967.hselasky@c2i.net> Hans Petter Selasky writes: : So can someone have this fixed, or is there a reason not to fix it. The one : who wrote the code has done the same mistake with every one of the : bus_space_XXXX that does memory mapped I/O. It currently breaks my drivers. One isn't supposed to call these routines with count == 0. One could say your drivers are broken :-) Back when these were written, small optimizations like this were made to make things go faster. Now that cache sizes are bigger, a few extra instructions likely wouldn't affect things too much. Best to measure the effects of your proposed changes on real workloads... Warner