Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965654AbdDSUvg (ORCPT ); Wed, 19 Apr 2017 16:51:36 -0400 Received: from mail-bl2nam02on0041.outbound.protection.outlook.com ([104.47.38.41]:24160 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S969374AbdDSUtH (ORCPT ); Wed, 19 Apr 2017 16:49:07 -0400 Authentication-Results: spf=fail (sender IP is 192.88.158.2) 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: [PATCH v2 04/11] soc/fsl/qbman: Drop set/clear_bits usage Date: Wed, 19 Apr 2017 16:48:43 -0400 Message-ID: <1492634930-10765-5-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1492634930-10765-1-git-send-email-roy.pledge@nxp.com> References: <1492634930-10765-1-git-send-email-roy.pledge@nxp.com> Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131371085397381116;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.158.2;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39850400002)(39380400002)(39400400002)(39840400002)(39450400003)(39410400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(189002)(199003)(9170700003)(8676002)(104016004)(86362001)(2201001)(38730400002)(5003940100001)(36756003)(8936002)(50986999)(50226002)(4326008)(2950100002)(76176999)(81166006)(6666003)(85426001)(77096006)(305945005)(189998001)(5660300001)(50466002)(48376002)(356003)(2906002)(105606002)(53936002)(47776003)(43066003)(8656002)(106466001)(3450700001)(33646002)(54906002)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:BLUPR03MB245;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11FD024;1:I5aMxpx8jGhQ35E/4XJG8oBABiUNZgZ2EZkw/GVBYfVnyv34i9E3+UJCFLGkR+PSX0H8zORQymLY6wryVNmnu8lfNUD5MUKRPpBNbvYQOSoWYrHGAS9/g1iPYV56rhFdYq8bmVqpVQfUMMG7DXZ0BVgFbP+lZ1t1Sxsxvib87AuLHO6P4YbsqTTZgAbKXF6BSZYuZ+kByXYgS5trtV2nagtKS1XeK9lGKFuKEBhyAyCGgzYhizTINzI0ax8OV/yGgAfpA+6dFM4Y3dTG20p3Ryo7lNvU2tZYzqg+S/6Q1a/MwBs5hJdcA7HkD87cSylNsgC+SOAZklnUFz5lTEwBU+iiBr2cUklG34+7UAsThQB26eELVCXb2oESZ7T9Mg6CzJg2iVL2m6ItMRE1MdNoOn4L1WN19voi33sTcegkefgvuU1C+no5Kig4AL78ZplZJ5dsVWqnfVGIX3XBwLabfrw58cq5P6sxRT9ca44DFawM4imSAUncL1PFfJfIMokbmOV7GRrL0NT6JSzNWV8AdECbBIqpVX4CFrnf44a1HqDSnirXw7mnw14J35GrqFmq91cBreZ/L4KqWkbbCgO/Kl2KNFQC6XtTDT1rj0++h8tNgbFRLs5+ikjLXPdNpLb0pHNQ0D+9FzqpcGOsNGHq6GuFo+tUXv5a+AoCYhah5DtXugbg8HngzwG9ZFivl4DDGUVmjc3mv35pH/CSf1pyrU91EDXGyeJi4p6zRS6H2Wv2xL4okKdH6RkWVeJx+s09 MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 94ddb7af-5e0a-467a-ee9b-08d487658152 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:BLUPR03MB245; X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB245;3:rXw0XSnnavqqeg7BPWmo18sSW+95zgCSS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vhtSZx0JJf9IORwnJvXoCauVEU/1zDbw7W07jXWGzdC6lSlww7yQd1sXH7ZRC9/wOefiL4Bw8VUk96hieXQX9ID95uys4VpLSFo2t80y5QX/HWRj0d+zpfr4Rct7X+boQ0pPT9oU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(788757137089); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(601004)(2401047)(13017025)(13015025)(8121501046)(5005006)(13023025)(13024025)(13018025)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123561025)(20161123556025)(20161123563025)(201703131430075)(201703131433075)(201703131441075)(201703131448075)(201703161259150)(20161123565025);SRVR:BLUPR03MB245;BCL:0;PCL:0;RULEID:(400006);SRVR:BLUPR03MB245; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BLUPR03MB245;4:BPGx8UFiOZL4X5PKP4xuKUxsnFxHUSC5gsG4CNDQYZv?= =?us-ascii?Q?BYhuN8XchAs3F6bCIDR9Jd11+s20jy1F924hGgzr8/jebWA2NvRYGrg3TCXy?= =?us-ascii?Q?K2WTdNWQaMRYXWp0TWN1/zyJs9rNv8BLCpBX2g2r7zitxB6+GqwOHMPnga3Y?= =?us-ascii?Q?qUKQfNAVQ4K+zWxZAaVVoPjtQUKhDRPJ/9g7Cf/wCeFlLG58ZUeJTUtCUODK?= =?us-ascii?Q?5FPEpu9DCMoU+rfCReOYJmNybnymOQR344ms56LvEDIObI2+oY/y5fJvKJjI?= =?us-ascii?Q?JmNRJz4Qk+u+IRdCA8Av1ZrjkV0tJATUpEeUr1jjSfNI9bguet/e5yPoxUmX?= =?us-ascii?Q?H6n1eqyuOne216SSHEK5I0ROD5fo+D6uam3s01gfbdTBa2YQA2yUrx9yXnOq?= =?us-ascii?Q?A30Nb4k2NMafhWQvWCf2sXw8ULVyJ7+YxIObhqlvuaOcv/EuW0Xirtm6yWSd?= =?us-ascii?Q?mpe3KKXS+3xHB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d?= =?us-ascii?Q?h52o78Op/8MbGiskum4s1MKSQI9QU3M0d1kGhhAfB252QXqZlZP28IBuw5rN?= =?us-ascii?Q?IgmFrYcLkiobRTejE=3D?= X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB245;6:Olu/gBIy7m+qVwkFBH2iOg1eGzb7Q7FdAL0JW2EIMoMIIxU3Dci42FWgZsiFf6hxRB7JECCsKoFw5Dt/grPyo7TgloHUsZSEYQ9aLsl/Tstq6ucfXosqZrxECywTlw7MQ38/+NYxqQHtO4Clu+rzRviNGOukUk+bBaZJ1Zpc012GDnvCMssJOt+kIAwPxUEjAs4003/M41tPy7dtqlzM+Mhrb93Flws7S+TVxncmSs19+kx/hYGtV5qLHu4fhHp6eYYO/pXprUUX5s5mW5OgLtjcJmJvyjL3G/f1vqDyHlu3MVRQwsmWq99Zw7v+m7H9uI3WJCEKxiHptqNX4RXCr8W9Q0bRzW8fFaKw6nqcNJm8DOkdeunLmpMZqc1NnxWGRPAMGQpH4S2zUqLJbaYaKogYiKzQrMiPLmc57tdbuQcjC8RQGDmjr28wT2ZeQp9B3JJ5fMkYskF500W9iPwT+mZNmaZY5IVTvDUiYhSfp5lMzztK2Nov5SPzJnNMf9b4yeTyxhWQA9sKISsmhqWnsA==;5:qpbEeos26yBBQIIlap+9owZkzgI01hdhIHC/L2aNS5Z6iBxUNapOXBlwYhYWdhS99UqirZLYYV/EJur1LDdkw8RUVx7E7V6CVY+KS67ka//X4EJd0tpQ7utRQVIUWH+8MqtRUqNOqwoMrknoh8zZMWPSp6HI8uIyopqDkZNnE0R9rKz0qeZnFa0M30Wn3u/U;24:nTdy/UuHI+E2O3fZXOLdadWpmtZ7Rq+1P8N2BdtvricJZ7DH9cUevGeNhFX6HmvLc68GdVX6gVsw6WDCSW9nJ2GpEbI5nStGDlYgj1sLPrk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;BLUPR03MB245;7:XQrAunRntPckk83HOASQXoHVoMEPLRRueRQ3bdmKAXuto1b3qkqvjSZ1nraLS8DFiUxQi3Kccs42EPXgZNscywz5QzMnEulOlNYU89QcHK2O222v+iKCI+EdQtq5wzD5knPo7OpMCl+7VGhB3JkAXbRsgW6KSzzGEIA/Rptt4+dcvbkggYbxlXeSs/gJgqlqzH+Wp1Bt3MiakfRxrCCjbhW4bEnqVJGstT/dINY1TI4A16/ltb3hx81noXmvpbUL5rGI3fUNMRXwP92IRCWYS25Ij/TRGX5uFuDPSZudoysOyfVIIqviITLxRl0ZMyIyYx2mf00I2vXowZeMSl1DEA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Apr 2017 20:48:59.6133 (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.158.2];Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB245 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 a3d6d7c..3acded1 100644 --- a/drivers/soc/fsl/qbman/bman.c +++ b/drivers/soc/fsl/qbman/bman.c @@ -607,7 +607,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 3d891db..3f60289 100644 --- a/drivers/soc/fsl/qbman/qman.c +++ b/drivers/soc/fsl/qbman/qman.c @@ -909,12 +909,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) @@ -1561,7 +1561,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); } @@ -1584,7 +1584,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