linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lee, Jung-Ik" <jung-ik.lee@intel.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: RFC: bare pci configuration access functions ?
Date: Thu, 31 Oct 2002 11:29:19 -0800	[thread overview]
Message-ID: <72B3FD82E303D611BD0100508BB29735046DFF69@orsmsx102.jf.intel.com> (raw)

Need:
====
	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.


Current pci configuration access functions:
==========================================
	Current pci configuration access functions is based on "struct
pci_ops" from "struct pci_bus".
 pci_{read|write}_config_{byte|word|dword}(pci_dev, where, val);
 pci_bus_{read|write}_config_{byte|word|dword}(pci_bus, devfn, where, val);

Issue:
=====
	Current functions need pci_ops and pci_bus struct, which are not
constructed yet for the above cases.

Current solutions:
=================
(1) i386 and ia64 kernel provides global bare pci config access functions
like:
 pci_config_{read|write}(seg, bus, dev, func, where, size, val);
	Acpi driver uses these.

(2) Alternative is to allocate temporary pci_dev/pci_bus structs and copy
parent's or root's, and modify the struct.
	Hotplug pci driver uses this.


Question:
========
Will it be desirable to have bare global pci config access functions as seen
in i386/ia64 pci codes ? It's clean and needs just what it takes - seg, bus,
dev, func, where, value, and size.
Or, do we keep original functions with temporary structs ? It takes extra
care for temporary structs, but it's with pci context.

Request for comments.
thanks,
J.I.

             reply	other threads:[~2002-10-31 19:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-31 19:29 Lee, Jung-Ik [this message]
2002-11-01  1:02 ` RFC: bare pci configuration access functions ? Greg KH
2002-11-01  1:55   ` Lee, Jung-Ik
2002-11-01  2:11     ` Greg KH
2002-11-01  2:39 Lee, Jung-Ik
2002-11-01  2:48 ` Greg KH
2002-11-01  4:45 Lee, Jung-Ik
2002-11-01  4:52 Lee, Jung-Ik
2002-11-01  5:38 ` Greg KH
2002-11-04 20:17 Lee, Jung-Ik
2002-11-04 21:30 ` Greg KH
2002-11-04 22:30 Lee, Jung-Ik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=72B3FD82E303D611BD0100508BB29735046DFF69@orsmsx102.jf.intel.com \
    --to=jung-ik.lee@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).