From patchwork Thu Aug 27 21:44:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Murali Karicheri X-Patchwork-Id: 7087281 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 58A779F1C2 for ; Thu, 27 Aug 2015 21:46:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5754120A04 for ; Thu, 27 Aug 2015 21:46:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5BDC320A01 for ; Thu, 27 Aug 2015 21:46:28 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZV4yE-0006dB-Df; Thu, 27 Aug 2015 21:44:30 +0000 Received: from comal.ext.ti.com ([198.47.26.152]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZV4yB-0006X1-Bf for linux-arm-kernel@lists.infradead.org; Thu, 27 Aug 2015 21:44:28 +0000 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id t7RLi3jq029817; Thu, 27 Aug 2015 16:44:03 -0500 Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t7RLi31i026383; Thu, 27 Aug 2015 16:44:03 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.224.2; Thu, 27 Aug 2015 16:44:03 -0500 Received: from ula0868495.am.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id t7RLi36J030053; Thu, 27 Aug 2015 16:44:03 -0500 From: Murali Karicheri To: , , Subject: [PATCH v1] soc: ti: reset irq affinity before freeing irq Date: Thu, 27 Aug 2015 17:44:07 -0400 Message-ID: <1440711847-24747-1-git-send-email-m-karicheri2@ti.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150827_144427_501609_F9DC2BA8 X-CRM114-Status: UNSURE ( 9.89 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -8.3 (--------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When using accumulator queue for rx side for network driver, following warning is seen when doing a reboot command from Linux console. This is because, affinity value is not reset before calling free_irq(). This patch fixes this. Deconfiguring network interfaces... [ 55.176589] ------------[ cut here ]----------- [ 55.181232] WARNING: CPU: 0 PID: 2081 at kernel/irq/manage.c:1370 __free_irq+0x208/0x214 [ 55.181232] WARNING: CPU: 0 PID: 2081 at kernel/irq/manage.c:1370 __free_irq+0x208/0x214 () [ 55.189527] Modules linked in: [ 55.192598] CPU: 0 PID: 2081 Comm: ifconfig Not tainted 4.1.5-00908-g1049e206-dirty #1 [ 55.200543] Hardware name: Keystone [ 55.204040] Backtrace: [ 55.206507] [] (dump_backtrace) from [] (show_stack+0x18/0x1c) [ 55.214102] r7:c005d0a8 r6:c06e2184 r5:c06e2184 r4:00000000 [ 55.219811] [] (show_stack) from [] (dump_stack+0x8c/0xcc) [ 55.227065] [] (dump_stack) from [] (warn_slowpath_common+0x88/0xb8) [ 55.235183] r7:c005d0a8 r6:0000055a r5:00000009 r4:00000000 [ 55.240889] [] (warn_slowpath_common) from [] (warn_slowpath_null+0x 24/0x2c) [ 55.249704] r8:0000006c r7:ee513f60 r6:ee513f00 r5:ee611010 r4:cc873a00 [ 55.256458] [] (warn_slowpath_null) from [] (__free_irq+0x208/0x214) [ 55.264580] [] (__free_irq) from [] (free_irq+0x54/0xac) [ 55.271652] r10:00000002 r9:00000000 r8:00000000 r7:ee611010 r6:0000006c r5:00000000 [ 55.279538] r4:ee513f00 r3:00000000 [ 55.283140] [] (free_irq) from [] (knav_range_setup_acc_irq+0xb0/0x1 28) [ 55.291519] r7:00000001 r6:0000006c r5:ee611010 r4:00000001 [ 55.297223] [] (knav_range_setup_acc_irq) from [] (knav_acc_close_qu eue+0x20/0x24) [ 55.306563] r8:edd1a4c8 r7:00001000 r6:eed89980 r5:ee616650 r4:edf9d990 [ 55.313320] [] (knav_acc_close_queue) from [] (knav_queue_close+0xb4 /0xb8) [ 55.321969] [] (knav_queue_close) from [] (netcp_free_navigator_reso urces+0x1d4/0x2c0) [ 55.331656] r5:edd1a480 r4:00000400 [ 55.335255] [] (netcp_free_navigator_resources) from [] (netcp_ndo_stop+0x220/0x230) [ 55.344768] r10:00008914 r9:edf34400 r8:00000000 r7:edd1a5d8 r6:edd1a480 r5:00000400 [ 55.352653] r4:edd1a000 [ 55.355202] [] (netcp_ndo_stop) from [] (__dev_close_many+0x90/0xd8) [ 55.363320] r7:00001003 r6:00001042 r5:edb0de20 r4:edd1a000 [ 55.369023] [] (__dev_close_many) from [] (__dev_close+0x30/0x48) [ 55.376880] r5:00000001 r4:edd1a000 [ 55.380480] [] (__dev_close) from [] (__dev_change_flags+0x9c/0x14c) [ 55.388602] [] (__dev_change_flags) from [] (dev_change_flags+0x20/0 x50) [ 55.397069] r9:edf34400 r8:00000000 r7:00000000 r6:00001003 r5:edd1a138 r4:edd1a000 [ 55.404875] [] (dev_change_flags) from [] (devinet_ioctl+0x680/0x754 ) [ 55.413080] r9:edf34400 r8:bef6af3c r7:00000000 r6:bef6ac64 r5:edf3440c r4:00000000 [ 55.420882] [] (devinet_ioctl) from [] (inet_ioctl+0x1a8/0x1d0) [ 55.428564] r10:00000000 r9:edb0c000 r8:bef6ac64 r7:00000003 r6:bef6ac64 r5:bef6ac64 [ 55.436449] r4:00008914 [ 55.438996] [] (inet_ioctl) from [] (sock_ioctl+0x1d0/0x2a8) [ 55.446423] [] (sock_ioctl) from [] (do_vfs_ioctl+0x414/0x604) [ 55.454018] r7:00000003 r6:ed8b60c0 r5:bef6ac64 r4:ccc88f20 [ 55.459721] [] (do_vfs_ioctl) from [] (SyS_ioctl+0x3c/0x64) [ 55.467055] r9:edb0c000 r8:bef6ac64 r7:00008914 r6:ed8b60c0 r5:00000003 r4:ed8b60c0 [ 55.474858] [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x3c) [ 55.482452] r9:edb0c000 r8:c000f924 r7:00000036 r6:0007e77c r5:bef6ac64 r4:0007e7d0 [ 55.490252] ---[ end trace f565594c905af0b4 ]--- Signed-off-by: Murali Karicheri --- - v1 - added all of the call trace per comment - Applies to v4.2.0-rc8 drivers/soc/ti/knav_qmss_acc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/soc/ti/knav_qmss_acc.c b/drivers/soc/ti/knav_qmss_acc.c index ef6f69d..b98fe56 100644 --- a/drivers/soc/ti/knav_qmss_acc.c +++ b/drivers/soc/ti/knav_qmss_acc.c @@ -261,6 +261,10 @@ static int knav_range_setup_acc_irq(struct knav_range_info *range, if (old && !new) { dev_dbg(kdev->dev, "setup-acc-irq: freeing %s for channel %s\n", acc->name, acc->name); + ret = irq_set_affinity_hint(irq, NULL); + if (ret) + dev_warn(range->kdev->dev, + "Failed to set IRQ affinity\n"); free_irq(irq, range); }