From patchwork Tue Oct 13 20:46:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Suthikulpanit, Suravee" X-Patchwork-Id: 54872 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f199.google.com (mail-lb0-f199.google.com [209.85.217.199]) by patches.linaro.org (Postfix) with ESMTPS id 66E3A20490 for ; Tue, 13 Oct 2015 20:48:19 +0000 (UTC) Received: by lbcao8 with SMTP id ao8sf15519131lbc.1 for ; Tue, 13 Oct 2015 13:48:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:mime-version:spamdiagnosticoutput :spamdiagnosticmetadata:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:cc:content-type :content-transfer-encoding:sender:errors-to:x-original-sender :x-original-authentication-results:mailing-list; bh=SQID36qWCnQsQweROt5TC6QWxwZUYDtiybJkUQObRUM=; b=DKzUQbJ8vRkUAX5Xkt8z214+MDAlTx+wnLNwrjnDsauWhcmkDWTtUyQJnhQXUHTOaK YLbHqVDSPvuWz5otRYmxuiTrYyXLUFyQUkl3z5x+/VGeiy3EVXJ4DwjAQ5SiTzXC1t/o K0G678JyVwuIkONYkPckqiBmadeZxyQGjf2CBqseJqfyeuN8mnSFhgHBsFO/nPcrQSxY 7K5SMT+czEKFNUBDnE0aL/PC+1LsYV+FitlJ5c9ArlWiElJ6lm14ZcX0esIaSi9O9H8V V0vUf3sfvrNm9uawk4rY1IT8zPg+IAtn03rK27WjDBXV1cRZyxBzvl7HRZ1dEg/rVQCu qk+A== X-Gm-Message-State: ALoCoQlEoVUnyySKAENE/ICKR89jO+VXc+0n/tTKE3jeiOI6SS2gndT+i8mM9Ge8mCJcfLOQNc8c X-Received: by 10.180.210.212 with SMTP id mw20mr4666439wic.3.1444769298414; Tue, 13 Oct 2015 13:48:18 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.15.89 with SMTP id e86ls287515lfi.14.gmail; Tue, 13 Oct 2015 13:48:18 -0700 (PDT) X-Received: by 10.112.134.73 with SMTP id pi9mr15852569lbb.83.1444769298130; Tue, 13 Oct 2015 13:48:18 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id ue7si3310422lbb.33.2015.10.13.13.48.18 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Oct 2015 13:48:18 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbbck17 with SMTP id ck17so32888382lbb.1 for ; Tue, 13 Oct 2015 13:48:18 -0700 (PDT) X-Received: by 10.112.132.7 with SMTP id oq7mr1121719lbb.32.1444769297999; Tue, 13 Oct 2015 13:48:17 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp2342188lbq; Tue, 13 Oct 2015 13:48:16 -0700 (PDT) X-Received: by 10.50.41.1 with SMTP id b1mr22004igl.3.1444769296770; Tue, 13 Oct 2015 13:48:16 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id i16si4447020ioi.211.2015.10.13.13.48.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Oct 2015 13:48:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zm6TU-0003NX-Sc; Tue, 13 Oct 2015 20:47:08 +0000 Received: from mail-bn1on0077.outbound.protection.outlook.com ([157.56.110.77] helo=na01-bn1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zm6T4-0003DS-M3 for linux-arm-kernel@lists.infradead.org; Tue, 13 Oct 2015 20:46:45 +0000 Received: from CY1PR1201CA0036.namprd12.prod.outlook.com (10.169.17.174) by DM3PR12MB0858.namprd12.prod.outlook.com (10.164.7.140) with Microsoft SMTP Server (TLS) id 15.1.293.16; Tue, 13 Oct 2015 20:46:20 +0000 Received: from DM3NAM03FT011.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e49::200) by CY1PR1201CA0036.outlook.office365.com (2a01:111:e400:5b9a::46) with Microsoft SMTP Server (TLS) id 15.1.300.14 via Frontend Transport; Tue, 13 Oct 2015 20:46:20 +0000 Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from atltwp01.amd.com (165.204.84.221) by DM3NAM03FT011.mail.protection.outlook.com (10.152.82.88) with Microsoft SMTP Server id 15.1.300.4 via Frontend Transport; Tue, 13 Oct 2015 20:46:19 +0000 X-WSS-ID: 0NW6F16-07-6UG-02 X-M-MSG: Received: from satlvexedge02.amd.com (satlvexedge02.amd.com [10.177.96.29]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by atltwp01.amd.com (Axway MailGate 5.3.1) with ESMTPS id 266F0CAE628; Tue, 13 Oct 2015 16:46:17 -0400 (EDT) Received: from SATLEXDAG03.amd.com (10.181.40.7) by SATLVEXEDGE02.amd.com (10.177.96.29) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 13 Oct 2015 15:46:19 -0500 Received: from ssuthiku-fedora-lt.amd.com (10.180.168.240) by satlexdag03.amd.com (10.181.40.7) with Microsoft SMTP Server id 14.3.266.1; Tue, 13 Oct 2015 16:46:18 -0400 From: Suravee Suthikulpanit To: , , , Subject: [PATCH 3/4] gicv2m: Refactor to prepare for ACPI support Date: Tue, 13 Oct 2015 13:46:22 -0700 Message-ID: <1444769183-12374-4-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1444769183-12374-1-git-send-email-Suravee.Suthikulpanit@amd.com> References: <1444769183-12374-1-git-send-email-Suravee.Suthikulpanit@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:165.204.84.221; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(428002)(199003)(189002)(101416001)(92566002)(64706001)(19580395003)(19580405001)(2950100001)(86362001)(189998001)(97736004)(53416004)(5001770100001)(11100500001)(50466002)(5003600100002)(87936001)(50986999)(50226001)(77096005)(105586002)(48376002)(5008740100001)(106466001)(46102003)(5007970100001)(2201001)(229853001)(5003940100001)(76176999)(47776003)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:DM3PR12MB0858; H:atltwp01.amd.com; FPR:; SPF:None; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DM3PR12MB0858; 2:1Sd1bpP11lAEe8GBTvOgpoIHoghWtBfq4RwTwekFutWO3qZlQyYQ4vY+M2ULUjwzUsT+Z9le1M2EYQNRDIHMpnmeZenhMPBZZKb9RZnhG14DQqgtW1Y2F1vpuXgYCxjz2uzSdsgz64I77owOfOvmlSC+4AHjvMfylp/Lf7FAqdA=; 3:uOCXrEnCyn6S0ONJRnNeh6pDuWrRnQSdOOYQUtDDBQLN0ahDRO+GH3/J/kePTqrY3Iytu5/7JXN+eVVcYRdsm7UoRiNAJb1O6MxopbJ39GMFhLmiVSsaXL6x9jKLVpKAFtGFWMlyp/vd12IjKRMiZq2G57SGn9tFkle0rx23mnoFB638JDrNlwpM9P09wPLjauE72YOzIsHNjn30UfsowK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3EIbnZb1XK5dTBn0DI8BfPeRoaYZuEi+ivKH1UFzU7dBQc4VVGRZTpAbrqj4T/9lsOQxMklbFL3m5Xdh5GQEHdNu/ThV/I6nF2AcR/7jyEdWwVdcVE0+0MDYd8sWEjxYZjpQ9yErxLRuE2OKGwAVief10mDcztbR9HZVktGNGXDY0HkBRT4Gw2xnoWTiwb0Y7E4J8xO5INvw5p48N8iSLZgI0vHGxA= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(520078)(8121501046)(5005006)(3002001); SRVR:DM3PR12MB0858; BCL:0; PCL:0; RULEID:; SRVR:DM3PR12MB0858; X-Forefront-PRVS: 07283408BE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM3PR12MB0858; 23:bLv/EU84W9DUjZdgZzE4++HB5SB71uan3I6ddZ9xq?= =?us-ascii?Q?y86EznaookuRu0V1BmZboha8mM/V7/ScyHCLDmmSf/iO6WvX2VCW291qqbDv?= =?us-ascii?Q?pBrbxhyTBLeHRDq7eJLGWCjqzOZBGr6fGqc294UeidNh2NaCANAgPVjsZ0DI?= =?us-ascii?Q?wuNRY0pCBgZy3/QzblMUrEnGai870Y3lzboS31nzVuKIQ07zZ2sapYgKt+/z?= =?us-ascii?Q?ttGeiTmxOvu5FmfjYJdpJ0q0VP1ButFwfS/7FQ/UZNkNJDPnWRbDhG8vpa6c?= =?us-ascii?Q?mJk4Sv1nuIAiEdO6eeMriS9iignqKcw6Mg5N9KzbQYgUHBukhiFLJEMowE5i?= =?us-ascii?Q?6vTugETkT9igGpUaxSn0binawZC89mPnKW9KSnyYBhmdHpFfaM7aPzSUYtA4?= =?us-ascii?Q?AxD6YnXeuP38utabS5UfahRdNFzc6zRWc6aY0I4OjqK+wc63GDd6xG30maID?= =?us-ascii?Q?h14+kPA+AJYX8jcUJoSBoJJ+3ykqrXOADVRi6+MiYVAMucdcd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kiXcruRLmF5t5RajBQuKD5LMfljEBAB478o6CnHWzkEqLY/w6Ep3YQn3B6ldTr9+rar1aJmrk8/VHzFH7w4LWhvrYNBOw7FtbB2fRHCU9eY SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Oct 2015 20:46:19.7891 (UTC) X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.221]; Helo=[atltwp01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM3PR12MB0858 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151013_134643_088634_82C9B6A6 X-CRM114-Status: GOOD ( 13.52 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [157.56.110.77 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [157.56.110.77 listed in wl.mailspike.net] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Cc: Lorenzo Pieralisi , graeme.gregory@linaro.org, Catalin Marinas , Will Deacon , linux-kernel@vger.kernel.org, tomasz.nowicki@linaro.org, linux-acpi@vger.kernel.org, hanjun.guo@linaro.org, Suravee Suthikulpanit , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: suravee.suthikulpanit@amd.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 This patch refactors gicv2m_init_one() to prepare for ACPI support. It also replaces the irq_domain_add_tree() w/ irq_domain_create_tree() since we will need to pass the struct fwnode_handle, instead of struct device_node, when adding ACPI support later. Signed-off-by: Suravee Suthikulpanit --- drivers/irqchip/irq-gic-v2m.c | 51 ++++++++++++++++++++++++++----------------- 1 file changed, 31 insertions(+), 20 deletions(-) diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c index bf9b3c0..97d1bf4 100644 --- a/drivers/irqchip/irq-gic-v2m.c +++ b/drivers/irqchip/irq-gic-v2m.c @@ -239,8 +239,10 @@ static struct msi_domain_info gicv2m_pmsi_domain_info = { .chip = &gicv2m_pmsi_irq_chip, }; -static int __init gicv2m_init_one(struct device_node *node, - struct irq_domain *parent) +static int __init gicv2m_init_one(struct irq_domain *parent, + u32 spi_start, u32 nr_spis, + struct resource *res, + struct fwnode_handle *fwnode) { int ret; struct v2m_data *v2m; @@ -252,23 +254,17 @@ static int __init gicv2m_init_one(struct device_node *node, return -ENOMEM; } - ret = of_address_to_resource(node, 0, &v2m->res); - if (ret) { - pr_err("Failed to allocate v2m resource.\n"); - goto err_free_v2m; - } - - v2m->base = ioremap(v2m->res.start, resource_size(&v2m->res)); + v2m->base = ioremap(res->start, resource_size(res)); if (!v2m->base) { pr_err("Failed to map GICv2m resource\n"); ret = -ENOMEM; goto err_free_v2m; } + memcpy(&v2m->res, res, sizeof(struct resource)); - if (!of_property_read_u32(node, "arm,msi-base-spi", &v2m->spi_start) && - !of_property_read_u32(node, "arm,msi-num-spis", &v2m->nr_spis)) { - pr_info("Overriding V2M MSI_TYPER (base:%u, num:%u)\n", - v2m->spi_start, v2m->nr_spis); + if (spi_start && nr_spis) { + v2m->spi_start = spi_start; + v2m->nr_spis = nr_spis; } else { u32 typer = readl_relaxed(v2m->base + V2M_MSI_TYPER); @@ -299,7 +295,7 @@ static int __init gicv2m_init_one(struct device_node *node, goto err_iounmap; } - inner_domain = irq_domain_add_tree(node, &gicv2m_domain_ops, v2m); + inner_domain = irq_domain_create_tree(fwnode, &gicv2m_domain_ops, v2m); if (!inner_domain) { pr_err("Failed to create GICv2m domain\n"); ret = -ENOMEM; @@ -308,10 +304,10 @@ static int __init gicv2m_init_one(struct device_node *node, inner_domain->bus_token = DOMAIN_BUS_NEXUS; inner_domain->parent = parent; - pci_domain = pci_msi_create_irq_domain(of_node_to_fwnode(node), + pci_domain = pci_msi_create_irq_domain(fwnode, &gicv2m_msi_domain_info, inner_domain); - plat_domain = platform_msi_create_irq_domain(of_node_to_fwnode(node), + plat_domain = platform_msi_create_irq_domain(fwnode, &gicv2m_pmsi_domain_info, inner_domain); if (!pci_domain || !plat_domain) { @@ -322,10 +318,9 @@ static int __init gicv2m_init_one(struct device_node *node, spin_lock_init(&v2m->msi_cnt_lock); - pr_info("Node %s: range[%#lx:%#lx], SPI[%d:%d]\n", node->name, - (unsigned long)v2m->res.start, (unsigned long)v2m->res.end, + pr_info("range[%#lx:%#lx], SPI[%d:%d]\n", + (unsigned long)res->start, (unsigned long)res->end, v2m->spi_start, (v2m->spi_start + v2m->nr_spis)); - return 0; err_free_domains: @@ -356,10 +351,26 @@ int __init gicv2m_of_init(struct device_node *node, struct irq_domain *parent) for (child = of_find_matching_node(node, gicv2m_device_id); child; child = of_find_matching_node(child, gicv2m_device_id)) { + u32 spi_start = 0, nr_spis = 0; + struct resource res; + if (!of_find_property(child, "msi-controller", NULL)) continue; - ret = gicv2m_init_one(child, parent); + ret = of_address_to_resource(child, 0, &res); + if (ret) { + pr_err("Failed to allocate v2m resource.\n"); + break; + } + + if (!of_property_read_u32(child, "arm,msi-base-spi", + &spi_start) && + !of_property_read_u32(child, "arm,msi-num-spis", &nr_spis)) + pr_info("Overriding V2M MSI_TYPER (base:%u, num:%u)\n", + spi_start, nr_spis); + + ret = gicv2m_init_one(parent, spi_start, nr_spis, &res, + &child->fwnode); if (ret) { of_node_put(node); break;