Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752234AbbH0Voa (ORCPT ); Thu, 27 Aug 2015 17:44:30 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:48276 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751449AbbH0Vo2 (ORCPT ); Thu, 27 Aug 2015 17:44:28 -0400 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 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4964 Lines: 125 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); } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/