Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758550AbXLMJ34 (ORCPT ); Thu, 13 Dec 2007 04:29:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752322AbXLMJ3r (ORCPT ); Thu, 13 Dec 2007 04:29:47 -0500 Received: from gate.crashing.org ([63.228.1.57]:43519 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751925AbXLMJ3p (ORCPT ); Thu, 13 Dec 2007 04:29:45 -0500 Subject: Re: Possible issue with dangling PCI BARs From: Benjamin Herrenschmidt Reply-To: benh@kernel.crashing.org To: Ivan Kokshaysky Cc: Robert Hancock , linux-pci@atrey.karlin.mff.cuni.cz, Linux Kernel list , Linus Torvalds In-Reply-To: <20071213121435.C21124@jurassic.park.msu.ru> References: <4760B37E.3010002@shaw.ca> <1197523602.15741.114.camel@pasglop> <20071213121435.C21124@jurassic.park.msu.ru> Content-Type: text/plain Date: Thu, 13 Dec 2007 20:29:23 +1100 Message-Id: <1197538163.15741.124.camel@pasglop> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 998 Lines: 26 On Thu, 2007-12-13 at 12:14 +0300, Ivan Kokshaysky wrote: > On Thu, Dec 13, 2007 at 04:26:42PM +1100, Benjamin Herrenschmidt wrote: > > I can try to whip up some code tomorrow I suppose, though I'm always > > afraid some dodgy x86 setup will blow up... > > That scares me too, but something like pci_dangling_bar(dev, idx) with > a default (for now) no-op implementation in asm-generic/pci.h should > be safe... Well, the code that detects collisions and "unsets" a resource is arch in the first place, and so is pcibios_enable_device(). So I'm going to do a powerpc implementation & test it a bit with what I have around, and then do an x86 since with my latest (pending for .25) patches. powerpc PCI code is -very- similar to x86. Cheers, Ben. -- 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/