public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Majun <majun258@huawei.com>
To: linux-kernel@vger.kernel.org, marc.zyngier@arm.com,
	linux-acpi@vger.kernel.org, robert.moore@intel.com,
	lenb@kernel.org, lv.zheng@intel.com, rafael.j.wysocki@intel.com,
	devel@acpica.org, mark.rutland@arm.com, robh+dt@kernel.org,
	jason@lakedaemon.net
Cc: dingtianhong@huawei.com, guohanjun@huawei.com, majun258@huawei.com
Subject: [RFC PATCH 3/3]irqchip/gicv3-its: Add a new flag to control indirect route in ACPI mode.
Date: Thu, 1 Dec 2016 15:46:00 +0800	[thread overview]
Message-ID: <1480578360-9268-4-git-send-email-majun258@huawei.com> (raw)
In-Reply-To: <1480578360-9268-1-git-send-email-majun258@huawei.com>

From: MaJun <majun258@huawei.com>

Add a new flag to control indirect route function for ACPI mode.
To carry the user defined flags information, we used the reserved byte
in ITS MADT table

Signed-off-by: MaJun <majun258@huawei.com>
---
 drivers/irqchip/irq-gic-v3-its.c | 5 ++++-
 include/acpi/actbl1.h            | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index ee54133..4420283 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1848,6 +1848,7 @@ static int __init gic_acpi_parse_madt_its(struct acpi_subtable_header *header,
 	struct fwnode_handle *dom_handle;
 	struct resource res;
 	int err;
+	u8 flags = 0;
 
 	its_entry = (struct acpi_madt_generic_translator *)header;
 	memset(&res, 0, sizeof(res));
@@ -1855,6 +1856,8 @@ static int __init gic_acpi_parse_madt_its(struct acpi_subtable_header *header,
 	res.end = its_entry->base_address + ACPI_GICV3_ITS_MEM_SIZE - 1;
 	res.flags = IORESOURCE_MEM;
 
+	flags = its_entry->flags;
+
 	dom_handle = irq_domain_alloc_fwnode((void *)its_entry->base_address);
 	if (!dom_handle) {
 		pr_err("ITS@%pa: Unable to allocate GICv3 ITS domain token\n",
@@ -1869,7 +1872,7 @@ static int __init gic_acpi_parse_madt_its(struct acpi_subtable_header *header,
 		goto dom_err;
 	}
 
-	err = its_probe_one(&res, dom_handle, NUMA_NO_NODE, 0);
+	err = its_probe_one(&res, dom_handle, NUMA_NO_NODE, flags);
 	if (!err)
 		return 0;
 
diff --git a/include/acpi/actbl1.h b/include/acpi/actbl1.h
index 796d6ba..42a08ae 100644
--- a/include/acpi/actbl1.h
+++ b/include/acpi/actbl1.h
@@ -930,7 +930,8 @@ struct acpi_madt_generic_translator {
 	u16 reserved;		/* reserved - must be zero */
 	u32 translation_id;
 	u64 base_address;
-	u32 reserved2;
+	u8 flags;
+	u8 reserved2[3];
 };
 
 /*
-- 
1.7.12.4



  parent reply	other threads:[~2016-12-01  7:46 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-01  7:45 [RFC PATCH 0/3] Add a new flag for ITS device to control indirect route Majun
2016-12-01  7:45 ` [RFC PATCH 1/3]Binding: Add a new property string in ITS node to control the two-level route function Majun
2016-12-01  7:45 ` [RFC PATCH 2/3] irqchip/gicv3-its: add a new flag to control indirect route in DT mode Majun
2016-12-01  7:46 ` Majun [this message]
2016-12-01  9:07 ` [RFC PATCH 0/3] Add a new flag for ITS device to control indirect route Marc Zyngier
2016-12-02  9:29   ` majun (Euler7)
2016-12-02  9:35     ` Marc Zyngier
2016-12-05  3:11       ` majun (Euler7)
2016-12-05  9:00         ` Marc Zyngier

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=1480578360-9268-4-git-send-email-majun258@huawei.com \
    --to=majun258@huawei.com \
    --cc=devel@acpica.org \
    --cc=dingtianhong@huawei.com \
    --cc=guohanjun@huawei.com \
    --cc=jason@lakedaemon.net \
    --cc=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=marc.zyngier@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robert.moore@intel.com \
    --cc=robh+dt@kernel.org \
    /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