mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2024-12-29 09:12:07 +00:00
locking/qspinlock: Do not include atomic.h from qspinlock_types.h
This patch breaks a header loop involving qspinlock_types.h. The issue is that qspinlock_types.h includes atomic.h, which then eventually includes kernel.h which could lead back to the original file via spinlock_types.h. As ATOMIC_INIT is now defined by linux/types.h, there is no longer any need to include atomic.h from qspinlock_types.h. This also allows the CONFIG_PARAVIRT hack to be removed since it was trying to prevent exactly this loop. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Waiman Long <longman@redhat.com> Link: https://lkml.kernel.org/r/20200729123316.GC7047@gondor.apana.org.au
This commit is contained in:
parent
7ca8cf5347
commit
459e39538e
@ -11,6 +11,7 @@
|
|||||||
#define __ASM_GENERIC_QSPINLOCK_H
|
#define __ASM_GENERIC_QSPINLOCK_H
|
||||||
|
|
||||||
#include <asm-generic/qspinlock_types.h>
|
#include <asm-generic/qspinlock_types.h>
|
||||||
|
#include <linux/atomic.h>
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* queued_spin_is_locked - is the spinlock locked?
|
* queued_spin_is_locked - is the spinlock locked?
|
||||||
|
@ -9,15 +9,7 @@
|
|||||||
#ifndef __ASM_GENERIC_QSPINLOCK_TYPES_H
|
#ifndef __ASM_GENERIC_QSPINLOCK_TYPES_H
|
||||||
#define __ASM_GENERIC_QSPINLOCK_TYPES_H
|
#define __ASM_GENERIC_QSPINLOCK_TYPES_H
|
||||||
|
|
||||||
/*
|
|
||||||
* Including atomic.h with PARAVIRT on will cause compilation errors because
|
|
||||||
* of recursive header file incluson via paravirt_types.h. So don't include
|
|
||||||
* it if PARAVIRT is on.
|
|
||||||
*/
|
|
||||||
#ifndef CONFIG_PARAVIRT
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
#include <linux/atomic.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct qspinlock {
|
typedef struct qspinlock {
|
||||||
union {
|
union {
|
||||||
|
Loading…
Reference in New Issue
Block a user