From patchwork Wed Dec 23 00:24:23 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suravee Suthikulpanit X-Patchwork-Id: 7908141 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7FD5D9F1AF for ; Wed, 23 Dec 2015 00:24:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E9E220383 for ; Wed, 23 Dec 2015 00:24:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5236D20374 for ; Wed, 23 Dec 2015 00:24:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965265AbbLWAYi (ORCPT ); Tue, 22 Dec 2015 19:24:38 -0500 Received: from mail-by2on0056.outbound.protection.outlook.com ([207.46.100.56]:16608 "EHLO na01-by2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933603AbbLWAYh (ORCPT ); Tue, 22 Dec 2015 19:24:37 -0500 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Suravee.Suthikulpanit@amd.com; Received: from ssuthiku-fedora-lt.amd.com (165.204.77.1) by SN1PR12MB0448.namprd12.prod.outlook.com (10.162.105.141) with Microsoft SMTP Server (TLS) id 15.1.361.13; Wed, 23 Dec 2015 00:24:32 +0000 From: Suravee Suthikulpanit To: , , , , CC: Lorenzo Pieralisi , Will Deacon , Catalin Marinas , , , , , , , , Suravee Suthikulpanit Subject: [PATCH] gicv2m: Miscellaneous fixes for V2m resources and SPI ranges Date: Tue, 22 Dec 2015 16:24:23 -0800 Message-ID: <1450830263-28914-1-git-send-email-Suravee.Suthikulpanit@amd.com> X-Mailer: git-send-email 2.1.0 MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BY1PR15CA0017.namprd15.prod.outlook.com (25.162.17.155) To SN1PR12MB0448.namprd12.prod.outlook.com (25.162.105.141) X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0448; 2:/c9xoe3E1R8O2MUHVa7dW7gWG2wX8vIFLJ+kgnXPL6jMdZjfFFiBCTLG0VEjZJEBrsCPerjW5irJNHfRR4jbF/Qgm+qmHW8tl1+B642RSud4NZZlZZHDDcqpUaURbxSEh/lTWPbPKib0fyUotizOuw==; 3:KBFUZdfyU+SwIsk/jsV70u+iaN/2tadsm63YjCAw14TeL7a1YB7YfeLKZJKNOLbVWPsAFTouXeixbmtL/ZXhmf8kSVRjU3Lbc4K2w1PFRNJCx971eodY4/wRclPegTkZ; 25:HSMmbRL3zn+WBIDwt+dwwq34ZLVzjNcT7O4TQii+p/OCKFMfDZEmjNotmpQP2Wcl+tFWxBOp9OI6oN/N9qx9/qPgiv/sh15zxmEBdynxfMmr175ExQMTjVs9IhpuZLH/p4IxyS/viNr/z/qqpYpDz/qi2cIWSDTPNtFY5mMPqURLlouhAQti80E5bQq32r3JZMWGsDxudQEw5Q5s1dauWl8nNznsZZEvumeR+zGhdq2FPrHLILF7qBecF9IKrkj4bF4K8pubYZBSYDcecTz7dg== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:SN1PR12MB0448; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0448; 20:L/EdAhC4N0FxYP/6uPd/wmi446XcwstA1MDImXppQ2dwWqoRg3SbkkwpLi+5Bm/7Uphwp3xMwcNJHR6inJo56WLY0u/us1YQTY+/K79xVlEiDKOwBTIWuT+In6mnupUruI9lHqPYArZZK9f5Y/tdqsjEYn6YPBCHm33iy+U6sCMPSZ4lg/W0NW+sIFTnzETVOqeDhDWNSkYMyJvkUgCn7arDyrnw+odX00Sro82yxxEnscW6am7GQj2xKeDUVAlwhyNgQi9Csn1jCx2JEbYisqTDLbVSOxNl5um8NOOSLU2pDHfrv6olZmWwGMuynShJPPkayQCmLbNOiia+gl/gyg07ur4viZOFJDKxf13wfubiiPEI+p836b7Xr7P+VD6EF+3OXWBIdXQiIfbkeAJNf3L3KsET6gHMz8Au5ZINt+mYsSON+6LG32mntYLkCEUnOybEtfIFBsTuprKZy99Dp8snFiC/6FV2ANt1wjGHhkvMRiMouxZYFXkJ7oVNJgZL; 4:7+u24PMFr+cx3K+US7mPNhi2GJxnNIqj2uyDfpKKjPoEoYpJly8cweuNFn+3DTB5w3HO95WOP06Xlkg8X6VnhdBABCc3jmZI7cKkmi6OrYz3jySrb3Yk9nM5bkKDvADpeyViyAmoJemEaNImg9406a4atSpVItZ2/X/KPZAjlKEXuzlH2op5XP4aOrYgju88m91OfNG1URICbcWFKnTCCjzRls2H5jp1KVRctBJreu0p95Q9bENcMZtFnJaZ3GACE2yZNyvaKpVox4d76kRtojC1/TP35c4HcUI1t7EwQppbrKKwUIigfNfVeGyZDp2UQ5Vha6+LJIMioxg6g7VcbsKWE3WyMWqSpbji1N7MpUko2rwDIWy4cxkIQm0niFLENglSTVIgZ/CaRpmwmCctgMvLxMSyrqcfPw4C6Z 2B9kU= 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)(5005006)(8121501046)(10201501046)(3002001); SRVR:SN1PR12MB0448; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0448; X-Forefront-PRVS: 0799B1B2D7 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(189002)(199003)(164054003)(106356001)(50466002)(19580405001)(53416004)(47776003)(5003940100001)(50986999)(2201001)(42186005)(50226001)(87976001)(19580395003)(586003)(40100003)(101416001)(229853001)(86362001)(5008740100001)(77096005)(48376002)(6116002)(1096002)(97736004)(36756003)(5004730100002)(189998001)(66066001)(3846002)(122386002)(105586002)(92566002)(5001770100001); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0448; H:ssuthiku-fedora-lt.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN1PR12MB0448; 23:5VQrWcyQ1aMa8XAsNMHAHZ0Pj2qeGYc2uGkYIy8NR?= =?us-ascii?Q?jK2XckoxICRWm/vdU+5uQDTK1vA3WcUqUB+mFy2vnlDs9xtlUWC2AJLlAhJA?= =?us-ascii?Q?qSEjLny0fYxHRTQcLDrEfsOyM9nr2kjaHj/yxnnFRa3V8OP6GVjf/Cd0Zwsi?= =?us-ascii?Q?SH3u+E+zZxUeOm76QiNt3+r847csoTHhW9bdd53S+PnA1PFbFv3rEBg8/9m+?= =?us-ascii?Q?gGjLlFFqU5I4xfrsR9SSoKKfdcjYtB6bl+snKtMMi6NYCsrai8ip8pY3bwqG?= =?us-ascii?Q?9ESA3PUnUoeWsw9XYmJJ9Aq3LXTa8ES/6DC1TFele036CyX4jo5ES03cWRF/?= =?us-ascii?Q?OzyHwGwxF6z8C9B5Lt5EeIlXT6A7zfFBRJ9hIB07nwJNJ1yL3mOWrR9sqqex?= =?us-ascii?Q?dbLkutVTe6EwmmD4j5klyXFxQRZvJJmgfMv6r2e0r1YeOyLU9RqqTEynOszk?= =?us-ascii?Q?M2NZSnGSguQPSQg9yeq1qc+CLLh0AM3TDlIJ2nwcnMRfQTd/OHSw0UJRfkS1?= =?us-ascii?Q?LJVOWHuwn24vxueeBLGpx/hW843ez39xdr8FvllxYYTsoR4Ksmv2bYzW3k56?= =?us-ascii?Q?kmmjOaERe/v2PNUWunJJGaE0QCms74i67OkY/r1WLxy11GEm2JLazhKAx6AJ?= =?us-ascii?Q?ptQuH5NJCk8g46H4jzr8hgrVtM0tP3+1VigKUw+rijm4KWigk2trmSIGJtWT?= =?us-ascii?Q?hTpt66tAxap3OjEVQXblkhr7MZiCMdENuRqn6KokYzxoDP932w3HdJNnlN4t?= =?us-ascii?Q?Uz/CKdZmRaP4RIv0rnga4xu2WDKwqAI/GtThGhvq05G8s6YkVzZZN8HfF0K7?= =?us-ascii?Q?1dqI/CwVYOHfPYnEFr4s9pjz/aXmWfCLjvLjJXL5vR7Uz1+Bo14sMP/V8Yjx?= =?us-ascii?Q?oHJUb+c4BlOvsvRO9SkhnTeUwmCi2wF9lXJyawmJppTCTBe7E29h1fsyDwTE?= =?us-ascii?Q?WCPXiQziohlTCvyDYqrIvlBCKicZpbnH0wVqq7R2w=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0448; 5:FUXHc5vteLZavbi0JwZ8bhXF+DFhBlJdCevb9bU8etRbPDSkjdAGDOJ3KE/OEpC3KZJ+C/O0YZGJHL5Rcikf88xmHmSCky05He7q+HCCqx1bkFK8fGWnvjFrtjQZjqTme1+W1O5KzaZ1Cq9IuLRAQA==; 24:b+fJc47mbwtlXZ1SZYZxqiKSVj1+blMh6ty2hyVchsSKbS3GZFwjNoCr2Hwp7sN4e77kvfII4EdsqgRecfIJ39Zl2C6NlWK/SAs6Qr6feik=; 20:mWabLQmlAmeFyKy711R3d8+PBV6I2tGMQtxZdu+O3KKS+IDsPhZZ8IZUPJiwpKFVSl/Vf/56y5+oEuDW4JmeL8WojmyvZKt0ZqjCz/P0zSB2NpZ4ZGV5t0eplvLu+a5eei+PxyizVhmbvqTHVHhMy5f+fyX7CgNsAICmgTXC1gM729H684K2uzzozIsMBBAzLGBP5ZyqB27H0F3SO8yXhRBYmot38LKJHOUodK65ZRMuqaT+sEDTXUgmDmFp4FE2 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Dec 2015 00:24:32.8126 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0448 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch contain fixes for v2m resources and SPI ranges: * Fix off-by-one error when set up v2m resource end range in gicv2m_acpi_init(). * Fix the off-by-one print error for SPI range. * Use %pR to properly print resource range information. Both ACPI and DT should now print: GICv2m: range[mem 0xe1180000-0xe1180fff], SPI[64:319] Suggested-by: Bjorn Helgaas Signed-off-by: Suravee Suthikulpanit --- Hi Marc, Sorry for this minor last minute fixup. This should go on top of the V7 of the GICv2m ACPI patch series. Although, this is not urgent. Thanks, Suravee drivers/irqchip/irq-gic-v2m.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c index 7e2975d..5f346ea 100644 --- a/drivers/irqchip/irq-gic-v2m.c +++ b/drivers/irqchip/irq-gic-v2m.c @@ -365,9 +365,8 @@ static int __init gicv2m_init_one(struct fwnode_handle *fwnode, list_add_tail(&v2m->entry, &v2m_nodes); - 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)); + pr_info("range%pR, SPI[%d:%d]\n", res, + v2m->spi_start, (v2m->spi_start + v2m->nr_spis - 1)); return 0; err_iounmap: @@ -456,7 +455,8 @@ acpi_parse_madt_msi(struct acpi_subtable_header *header, return -EINVAL; res.start = m->base_address; - res.end = m->base_address + SZ_4K; + res.end = m->base_address + SZ_4K - 1; + res.flags = IORESOURCE_MEM; if (m->flags & ACPI_MADT_OVERRIDE_SPI_VALUES) { spi_start = m->spi_base;