From patchwork Mon Mar 26 19:05:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Pledge X-Patchwork-Id: 10308511 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EE162600CC for ; Mon, 26 Mar 2018 19:06:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DA5C52975F for ; Mon, 26 Mar 2018 19:06:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF0D329767; Mon, 26 Mar 2018 19:06:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 43A762975F for ; Mon, 26 Mar 2018 19:06:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:To:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=h5IvBXgPC1gpHXa7Picm+gP9/TwxEi35jzfysTkx8XE=; b=dBZWV1VzbUxv5s RoJkBdKTF9miMGZ+JDVzuBpTdXiUIVtstqS0fJD9AzeGJ9DsQ7tgGNHV/96+nVtjCuDIyGLGEkPez 3dY6doSALvW/Iis9L7JR70seTQhON7b1voP0bh/kZ4GmhgAePCUriQZDeJMXMHmc6Zjo24Ygu++hg pkCMzC48Zyqk6zZo99oNVDR7QVAn38aLyzqFf7tCyEM2dK8OVYVz/89rVRkxW/8uxsBvg7+iX+fhO ijw7Bb80Y6wmWcwwp90QgQr6LWrAFDkMeG6F/NaLzaaNkkCmV6AQ1iQm8JOpnOzIs+ep8iN3mKsiY tVfN8CW4g6sP6qMkKFOQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0XRz-0002dG-EU; Mon, 26 Mar 2018 19:06:35 +0000 Received: from mail-db5eur01on0074.outbound.protection.outlook.com ([104.47.2.74] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1f0XRe-0002L4-2t for linux-arm-kernel@lists.infradead.org; Mon, 26 Mar 2018 19:06:15 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FeoXdb5e6VQYQPu+9uMQFYosfGU/h/yzA9lSUsJKCyg=; b=QkwIuRXxcTmbj3M7/vORFq8QKuBJW6h2JWL+Z3laXgcATrVYnkpAkz+VxlcLP3e0O2DlGnt/RuKfpBdRdG9BlsDOIyiDOdvCAihU5x9rfq2UZDvfDdN3PPwFqieyD0x2jVrDtSpJAIuY25pzRXkPeuJAKmxZ0dS0sduvmpk/qw8= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=roy.pledge@nxp.com; Received: from otc-sw1.am.freescale.net (192.88.168.1) by AM5PR04MB2993.eurprd04.prod.outlook.com (2603:10a6:206:a::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.609.10; Mon, 26 Mar 2018 19:05:55 +0000 From: Roy Pledge To: devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 1/4] drivers/staging/fsl-mc: Use memremap for DPIO cache enabled area Date: Mon, 26 Mar 2018 15:05:31 -0400 Message-Id: <1522091134-24646-2-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1522091134-24646-1-git-send-email-roy.pledge@nxp.com> References: <1522091134-24646-1-git-send-email-roy.pledge@nxp.com> MIME-Version: 1.0 X-Originating-IP: [192.88.168.1] X-ClientProxiedBy: DM5PR1501CA0025.namprd15.prod.outlook.com (2603:10b6:4:9d::38) To AM5PR04MB2993.eurprd04.prod.outlook.com (2603:10a6:206:a::25) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: c55278ea-c5b9-42c7-9d46-08d5934c9b8d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM5PR04MB2993; X-Microsoft-Exchange-Diagnostics: 1; AM5PR04MB2993; 3:qxEIp2AwVb647U5VjmxYPAoTNf9rNff55MTgW322fYhF7N7jswXtu8AsUdpZD3fI5VSK/RfpX3a3kyhR5CKRGm7znuOBH6fg7F3P29/IPGEw9eWZ3ln0H8VAIENT/d7iIs67nlRPlwK/6hzNc8jng1ASnxsWgsMUevh5Mc6BUzC8Qw8XaFV+QExnIpOcqU5GZzyw63pGOSK5Wtsxeb4aIOPIUU/HgUivQWqUNl48+roo7OKCpeu+h64o2x14GSK7; 25:iIhiJ1eEALCQgwWgy5ZWtjJWTGZ8VLHziOi3e11G/eszNPC0ByHgLoTUNcmo8MARUysoFIdypvfgqLMatYzPApOtvBw7S91QfwIHxI84Mfm+gfYu4rOXjv+SbV5gsaTJ8Lz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0kxk4eR7CF8GYGt/ynqZ1af3Y95hlrWmhFSyGKmUJXZKZvuO+lp0VH9v9KwllZMLcq15uK8Y6/rHJPJy4Eyzq7kZJWYeEIyinHro9J/wvLXfghkrft+ICvLfZdhB4rgPvnTmxee9GWJWwfOcrq+tbYjcJQlu1nCwhsCczDjE6sSx56HDgtdAaJqRuFDX7SHqWfH3kwKZAUSQc/g9Wcd3SbMkxZoy6Weth3PnNU5b3XgiTf2ckbJzSFmnJgaw8Ikxktp3SMfnvlMt4cLY0ueZ5XxiIFXp2N9WvyHBY87YjudyGsC884NNUFLv4Eh39h2gS5Eftgp2STJNSg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(6055026)(6041310)(20161123562045)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:AM5PR04MB2993; BCL:0; PCL:0; RULEID:; SRVR:AM5PR04MB2993; X-Forefront-PRVS: 06237E4555 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(979002)(366004)(39860400002)(39380400002)(376002)(396003)(346002)(189003)(199004)(106356001)(66066001)(478600001)(47776003)(6116002)(3846002)(2906002)(186003)(16526019)(26005)(68736007)(51416003)(76176011)(86362001)(6666003)(36756003)(43066004)(25786009)(6506007)(305945005)(386003)(7736002)(316002)(50466002)(16586007)(105586002)(39060400002)(5660300001)(97736004)(6512007)(3450700001)(956004)(8936002)(8676002)(53936002)(2616005)(11346002)(446003)(4326008)(48376002)(6486002)(81156014)(81166006)(52116002)(50226002)(476003)(486005)(486005)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM5PR04MB2993; H:otc-sw1.am.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM5PR04MB2993; 23:S/GkfZUdqDH+degKshCMNyVYwYaVJ1NHK1jM8tVQi?= =?us-ascii?Q?C8ucOW9j5hWOpcTdvjNuURVH1eMWRHj4qXxXpmj89L/jtVFH097V2vNSkqza?= =?us-ascii?Q?DigVDUAOdSIWwoCY248Isr0toEd4m1L20DzMh85/2xbhoLuUPXiie4f1FLGC?= =?us-ascii?Q?8QdI0PiWffqV8FdeNv2jniuRGQdgp9X8SyyZiuOLh9GU9x97Y3IPJKN52hDW?= =?us-ascii?Q?MCT6J9ldhpcw7GN/0msZ6oKoCUHG08kCkigHMlPgl1JsACh7KqWVf7QhjBg7?= =?us-ascii?Q?zh6TP5ELj9TJ0hkaFixtCMiboWHI6kS4RHjraD4CDyb0RIVjgeTKyyRJQhdp?= =?us-ascii?Q?ecRfl2NVyYLyewhKqMOliZl1graBkh/BjSyO+WQcbGvHXWAzwQOZIVP+e08u?= =?us-ascii?Q?wRQeL2MDYrMCptMZLZRatrwNC3rYDA9J9MsBsRrVXkrwbDUYDoPDREilc8oa?= =?us-ascii?Q?W93LG6sngeTXREu8jQEwqeZ93k9iL4tH5HtYeKxhF5kolXUUlMj15O3kE7Yv?= =?us-ascii?Q?TtnhZYGazmGvXsraUl1kXjjvj7H5oIZLm5AW834wbcbRbvR9wxOqGe2xdMKl?= =?us-ascii?Q?a1VqA8xdDJh1plLVBUMB4nzXLAu06iA3hO76i99Eyxs7eoeNHb0xA6lOEenh?= =?us-ascii?Q?30jgSF8FLW3MnD4j0y4BBIR+VkTaCe3OBKn2koFo49rL1rtRMbgNHvb00HXq?= =?us-ascii?Q?p9AOBYvpanDJ8mTDNpmQ0HqtTf1fLZzADhLYc9khyXUNU0YOG7YVy4TI6++z?= =?us-ascii?Q?HWEtcWw2GzM089SA2kjF69axOQiamzFABMj8IQAyKCMgEZySGO+PBbQYQXz2?= =?us-ascii?Q?hn2djiOSTcfKiTEQQWhcgwyJSsslQLFGuggih20KjeEtdkgQx0Ya0Agtxpef?= =?us-ascii?Q?FwtV9AyfAySbum1cKku6punNHl4FQUZtvPRhMrbX4xU/fVF/31DxFD2oL/ii?= =?us-ascii?Q?LvLnTz6vGy2hbA1koypAbv4LRJUuaxwQj2+GYXfDb23IHqlHEV2Y03uERA06?= =?us-ascii?Q?guNi52ZweKGtBYExRN3oUS3IqrZbQsxv6vq8uaPEK3QvVYzhg1AE6ECnt109?= =?us-ascii?Q?3KNXeXeQ5+2AZMKrr4t2WMfZs5v2WQACDyIzeGibufG3NVNPimrOWZzOcCQx?= =?us-ascii?Q?ApGL19w5iQ864Av3VX1RrcW9d+56uZs6n8VIFvh5k4qZHT5X2x/2dAKhsw6l?= =?us-ascii?Q?ISnf1m85j/yoRxf1ynotSXGQRg35Nv4z33XxkjuoKpMMDF0wLmtTvhS0hJDY?= =?us-ascii?Q?+eet5CQI1dO/EIIZbYfRV5P5YN9NU+hDj5671mo3a6Y5qEODG6TiZJ36t6w7?= =?us-ascii?Q?30aXCjjMkDNDHakyGAbmxHAdc7q1Up9wyF8UdoGDCYU?= X-Microsoft-Antispam-Message-Info: dF7pne9q1oTak9S2Xbvo9ePIQ5xMJ711uK3m5nNE7oY1S895xJTVrULSIygHUjzV0zkXrzGjuuVsjFimDMApfpZygml6JVJHuEoGo8DzMvOZ6yvTOjfrv4YhC7VKe4hsBlzvKDdiuHDRSAxpsbJR3sky8BtpJoNHJ8Zh+AjJIRNT2uezMWxYHg6TihTm8T9f X-Microsoft-Exchange-Diagnostics: 1; AM5PR04MB2993; 6:T1YCTfvMkOWCTQ1fUZbE/CtdMN6Hru2sCrn/rX4TOXFLPJnplSXCc9t2FTFkLspA8sBohrGp+Vt8L6xHZbtgXA4LxzMyliqVdruLgO6jU488rdadyP1b3A3oKvkzE/xVFqPcc09An5T4pTCvYSH2fnJl6gVc5+NyE9qg57dKOPQb4Hgi/6o5K0jGAl1hogCUNHizkyX/CrIi+mYL4r9g3OE0atgbw7+GyMQ8b39xfk8UF4PHqMBFLv1IQx+3ssp5RzisEiUA4s5aa0yFpKLePgt2ptyscISh9fzRbsyJzZO2iamBBZaHwSLlSDUimoHqIiCX3vygkBOLYyR0B3w+wraKFq69fM/2JD0Fzosvk4iUSAgt4sTwbjxdzPigy50OG3T/csACt2oe5y4RLc3oNYWM1zL97uOEPyLu9dv2/3XYi8nek49H7E5fDw3qGWmVK1E0ctDd0NeK0Z8rzoriqQ==; 5:7WUTfz0W8VicubC6Qb3MKBQhm7CvS5tZNOx+A8g+sJEeHRAe6PgJwZA5Ont0Tl+7ba8cn4EKUsWvp/l41grVkpqHmxrTiumMF3d0v1B7xj+kX6PS9xcfbBlELAZGGDnFIWtuEaIpW81NraVTR/QJxyYw7z7E6UjnjWweNG9T168=; 24:zVibXCDkN8G/dqx7xkt9pQZbenjSfqX2sqGzS7EQdseM/ddEGRxAb2OMjj73QN7aHGL+qoFvCrla7MA4Gy4oJDc9JH4L/WtThETWhJgwMlk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR04MB2993; 7:URjeDDd5mW28ZoO/T1wzYHLiaW2OtCmyYKToP9JMAVQbamq7vAvyTrNaH6NT5If5zLfyN0/QtfaMnNT5clC5hRl+Sh9WHNsn/DmR0bFxiNUQ2Mv5bVeZdRXlwKDAnDWEbefFIbSEOeX8m1Xop6y6HgMY+5LG4pI7IHPmUsLh/KJB1CqWzJoSjOsgW5ceJY2VaynNB9CzpOXWRihyg4r7IeTdpZQTe8aZR0Jh9V0LgsfHapQqLJc/Ou40TTZ2++BR X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Mar 2018 19:05:55.1580 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c55278ea-c5b9-42c7-9d46-08d5934c9b8d X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR04MB2993 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180326_120614_124822_5DC1BE05 X-CRM114-Status: GOOD ( 16.29 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: roy.pledge@nxp.com Cc: ruxandra.radulescu@nxp.com, arnd@arndb.de, gregkh@linuxfoundation.org, horia.geanta@nxp.com, linux-kernel@vger.kernel.org, leoyang.li@nxp.com, stuyoder@gmail.com, catalin.marinas@arm.com, Roy Pledge , laurentiu.tudor@nxp.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Change the mapping of the QBMan cache enabled area from using ioremap_wc() to memremap(). This allows the __iomem attribute to be removed from the pointer (which makes sense as accesses try this as cacheable memory not IO memory). These changes allow sparse checks to pass. Signed-off-by: Roy Pledge --- drivers/staging/fsl-mc/bus/dpio/dpio-driver.c | 8 +++++--- drivers/staging/fsl-mc/bus/dpio/qbman-portal.h | 4 ++-- drivers/staging/fsl-mc/include/dpaa2-io.h | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c index 182b384..e00f473 100644 --- a/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c +++ b/drivers/staging/fsl-mc/bus/dpio/dpio-driver.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include "../../include/dpaa2-io.h" @@ -146,10 +147,11 @@ static int dpaa2_dpio_probe(struct fsl_mc_device *dpio_dev) * Set the CENA regs to be the cache inhibited area of the portal to * avoid coherency issues if a user migrates to another core. */ - desc.regs_cena = ioremap_wc(dpio_dev->regions[1].start, - resource_size(&dpio_dev->regions[1])); + desc.regs_cena = memremap(dpio_dev->regions[1].start, + resource_size(&dpio_dev->regions[1]), + MEMREMAP_WC); desc.regs_cinh = ioremap(dpio_dev->regions[1].start, - resource_size(&dpio_dev->regions[1])); + resource_size(&dpio_dev->regions[1])); err = fsl_mc_allocate_irqs(dpio_dev); if (err) { diff --git a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.h b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.h index 4488a44..69db3c8 100644 --- a/drivers/staging/fsl-mc/bus/dpio/qbman-portal.h +++ b/drivers/staging/fsl-mc/bus/dpio/qbman-portal.h @@ -15,7 +15,7 @@ struct qbman_swp; /* qbman software portal descriptor structure */ struct qbman_swp_desc { void *cena_bar; /* Cache-enabled portal base address */ - void *cinh_bar; /* Cache-inhibited portal base address */ + void __iomem *cinh_bar; /* Cache-inhibited portal base address */ u32 qman_version; }; @@ -102,7 +102,7 @@ struct qbman_release_desc { /* portal data structure */ struct qbman_swp { const struct qbman_swp_desc *desc; - void __iomem *addr_cena; + void *addr_cena; void __iomem *addr_cinh; /* Management commands */ diff --git a/drivers/staging/fsl-mc/include/dpaa2-io.h b/drivers/staging/fsl-mc/include/dpaa2-io.h index f71227d..ab51e40 100644 --- a/drivers/staging/fsl-mc/include/dpaa2-io.h +++ b/drivers/staging/fsl-mc/include/dpaa2-io.h @@ -52,7 +52,7 @@ struct dpaa2_io_desc { int has_8prio; int cpu; void *regs_cena; - void *regs_cinh; + void __iomem *regs_cinh; int dpio_id; u32 qman_version; };