Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5431713ybp; Mon, 14 Oct 2019 22:38:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqyYtQrF/nrzpMcEdGMgSFXqxHn3lU23qphF4l2lUgZexD1nPCr1tf7C4+3NhalwBs+bxrhS X-Received: by 2002:a17:906:940a:: with SMTP id q10mr32675306ejx.250.1571117882776; Mon, 14 Oct 2019 22:38:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571117882; cv=none; d=google.com; s=arc-20160816; b=KZFSa+kCmQ0iREFNaHEXqzi6i9ZZaQbpvcOX91Ye4Vo/heUt5RKgzQIefog7K2Gr8z Di704VsdwXVtNb+9y5GlQ58nCv35ZVsRXXWop7gKatTMbwTI20YsCs567qMwJpwdc2YL K+av2ZyGRoF1ZjzX4DxI0/eQtn91X7OHn0PIR+e1APWGdG4J7gIazyYALbBHps31zVV7 Wf2mbVFxS914H09s6vWROz5pXhSn0LlHLvsT7cq8rIOMrpT1L0uUccgTJzAEaza3R5v4 edGnGBnvesgfSbENoWch54J1KgAxfgZBNMd4T5UwMgu46FgzlgAs48umJDB49oAnxFtl 53tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=AAqqr/LEnwmudGCJFsXjelKrD7d/2YASR/J+9XfqQVI=; b=0ijTUuZAJf0AqLXnEE+1NW9tNPl/AMs6vYSeHt27e3SfCuEKdgE2OqPzpazrKjcsN+ LA4WaywbPfAK4WOTTtgkBZen/kzR6D8TrmuTco8ERh3RV/Akvbhdep6p1+uKs66auzLd QIy9rbwWxRGo8weewJD3s7iUqNCMr6wyoWd/w4cxKig2p+Fal6+9E7kfW+7gu3+omUj3 vM/veWOG5HB9CaeBLWZpXZFr+B3zpfsG7NDOOoO5moPNQdxAosCZcm+qblmlM9gWGpHC ElRwScBJH5mBXI/FqVWJLgiBmeiJV7Y5cmITmbSvyXfjFshPu3N72dVVHf1rRNRvLFCC m2xg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 26si12621816ejl.292.2019.10.14.22.37.39; Mon, 14 Oct 2019 22:38:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727641AbfJODHX (ORCPT + 99 others); Mon, 14 Oct 2019 23:07:23 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:49026 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727091AbfJODHX (ORCPT ); Mon, 14 Oct 2019 23:07:23 -0400 Received: from DGGEMS402-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 298D293D40F504CE2C73; Tue, 15 Oct 2019 11:07:21 +0800 (CST) Received: from [127.0.0.1] (10.177.223.23) by DGGEMS402-HUB.china.huawei.com (10.3.19.202) with Microsoft SMTP Server id 14.3.439.0; Tue, 15 Oct 2019 11:07:11 +0800 Subject: Re: [RFC PATCH 6/6] ACPI/IORT: Drop code to set the PMCG software-defined model To: John Garry , , , , , CC: , , , , , , , References: <1569854031-237636-1-git-send-email-john.garry@huawei.com> <1569854031-237636-7-git-send-email-john.garry@huawei.com> From: Hanjun Guo Message-ID: Date: Tue, 15 Oct 2019 11:06:59 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1569854031-237636-7-git-send-email-john.garry@huawei.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.223.23] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2019/9/30 22:33, John Garry wrote: > Now that we can identify a PMCG implementation from the parent SMMUv3 > IIDR, drop all the code to match based on the ACPI OEM ID. > > Signed-off-by: John Garry > --- > drivers/acpi/arm64/iort.c | 35 +---------------------------------- > include/linux/acpi_iort.h | 8 -------- > 2 files changed, 1 insertion(+), 42 deletions(-) > > diff --git a/drivers/acpi/arm64/iort.c b/drivers/acpi/arm64/iort.c > index 0b687520c3e7..d04888cb8cff 100644 > --- a/drivers/acpi/arm64/iort.c > +++ b/drivers/acpi/arm64/iort.c > @@ -1377,27 +1377,6 @@ static void __init arm_smmu_v3_pmcg_init_resources(struct resource *res, > ACPI_EDGE_SENSITIVE, &res[2]); > } > > -static struct acpi_platform_list pmcg_plat_info[] __initdata = { > - /* HiSilicon Hip08 Platform */ > - {"HISI ", "HIP08 ", 0, ACPI_SIG_IORT, greater_than_or_equal, > - "Erratum #162001800", IORT_SMMU_V3_PMCG_HISI_HIP08}, > - { } > -}; > - > -static int __init arm_smmu_v3_pmcg_add_platdata(struct platform_device *pdev) > -{ > - u32 model; > - int idx; > - > - idx = acpi_match_platform_list(pmcg_plat_info); > - if (idx >= 0) > - model = pmcg_plat_info[idx].data; > - else > - model = IORT_SMMU_V3_PMCG_GENERIC; > - > - return platform_device_add_data(pdev, &model, sizeof(model)); > -} > - > struct iort_dev_config { > const char *name; > int (*dev_init)(struct acpi_iort_node *node); > @@ -1408,7 +1387,6 @@ struct iort_dev_config { > struct acpi_iort_node *node); > int (*dev_set_proximity)(struct device *dev, > struct acpi_iort_node *node); > - int (*dev_add_platdata)(struct platform_device *pdev); > }; > > static const struct iort_dev_config iort_arm_smmu_v3_cfg __initconst = { > @@ -1430,7 +1408,6 @@ static const struct iort_dev_config iort_arm_smmu_v3_pmcg_cfg __initconst = { > .name = "arm-smmu-v3-pmcg", > .dev_count_resources = arm_smmu_v3_pmcg_count_resources, > .dev_init_resources = arm_smmu_v3_pmcg_init_resources, > - .dev_add_platdata = arm_smmu_v3_pmcg_add_platdata, > }; > > static __init const struct iort_dev_config *iort_get_dev_cfg( > @@ -1494,17 +1471,7 @@ static int __init iort_add_platform_device(struct acpi_iort_node *node, > if (ret) > goto dev_put; > > - /* > - * Platform devices based on PMCG nodes uses platform_data to > - * pass the hardware model info to the driver. For others, add > - * a copy of IORT node pointer to platform_data to be used to > - * retrieve IORT data information. > - */ > - if (ops->dev_add_platdata) > - ret = ops->dev_add_platdata(pdev); > - else > - ret = platform_device_add_data(pdev, &node, sizeof(node)); > - > + ret = platform_device_add_data(pdev, &node, sizeof(node)); > if (ret) > goto dev_put; > > diff --git a/include/linux/acpi_iort.h b/include/linux/acpi_iort.h > index 8e7e2ec37f1b..7a8961e6a8bb 100644 > --- a/include/linux/acpi_iort.h > +++ b/include/linux/acpi_iort.h > @@ -14,14 +14,6 @@ > #define IORT_IRQ_MASK(irq) (irq & 0xffffffffULL) > #define IORT_IRQ_TRIGGER_MASK(irq) ((irq >> 32) & 0xffffffffULL) > > -/* > - * PMCG model identifiers for use in smmu pmu driver. Please note > - * that this is purely for the use of software and has nothing to > - * do with hardware or with IORT specification. > - */ > -#define IORT_SMMU_V3_PMCG_GENERIC 0x00000000 /* Generic SMMUv3 PMCG */ > -#define IORT_SMMU_V3_PMCG_HISI_HIP08 0x00000001 /* HiSilicon HIP08 PMCG */ Since only HiSilicon platform has such erratum, and I think it works with both old version of firmware, I'm fine with removing this erratum framework. Acked-by: Hanjun Guo Thanks Hanjun