lkml.org 
[lkml]   [2022]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/4] panic: Add panic_in_progress helper
On Fri 2022-01-21 11:02:19, Stephen Brennan wrote:

Please, add explanation why the new helper is added. It will be
used in printk code to reduce risk of deadlocks during panic().

> Suggested-by: Petr Mladek <pmladek@suse.com>
> Signed-off-by: Stephen Brennan <stephen.s.brennan@oracle.com>
> ---
> We cannot define a static inline without including linux/atomic.h, so
> I just added a macro for convenience in later patches. Since macros were
> the only option, I didn't include a helper for
> panic_in_progress_different_cpu().

What is the exact problem with including atomic.h and using static
inline, please?

IMHO, the define is not a real solution. The macro won't be usable
without including atomic.h. So, it would work only by chance.

But it is possible that I miss something.

Best Regards,
Petr

\
 
 \ /
  Last update: 2022-01-25 12:57    [W:1.238 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site