Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758952AbcLAHq6 (ORCPT ); Thu, 1 Dec 2016 02:46:58 -0500 Received: from szxga03-in.huawei.com ([119.145.14.66]:55059 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758717AbcLAHqj (ORCPT ); Thu, 1 Dec 2016 02:46:39 -0500 From: Majun To: , , , , , , , , , , CC: , , 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 Message-ID: <1480578360-9268-4-git-send-email-majun258@huawei.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1480578360-9268-1-git-send-email-majun258@huawei.com> References: <1480578360-9268-1-git-send-email-majun258@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.177.249.226] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1870 Lines: 59 From: MaJun 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 --- 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