mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
![Andy Shevchenko](/assets/img/avatar_default.png)
Patch series "kernel.h further split", v5. kernel.h is a set of something which is not related to each other and often used in non-crossed compilation units, especially when drivers need only one or two macro definitions from it. This patch (of 7): There is no evidence we need kernel.h inclusion in certain headers. Drop unneeded <linux/kernel.h> inclusion from other headers. [sfr@canb.auug.org.au: bottom_half.h needs kernel] Link: https://lkml.kernel.org/r/20211015202908.1c417ae2@canb.auug.org.au Link: https://lkml.kernel.org/r/20211013170417.87909-1-andriy.shevchenko@linux.intel.com Link: https://lkml.kernel.org/r/20211013170417.87909-2-andriy.shevchenko@linux.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Will Deacon <will@kernel.org> Cc: Waiman Long <longman@redhat.com> Cc: Boqun Feng <boqun.feng@gmail.com> Cc: Sakari Ailus <sakari.ailus@linux.intel.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> Cc: Jonathan Cameron <jic23@kernel.org> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk> Cc: Thorsten Leemhuis <regressions@leemhuis.info> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
42 lines
1,000 B
C
42 lines
1,000 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_BH_H
|
|
#define _LINUX_BH_H
|
|
|
|
#include <linux/kernel.h>
|
|
#include <linux/preempt.h>
|
|
|
|
#if defined(CONFIG_PREEMPT_RT) || defined(CONFIG_TRACE_IRQFLAGS)
|
|
extern void __local_bh_disable_ip(unsigned long ip, unsigned int cnt);
|
|
#else
|
|
static __always_inline void __local_bh_disable_ip(unsigned long ip, unsigned int cnt)
|
|
{
|
|
preempt_count_add(cnt);
|
|
barrier();
|
|
}
|
|
#endif
|
|
|
|
static inline void local_bh_disable(void)
|
|
{
|
|
__local_bh_disable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
|
|
}
|
|
|
|
extern void _local_bh_enable(void);
|
|
extern void __local_bh_enable_ip(unsigned long ip, unsigned int cnt);
|
|
|
|
static inline void local_bh_enable_ip(unsigned long ip)
|
|
{
|
|
__local_bh_enable_ip(ip, SOFTIRQ_DISABLE_OFFSET);
|
|
}
|
|
|
|
static inline void local_bh_enable(void)
|
|
{
|
|
__local_bh_enable_ip(_THIS_IP_, SOFTIRQ_DISABLE_OFFSET);
|
|
}
|
|
|
|
#ifdef CONFIG_PREEMPT_RT
|
|
extern bool local_bh_blocked(void);
|
|
#else
|
|
static inline bool local_bh_blocked(void) { return false; }
|
|
#endif
|
|
|
|
#endif /* _LINUX_BH_H */
|