From: "tip-bot for H. Peter Anvin" <hpa@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, hpa@zytor.com,
mingo@redhat.com, luto@mit.edu, tony.luck@intel.com,
tglx@linutronix.de
Subject: [tip:x86/vdso] clocksource: Change __ARCH_HAS_CLOCKSOURCE_DATA to a CONFIG option
Date: Thu, 21 Jul 2011 20:52:07 GMT [thread overview]
Message-ID: <tip-ae7bd11b471931752e5609094ca0a49386590524@git.kernel.org> (raw)
In-Reply-To: <4E288AA6.7090804@zytor.com>
Commit-ID: ae7bd11b471931752e5609094ca0a49386590524
Gitweb: http://git.kernel.org/tip/ae7bd11b471931752e5609094ca0a49386590524
Author: H. Peter Anvin <hpa@zytor.com>
AuthorDate: Thu, 21 Jul 2011 13:34:05 -0700
Committer: H. Peter Anvin <hpa@zytor.com>
CommitDate: Thu, 21 Jul 2011 13:34:05 -0700
clocksource: Change __ARCH_HAS_CLOCKSOURCE_DATA to a CONFIG option
The machinery for __ARCH_HAS_CLOCKSOURCE_DATA assumed a file in
asm-generic would be the default for architectures without their own
file in asm/, but that is not how it works.
Replace it with a Kconfig option instead.
Link: http://lkml.kernel.org/r/4E288AA6.7090804@zytor.com
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: Andy Lutomirski <luto@mit.edu>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Tony Luck <tony.luck@intel.com>
---
arch/ia64/Kconfig | 3 +++
arch/ia64/include/asm/clocksource.h | 2 --
arch/x86/Kconfig | 4 ++++
arch/x86/include/asm/clocksource.h | 2 --
include/asm-generic/clocksource.h | 4 ----
include/linux/clocksource.h | 4 +++-
6 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig
index 38280ef..0a9820a 100644
--- a/arch/ia64/Kconfig
+++ b/arch/ia64/Kconfig
@@ -101,6 +101,9 @@ config GENERIC_IOMAP
bool
default y
+config ARCH_CLOCKSOURCE_DATA
+ def_bool y
+
config SCHED_OMIT_FRAME_POINTER
bool
default y
diff --git a/arch/ia64/include/asm/clocksource.h b/arch/ia64/include/asm/clocksource.h
index 00eb549..5c8596e 100644
--- a/arch/ia64/include/asm/clocksource.h
+++ b/arch/ia64/include/asm/clocksource.h
@@ -3,8 +3,6 @@
#ifndef _ASM_IA64_CLOCKSOURCE_H
#define _ASM_IA64_CLOCKSOURCE_H
-#define __ARCH_HAS_CLOCKSOURCE_DATA
-
struct arch_clocksource_data {
void *fsys_mmio; /* used by fsyscall asm code */
};
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index da34972..c1e41bc 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -93,6 +93,10 @@ config CLOCKSOURCE_WATCHDOG
config GENERIC_CLOCKEVENTS
def_bool y
+config ARCH_CLOCKSOURCE_DATA
+ def_bool y
+ depends on X86_64
+
config GENERIC_CLOCKEVENTS_BROADCAST
def_bool y
depends on X86_64 || (X86_32 && X86_LOCAL_APIC)
diff --git a/arch/x86/include/asm/clocksource.h b/arch/x86/include/asm/clocksource.h
index 3882c65..0bdbbb3 100644
--- a/arch/x86/include/asm/clocksource.h
+++ b/arch/x86/include/asm/clocksource.h
@@ -5,8 +5,6 @@
#ifdef CONFIG_X86_64
-#define __ARCH_HAS_CLOCKSOURCE_DATA
-
#define VCLOCK_NONE 0 /* No vDSO clock available. */
#define VCLOCK_TSC 1 /* vDSO should use vread_tsc. */
#define VCLOCK_HPET 2 /* vDSO should use vread_hpet. */
diff --git a/include/asm-generic/clocksource.h b/include/asm-generic/clocksource.h
deleted file mode 100644
index 0a462d3..0000000
--- a/include/asm-generic/clocksource.h
+++ /dev/null
@@ -1,4 +0,0 @@
-/*
- * Architectures should override this file to add private userspace
- * clock magic if needed.
- */
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 6bb6970..59ee970 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -22,7 +22,9 @@
typedef u64 cycle_t;
struct clocksource;
+#ifdef CONFIG_ARCH_CLOCKSOURCE_DATA
#include <asm/clocksource.h>
+#endif
/**
* struct cyclecounter - hardware abstraction for a free running counter
@@ -171,7 +173,7 @@ struct clocksource {
u32 shift;
u64 max_idle_ns;
-#ifdef __ARCH_HAS_CLOCKSOURCE_DATA
+#ifdef CONFIG_ARCH_CLOCKSOURCE_DATA
struct arch_clocksource_data archdata;
#endif
next prev parent reply other threads:[~2011-07-21 20:52 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-13 13:24 [PATCH v3 0/8] x86-64 vDSO changes for 3.1 Andy Lutomirski
2011-07-13 13:24 ` [PATCH v3 1/8] x86-64: Improve vsyscall emulation CS and RIP handling Andy Lutomirski
2011-07-15 4:22 ` [tip:x86/vdso] " tip-bot for Andy Lutomirski
2011-07-13 13:24 ` [PATCH v3 2/8] x86: Make alternative instruction pointers relative Andy Lutomirski
2011-07-15 4:22 ` [tip:x86/vdso] " tip-bot for Andy Lutomirski
2011-07-13 13:24 ` [PATCH v3 3/8] x86-64: Allow alternative patching in the vDSO Andy Lutomirski
2011-07-15 4:23 ` [tip:x86/vdso] " tip-bot for Andy Lutomirski
2011-07-18 19:10 ` Borislav Petkov
2011-07-18 19:54 ` Andrew Lutomirski
2011-07-18 23:54 ` [tip:x86/vdso] x86, vdso: Drop now wrong comment tip-bot for Borislav Petkov
2011-07-13 13:24 ` [PATCH v3 4/8] x86-64: Add --no-undefined to vDSO build Andy Lutomirski
2011-07-15 4:23 ` [tip:x86/vdso] " tip-bot for Andy Lutomirski
2011-07-13 13:24 ` [PATCH v3 5/8] clocksource: Replace vread with generic arch data Andy Lutomirski
2011-07-15 4:24 ` [tip:x86/vdso] " tip-bot for Andy Lutomirski
2011-07-21 20:23 ` H. Peter Anvin
2011-07-21 20:49 ` Andrew Lutomirski
2011-07-21 20:59 ` H. Peter Anvin
2011-07-21 21:22 ` Andrew Lutomirski
2011-07-21 21:25 ` H. Peter Anvin
2011-07-21 21:36 ` Andrew Lutomirski
2011-07-21 21:42 ` H. Peter Anvin
2011-07-21 20:52 ` tip-bot for H. Peter Anvin [this message]
2011-07-13 13:24 ` [PATCH v3 6/8] x86-64: Move vread_tsc and vread_hpet into the vDSO Andy Lutomirski
2011-07-14 3:39 ` H. Peter Anvin
2011-07-14 10:47 ` [PATCH v3] " Andy Lutomirski
2011-07-15 4:24 ` [tip:x86/vdso] " tip-bot for Andy Lutomirski
2011-07-13 13:24 ` [PATCH v3 7/8] ia64: Replace clocksource.fsys_mmio with generic arch data Andy Lutomirski
2011-07-15 4:25 ` [tip:x86/vdso] " tip-bot for Andy Lutomirski
2011-07-13 13:24 ` [PATCH v3 8/8] Document the vDSO and add a reference parser Andy Lutomirski
2011-07-15 4:25 ` [tip:x86/vdso] " tip-bot for Andy Lutomirski
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=tip-ae7bd11b471931752e5609094ca0a49386590524@git.kernel.org \
--to=hpa@zytor.com \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=luto@mit.edu \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.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
Powered by JetHome