Re: [RFC PATCH net-next] sfc: replace in_interrupt() usage

2020-09-29 Thread Thomas Gleixner
On Tue, Sep 29 2020 at 16:15, Edward Cree wrote: >> On Mon, Sep 28 2020 at 21:05, Edward Cree wrote: >>> Only compile-tested so far, because I'm waiting for my kernel to >>> finish rebuilding with CONFIG_DEBUG_ATOMIC_SLEEP > > I've now tested and confirmed that the might_sleep warning goes >

Re: [RFC PATCH net-next] sfc: replace in_interrupt() usage

2020-09-29 Thread Edward Cree
> On Mon, Sep 28 2020 at 21:05, Edward Cree wrote: >> Only compile-tested so far, because I'm waiting for my kernel to >> finish rebuilding with CONFIG_DEBUG_ATOMIC_SLEEP I've now tested and confirmed that the might_sleep warning goes away with this patch. Thomas, do you want to pull it into

Re: [RFC PATCH net-next] sfc: replace in_interrupt() usage

2020-09-29 Thread Martin Habets
On Mon, Sep 28, 2020 at 09:05:52PM +0100, Edward Cree wrote: > efx_ef10_try_update_nic_stats_vf() used in_interrupt() to figure out > whether it is safe to sleep (for MCDI) or not. > The only caller from which it was not is efx_net_stats(), which can be > invoked under dev_base_lock from

Re: [RFC PATCH net-next] sfc: replace in_interrupt() usage

2020-09-28 Thread Thomas Gleixner
On Mon, Sep 28 2020 at 21:05, Edward Cree wrote: > efx_ef10_try_update_nic_stats_vf() used in_interrupt() to figure out > whether it is safe to sleep (for MCDI) or not. > The only caller from which it was not is efx_net_stats(), which can be > invoked under dev_base_lock from

[RFC PATCH net-next] sfc: replace in_interrupt() usage

2020-09-28 Thread Edward Cree
efx_ef10_try_update_nic_stats_vf() used in_interrupt() to figure out whether it is safe to sleep (for MCDI) or not. The only caller from which it was not is efx_net_stats(), which can be invoked under dev_base_lock from net-sysfs::netstat_show(). So add a new update_stats_atomic() method to