From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Hanjun Guo <guohanjun@huawei.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Robert Moore <robert.moore@intel.com>
Cc: Robin Murphy <robin.murphy@arm.com>,
Marc Zyngier <marc.zyngier@arm.com>,
linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linuxarm@huawei.com, Hanjun Guo <hanjun.guo@linaro.org>,
will.deacon@arm.com
Subject: Re: [PATCH v2 3/4] ACPI/IORT: Add SMMUv3 specific special index mapping handling
Date: Fri, 13 Oct 2017 14:04:45 +0100 [thread overview]
Message-ID: <20171013130445.GA27895@red-moon> (raw)
In-Reply-To: <1507878590-51066-4-git-send-email-guohanjun@huawei.com>
[+Robert, Will]
Rafael, Robert,
On Fri, Oct 13, 2017 at 03:09:49PM +0800, Hanjun Guo wrote:
[...]
> +#if (ACPI_CA_VERSION > 0x20170929)
Any objection to handling 4.15 trees dependency by using ACPICA
version as a temporary guard (that I will promptly remove at -rc1) ?
This series will go via arm64 tree and I see no other obvious way of
handling the dependency with ACPICA, unless I can send an ACPI IORT pull
request to Rafael and ACPICA changes go via Rafael's tree too.
Please let me know, I would like to send the pull request to arm64
shortly.
Thanks,
Lorenzo
> +static int iort_get_id_mapping_index(struct acpi_iort_node *node)
> +{
> + struct acpi_iort_smmu_v3 *smmu;
> +
> + switch (node->type) {
> + case ACPI_IORT_NODE_SMMU_V3:
> + /*
> + * SMMUv3 dev ID mapping index was introdueced in revision 1
> + * table, not available in revision 0
> + */
> + if (node->revision < 1)
> + return -EINVAL;
> +
> + smmu = (struct acpi_iort_smmu_v3 *)node->node_data;
> + /*
> + * ID mapping index is only ignored if all interrupts are
> + * GSIV based
> + */
> + if (smmu->event_gsiv && smmu->pri_gsiv && smmu->gerr_gsiv
> + && smmu->sync_gsiv)
> + return -EINVAL;
> +
> + if (smmu->id_mapping_index >= node->mapping_count) {
> + pr_err(FW_BUG "[node %p type %d] ID mapping index overflows valid mappings\n",
> + node, node->type);
> + return -EINVAL;
> + }
> +
> + return smmu->id_mapping_index;
> + default:
> + return -EINVAL;
> + }
> +}
> +#else
> static inline int iort_get_id_mapping_index(struct acpi_iort_node *node)
> {
> return -EINVAL;
> }
> +#endif
>
> static struct acpi_iort_node *iort_node_map_id(struct acpi_iort_node *node,
> u32 id_in, u32 *id_out,
> --
> 1.7.12.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-10-13 13:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-13 7:09 [PATCH v2 0/4] IORT SMMUv3 MSI support Hanjun Guo
2017-10-13 7:09 ` [PATCH v2 1/4] ACPI/IORT: Look up IORT node through struct fwnode_handle pointer Hanjun Guo
2017-10-13 7:09 ` [PATCH v2 2/4] ACPI/IORT: Enable special index ITS group mappings for IORT nodes Hanjun Guo
2017-10-13 7:09 ` [PATCH v2 3/4] ACPI/IORT: Add SMMUv3 specific special index mapping handling Hanjun Guo
2017-10-13 13:04 ` Lorenzo Pieralisi [this message]
2017-10-13 12:59 ` Rafael J. Wysocki
2017-10-13 7:09 ` [PATCH v2 4/4] ACPI/IORT: Enable SMMUv3/PMCG IORT MSI domain set-up Hanjun Guo
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=20171013130445.GA27895@red-moon \
--to=lorenzo.pieralisi@arm.com \
--cc=guohanjun@huawei.com \
--cc=hanjun.guo@linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linuxarm@huawei.com \
--cc=marc.zyngier@arm.com \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
--cc=robin.murphy@arm.com \
--cc=will.deacon@arm.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).