From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751875AbdHGVAp (ORCPT ); Mon, 7 Aug 2017 17:00:45 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:56494 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751662AbdHGVAn (ORCPT ); Mon, 7 Aug 2017 17:00:43 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 7544160209 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=nleeder@codeaurora.org Cc: nleeder@codeaurora.org, Will Deacon , Mark Rutland , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Mark Langsdorf , Mark Salter , Jon Masters , Timur Tabi , Mark Brown , Robin Murphy Subject: Re: [PATCH 1/2] acpi: arm64: add iort support for PMCG To: Lorenzo Pieralisi References: <1501876754-1064-1-git-send-email-nleeder@codeaurora.org> <1501876754-1064-2-git-send-email-nleeder@codeaurora.org> <20170807164400.GA27830@red-moon> From: "Leeder, Neil" Message-ID: Date: Mon, 7 Aug 2017 17:00:40 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170807164400.GA27830@red-moon> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Lorenzo, On 8/7/2017 12:44 PM, Lorenzo Pieralisi wrote: > On Fri, Aug 04, 2017 at 03:59:13PM -0400, Neil Leeder wrote: [...] >> + } else if (iort_node->type == ACPI_IORT_NODE_PMCG) { >> + if (iort_add_smmu_platform_device(iort_node)) >> + return; > > > It is becoming a bit messy, probably it makes sense to rework the > iommu platform device creation to make room for more generic (ie > iommu platform device creation is not really iommu specific) behaviour > that can accommodate the PMCG too, it can be made cleaner. > > I do not know if we can make it for this cycle but I am happy to put > a patch together shortly with this in mind. > Ok, I will rebase on top of it when it's ready. >> } >> >> iort_node = ACPI_ADD_PTR(struct acpi_iort_node, iort_node, >> diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h >> index 707dda74..2169b6f 100644 >> --- a/include/acpi/actbl2.h >> +++ b/include/acpi/actbl2.h >> @@ -695,7 +695,8 @@ enum acpi_iort_node_type { >> ACPI_IORT_NODE_NAMED_COMPONENT = 0x01, >> ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02, >> ACPI_IORT_NODE_SMMU = 0x03, >> - ACPI_IORT_NODE_SMMU_V3 = 0x04 >> + ACPI_IORT_NODE_SMMU_V3 = 0x04, >> + ACPI_IORT_NODE_PMCG = 0x05 >> }; >> >> struct acpi_iort_id_mapping { >> @@ -811,6 +812,12 @@ struct acpi_iort_smmu_v3 { >> #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) >> #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1) >> >> +struct acpi_iort_pmcg { >> + u64 base_address; /* PMCG base address */ >> + u32 overflow_gsiv; >> + u32 node_reference; >> +}; > > As Robin already said this hunk should be made an ACPICA pull but > NOT before seeking IORT specs clarification as per his comments. > OK, I will add this through ACPICA once the IORT decision is made. Thanks, Neil -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project. From mboxrd@z Thu Jan 1 00:00:00 1970 From: nleeder@codeaurora.org (Leeder, Neil) Date: Mon, 7 Aug 2017 17:00:40 -0400 Subject: [PATCH 1/2] acpi: arm64: add iort support for PMCG In-Reply-To: <20170807164400.GA27830@red-moon> References: <1501876754-1064-1-git-send-email-nleeder@codeaurora.org> <1501876754-1064-2-git-send-email-nleeder@codeaurora.org> <20170807164400.GA27830@red-moon> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi Lorenzo, On 8/7/2017 12:44 PM, Lorenzo Pieralisi wrote: > On Fri, Aug 04, 2017 at 03:59:13PM -0400, Neil Leeder wrote: [...] >> + } else if (iort_node->type == ACPI_IORT_NODE_PMCG) { >> + if (iort_add_smmu_platform_device(iort_node)) >> + return; > > > It is becoming a bit messy, probably it makes sense to rework the > iommu platform device creation to make room for more generic (ie > iommu platform device creation is not really iommu specific) behaviour > that can accommodate the PMCG too, it can be made cleaner. > > I do not know if we can make it for this cycle but I am happy to put > a patch together shortly with this in mind. > Ok, I will rebase on top of it when it's ready. >> } >> >> iort_node = ACPI_ADD_PTR(struct acpi_iort_node, iort_node, >> diff --git a/include/acpi/actbl2.h b/include/acpi/actbl2.h >> index 707dda74..2169b6f 100644 >> --- a/include/acpi/actbl2.h >> +++ b/include/acpi/actbl2.h >> @@ -695,7 +695,8 @@ enum acpi_iort_node_type { >> ACPI_IORT_NODE_NAMED_COMPONENT = 0x01, >> ACPI_IORT_NODE_PCI_ROOT_COMPLEX = 0x02, >> ACPI_IORT_NODE_SMMU = 0x03, >> - ACPI_IORT_NODE_SMMU_V3 = 0x04 >> + ACPI_IORT_NODE_SMMU_V3 = 0x04, >> + ACPI_IORT_NODE_PMCG = 0x05 >> }; >> >> struct acpi_iort_id_mapping { >> @@ -811,6 +812,12 @@ struct acpi_iort_smmu_v3 { >> #define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1) >> #define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1) >> >> +struct acpi_iort_pmcg { >> + u64 base_address; /* PMCG base address */ >> + u32 overflow_gsiv; >> + u32 node_reference; >> +}; > > As Robin already said this hunk should be made an ACPICA pull but > NOT before seeking IORT specs clarification as per his comments. > OK, I will add this through ACPICA once the IORT decision is made. Thanks, Neil -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.