From patchwork Sun Sep 27 19:49:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 260068 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA204C47426 for ; Sun, 27 Sep 2020 19:59:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9BDD723A53 for ; Sun, 27 Sep 2020 19:59:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="zPJ0hda+"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hDcBqn6U" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727249AbgI0T6v (ORCPT ); Sun, 27 Sep 2020 15:58:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727151AbgI0T6B (ORCPT ); Sun, 27 Sep 2020 15:58:01 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B0D7C0613DE; Sun, 27 Sep 2020 12:57:38 -0700 (PDT) Message-Id: <20200927194922.339094192@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1601236656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=/+NkNOFDTNEsvHtoYwvS6e5nGIUJrGWmdKgKhxRiVZQ=; b=zPJ0hda+pKDPbZkQiEtOVllcXiteC26rVxdbQgUPr53iqM/EtEAbi1jtvWq04gLkIbOM6C ujfovK3wMHdZ6FXvajjqwPwbQFJ1LmtPBz5T2j4cEbjdcl/D+0f6GJFyKzRFZgjbfahwNX reMPCs/At1wAnsoD3uJBqkJR3ASHJ1jz71cDvSkEqPFCeHA3unVIKbnfpJH2o2myxU5Yfj jtmwzjKqvGFQUP7fsDit0YJbrYUAo2QclFxUF6MNX5tfRLQRt4fABWO8rJGitwZfVjJkd7 jHvsBaHgoyuL08FnoCDIKhTbUfSfoh93d587AamWzDVi2V/ozGa6S40/kgPXeQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1601236656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: references:references; bh=/+NkNOFDTNEsvHtoYwvS6e5nGIUJrGWmdKgKhxRiVZQ=; b=hDcBqn6UXrJKv91FTu0QIgtLv0almCpuRxCTeOsqJHFPOoIM9MsroIFDwncbCe5QtqMrPS AfISOKWlb8O3SEBg== Date: Sun, 27 Sep 2020 21:49:11 +0200 From: Thomas Gleixner To: LKML Cc: Peter Zijlstra , Linus Torvalds , Paul McKenney , Matthew Wilcox , Sebastian Andrzej Siewior , Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , "David S. Miller" , Jakub Kicinski , linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, brcm80211-dev-list@cypress.com, netdev@vger.kernel.org, Christian Benvenuti , Govindarajulu Varadarajan <_govind@gmx.com>, Dave Miller , Jonathan Corbet , Mauro Carvalho Chehab , linux-doc@vger.kernel.org, Luc Van Oostenryck , Jay Cliburn , Chris Snook , Vishal Kulkarni , Jeff Kirsher , intel-wired-lan@lists.osuosl.org, Shannon Nelson , Pensando Drivers , Andrew Lunn , Heiner Kallweit , Russell King , Thomas Bogendoerfer , Solarflare linux maintainers , Edward Cree , Martin Habets , Jon Mason , Daniel Drake , Ulrich Kunitz , linux-usb@vger.kernel.org, Greg Kroah-Hartman , Chi-Hsien Lin , Wright Feng , Stanislav Yakovlev , Stanislaw Gruszka , Johannes Berg , Emmanuel Grumbach , Luca Coelho , Intel Linux Wireless , Jouni Malinen , Amitkumar Karwar , Ganapathi Bhat , Xinming Hu , libertas-dev@lists.infradead.org, Pascal Terjan , Ping-Ke Shih Subject: [patch 25/35] net: brcmfmac: Use netif_rx_any_context(). References: <20200927194846.045411263@linutronix.de> MIME-Version: 1.0 Content-transfer-encoding: 8-bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Sebastian Andrzej Siewior The usage of in_interrupt() in non-core code is phased out. Ideally the information of the calling context should be passed by the callers or the functions be split as appropriate. brcmfmac uses in_interupt() to select the netif_rx*() variant which matches the calling context. The attempt to consolidate the code by passing an arguemnt or by distangling it failed due lack of knowledge about this driver and because the call chains are convoluted and hard to follow. As a stop gap use netif_rx_any_context() which invokes the correct code path depending on context which confines the usage of in_interrupt() to core code. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Thomas Gleixner Cc: Arend van Spriel Cc: Franky Lin Cc: Hante Meuleman Cc: Kalle Valo Cc: "David S. Miller" Cc: Jakub Kicinski Cc: linux-wireless@vger.kernel.org Cc: brcm80211-dev-list.pdl@broadcom.com Cc: brcm80211-dev-list@cypress.com Cc: netdev@vger.kernel.org --- drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c @@ -418,14 +418,7 @@ void brcmf_netif_rx(struct brcmf_if *ifp ifp->ndev->stats.rx_packets++; brcmf_dbg(DATA, "rx proto=0x%X\n", ntohs(skb->protocol)); - if (in_interrupt()) - netif_rx(skb); - else - /* If the receive is not processed inside an ISR, - * the softirqd must be woken explicitly to service - * the NET_RX_SOFTIRQ. This is handled by netif_rx_ni(). - */ - netif_rx_ni(skb); + netif_rx_any_context(skb); } void brcmf_netif_mon_rx(struct brcmf_if *ifp, struct sk_buff *skb)