Received: by 10.213.65.68 with SMTP id h4csp1668883imn; Mon, 26 Mar 2018 12:07:19 -0700 (PDT) X-Google-Smtp-Source: AG47ELv78M3+ggGI5tk9q94VBhphwN6loIR3Jjh4GwK1BLTfzhm6nNl1HwI0OBb1Y9muCjOste6i X-Received: by 2002:a17:902:848e:: with SMTP id c14-v6mr42671540plo.139.1522091239890; Mon, 26 Mar 2018 12:07:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522091239; cv=none; d=google.com; s=arc-20160816; b=h3gzdRWdCtZkcz2ivyFlQFHrygMiC0lG0yzReksvAgUl8E9wJlWnYKGbSydmSEwGHy Jr/8wmfC4paUYDURJPnGIpUo5tOUxcid5cDupqhyP7pxcBfFofqRmKLgn9rUmNfU3+93 6DUaebAxy+KCPCNbUV0V3kdXRsa5ffanKCuyeMjpozXV9CVfmOXakb0F7G5mqTAreIqv QvBlwo35dRF3FR/spLt08eei/mDW1PTpAj0YUT2peheoIwzC+kO08a70Ep15NcUuuCZX iN6zKW3moUwDHiETrW0r6RgGngE18PKcvQUb+ynVcGaiZP+MWBpgzWYOAV8S9uq7nFVJ 4LdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:reply-to:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=FeoXdb5e6VQYQPu+9uMQFYosfGU/h/yzA9lSUsJKCyg=; b=CWkEiRWGqD4/yH83Js/UJHi+aJg0I36MH+BE0ywdMjaWnAx6m4mx+iihgnyKc21nuV oB4V0NPl3cwbf34EaqaeXbC2rwGsT1x6fBDglhFTQQ6ak+VfQ0q2xbdGB9wRZi8l73GM GWLmF6bsj4up+AvwADISKZzrV528Yal8XpqefFAI5JjcTZr52FxHvTLNeiiO89G6vnnX vVy/zlbZL9EfTtMW7sQD/UISMQJo+A8XKpUjDMm8nMaYV139luWhgOAA0ckWC5Fx1qQJ p+PMvCBmk5tt+g9dz1M7Pq4Wv0hiWEN06E8bQUeXEHSfJbqsXavi/14viffsEkBmlgBZ c/aA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector1 header.b=QkwIuRXx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z2si6780956pgz.328.2018.03.26.12.07.04; Mon, 26 Mar 2018 12:07:19 -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; dkim=pass header.i=@nxp.com header.s=selector1 header.b=QkwIuRXx; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752128AbeCZTGE (ORCPT + 99 others); Mon, 26 Mar 2018 15:06:04 -0400 Received: from mail-db5eur01on0044.outbound.protection.outlook.com ([104.47.2.44]:37457 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751903AbeCZTGA (ORCPT ); Mon, 26 Mar 2018 15:06:00 -0400 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 Cc: linux-kernel@vger.kernel.org, ruxandra.radulescu@nxp.com, arnd@arndb.de, gregkh@linuxfoundation.org, leoyang.li@nxp.com, laurentiu.tudor@nxp.com, stuyoder@gmail.com, catalin.marinas@arm.com, horia.geanta@nxp.com, Roy Pledge 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> Reply-to: roy.pledge@nxp.com MIME-Version: 1.0 Content-Type: text/plain 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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HFDGhvELd2FjJwIR1T3L20mXRKpg0EG92ZVSOG71I3fYYhH2/dcOyqK+RcOKm0DPT0ndK3OST5k9fXt5aCFkuLCUpaDwy/EsjLfNQuB+1kYs4bfpcgLmzZct6noa0bnDAYJsu+YKX3DwRqKUoRhlxlmTGwLpxa1a8cS1R6wRBYcY8MPvgzBzhBEgLX0jEaRPPBLBx0s31h7NKbMbhxHUCcqpcm+VRtkhrHhwNUDkBkR9b+nQFNPJgkBEUE+FSp14uAt60WLi875jeNaF5pYnjNdLbJcSSssYzQbYHrBaIHjJI9tDflXiStWqmyiDSC1KHDwJXFgUeWb2uhKRh7r5obMsaEPF/Vww6jsZhqVtHarjLKYkg8TV5WArY6DO5p6av3xO5aLg9Fm8bJWGKdcIr2RaPg;4:UbrESDwZq8dj1hkZ7Am24sC5hVDIk0kxk4eR7CF8GYGt/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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; }; -- 2.7.4