Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933355AbbFCPP5 (ORCPT ); Wed, 3 Jun 2015 11:15:57 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:45026 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964866AbbFCPPu (ORCPT ); Wed, 3 Jun 2015 11:15:50 -0400 Message-ID: <556F1A22.7050400@roeck-us.net> Date: Wed, 03 Jun 2015 08:15:46 -0700 From: Guenter Roeck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Bjorn Helgaas CC: Lorenzo Pieralisi , "linux-pci@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "suravee.suthikulpanit@amd.com" , Will Deacon Subject: Re: [PATCH] PCI: Only enable IO window if supported References: <1432342336-25832-1-git-send-email-linux@roeck-us.net> <20150527210447.GY32152@google.com> <20150602145510.GE23650@red-moon> <556DE1B9.6020100@roeck-us.net> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1667 Lines: 40 Bjorn, On 06/02/2015 12:58 PM, Bjorn Helgaas wrote: > On Tue, Jun 2, 2015 at 12:02 PM, Guenter Roeck wrote: [ ... ] >>>> >>>> I wonder if we can do the same with pci_read_bridge_mmio_pref(), and >>>> somehow get rid of pci_bridge_check_ranges() altogether? >>>> >>>> I think I looked at doing that a while back, and it seems like there was >>>> some wrinkle, but I don't remember what it was. >> >> After looking into this some more, I think the wrinkle may be that >> pci_read_bridge_bases() and thus pci_read_bridge_io() isn't called >> on probe-only systems (if PCI_PROBE_ONLY is set). A secondary >> problem is that pci_read_bridge_io() does not enable a resource >> if it is explicitly disabled (base > limit), but the subsequent call >> to pci_bridge_check_ranges() unconditionally enables it. > > I haven't researched this, but it sounds wrong that we skip > pci_read_bridge_bases() if PCI_PROBE_ONLY is set. I think > PCI_PROBE_ONLY should mean "look, but don't touch." So I think we > should always look at the bridge windows, and my advice is to see if > it looks reasonable to change this aspect of PCI_PROBE_ONLY. > Looks like Lorenzo's patch is going to take care of that problem. How about the second problem mentioned above ? One option might be to keep pci_bridge_check_ranges() but only use it to _enable_ the various ranges (and maybe rename it accordingly) ? Thanks, Guenter -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/