aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 20:05:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-22 20:05:15 -0400
commit8e204874db000928e37199c2db82b7eb8966cc3c (patch)
treeeae66035cb761c3c5a79e98b92280b5156bc01ef /include
parent3e0b8df79ddb8955d2cce5e858972a9cfe763384 (diff)
parentaafade242ff24fac3aabf61c7861dfa44a3c2445 (diff)
Merge branch 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-vdso-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86-64, vdso: Do not allocate memory for the vDSO clocksource: Change __ARCH_HAS_CLOCKSOURCE_DATA to a CONFIG option x86, vdso: Drop now wrong comment Document the vDSO and add a reference parser ia64: Replace clocksource.fsys_mmio with generic arch data x86-64: Move vread_tsc and vread_hpet into the vDSO clocksource: Replace vread with generic arch data x86-64: Add --no-undefined to vDSO build x86-64: Allow alternative patching in the vDSO x86: Make alternative instruction pointers relative x86-64: Improve vsyscall emulation CS and RIP handling x86-64: Emulate legacy vsyscalls x86-64: Fill unused parts of the vsyscall page with 0xcc x86-64: Remove vsyscall number 3 (venosys) x86-64: Map the HPET NX x86-64: Remove kernel.vsyscall64 sysctl x86-64: Give vvars their own page x86-64: Document some of entry_64.S x86-64: Fix alignment of jiffies variable
Diffstat (limited to 'include')
-rw-r--r--include/linux/clocksource.h15
-rw-r--r--include/linux/seccomp.h10
2 files changed, 18 insertions, 7 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 18a1baf31f2d..139c4db55f17 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -22,6 +22,10 @@
22typedef u64 cycle_t; 22typedef u64 cycle_t;
23struct clocksource; 23struct clocksource;
24 24
25#ifdef CONFIG_ARCH_CLOCKSOURCE_DATA
26#include <asm/clocksource.h>
27#endif
28
25/** 29/**
26 * struct cyclecounter - hardware abstraction for a free running counter 30 * struct cyclecounter - hardware abstraction for a free running counter
27 * Provides completely state-free accessors to the underlying hardware. 31 * Provides completely state-free accessors to the underlying hardware.
@@ -153,7 +157,7 @@ extern u64 timecounter_cyc2time(struct timecounter *tc,
153 * @shift: cycle to nanosecond divisor (power of two) 157 * @shift: cycle to nanosecond divisor (power of two)
154 * @max_idle_ns: max idle time permitted by the clocksource (nsecs) 158 * @max_idle_ns: max idle time permitted by the clocksource (nsecs)
155 * @flags: flags describing special properties 159 * @flags: flags describing special properties
156 * @vread: vsyscall based read 160 * @archdata: arch-specific data
157 * @suspend: suspend function for the clocksource, if necessary 161 * @suspend: suspend function for the clocksource, if necessary
158 * @resume: resume function for the clocksource, if necessary 162 * @resume: resume function for the clocksource, if necessary
159 */ 163 */
@@ -169,16 +173,13 @@ struct clocksource {
169 u32 shift; 173 u32 shift;
170 u64 max_idle_ns; 174 u64 max_idle_ns;
171 175
172#ifdef CONFIG_IA64 176#ifdef CONFIG_ARCH_CLOCKSOURCE_DATA
173 void *fsys_mmio; /* used by fsyscall asm code */ 177 struct arch_clocksource_data archdata;
174#define CLKSRC_FSYS_MMIO_SET(mmio, addr) ((mmio) = (addr))
175#else
176#define CLKSRC_FSYS_MMIO_SET(mmio, addr) do { } while (0)
177#endif 178#endif
179
178 const char *name; 180 const char *name;
179 struct list_head list; 181 struct list_head list;
180 int rating; 182 int rating;
181 cycle_t (*vread)(void);
182 int (*enable)(struct clocksource *cs); 183 int (*enable)(struct clocksource *cs);
183 void (*disable)(struct clocksource *cs); 184 void (*disable)(struct clocksource *cs);
184 unsigned long flags; 185 unsigned long flags;
diff --git a/include/linux/seccomp.h b/include/linux/seccomp.h
index 167c33361d9c..cc7a4e9cc7ad 100644
--- a/include/linux/seccomp.h
+++ b/include/linux/seccomp.h
@@ -19,6 +19,11 @@ static inline void secure_computing(int this_syscall)
19extern long prctl_get_seccomp(void); 19extern long prctl_get_seccomp(void);
20extern long prctl_set_seccomp(unsigned long); 20extern long prctl_set_seccomp(unsigned long);
21 21
22static inline int seccomp_mode(seccomp_t *s)
23{
24 return s->mode;
25}
26
22#else /* CONFIG_SECCOMP */ 27#else /* CONFIG_SECCOMP */
23 28
24#include <linux/errno.h> 29#include <linux/errno.h>
@@ -37,6 +42,11 @@ static inline long prctl_set_seccomp(unsigned long arg2)
37 return -EINVAL; 42 return -EINVAL;
38} 43}
39 44
45static inline int seccomp_mode(seccomp_t *s)
46{
47 return 0;
48}
49
40#endif /* CONFIG_SECCOMP */ 50#endif /* CONFIG_SECCOMP */
41 51
42#endif /* _LINUX_SECCOMP_H */ 52#endif /* _LINUX_SECCOMP_H */