From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.redhat.com (mail.redhat.com [199.183.24.239]) by listman.redhat.com (Postfix) with ESMTP id 5A1832EF9C for ; Thu, 9 Nov 2000 09:40:41 -0500 (EST) Received: (from mail@localhost) by mail.redhat.com (8.11.0/8.8.7) id eA9Eefr12981 for axp-list@listman.redhat.com; Thu, 9 Nov 2000 09:40:41 -0500 Received: from jurassic.park.msu.ru (jurassic.park.msu.ru [195.208.223.243]) by mail.redhat.com (8.11.0/8.8.7) with ESMTP id eA9EeFD12902 for ; Thu, 9 Nov 2000 09:40:18 -0500 Received: (from ink@localhost) by jurassic.park.msu.ru (8.9.3/8.9.3) id RAA03281; Thu, 9 Nov 2000 17:39:20 +0300 Date: Thu, 9 Nov 2000 17:39:20 +0300 From: Ivan Kokshaysky To: Richard Henderson Cc: axp-list@redhat.com, linux-kernel@vger.kernel.org Subject: Re: PCI-PCI bridges mess in 2.4.x Message-ID: <20001109173920.A3205@jurassic.park.msu.ru> References: <20001101153420.A2823@jurassic.park.msu.ru> <20001101093319.A18144@twiddle.net> <20001103111647.A8079@jurassic.park.msu.ru> <20001103011640.A20494@twiddle.net> <20001106192930.A837@jurassic.park.msu.ru> <20001108013931.A26972@twiddle.net> <20001108142513.A5244@jurassic.park.msu.ru> <20001108093744.D27324@twiddle.net> <20001109010336.A1367@jurassic.park.msu.ru> <20001108154811.A28101@twiddle.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: <20001108154811.A28101@twiddle.net>; from rth@twiddle.net on Wed, Nov 08, 2000 at 03:48:11PM -0800 X-Loop: axp-list@redhat.com Sender: axp-list-admin@redhat.com Errors-To: axp-list-admin@redhat.com X-BeenThere: axp-list@redhat.com X-Mailman-Version: 2.0beta4 Precedence: bulk Reply-To: axp-list@redhat.com List-Id: Linux and Red Hat on Alpha processors On Wed, Nov 08, 2000 at 03:48:11PM -0800, Richard Henderson wrote: > Whee! We're back in Bootsville. Cool! Meanwhile this base/limit stuff got confirmation :-) Here is a patch against bridges-2.4.0t11-rth. Ivan. --- 2.4.0t11p1/drivers/pci/setup-bus.c Wed Nov 8 19:44:42 2000 +++ linux/drivers/pci/setup-bus.c Thu Nov 9 15:11:01 2000 @@ -88,14 +88,14 @@ pbus_assign_resources_sorted(struct pci_ ranges->io_end += io_reserved; ranges->mem_end += mem_reserved; - /* ??? How to turn off a bus from responding to, say, I/O at - all if there are no I/O ports behind the bus? Turning off - PCI_COMMAND_IO doesn't seem to do the job. So we must - allow for at least one unit. */ - if (ranges->io_end == ranges->io_start) - ranges->io_end += 1; - if (ranges->mem_end == ranges->mem_start) - ranges->mem_end += 1; + /* Interesting case is when, say, io_end == io_start, i.e. + there is no I/O behind the bridge at all. We initialize + the bridge with base=io_start and limit=io_end-1, so + in this case we'll have base > limit. According to + the `PCI-to-PCI Bridge Architecture Specification', this + means that the bridge will not forward any I/O transactions + from the primary bus to the secondary bus and will forward + all I/O transactions upstream. Exactly what we want. */ ranges->io_end = ROUND_UP(ranges->io_end, 4*1024); ranges->mem_end = ROUND_UP(ranges->mem_end, 1024*1024);