From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: Keith Busch <keith.busch@intel.com>
Cc: linux-mm@kvack.org, linux-acpi@vger.kernel.org,
linux-kernel@vger.kernel.org, linuxarm@huawei.com,
"Jérôme Glisse" <jglisse@redhat.com>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
"Michal Hocko" <mhocko@kernel.org>,
jcm@redhat.com
Subject: Re: [PATCH 1/3] ACPI: Support Generic Initator only domains
Date: Wed, 13 Feb 2019 10:16:40 +0000 [thread overview]
Message-ID: <20190213101640.00006a51@huawei.com> (raw)
In-Reply-To: <20190212214736.GG6176@localhost.localdomain>
On Tue, 12 Feb 2019 14:47:36 -0700
Keith Busch <keith.busch@intel.com> wrote:
> On Tue, Feb 12, 2019 at 04:49:24PM +0000, Jonathan Cameron wrote:
> > + case ACPI_SRAT_TYPE_GENERIC_INITIATOR_AFFINITY:
> > + {
> > + struct acpi_srat_gi_affinity *p =
> > + (struct acpi_srat_gi_affinity *)header;
> > + char name[9] = {};
> > +
> > + if (p->flags & ACPI_SRAT_GI_PCI_HANDLE) {
> > + /*
> > + * For pci devices this may be the only place they
> > + * are assigned a proximity domain
> > + */
> > + pr_debug("SRAT Generic Initiator(Seg:%u BDF:%u) in proximity domain %d %s\n",
> > + p->pci_handle.segment,
> > + p->pci_handle.bdf,
> > + p->proximity_domain,
> > + (p->flags & ACPI_SRAT_GI_ENABLED) ?
> > + "enabled" : "disabled");
>
> <snip>
>
> > +#define ACPI_SRAT_GI_ENABLED (1) /* 00: Use affinity structure */
> > +#define ACPI_SRAT_GI_ACPI_HANDLE (0) /* 01: */
> > +#define ACPI_SRAT_GI_PCI_HANDLE (1 << 1) /* 01: */
>
> It looks like you're reading reserved bits. My copy of the 6.3 spec says
> PCI Handle is 1, and is set in Device Handle Type field, not in the Flags.
Good spot.
Sorry, wrote this long before spec publish and some details got tidied up.
I fixed iasl end but forgot to actually update the reading of it. Oops!
As you can probably guess that my test was using an ACPI handle so didn't
hit this at all. I'll shove a PCIe card in the machine to check those
as well.
Will fix up for v2!
Thanks,
Jonathan
>
> > +/* 5 : Generic Initiator Affinity (ACPI 6.3) */
> > +
> > +struct acpi_srat_gi_affinity {
> > + struct acpi_subtable_header header;
> > + u8 reserved;
> > + u8 device_handl_type;
> > + u32 proximity_domain;
> > + union {
> > + struct acpi_srat_gi_acpi_handle acpi_handle;
> > + struct acpi_srat_gi_pci_handle pci_handle;
> > + };
> > + u32 flags;
> > + u32 reserved2;
> > +};
next prev parent reply other threads:[~2019-02-13 10:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-12 16:49 [RFC PATCH 0/3] ACPI: Support generic initiator proximity domains Jonathan Cameron
2019-02-12 16:49 ` [PATCH 1/3] ACPI: Support Generic Initator only domains Jonathan Cameron
2019-02-12 21:47 ` Keith Busch
2019-02-13 10:16 ` Jonathan Cameron [this message]
2019-02-12 16:49 ` [PATCH 2/3] arm64: Support Generic Initiator " Jonathan Cameron
2019-02-12 16:49 ` [PATCH 3/3] ACPI: Let ACPI know we support Generic Initiator Affinity Structures Jonathan Cameron
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=20190213101640.00006a51@huawei.com \
--to=jonathan.cameron@huawei.com \
--cc=jcm@redhat.com \
--cc=jglisse@redhat.com \
--cc=keith.busch@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxarm@huawei.com \
--cc=mhocko@kernel.org \
--cc=rjw@rjwysocki.net \
/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