Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932783AbdCJUPc (ORCPT ); Fri, 10 Mar 2017 15:15:32 -0500 Received: from mail-by2nam03on0072.outbound.protection.outlook.com ([104.47.42.72]:59617 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933100AbdCJUPL (ORCPT ); Fri, 10 Mar 2017 15:15:11 -0500 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: , , Subject: [RESEND PATCH] soc/qbman: Disable IRQs for deferred QBMan work Date: Fri, 10 Mar 2017 15:15:04 -0500 Message-ID: <1489176904-16297-1-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 1.7.9.5 Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131336505083562032;(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)(39860400002)(39840400002)(39400400002)(39450400003)(39380400002)(39410400002)(39850400002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(9170700003)(86362001)(2201001)(104016004)(43066003)(5660300001)(38730400002)(50226002)(36756003)(8656002)(5003940100001)(4326008)(8676002)(50466002)(8936002)(33646002)(81166006)(85426001)(47776003)(54906002)(48376002)(356003)(4720700003)(3450700001)(105606002)(53936002)(305945005)(50986999)(189998001)(2906002)(106466001)(77096006)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0301MB0731;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11OLC010;1:QAYVr8Xeue24UPRkpHCepz1kCUcDUfru4jmpWvfUghN8OMegy3pe+otKV2npGd80BM21kEphjB4vscU/yaFIucbh+mnIItcBUHzTRpmayw9tzKkLz2DTSdvR30TcAKvg7NX1fuuA0VRwuTjfBzFw1bESwCHANOwA1FiOxc1/Qam/+yvkNjCvwHj6AOaDX76ef5hK+F9KGA4TXMuxJR3UJKY+NiQOF0MuanEqHXUaEUKGyerMbSbTN4MY44hW2NSw6yxePmqMnMh7RiNR7dcwpRMCJqZUUSk/Tjz1tzFfl8WdZGfpJLFxhL5OUdOSoToEhX2W2zh1O34RoIUPVkdKj6iHwG7ezOnmv/ZZAaNwq2ahe+Qe/n/j4NDOZ5CBCrRvA4LIjJGwouzSa9tOX9Z1Gf36KNwh4/Yy1pWmKpOQ1hJrjIbJiLMC0rPf9INoTxN66NMJQfxliOQdCF7l5DYQ27qvb55pYyRVJUwWE05ypK6s/0hQCRBEtOQTIk+FVUTTJ0Jhi9ssnc8p0hPorEhWnzqhGL3HT4apJrXF4JJ/O7wUR9bqq5yTtfYMg+EJva2rdnfl+iTKjUdxCUTykN6Wxh41ZZKQfWUcjMKh/x7xQ8B/vfm286JN9lTNlPp98UiOK6Oyfkwrthwp8XJWQ73DYHE9c6yrCaBUq+mF7HpfkilvF4ByD7+uvGTGFSinbLz+mjlfUAf/mBuTe6uNT25H+A== MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: c51839c4-ba99-4156-9beb-08d467f225ed X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:CY1PR0301MB0731; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0731;3:U0wghmCCsThouOKptvh6iyQutH7+Inxq7/tM1y2GDg4JNOMaDUzE6blplMmcpzknz6RTphkF2+4vOszwT1czoaUi+i49zg2ugsqTPzLSC3MLgZ4zxPxqTZ8EvKrKjI+k2M/gAKzYU4Bo6Bu4HCf7a4DKceOx/Xk/AX9FTviE9xTWWGWEod8g1b2X3qBy+ok5ZwsTkKrlneGVVlyvIaotBhrJb4z7l6KuAEY8u72FrIT9erupaxc2SJiGJaVMQcrjxf56efVwwLH/PPr6FuPrzL+io6XzXG7TFKOZZbde3OM6kSl+B4WsBoMZfnjm6bRdvdgK7IPXv730MEgpgypcK67C7g/yS/Gj6mZWXUdevfXHyCODk1FU0n5ji9NSdlHc;25:p/N0bgAPmeBBsopHURItRBI2YhnLW6GR4IxHoVc2cQ6oY6TcvBY/QUv2LmQVkPU2wAeZw4mLomcoBOvLybNCueC4zdBmwL78voTa23bMFcBLcJSy+7RXk4Wy2+itUcNsE7xOueCcpLRRCsReV7EZKMrGG6gPCey1ABiy4Ld+SspzyWWgLlcovCvWMYDClX224seCAPr49NoncauUvBSY5gJ2QXKrREwbr07FWzT0DbLjuuk5U/6nh7qNMhDY7IEsyntHki0nAvOCCqHjC8hdX5cFULzxmiq6LKh2twXJXgaPdQ23N6OsLnlwVRKqAO0a6I+jkKOTM77oYbpt/tpPVn8LGDAx3xjKZBGIo2hIRNF9GeQSMK3Tl6DtoP2iaAoX+233DSzzjCes0eV2T5M6Go9MXNMP+UK44ffBvanwo9MLxJtkVXAQQyd5srmGWGRKbWQuSvp0yt5x8nG7uUfhXA== X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0731;31:ev+XTjEXfsoVIu/s+tf1I6UpYLxZT2juxwcLebaNVN4CKVQh5lGc6/FcijX+VrRwUDBJNYEYiYHgozikU6E7nxhpSH3X9AZb3Ruw7orntFuhmaMaZORhBOTXSk1hXXgvFl/CGPwWcfe8dkgXRD2qDPND/YFihSOzApmAmtkti7D8hJWI9kgNMH0KGIt/h2zeWQRENg+VPbMta2uFgLcntYZrwDEBS5sBfLDWCW5fFihRUQCwgBE9CZwTvVV4kzHyWAZvzbVtn+TwqP3tsxS+iA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095060)(601004)(2401047)(5005006)(13024025)(13018025)(13017025)(8121501046)(13015025)(13023025)(3002001)(10201501046)(6055026)(6096035)(20161123563025)(20161123561025)(20161123565025)(20161123559025)(20161123556025);SRVR:CY1PR0301MB0731;BCL:0;PCL:0;RULEID:(400006);SRVR:CY1PR0301MB0731; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0731;4:2613e5I/vm5ACsGo5d05RO2m5g6k96GFC26ezPeTNpSD9/jx3y15HnHOaKyZ/t1lkS35CSF7PINmfJPmzhyjR9TI/abBB8wjDSaMVqXr+DIrdFuvrW/hC96OnWQe2DhvV5KPtKyT46SEeUgmzYQoUiQLgZIB2LAIYtglbVvN4IploqvKzcPalBwJ9OVfZtoi4ZH0hDPfu6+wV8hbZFpZkquN+MyU08qZJ0s5Pek0aJXFs0Rmua9UoCwtXrKaDlOUgzxP21Zy5QjUKtP/fcYxprtG+XDesuY2bMsolT9IVroBVIiqh9tCds9Z4IzvEEW8ZlORahYtXB0qQL4c0D4+u9qUil27CAF6adN8MGQXDjpUEAneOh+7pfpcGY2J7zPo/nrJUkwFHnwTWeXbQBgpGuex0Vdw5NWrIx8VTtxKUdlOQFLgijnxcw/rioxyLSnx2OcNEaLbLz/lnWAlfE6PsmNc+NMaLBDQc0YbITmqWEy2ovfYbe9ZFRw7gu0HAGNz6R6mjUQJOpZGJDAcxC2iJ3dT3nr8MB7Q5uHkxQ+BpfWtQ9NC+tTIpiQd9CZhDK3msp43tsCgfU25i8wkmKNu9bKkO/zj/8XXVcOyBeQyMKTkiyc5mtUc0bB0euk6ud5K6c6P8+6bm9FNLBrXiRyJP+mVhADH6WApKFP1EnSp3+OYmtGXx9R9HlJ0nZtlxcw15ABY95nqyijfDoxYUBH3/XHet8um595HCd+X6grrrUV7b1MY58QDFV5W3NpdZ8Hg X-Forefront-PRVS: 02426D11FE X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR0301MB0731;23:Yw9spUqYH1MfAyzAObsDC6FJR88IXEhF2jfH9Lu?= =?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loapmhrAuXY9bet6LfwXHyR/a/6rzn75HzIoR7t8B13GUGVwEt6u8slC/UyPCACbOTECYizdJGHhAf7QaUQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR0301MB0731;7:3VfVBVBJTEa85qU8M+pu8dJIbrBKlAsEkZel7w/+uzJdkUOBvqs5EnILP+sEi5Go48cukErwqf5iI10JMYWnJTdspLxMqZtjHK2PLYwP6aDB8Pl5uJAC2SFphefN4sm7OPnSHx5wKpbhT7NMtTH7f/EV1h/6GLQa6t+UwHExOkQBqBm7EJqZXwhmKvT7mcn7N/CLu0DjAwoqQO5JmtyE5fanC5rnFmEpbwsS2ftAJdBxtyEcyjpNMv0HE9FK8IavbNYGwAsinadMaunMOJHmyWoT8JM2IRkHHrpATBClWvW6d9v7MiL/XKVd4agUK+YSUmGo6eW55BizlZkM+/WeLA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Mar 2017 20:15:07.9818 (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: CY1PR0301MB0731 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1877 Lines: 56 Work for Congestion State Notifications (CSCN) and Message Ring (MR) handling is handled via the workqueue mechanism. This requires the driver to disable those IRQs before scheduling the work and re-enabling it once the work is completed so that the interrupt doesn't continually fire. Signed-off-by: Roy Pledge --- drivers/soc/fsl/qbman/qman.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/soc/fsl/qbman/qman.c b/drivers/soc/fsl/qbman/qman.c index d67b8e1..f1a242a 100644 --- a/drivers/soc/fsl/qbman/qman.c +++ b/drivers/soc/fsl/qbman/qman.c @@ -1382,6 +1382,7 @@ static void qm_congestion_task(struct work_struct *work) if (!qm_mc_result_timeout(&p->p, &mcr)) { spin_unlock(&p->cgr_lock); dev_crit(p->config->dev, "QUERYCONGESTION timeout\n"); + qman_p_irqsource_add(p, QM_PIRQ_CSCI); return; } /* mask out the ones I'm not interested in */ @@ -1396,6 +1397,7 @@ static void qm_congestion_task(struct work_struct *work) if (cgr->cb && qman_cgrs_get(&c, cgr->cgrid)) cgr->cb(p, cgr, qman_cgrs_get(&rr, cgr->cgrid)); spin_unlock(&p->cgr_lock); + qman_p_irqsource_add(p, QM_PIRQ_CSCI); } static void qm_mr_process_task(struct work_struct *work) @@ -1455,12 +1457,14 @@ static void qm_mr_process_task(struct work_struct *work) } qm_mr_cci_consume(&p->p, num); + qman_p_irqsource_add(p, QM_PIRQ_MRI); preempt_enable(); } static u32 __poll_portal_slow(struct qman_portal *p, u32 is) { if (is & QM_PIRQ_CSCI) { + qman_p_irqsource_remove(p, QM_PIRQ_CSCI); queue_work_on(smp_processor_id(), qm_portal_wq, &p->congestion_work); } @@ -1472,6 +1476,7 @@ static u32 __poll_portal_slow(struct qman_portal *p, u32 is) } if (is & QM_PIRQ_MRI) { + qman_p_irqsource_remove(p, QM_PIRQ_MRI); queue_work_on(smp_processor_id(), qm_portal_wq, &p->mr_work); } -- 1.7.9.5