Message ID | 20170503145141.4966-3-ynorov@caviumnetworks.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, May 3, 2017 at 4:51 PM, Yury Norov <ynorov@caviumnetworks.com> wrote: > The "qspinlock_types.h" doesn't need linux/atomic.h directly. So > because of this, and because including of it requires the protection > against recursive inclusion, it looks reasonable to move the > inclusion exactly where it is needed. This change affects the x86_64 > arch, as the only user of qspinlocks at now. I have build-tested the > change on x86_64 with CONFIG_PARAVIRT enabled and disabled. > > Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Please keep this together with the other patches as they get merged through the arm64 tree. Arnd
diff --git a/include/asm-generic/qspinlock.h b/include/asm-generic/qspinlock.h index 9f0681bf1e87..5f4d42a09175 100644 --- a/include/asm-generic/qspinlock.h +++ b/include/asm-generic/qspinlock.h @@ -20,6 +20,7 @@ #define __ASM_GENERIC_QSPINLOCK_H #include <asm-generic/qspinlock_types.h> +#include <linux/atomic.h> /** * queued_spin_unlock_wait - wait until the _current_ lock holder releases the lock diff --git a/include/asm-generic/qspinlock_types.h b/include/asm-generic/qspinlock_types.h index 034acd0c4956..a13cc90c87fc 100644 --- a/include/asm-generic/qspinlock_types.h +++ b/include/asm-generic/qspinlock_types.h @@ -18,15 +18,7 @@ #ifndef __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/atomic.h> -#endif typedef struct qspinlock { atomic_t val;
The "qspinlock_types.h" doesn't need linux/atomic.h directly. So because of this, and because including of it requires the protection against recursive inclusion, it looks reasonable to move the inclusion exactly where it is needed. This change affects the x86_64 arch, as the only user of qspinlocks at now. I have build-tested the change on x86_64 with CONFIG_PARAVIRT enabled and disabled. Signed-off-by: Yury Norov <ynorov@caviumnetworks.com> --- include/asm-generic/qspinlock.h | 1 + include/asm-generic/qspinlock_types.h | 8 -------- 2 files changed, 1 insertion(+), 8 deletions(-)