Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753850AbdHXUiO (ORCPT ); Thu, 24 Aug 2017 16:38:14 -0400 Received: from mail-by2nam03on0067.outbound.protection.outlook.com ([104.47.42.67]:63519 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753021AbdHXUiE (ORCPT ); Thu, 24 Aug 2017 16:38:04 -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: [v4 04/11] soc/fsl/qbman: Drop set/clear_bits usage Date: Thu, 24 Aug 2017 16:37:48 -0400 Message-ID: <1503607075-28970-5-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1503607075-28970-1-git-send-email-roy.pledge@nxp.com> References: <1503607075-28970-1-git-send-email-roy.pledge@nxp.com> Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131480806830180164;(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)(39380400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(81156014)(81166006)(68736007)(2950100002)(33646002)(305945005)(8676002)(7416002)(43066003)(356003)(105606002)(5660300001)(50466002)(48376002)(50226002)(6666003)(106466001)(54906002)(498600001)(189998001)(5003940100001)(53936002)(626005)(8936002)(3450700001)(4326008)(2906002)(104016004)(47776003)(77096006)(36756003)(86362001)(85426001)(8656003)(97736004)(2201001)(76176999)(50986999)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR03MB2264;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;PTR:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11OLC008;1:bIP0IkRXUBjYWYfCSo1eM/plNwUwoKRRNx5VMGjbspUee93RLaHYl011DI7KTeBsCe6W5Nb/RbG1zRH5Ygp5MbjLRDKyGY6I5DrBbcOlZHvStdQoNFjtfjewTfKX90Wy MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5580f918-b59f-41e1-0744-08d4eb30045c X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(300000503095)(300135400095)(2017052603199)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CO2PR03MB2264; X-Microsoft-Exchange-Diagnostics: 1;CO2PR03MB2264;3:VkWA3iVC3PX9UrIu2+FBCgKkbYEloHXmPUQaO/tqFj3i24ktQiTKil5Tdvp3i2H5hkbP3e3GNlI0sUFLHVjfS3c8hCh4ILmqyn3yd32IY8G39t/n2hZQJGDxIRa0HiP0BxLxgEfynK522CFUy4hNl8SJ/KyDaUDY1/A+BtxP87aitdDzC/prfd2Nz+T2f/+gSYhM3uUaPqGn58KB8FW9ElHrhqePGWkx81V+0XB9mdqX3K7ejObp8XxMoHoJOZuteoNujSbWuskyNn5z9RLzQPttemmr2RlrvV2lILBgsl0rjIn09ECvkubdBw9HQq1LFz96QV8+2QJquu+H8WuHTMh/QqAHxQ1W1l0VN82R7xI=;25:tLY54lpI2N17LmjrW34LVCAjtf7iIDewbSbsS+LNvJqscy1lQ/w+YcKlKbCANZtGyFTf685T4SgdTnad+i0t0lqTks7gIoxtvuBDUrwOmsXEhVguaL0t+utfwJbsTBUsmMyIAu2cFsyvQuz0xqWrby/tbHy59Ymzal01CHbz0Tk0/s1udLWrCNYJefyjCZTiSF3pV235bWgSFKYGgIhB9sLSvwcjlrRn0Dlo1RD3NCoNbG8tySYcVLxdu6NzszTJ2NhgKLhdl2JO2NBayoClV3Q1iZxt+myGTIQS/32/FKxpKGExYK1O8M1OLwuCqTpRUQBJ4VsVJKn5vnfpkHIC9A== X-MS-TrafficTypeDiagnostic: CO2PR03MB2264: X-Microsoft-Exchange-Diagnostics: 1;CO2PR03MB2264;31:jU5MAUJ1f+3lM/aa8JqKkrjbVfyuRnmjnVhgFt4yRPetMJ+o2bp0vMf1hGG2lWx8R6NmSEDDEEK+plkAmG4Co9DVc4Mmid5xnAhJyqfJ04G10Eek1Y91efMQ5evlQQmA5ThWZgDBaranHY4MU+EcPqYRRMSuK6it1sor/keKI8BFSaPULBrIwQAPBSK5a4KhyHaqZERvk6Nldq02TieRnCkBHF1QXRgraPTkvr/9qMc=;4:+B8AhbKBUeXKmSM88gh6q2wr1HBdCAPFEVImzjgJfDALpFE5XEx0UXlouS5iE1adKHXZ81ZW+LzCEx0MabwVsNGNAxFIuR2nN0KyDw7AixF9y7j4LXIgAqiQb1+R6hmeBaGnFBMjBuI/FBFbuMrlChkRg8QIhUgbSkvWscE/RouN52fJM+GK1Bcw8+UjgSHo9kyL24c1Kzyi2TCyj5jUbl2J/LB4IsEhda3VHpGJzE0D5DQwud9lBzm8NSSxahtcc5sddfA6Rf2cjO2esh7CxDWXuFxkFtq0hYW0YW1ivAmi+CV2B99EcM8sdEjS9+SfR8WN9MgY6Wc2FnH7CtycNA== 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)(601004)(2401047)(8121501046)(5005006)(13018025)(13016025)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123563025)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123565025)(20161123556025)(20161123561025)(20161123559100)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CO2PR03MB2264;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CO2PR03MB2264; X-Forefront-PRVS: 04097B7F7F X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CO2PR03MB2264;23:8qHTh9O6MlBAOWLod78JzoVfZamPsHUdmrX4S3yJY?= =?us-ascii?Q?McRoe/PxvQLDm5QTZhQ0RuZCJ0aLpL4EEj7JxPy29tdzmoRiGYcFOP7ovXaI?= =?us-ascii?Q?kThZmsHXDdd/LBFOzTp1LC4pAJs+MSkxFehBgFKD0skejU5DUpfKSSF5sN1W?= =?us-ascii?Q?nKVKkIrDCGt4uEMjTvOZ3UqHjKI9G+1R9RDt1/ynXFzTRkLTHbn6StveOU/M?= =?us-ascii?Q?pRbvxVo7Co8iOaOS2OodiFYyliBTufQwSnaxg8vTjBpMOWgGMh2XUCqcWGqr?= =?us-ascii?Q?2/MvqptZXe85CPBEr4OlQERrLK53+KRmDCPwaeTT3Hf78sGlLuag69puOyxf?= =?us-ascii?Q?5rsWNtljquieOGnmX85xlDzPRI2CAqJD40s2yHYjEe7b3CXGTJnM/tum32P+?= =?us-ascii?Q?NoLqu425eQGHjLjeZVpetd2NXegpfg6W39oyKBqkUc4Ql9pdxtraGHUp1SLz?= =?us-ascii?Q?RdZI00koGlkd69UrebkRU0Bd/LvBOd53HKnBaLHNTA5Rnsin1c3hiPWtEEJY?= =?us-ascii?Q?i/ROqgBkLDxudIk5Eq4AuofAVpkiE2KHC97us0eRQWtTeMZnVY6OOuWzzQ7L?= =?us-ascii?Q?4/3U1xDUzSMnUQ+dfISClZdxmdOt1e8QWob6/daSxMjXPNq+nvlU1Z/+i1BJ?= =?us-ascii?Q?8phfB+1syhvFjr09WNPT/K69a8GS4UEV6aSlrrXwBZQrf/C9/NyHiL1mJ9Co?= =?us-ascii?Q?z33Qk0gk1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EDs/b06t+Lpg2RhA4OHyjU6M7wC2+t++JgglrXSPwyxUx8X7kSVkVj7NA3s/PA==;24:LL35VH5CtM7DS5sLQ2AlM9+p4YXjGd/D3PyzY8iwNmFsJ9cGK+YK/sfEahGfcZ7nCCnO5z2+8fr0aM0P/+czFi7XNZQSualOfrxU79Cnp0A=;7:p6YNroZppBUXIXqFf1bCT7Gqy2nybP0dee93Hgkau9lKqbgBz6rdVflHotoBzj54t5Yqhc9fSamFk7NaLKpKqnhgeMYfovOIX9Jrk7yR3EVsX4b2JMqbK+3I2UGvVGj24TdIncVgGGWPMTr6WPKaz8RC0sDnDDWkwT0BANzP1J/carblkLMcmmKt2R70xFJ5IktZThI5ewjz1NG2Ul/sXH5gFhnokrYK4NOAXuhQO+g= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Aug 2017 20:38:02.8308 (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: CO2PR03MB2264 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