From: Tony Camuso <tcamuso@redhat.com>
To: gregkh@suse.de, linux-kernel@vger.kernel.org,
linux-pci@atrey.karlin.mff.cuni.cz
Subject: [Fwd: Re: [PATCH 2/5]PCI: x86 MMCONFIG: add legacy pci conf functions]
Date: Thu, 20 Dec 2007 07:25:11 -0500 [thread overview]
Message-ID: <476A5F27.4040209@redhat.com> (raw)
-------- Original Message --------
Subject: Re: [PATCH 2/5]PCI: x86 MMCONFIG: add legacy pci conf functions
Date: Wed, 19 Dec 2007 19:07:27 -0500
From: Tony Camuso <tcamuso@redhat.com>
Reply-To: tcamuso@redhat.com
To: Greg KH <gregkh@suse.de>
References:
<20071219221746.20362.39243.sendpatchset@dhcp83-188.boston.redhat.com>
<20071219221756.20362.84805.sendpatchset@dhcp83-188.boston.redhat.com>
<20071219230615.GB24219@suse.de>
Greg KH wrote:
>> +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?
It gets used by the routine pcibios_fix_bus_scan_quirk in
arch/x86/pci/common.c
>
>> /*
>> * 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
The way the code works today, when raw_pci_ops is set to use mmconf,
it is platform-wide. Legacy pci config reads are not available.
I would have simply used the pci_direct_conf1, but because there can
also be a pci_direct_conf2, I thought it best to abstract it as
pci_legacy_conf.
A pointer to struct pci_ops pci_legacy_ops data is written into the
pci_bus.ops field for buses that must use legacy pci config access.
The other busses can continue to use the pointer to the mmconf pci_ops.
reply other threads:[~2007-12-20 12:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=476A5F27.4040209@redhat.com \
--to=tcamuso@redhat.com \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
/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