public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Yury Norov <ynorov@caviumnetworks.com>
To: Will Deacon <will.deacon@arm.com>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Cc: Yury Norov <ynorov@caviumnetworks.com>,
	Adam Wallis <awallis@codeaurora.org>,
	Andrew Pinski <Andrew.Pinski@cavium.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Ingo Molnar <mingo@redhat.com>, Jan Glauber <jglauber@cavium.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Subject: [PATCH 2/3] asm-generic: don't #include <linux/atomic.h> in qspinlock_types.h
Date: Wed,  3 May 2017 17:51:40 +0300	[thread overview]
Message-ID: <20170503145141.4966-3-ynorov@caviumnetworks.com> (raw)
In-Reply-To: <20170503145141.4966-1-ynorov@caviumnetworks.com>

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(-)

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;
-- 
2.11.0

  parent reply	other threads:[~2017-05-03 14:52 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-03 14:51 [PATCH 0/3] arm64: queued spinlocks and rw-locks Yury Norov
2017-05-03 14:51 ` [PATCH 1/3] kernel/locking: #include <asm/spinlock.h> in qrwlock.c Yury Norov
2017-05-03 15:05   ` Geert Uytterhoeven
2017-05-03 15:05     ` Geert Uytterhoeven
2017-05-03 20:32     ` Yury Norov
2017-05-03 14:51 ` Yury Norov [this message]
2017-05-04  8:01   ` [PATCH 2/3] asm-generic: don't #include <linux/atomic.h> in qspinlock_types.h Arnd Bergmann
2017-05-03 14:51 ` [PATCH 3/3] arm64/locking: qspinlocks and qrwlocks support Yury Norov
2017-05-09  4:47   ` Boqun Feng
2017-05-09 18:48     ` Yury Norov
2017-05-09 19:37       ` Yury Norov
2017-05-03 18:59 ` 答复: [PATCH 0/3] arm64: queued spinlocks and rw-locks pan xinhui
2017-05-04 20:28   ` Yury Norov
2017-05-05 11:37     ` 答复: " pan xinhui
2017-05-05 11:53     ` Peter Zijlstra
2017-05-05 11:53       ` Peter Zijlstra
2017-05-05 12:26       ` Will Deacon
2017-05-05 15:28         ` Yury Norov
2017-05-05 15:32           ` Will Deacon
2017-05-05 15:32             ` Will Deacon
  -- strict thread matches above, loose matches on Subject: below --
2017-04-10 21:35 [RFC PATCH " Yury Norov
2017-04-10 21:35 ` [PATCH 2/3] asm-generic: don't #include <linux/atomic.h> in qspinlock_types.h Yury Norov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170503145141.4966-3-ynorov@caviumnetworks.com \
    --to=ynorov@caviumnetworks.com \
    --cc=Andrew.Pinski@cavium.com \
    --cc=arnd@arndb.de \
    --cc=awallis@codeaurora.org \
    --cc=catalin.marinas@arm.com \
    --cc=jglauber@cavium.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.com \
    --cc=xinhui.pan@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox