From: Greg KH <gregkh@suse.de>
To: tcamuso@redhat.com
Cc: linux-kernel@vger.kernel.org, linux-pci@atrey.karlin.mff.cuni.cz,
prarit@redhat.com
Subject: Re: [PATCH 2/5]PCI: x86 MMCONFIG: add legacy pci conf functions
Date: Wed, 19 Dec 2007 15:06:15 -0800 [thread overview]
Message-ID: <20071219230615.GB24219@suse.de> (raw)
In-Reply-To: <20071219221756.20362.84805.sendpatchset@dhcp83-188.boston.redhat.com>
On Wed, Dec 19, 2007 at 05:17:56PM -0500, tcamuso@redhat.com wrote:
> commit 307e3aecde8060af3802590f8c5bffb5456fe22b
> Author: Tony Camuso <tony.camuso@hp.com>
> Date: Wed Dec 19 15:38:31 2007 -0500
>
> Modifies arch/x86/pci/direct.c to add the Legacy PCI Config routines
> that will be made available, even when MMCONFIG is the platform default
> PCI Config access mechanism. It also provides logic for selecting the
> correct Legacy PCI Config access mechanism and the corresponding boot log
> messages.
>
> Signed-off-by: Tony Camuso tony.camuso@hp.com
>
> diff --git a/arch/x86/pci/direct.c b/arch/x86/pci/direct.c
> index 431c9a5..4e78002 100644
> --- a/arch/x86/pci/direct.c
> +++ b/arch/x86/pci/direct.c
> @@ -175,6 +175,32 @@ static struct pci_raw_ops pci_direct_conf2 = {
> .write = pci_conf2_write,
> };
>
> +/*
> + * Legacy PCI Config read and write routines for buses that can't use
> + * MMCONFIG accesses in systems where MMCONFIG is the default PCI config
> + * access mechanism.
> + */
> +static struct pci_raw_ops *pci_legacy_conf;
> +
> +static int pci_ops_legacy_read(struct pci_bus *bus, unsigned int devfn,
> + int where, int size, u32 *value)
> +{
> + return pci_legacy_conf->read(0, bus->number, devfn, where,
> + size, value);
> +}
> +
> +static int pci_ops_legacy_write(struct pci_bus *bus, unsigned int devfn,
> + int where, int size, u32 value)
> +{
> + return pci_legacy_conf->write(0, bus->number, devfn, where,
> + size, value);
> +}
> +
> +struct pci_ops pci_legacy_ops = {
> + .read = pci_ops_legacy_read,
> + .write = pci_ops_legacy_write,
> +};
This whole structure is never used in this patch, why add it now?
> /*
> * Before we decide to use direct hardware access mechanisms, we try to do some
> @@ -258,18 +284,28 @@ void __init pci_direct_init(int type)
> {
> if (type == 0)
> return;
> - printk(KERN_INFO "PCI: Using configuration type %d\n", type);
> - if (type == 1)
> + if (type == 1) {
> raw_pci_ops = &pci_direct_conf1;
> - else
> + pci_legacy_conf = &pci_direct_conf1;
> + } else {
> raw_pci_ops = &pci_direct_conf2;
> + pci_legacy_conf = &pci_direct_conf2;
Why have two pointers to the same thing? What is pci_legacy_conf going
to be used for? Why not just use raw_pci_ops?
thanks,
greg k-h
next prev parent reply other threads:[~2007-12-19 23:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071219221746.20362.39243.sendpatchset@dhcp83-188.boston.redhat.com>
[not found] ` <20071219221751.20362.23451.sendpatchset@dhcp83-188.boston.redhat.com>
2007-12-19 23:04 ` [PATCH 1/5]PCI: x86 MMCONFIG: introduce PCI_USING_MMCONF Greg KH
[not found] ` <4769B035.9020005@redhat.com>
[not found] ` <20071220001936.GA23791@suse.de>
2007-12-20 0:49 ` Tony Camuso
[not found] ` <20071219221756.20362.84805.sendpatchset@dhcp83-188.boston.redhat.com>
2007-12-19 23:06 ` Greg KH [this message]
[not found] ` <20071219221806.20362.25964.sendpatchset@dhcp83-188.boston.redhat.com>
2007-12-19 23:10 ` [PATCH 4/5]PCI: x86 MMCONFIG: introduce pcibios_fix_bus_scan() Greg KH
2007-12-19 23:14 ` Greg KH
2007-12-19 23:16 ` [PATCH 0/5]PCI: x86 MMCONFIG Greg KH
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=20071219230615.GB24219@suse.de \
--to=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=prarit@redhat.com \
--cc=tcamuso@redhat.com \
/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).