From patchwork Mon Sep 18 20:39:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roy Pledge X-Patchwork-Id: 9957645 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 B24B9601E9 for ; Mon, 18 Sep 2017 20:42:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2FEE28863 for ; Mon, 18 Sep 2017 20:42:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 941172894E; Mon, 18 Sep 2017 20:42:13 +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=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 C07B9288E1 for ; Mon, 18 Sep 2017 20:42:09 +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=6aLF/nyGKUApvzeHCTYDGJ1zSjpOP1RFfrJGASTLy14=; b=bZGW5FkAEzwZvV +/xdZXitnZWgonRFuDr2zzej+7vLwNbDnFOiVG0nTz2x3L3fxDDlOgQRQvahGhTnKqxm+LYPTonZP Twc/UR3//zr1kUhgYbcHBN2mCXdKNlUQsdxD/YUbXVWBsqov/zhg0epL2hz3ryAR72G5Uqamuy8b3 CbU67Q/IC8HN8Yd1zVl9g/CpIhCAt0w/K4RCyGssA3zVXLsfEhI9a1Vv/WONAsszfCL3igKF55sVY FF4OTzYL2Iaede4jbpDM5R1ppyDOQnpmtX/AmnEjcJ/qq1X2DBXRiXto7CH/2xbj0enmGgyUsGJOw iiSZjkiGokJdtMZrz/Lg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1du2rj-0003yr-Mi; Mon, 18 Sep 2017 20:42:03 +0000 Received: from mail-by2nam01on0089.outbound.protection.outlook.com ([104.47.34.89] helo=NAM01-BY2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1du2q2-0001S9-Qm for linux-arm-kernel@lists.infradead.org; Mon, 18 Sep 2017 20:40:27 +0000 Received: from BN6PR03CA0054.namprd03.prod.outlook.com (10.173.137.16) by CO2PR03MB2359.namprd03.prod.outlook.com (10.166.93.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.11; Mon, 18 Sep 2017 20:39:56 +0000 Received: from BL2FFO11FD052.protection.gbl (2a01:111:f400:7c09::100) by BN6PR03CA0054.outlook.office365.com (2603:10b6:404:4c::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.56.8 via Frontend Transport; Mon, 18 Sep 2017 20:39:55 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11FD052.mail.protection.outlook.com (10.173.161.214) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.35.14 via Frontend Transport; Mon, 18 Sep 2017 20:39:55 +0000 Received: from otc-sw1.am.freescale.net (otc-sw1.am.freescale.net [10.29.200.182]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v8IKdn2q025841; Mon, 18 Sep 2017 13:39:54 -0700 From: Roy Pledge To: , , , , Subject: [v5 05/12] soc/fsl/qbman: Drop set/clear_bits usage Date: Mon, 18 Sep 2017 16:39:40 -0400 Message-ID: <1505767187-4596-6-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505767187-4596-1-git-send-email-roy.pledge@nxp.com> References: <1505767187-4596-1-git-send-email-roy.pledge@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131502407957683659; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(376002)(346002)(39860400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(5660300001)(316002)(8936002)(77096006)(81156014)(81166006)(48376002)(8676002)(7416002)(50466002)(2950100002)(106466001)(6666003)(68736007)(54906002)(4326008)(5003940100001)(16586007)(97736004)(104016004)(47776003)(36756003)(53936002)(33646002)(43066003)(76176999)(50986999)(356003)(305945005)(2201001)(3450700001)(86362001)(189998001)(85426001)(498600001)(50226002)(8656003)(105606002)(2906002)(110136005)(2101003); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2359; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD052; 1:OhkxbYzbVpKvqfq429EU29TmGZCcEdrppQbQVJrl9Q/P9UdGz9629jFUmCyRP4M0wnZxsoIGDU7o9ckrF1lZW2Mi2/Rs2un1CYKGjpJrpxWQQMx0wBJKPB9E0Z0jYEOl MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5d120855-4d97-49a6-bc6c-08d4fed56be1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CO2PR03MB2359; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2359; 3:MswmVmtnP4MOHdysrUFeqbefAmY4i1RHZYMoGnEx892S7lonkwLbinxH/pqhw5nQBGUm1RcFB+JOW2p/b10uTWbo3FRim1VOD6tr0IIEWILvzpOcLwiDlhmQu98MB8acfuWnzqwe0ymSGKzrliygXLAO61K4C6rb/ba9haoI+8BQt9hAPI5eaBK8LQ3tOXH2Zn8MMC4atrvaYJrmLlxdUAoY/Jp6arBZUzcZK2b/4zz01dArGXeiv4qdX8WrnKTcnRDsTFBtzymeSD5XLYQzMyhGH4T2AsmnUTgDVcNRQPEfUciSxZ2aMmVhcPQgweH04VJAjHF0qmvObaps95VFeS+7GsXKHa4YMoHVeTvfusA=; 25:3LzTlDPVZY+KnRgTdkonXS1y3Lb6xDGOpBn0GYjnNeq+KjaHjyIemE8f1PNlokx20KmZ2hd2G9t0F2dfLSHqp6IGgpquVCqOSHllR+lTfy9KvV/d1UL8h1ZsTu+aj1eGj8zfw/k8s83eeTeIK0otMwwp0LD7FT0TmvftIDcrqYYHZblrIxX+P3QCp8VpSbI+9aZhLPNRZGe6PHTvM85//rargQERksFwyqZCCeJ7UyYeO2tpEyvkmkdmg+csN/5ZseYWf4nk9tJCsLJDRZNlx4p8ajv6+kePjDqdBR9xjVq74RWQwZpRDBG7WEtr+aNRKPI1QwoPDQtvxA1g/LxR2w== X-MS-TrafficTypeDiagnostic: CO2PR03MB2359: X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2359; 31:fGxIE4QaROsj6vVnrUxDiInKG6pNOR1veYjX3FcJaAms5Vvx7Wo8v2RhdWs/4Mj+IrP8jHoypbykYRNAKT8KA1MUao9yD7/UILYZGkjrQdb9YwNyBSM9skq+m0kZ9Ud1OznUZw+eKEXIuXW1fugc2wRiUBdOHvYbnveMaaiNqen66DA9bnwRuuls4F+GDjaYIoaz2M5XnGSmJDdNTOeh75Amf46FgxEsn/AwPM/kij8=; 4:pDmZh8x8vuSlF3XZ97FhlqrYKIVgBDeoI4U8Ed/lrH8pIoAaTm/6J6kfE98oQq25EQZDECe0krkKH8Wd4j9O10GPFGbwL7Lu6doSck6I9WZfi3vP371j4N+XtaLmw1k3mDHRK5zJYRZG0QBCRLbTRfCBQHvJdh2jh/PkELk1XaRP5feTCqVGnSS3vM47gAUY/FguOxb97wVMpLVeCXe9BwDxb4e+Y8mA1GZyxO9mwaLW7ntrC9hcwVASvT69RmIjCldp7W7Zve8aWMATKq9t+vTDsiZ0FVyh66RQ1bCqjUvazbQJQCHq9FjVYHlIdN2SS/PXsGR7z/mY1JYgyLe39Q== X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(788757137089); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6096035)(20161123559100)(20161123563025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123565025)(20161123556025)(20161123561025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR03MB2359; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR03MB2359; X-Forefront-PRVS: 04347F8039 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2359; 23:8NR/Yo7M5j9+lFl5br3H/l4ifvlahkvNGuxTPdmn6?= =?us-ascii?Q?HxL/fYYUvGgvNwg4O4towvp0tXJ+xHwlia0iuK5ROLulM45IM8PVaa6GKDhD?= =?us-ascii?Q?OnJtdm9ccjli2lLzkflQKztjrLdicam4vnNFDBW1phMOaPuLH6QFcAbVISJN?= =?us-ascii?Q?JB+JRptSKoYIBAYsEx5EnQfNC4Ntp3K0k5dHxlENK+Ft9dQrh3FNreZxzQzo?= =?us-ascii?Q?WHOCdScQVUiIPBc44+JqVJlgY3zpeN8ErhdmnuOYbx3cxsZDabn63FL7Ffkh?= =?us-ascii?Q?7mgm4dVlEL0i2K6ftSTKu/OqNBWbAN0hRx5i/NJO/BPGExw+FGr/NNRKO7Op?= =?us-ascii?Q?CdSj41lZpUw7TuhZ6ZuGC7gPsnnz8S7XAgnunXZAizIOzjL/m20gcXm+UEAT?= =?us-ascii?Q?iJe+/bAOgR5j8kod1XBI/rKXr3pGzHH7FG25OZXzBrhddnJvicQMH+gSmkWL?= =?us-ascii?Q?qjB1PL7hPQsm1z0KV14V9CK3lFGdN7kYhKw6ijT8TSaQVKNQ1noZ1xg1dMyR?= =?us-ascii?Q?D00S+l/WCHujBz8jZ6u7d2OVO60OoixmI6E3XiNq4+369W7SjAgpCKv5N59G?= =?us-ascii?Q?znln0o5+KqEAV4jmrTgt46egtd0AWRykO3uXH8+0EUrbYJaw6of+7ii1VGZt?= =?us-ascii?Q?VcjoYgAp9qkYVmxX6i5ipIJxjxZIebpBevg/onnlK7X6GCQYw5BK54AvviG6?= =?us-ascii?Q?xt+lhjwOi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H+XKopK140fB1KHi90Ya7bpdtL4eX7rhn3C+yzZEjhLv/e2FLVAx1h/XLx8YwdraA9So0YIwZuJ1Ze2CtZY58goVRotivoR0X4hYLW1n3NRRccph1YxBpKtuadDoOBv0WEX3yJImPrdwUzBPVnTw==; 24:ive3cGDysFjFOOATa/KETaMy/VR7aa3w6JZvkX3v6BrCfQTaQPMz93qq94HZSdTI5KHiGPqLTWT7sTTPq9unG38CpjVgoCZsA6W0kt+MC0A=; 7:UZqWtl3CfTS8hr3q7JEmifacQXQ/KDRlNXLWJpQNqp1ZOCpY168MoPMVs6apqA1RMnI2kE+5C1o6WDdnrjDkzFImuyd+CmD4aiXbluBooT99LombxQnmlPgM7OpZbDntj4yDfwmxen1orWqjPCZtq7Tuqhv2TmpcNtlVjZ22vh8TjJkPREyI8URhAqU8S9t/GbgoPqHVdMN08YxiHmMIocIHmT121fTjoVCs0DvNKpk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2017 20:39:55.5811 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2359 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170918_134019_075193_887D2D7E X-CRM114-Status: GOOD ( 11.47 ) 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: mark.rutland@arm.com, arnd@arndb.de, madalin.bucur@nxp.com, catalin.marinas@arm.com, Roy Pledge , linux@armlinux.org.uk, oss@buserror.net, Claudiu Manoil 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 From: Madalin Bucur Replace PPC specific set/clear_bits API with standard bit twiddling so driver is portalable outside PPC. Signed-off-by: Madalin Bucur Signed-off-by: Claudiu Manoil Signed-off-by: Roy Pledge Reviewed-by: Catalin Marinas --- drivers/soc/fsl/qbman/bman.c | 2 +- drivers/soc/fsl/qbman/qman.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/soc/fsl/qbman/bman.c b/drivers/soc/fsl/qbman/bman.c index 604e45c..ff8998f 100644 --- a/drivers/soc/fsl/qbman/bman.c +++ b/drivers/soc/fsl/qbman/bman.c @@ -616,7 +616,7 @@ int bman_p_irqsource_add(struct bman_portal *p, u32 bits) unsigned long irqflags; local_irq_save(irqflags); - set_bits(bits & BM_PIRQ_VISIBLE, &p->irq_sources); + p->irq_sources |= bits & BM_PIRQ_VISIBLE; bm_out(&p->p, BM_REG_IER, p->irq_sources); local_irq_restore(irqflags); return 0; diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index 1bcfc51..25419e1 100644 --- a/drivers/soc/fsl/qbman/qman.c +++ b/drivers/soc/fsl/qbman/qman.c @@ -908,12 +908,12 @@ static inline int qm_mc_result_timeout(struct qm_portal *portal, static inline void fq_set(struct qman_fq *fq, u32 mask) { - set_bits(mask, &fq->flags); + fq->flags |= mask; } static inline void fq_clear(struct qman_fq *fq, u32 mask) { - clear_bits(mask, &fq->flags); + fq->flags &= ~mask; } static inline int fq_isset(struct qman_fq *fq, u32 mask) @@ -1574,7 +1574,7 @@ void qman_p_irqsource_add(struct qman_portal *p, u32 bits) unsigned long irqflags; local_irq_save(irqflags); - set_bits(bits & QM_PIRQ_VISIBLE, &p->irq_sources); + p->irq_sources |= bits & QM_PIRQ_VISIBLE; qm_out(&p->p, QM_REG_IER, p->irq_sources); local_irq_restore(irqflags); } @@ -1597,7 +1597,7 @@ void qman_p_irqsource_remove(struct qman_portal *p, u32 bits) */ local_irq_save(irqflags); bits &= QM_PIRQ_VISIBLE; - clear_bits(bits, &p->irq_sources); + p->irq_sources &= ~bits; qm_out(&p->p, QM_REG_IER, p->irq_sources); ier = qm_in(&p->p, QM_REG_IER); /*