From: Len Brown <lenb@kernel.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Ed Swierk <eswierk@aristanetworks.com>,
tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
jbarnes@virtuousgeek.org, linux-pci@vger.kernel.org
Subject: Re: [RFC] [PATCH] PCI mmconfig without ACPI
Date: Sat, 21 Feb 2009 00:55:15 -0500 (EST) [thread overview]
Message-ID: <alpine.LFD.2.00.0902210046030.19156@localhost.localdomain> (raw)
In-Reply-To: <20090204181738.GA16174@elte.hu>
> > +#ifdef CONFIG_PCI_MMCONFIG
> > +
> > +struct acpi_mcfg_allocation {
> > + u64 address; /* Base address, processor-relative */
> > + u16 pci_segment; /* PCI segment group number */
> > + u8 start_bus_number; /* Starting PCI Bus number */
> > + u8 end_bus_number; /* Final PCI Bus number */
> > + u32 reserved;
> > +};
>
> Please rename this to "struct pci_mcfg_allocation" - there's nothing ACPI
> about it anymore - mmcfg is a PCI feature and ACPI is an enumeration method.
>
> Also, while touching it, please also use the opportunity to align structure
> fields vertically:
>
> struct pci_mcfg_allocation {
> u64 address; /* Base address, processor-relative */
> u16 pci_segment; /* PCI segment group number */
> u8 start_bus_number; /* Starting PCI Bus number */
> u8 end_bus_number; /* Final PCI Bus number */
> u32 __reserved;
> };
>
> The whole layout of this structure becomes easier to read and nicer to look
> at as well.
>
> Another small detail: note how i renamed reserved to __reserved - that is a
> standard way to de-emphasise the signficance of a structure field.
>
> The reserved field there is for future expansion and to pad the structure to
> 16 bytes - it doesnt really mean much and the underscores move it a bit out
> of the default line of sight.
>
> With a 'reserved' field people end up wondering whether it's perhaps some
> _semantic_ 'reserved area' kind of thing (like for e820 maps, etc.) - so
> it's never bad to make that distinction explicit via the double underscores.
struct acpi_mcfg_allocation is the structure that maps onto the MCFG
ACPI table as defined in the PCI firmware spec and provided by the ACPI
BIOS.
I'd like it to stay in actbl1.h -- as that is part of ACPICA, which
tracks the standard tables. (and I see you did this with your updated
patch, thanks.)
FWIW, "reserved" here really does have a specific definition.
On read-only tables, such as this one, reserved fields are defined
to return 0 on reads for this version of the table, but may
return non-zero on future revisions.
thanks,
-Len
next prev parent reply other threads:[~2009-02-21 5:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-04 16:59 [RFC] [PATCH] PCI mmconfig without ACPI Ed Swierk
2009-02-04 18:17 ` Ingo Molnar
2009-02-13 20:40 ` Jesse Barnes
2009-02-16 19:32 ` Ed Swierk
2009-05-05 17:57 ` Jesse Barnes
2009-05-05 20:09 ` Ed Swierk
2009-05-05 20:32 ` Jesse Barnes
2009-02-21 5:55 ` Len Brown [this message]
2009-02-22 9:22 ` Ingo Molnar
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=alpine.LFD.2.00.0902210046030.19156@localhost.localdomain \
--to=lenb@kernel.org \
--cc=eswierk@aristanetworks.com \
--cc=hpa@zytor.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
/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