Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757040AbdDQUzv (ORCPT ); Mon, 17 Apr 2017 16:55:51 -0400 Received: from mail-by2nam03on0078.outbound.protection.outlook.com ([104.47.42.78]:61357 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755477AbdDQUzi (ORCPT ); Mon, 17 Apr 2017 16:55:38 -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: , Subject: [PATCH] soc/fsl/qbman: Disable IRQs for deferred QBMan work Date: Mon, 17 Apr 2017 16:55:19 -0400 Message-ID: <1492462519-1823-1-git-send-email-roy.pledge@nxp.com> X-Mailer: git-send-email 2.7.4 Reply-To: X-EOPAttributedMessage: 0 X-Matching-Connectors: 131369361373261613;(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)(39840400002)(39450400003)(39860400002)(39400400002)(39380400002)(39410400002)(39850400002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(9170700003)(356003)(8936002)(33646002)(106466001)(5660300001)(43066003)(5003940100001)(81166006)(48376002)(4326008)(38730400002)(105606002)(50986999)(189998001)(305945005)(8676002)(53936002)(6666003)(3450700001)(104016004)(50466002)(47776003)(85426001)(50226002)(8656002)(2906002)(86362001)(2201001)(36756003)(77096006)(54906002)(2101003);DIR:OUT;SFP:1101;SCL:1;SRVR:CO2PR03MB2278;H:az84smr01.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;A:1;MX:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD021;1:FPGLP1hWq9kCL6xXEtPrRYriRc9S6ZxhTYR41G+ReHX4ayJiv/m9FlgeqL4IQVuKVYT0vPz5+b98W9lmB6oZSkZGTgUO8V645kVts12MSl6rDqcwXwQK3Ilmh9jdaMGImgsZ6xljqn8tbmbKHb9hCm97qDa2kN9u2rKKm1UQt9RLyDD8hWMwgZ7b5jHY97ms15FEQTiktoLwc49linrlndz/fY9rQc+QO7h7bANtJ5VrGp85P+Iv5X19WBP36lRxvCwfL5smV/6vGH5kdmTf37+w/O7OaGqInYnsydAJlYduuzjetGIRMqHFI1rViurWhM8r+0B/ds7vPJlgta76tNzd2lI02+M+ILVJ8McJcAFIYNk+qhWdbqamt8qFudW6OmrvYQTWHEHdbrZOFpbJX0ZwNXl2B4OV5IFSMx73eUB4J6nsUGeWRB/dPxlXuq+30MrZfPduMdVLzXAtjfo7S+1AjJ8Lv5642Me+IZyGQwUrF1J4PKgHo9EQF4IhAt/OuR7hy5qAw0LMbLuxmzhyCIPs3oSR71Q5mOnmT4/L/vNpEhSdoYWaYch30ySjO2G/8LHOgxYThd2slMauSgQbi4V+SKM9q5G1RzqL+ctv1ap9oKRYTgUKW4s3XB9Zgomjp89dB2Ily04M5BC61o0yvCO4APEBl/h5INomKrF+oz2y+guk+9Sb2drJYBziq+/LpdX993Rocyd/PAjagZIX11jrR8qMmEKGz0opzAbjBE4= MIME-Version: 1.0 Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: bf71f06f-ce00-45ed-8dcc-08d485d4197a X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(201703131430075)(201703131517081);SRVR:CO2PR03MB2278; X-Microsoft-Exchange-Diagnostics: 1;CO2PR03MB2278;3:p8MyaQ4Crr5wpbPH2uCK2TtxSjA/fknLnzjK47Yxpf+V+x5uPix4TJqxmR8mifANHmwLIb7XYPKZvQcygD/bdIrIkPLY3I+11lr40XEGKakv3aEyZ/DoVX3MDtHdiSUuk/sdPWVeq5B306q5lF2wrRnm/pU0RAsG1RUPGKytCz0sEfvMq3gdxn9gq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RVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6095135)(601004)(2401047)(13017025)(5005006)(8121501046)(13018025)(13024025)(13015025)(13023025)(93006095)(93001095)(3002001)(10201501046)(6055026)(6096035)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(20161123556025)(20161123565025)(20161123561025)(20161123563025);SRVR:CO2PR03MB2278;BCL:0;PCL:0;RULEID:(400006);SRVR:CO2PR03MB2278; X-Microsoft-Exchange-Diagnostics: 1;CO2PR03MB2278;4:lGjlwrHm8m0uTP7rCdDx+H2+vc1L0Fq61OpBLXD3rs7Ir4A8ttG+kB5Dn7w5NyE7gnplQkFMlzCrnnYFATwqKq/3Q0QDUR+ufDXPAPjn5VjiJPnpvPN7uMrMjUq8LOvAH9Nx+qtP63e3pEunirvXENVtQoFAOkXpRW0e5mX9fJT8cMwJ6A9eySWtddVO+URwzbkJ6JWlR8Gr8VQbkcCURlUtEhIaGXB0/o3rLvAKfMdUle/UDAcL8oksFC15xayJjvm/EywszlBKvXh4lt57s7hx4t4ZdFkrcYKwnZwsEA3trab8MKnIt7qDyW74KscYX1014mwIPo2JnRLmUujFq0xyNTZCLaysdJydGPGUy1THV+tb7Ti5c4DG4TwrvOmcGI24uoFVLmL5myr4e+h2qCqJFY+RUFnEHTnzucJJ+6V6a6rYz0KGsyuYHNPXFAWw76Gf7H42Dlja5+c+FaNU5YHmVLHFe2ISeVrcpqdPCjYR3p1TS3vtjVNmqRdmajkWBP5bplaH+WkAJ98X972D2P+Nk8U24cGm2TQut7Ol7Kw/6ltyxTXnxEva0flzxp8y8Dv5hVobaUbrQd959Iap3cm0hlQXPwmB8hdMcIILZHSU7m6XpTj44qbleZEOvtbphulxXn7wx1qceUw3mfMA5iVk8TRiSJSZoyM97Smgo+QszcUSC0NiNQJHjC7ZfUe45uGsFuwihpCOnLJp3cEIURGkwXBccNpNNJ+Sehhh0wVEkP7Ks2f4FILevnYW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62NueFFRqRUorSzTbR2FH0LmlDE3rq3358Lv3yTnQMGZqAtBHHQFnlYXxeVtKoOvrlOxihk3Z6i+C;5:/k+bot2E2v4AWE8MDlOMTW4B7bWTkrUoBlbn+fDjy/7E4t693JrVFsOcEmQskchuGzTVJyhYfvPNcbgMycdcHymKVeqSG9ihWHKhlEecxYQAE7AcVTmuqIfjXBzFd6N8pvOTI4w4uEhQxXq4YMMfmFGFf5cAUvC1tCBp2ZqHFRZE5O9VCq/W98KvZp3K6n9K;24:U51FTLv2QQ+jm1/SlwhQgiGV2WVBLTvDVV8fRqtxJ5a3kICiqkUaAC9ss2soC+r4TIqy56gqBpjN/sVIdz7jR+vJ2oKINO3OnwQdksWBhuE= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CO2PR03MB2278;7:rci+iOhK94mLuz3LdsBX9PcrCaDtOWntyM0jAB4oCallIBLZXx+D9xD+Cs4ayHaWGKFQ173aGYuNiNnZVKIXCVdhOBDGMe3CZyZyg5Z42X6SUJyjOJIm60XG7Urgr3zmn2WKmYUVDDqh4pHD9a4eVGrXCjGuH6kdOGV5OH7SYKCGAXiXowHlD27W9HVTZl+1NG8FZc3Sp1bvDAxdH047ylkbB/Dy20kMOj6hv98BQwzve9IhSi3D1nb1xdkswhSz46Lx468qYZU9plfhdMWFbYyCWjFnT5epxmQfLh19AMjYddz7WOwC7abAqfwfDf2tsYnyFt5e4MFTA5prkKmKLA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2017 20:55:37.0921 (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: CO2PR03MB2278 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1872 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 3d891db..18eefc3 100644 --- a/drivers/soc/fsl/qbman/qman.c +++ b/drivers/soc/fsl/qbman/qman.c @@ -1344,6 +1344,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 */ @@ -1358,6 +1359,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) @@ -1417,12 +1419,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); } @@ -1434,6 +1438,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); } -- 2.7.4