Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751833AbdIRUmQ (ORCPT ); Mon, 18 Sep 2017 16:42:16 -0400 Received: from mail-by2nam01on0070.outbound.protection.outlook.com ([104.47.34.70]:49328 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751466AbdIRUj5 (ORCPT ); Mon, 18 Sep 2017 16:39:57 -0400 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; From: Roy Pledge To: , , , , CC: , , , , , , Claudiu Manoil , Roy Pledge 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> Reply-To: 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 Content-Type: text/plain 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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QJQQ==;5:qqH+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 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2106 Lines: 65 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 --- 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); /* -- 2.7.4