[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aac2b8b3-53f4-9b27-03d0-742bbe3cd81f@broadcom.com>
Date: Mon, 28 Sep 2020 11:34:22 +0200
From: Arend Van Spriel <arend.vanspriel@...adcom.com>
To: Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>
Cc: 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>,
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>,
Kalle Valo <kvalo@...eaurora.org>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
linux-wireless@...r.kernel.org,
brcm80211-dev-list.pdl@...adcom.com,
brcm80211-dev-list@...ress.com, 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>,
Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
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>, linux-usb@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
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 26/35] net: brcmfmac: Convey allocation mode as argument
On 9/27/2020 9:49 PM, Thomas Gleixner wrote:
> From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
>
> The usage of in_interrupt() in drivers is phased out and Linus clearly
> requested that code which changes behaviour depending on context should
> either be seperated or the context be conveyed in an argument passed by the
> caller, which usually knows the context.
>
> brcmf_fweh_process_event() uses in_interrupt() to select the allocation
> mode GFP_KERNEL/GFP_ATOMIC. Aside of the above reasons this check is
> incomplete as it cannot detect contexts which just have preemption or
> interrupts disabled.
>
> All callchains leading to brcmf_fweh_process_event() can clearly identify
> the calling context. Convey a 'gfp' argument through the callchains and let
> the callers hand in the appropriate GFP mode.
>
> This has also the advantage that any change of execution context or
> preemption/interrupt state in these callchains will be detected by the
> memory allocator for all GFP_KERNEL allocations.
Looking at the functions changed I see overlap with patch 25/35 so maybe
change to gfp flag to a 'in_isr' bool. The flag can then be used for
dealing with netif_rx as well.
Regards,
Arend
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4176 bytes)
Powered by blists - more mailing lists