[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKgT0Uc0bB8nr0Kh-UHS=dEW3nu=DrYeio1w6snkzFSB=tQgXw@mail.gmail.com>
Date: Mon, 28 Sep 2020 16:04:31 -0700
From: Alexander Duyck <alexander.duyck@...il.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Linus Torvalds <torvalds@...uxfoundation.org>,
Paul McKenney <paulmck@...nel.org>,
Matthew Wilcox <willy@...radead.org>,
Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Netdev <netdev@...r.kernel.org>,
Christian Benvenuti <benve@...co.com>,
Govindarajulu Varadarajan <_govind@....com>,
Jonathan Corbet <corbet@....net>,
Mauro Carvalho Chehab <mchehab+huawei@...nel.org>,
linux-doc@...r.kernel.org,
Luc Van Oostenryck <luc.vanoostenryck@...il.com>,
Jay Cliburn <jcliburn@...il.com>,
Chris Snook <chris.snook@...il.com>,
Vishal Kulkarni <vishal@...lsio.com>,
intel-wired-lan <intel-wired-lan@...ts.osuosl.org>,
Shannon Nelson <snelson@...sando.io>,
Pensando Drivers <drivers@...sando.io>,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Solarflare linux maintainers <linux-net-drivers@...arflare.com>,
Edward Cree <ecree@...arflare.com>,
Martin Habets <mhabets@...arflare.com>,
Jon Mason <jdmason@...zu.us>, Daniel Drake <dsd@...too.org>,
Ulrich Kunitz <kune@...ne-taler.de>,
Kalle Valo <kvalo@...eaurora.org>,
linux-wireless@...r.kernel.org,
USB list <linux-usb@...r.kernel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Arend van Spriel <arend.vanspriel@...adcom.com>,
Franky Lin <franky.lin@...adcom.com>,
Hante Meuleman <hante.meuleman@...adcom.com>,
Chi-Hsien Lin <chi-hsien.lin@...ress.com>,
Wright Feng <wright.feng@...ress.com>,
brcm80211-dev-list.pdl@...adcom.com,
brcm80211-dev-list@...ress.com,
Stanislav Yakovlev <stas.yakovlev@...il.com>,
Stanislaw Gruszka <stf_xl@...pl>,
Johannes Berg <johannes.berg@...el.com>,
Emmanuel Grumbach <emmanuel.grumbach@...el.com>,
Luca Coelho <luciano.coelho@...el.com>,
Intel Linux Wireless <linuxwifi@...el.com>,
Jouni Malinen <j@...fi>,
Amitkumar Karwar <amitkarwar@...il.com>,
Ganapathi Bhat <ganapathi.bhat@....com>,
Xinming Hu <huxinming820@...il.com>,
libertas-dev@...ts.infradead.org,
Pascal Terjan <pterjan@...gle.com>,
Ping-Ke Shih <pkshih@...ltek.com>
Subject: Re: [patch 10/35] net: intel: Remove in_interrupt() warnings
On Sun, Sep 27, 2020 at 1:00 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
>
> in_interrupt() is ill defined and does not provide what the name
> suggests. The usage especially in driver code is deprecated and a tree wide
> effort to clean up and consolidate the (ab)usage of in_interrupt() and
> related checks is happening.
>
> In this case the checks cover only parts of the contexts in which these
> functions cannot be called. They fail to detect preemption or interrupt
> disabled invocations.
>
> As the functions which are invoked from the various places contain already
> a broad variety of checks (always enabled or debug option dependent) cover
> all invalid conditions already, there is no point in having inconsistent
> warnings in those drivers.
>
> Just remove them.
>
> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> Cc: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: netdev@...r.kernel.org
The patch looks good to me.
Reviewed-by: Alexander Duyck <alexander.h.duyck@...ux.intel.com>
> ---
> drivers/net/ethernet/intel/e1000/e1000_main.c | 1 -
> drivers/net/ethernet/intel/fm10k/fm10k_pci.c | 2 --
> drivers/net/ethernet/intel/i40e/i40e_main.c | 4 ----
> drivers/net/ethernet/intel/ice/ice_main.c | 1 -
> drivers/net/ethernet/intel/igb/igb_main.c | 1 -
> drivers/net/ethernet/intel/igc/igc_main.c | 1 -
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 1 -
> drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c | 2 --
> 8 files changed, 13 deletions(-)
>
> --- a/drivers/net/ethernet/intel/e1000/e1000_main.c
> +++ b/drivers/net/ethernet/intel/e1000/e1000_main.c
> @@ -534,7 +534,6 @@ void e1000_down(struct e1000_adapter *ad
>
> void e1000_reinit_locked(struct e1000_adapter *adapter)
> {
> - WARN_ON(in_interrupt());
> while (test_and_set_bit(__E1000_RESETTING, &adapter->flags))
> msleep(1);
>
> --- a/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k_pci.c
> @@ -221,8 +221,6 @@ static bool fm10k_prepare_for_reset(stru
> {
> struct net_device *netdev = interface->netdev;
>
> - WARN_ON(in_interrupt());
> -
> /* put off any impending NetWatchDogTimeout */
> netif_trans_update(netdev);
>
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -6689,7 +6689,6 @@ static void i40e_vsi_reinit_locked(struc
> {
> struct i40e_pf *pf = vsi->back;
>
> - WARN_ON(in_interrupt());
> while (test_and_set_bit(__I40E_CONFIG_BUSY, pf->state))
> usleep_range(1000, 2000);
> i40e_down(vsi);
> @@ -8462,9 +8461,6 @@ void i40e_do_reset(struct i40e_pf *pf, u
> {
> u32 val;
>
> - WARN_ON(in_interrupt());
> -
> -
> /* do the biggest reset indicated */
> if (reset_flags & BIT_ULL(__I40E_GLOBAL_RESET_REQUESTED)) {
>
> --- a/drivers/net/ethernet/intel/ice/ice_main.c
> +++ b/drivers/net/ethernet/intel/ice/ice_main.c
> @@ -486,7 +486,6 @@ static void ice_do_reset(struct ice_pf *
> struct ice_hw *hw = &pf->hw;
>
> dev_dbg(dev, "reset_type 0x%x requested\n", reset_type);
> - WARN_ON(in_interrupt());
>
> ice_prepare_for_reset(pf);
>
> --- a/drivers/net/ethernet/intel/igb/igb_main.c
> +++ b/drivers/net/ethernet/intel/igb/igb_main.c
> @@ -2220,7 +2220,6 @@ void igb_down(struct igb_adapter *adapte
>
> void igb_reinit_locked(struct igb_adapter *adapter)
> {
> - WARN_ON(in_interrupt());
> while (test_and_set_bit(__IGB_RESETTING, &adapter->state))
> usleep_range(1000, 2000);
> igb_down(adapter);
> --- a/drivers/net/ethernet/intel/igc/igc_main.c
> +++ b/drivers/net/ethernet/intel/igc/igc_main.c
> @@ -3831,7 +3831,6 @@ void igc_down(struct igc_adapter *adapte
>
> void igc_reinit_locked(struct igc_adapter *adapter)
> {
> - WARN_ON(in_interrupt());
> while (test_and_set_bit(__IGC_RESETTING, &adapter->state))
> usleep_range(1000, 2000);
> igc_down(adapter);
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
> @@ -5677,7 +5677,6 @@ static void ixgbe_up_complete(struct ixg
>
> void ixgbe_reinit_locked(struct ixgbe_adapter *adapter)
> {
> - WARN_ON(in_interrupt());
> /* put off any impending NetWatchDogTimeout */
> netif_trans_update(adapter->netdev);
>
> --- a/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> +++ b/drivers/net/ethernet/intel/ixgbevf/ixgbevf_main.c
> @@ -2526,8 +2526,6 @@ void ixgbevf_down(struct ixgbevf_adapter
>
> void ixgbevf_reinit_locked(struct ixgbevf_adapter *adapter)
> {
> - WARN_ON(in_interrupt());
> -
> while (test_and_set_bit(__IXGBEVF_RESETTING, &adapter->state))
> msleep(1);
>
>
Powered by blists - more mailing lists