From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from server19320154104.serverpool.info ([193.201.54.104]:33225 "EHLO hauke-m.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753621Ab3JBLxZ (ORCPT ); Wed, 2 Oct 2013 07:53:25 -0400 Message-ID: <524C092A.4090801@hauke-m.de> (sfid-20131002_135330_376762_E579F712) Date: Wed, 02 Oct 2013 13:53:14 +0200 From: Hauke Mehrtens MIME-Version: 1.0 To: Arend van Spriel , "John W. Linville" CC: linux-wireless , stable@vger.kernel.org, Tod Jackson , Joe Perches , Rafal Milecki Subject: Re: [PATCH for-3.12 2/3] bcma: make bcma_core_pci_{up,down}() callable from atomic context References: <1380103864-10447-1-git-send-email-arend@broadcom.com> <1380103864-10447-3-git-send-email-arend@broadcom.com> In-Reply-To: <1380103864-10447-3-git-send-email-arend@broadcom.com> Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-wireless-owner@vger.kernel.org List-ID: On 09/25/2013 12:11 PM, Arend van Spriel wrote: > This patch removes the bcma_core_pci_power_save() call from > the bcma_core_pci_{up,down}() functions as it tries to schedule > thus requiring to call them from non-atomic context. The function > bcma_core_pci_power_save() is now exported so the calling module > can explicitly use it in non-atomic context. This fixes the > 'scheduling while atomic' issue reported by Tod Jackson and > Joe Perches. > > [ 13.210710] BUG: scheduling while atomic: dhcpcd/1800/0x00000202 > [ 13.210718] Modules linked in: brcmsmac nouveau coretemp kvm_intel kvm cordic brcmutil bcma dell_wmi atl1c ttm mxm_wmi wmi > [ 13.210756] CPU: 2 PID: 1800 Comm: dhcpcd Not tainted 3.11.0-wl #1 > [ 13.210762] Hardware name: Alienware M11x R2/M11x R2, BIOS A04 11/23/2010 > [ 13.210767] ffff880177c92c40 ffff880170fd1948 ffffffff8169af5b 0000000000000007 > [ 13.210777] ffff880170fd1ab0 ffff880170fd1958 ffffffff81697ee2 ffff880170fd19d8 > [ 13.210785] ffffffff816a19f5 00000000000f4240 000000000000d080 ffff880170fd1fd8 > [ 13.210794] Call Trace: > [ 13.210813] [] dump_stack+0x4f/0x84 > [ 13.210826] [] __schedule_bug+0x43/0x51 > [ 13.210837] [] __schedule+0x6e5/0x810 > [ 13.210845] [] schedule+0x24/0x70 > [ 13.210855] [] schedule_hrtimeout_range_clock+0x10c/0x150 > [ 13.210867] [] ? update_rmtp+0x60/0x60 > [ 13.210877] [] ? hrtimer_start_range_ns+0xf/0x20 > [ 13.210887] [] schedule_hrtimeout_range+0xe/0x10 > [ 13.210897] [] usleep_range+0x3b/0x40 > [ 13.210910] [] bcma_pcie_mdio_set_phy.isra.3+0x4f/0x80 [bcma] > [ 13.210921] [] bcma_pcie_mdio_write.isra.4+0xbf/0xd0 [bcma] > [ 13.210932] [] bcma_pcie_mdio_writeread.isra.6.constprop.13+0x18/0x30 [bcma] > [ 13.210942] [] bcma_core_pci_power_save+0x3e/0x80 [bcma] > [ 13.210953] [] bcma_core_pci_up+0x2d/0x60 [bcma] > [ 13.210975] [] brcms_c_up+0xfc/0x430 [brcmsmac] > [ 13.210989] [] brcms_up+0x1d/0x20 [brcmsmac] > [ 13.211003] [] brcms_ops_start+0x298/0x340 [brcmsmac] > [ 13.211020] [] ? cfg80211_netdev_notifier_call+0xd2/0x5f0 > [ 13.211030] [] ? packet_notifier+0xad/0x1d0 > [ 13.211064] [] ieee80211_do_open+0x325/0xf80 > [ 13.211076] [] ? __raw_notifier_call_chain+0x9/0x10 > [ 13.211086] [] ieee80211_open+0x71/0x80 > [ 13.211101] [] __dev_open+0x87/0xe0 > [ 13.211109] [] __dev_change_flags+0x9c/0x180 > [ 13.211117] [] dev_change_flags+0x23/0x70 > [ 13.211127] [] devinet_ioctl+0x5b8/0x6a0 > [ 13.211136] [] inet_ioctl+0x75/0x90 > [ 13.211147] [] sock_do_ioctl+0x2b/0x70 > [ 13.211155] [] sock_ioctl+0x71/0x2a0 > [ 13.211169] [] do_vfs_ioctl+0x87/0x520 > [ 13.211180] [] ? ____fput+0x9/0x10 > [ 13.211198] [] ? task_work_run+0x9c/0xd0 > [ 13.211202] [] SyS_ioctl+0x91/0xb0 > [ 13.211208] [] system_call_fastpath+0x16/0x1b > [ 13.211217] NOHZ: local_softirq_pending 202 > > The issue was introduced in v3.11 kernel by following commit: > > commit aa51e598d04c6acf5477934cd6383f5a17ce9029 > Author: Hauke Mehrtens > Date: Sat Aug 24 00:32:31 2013 +0200 > > brcmsmac: use bcma PCIe up and down functions > > replace the calls to bcma_core_pci_extend_L1timer() by calls to the > newly introduced bcma_core_pci_ip() and bcma_core_pci_down() > > Signed-off-by: Hauke Mehrtens > Cc: Arend van Spriel > Signed-off-by: John W. Linville > > This fix has been discussed with Hauke Mehrtens [1] selection > option 3) and is intended for v3.12. > > Ref: > [1] http://mid.gmane.org/5239B12D.3040206@hauke-m.de > > Cc: # 3.11.x > Cc: Tod Jackson > Cc: Joe Perches > Cc: Rafal Milecki > Cc: Hauke Mehrtens > Reviewed-by: Hante Meuleman > Signed-off-by: Arend van Spriel Acked-by: Hauke Mehrtens Hi, This is a little late but I am ok with the brcmsmac patch and the bcma patch, feel free to add my Acked-by. This should go into 3.12 and 3.13+. Hauke