Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Thu, 31 Oct 2002 18:34:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Thu, 31 Oct 2002 18:34:12 -0500 Received: from chaos.physics.uiowa.edu ([128.255.34.189]:44515 "EHLO chaos.physics.uiowa.edu") by vger.kernel.org with ESMTP id ; Thu, 31 Oct 2002 18:34:10 -0500 Date: Thu, 31 Oct 2002 17:40:34 -0600 (CST) From: Kai Germaschewski X-X-Sender: kai@chaos.physics.uiowa.edu To: "Grover, Andrew" cc: "Lee, Jung-Ik" , linux-kernel , "'Greg@kroah.com'" Subject: RE: bare pci configuration access functions ? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1635 Lines: 43 On Thu, 31 Oct 2002, Grover, Andrew wrote: > > From: Lee, Jung-Ik [mailto:jung-ik.lee@intel.com] > > Some kernel drivers/components such as hotplug > > pci/io-node drivers, > > ACPI driver, some console drivers, etc **need bare pci > > configuration space > > access** before either pci driver is initialized or struct pci_dev is > > constructed. > > > > ACPI needs this for ACPI/PCI population, hotplug pci driver > > for populating > > hot-added pci hierarchy. As more drivers are cross ported > > over to wider > > architectures, this would become wider need. Help me if > > others need this > > too. > > When the PCI Config stuff got revamped a few months ago, Greg KH, myself, > and some other people discussed this, and the conclusion seemed to be that > it was less ugly to make the code that needs bare PCI config access use fake > structs, than to have the bare functions exposed. Greg, am I remembering > correctly? As one of the other people involved, I think the solution which was agreed on was to have the lower level functions provided with (struct pci_bus *, u8 dev, u8 fn) since that is what's really needed to implement the config accesses. The standard PCI config functions, taking struct pci_dev * are merely a wrapper around these. Greg did a patch to implement it, and it looks like it got merged. pci_bus_{read,write}_config_{byte,word,dword}() --Kai - 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/