aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2006-09-29 19:47:55 -0400
committerAndi Kleen <andi@basil.nowhere.org>2006-09-29 19:47:55 -0400
commit34596dc9e59d7bece16fe5aba08116b49465da26 (patch)
tree75e09786a8ff8db3a69a5c82663f97d317e59e46 /arch
parent120b114237e2461fb4fa437c5c37edf014c916b9 (diff)
[PATCH] Define vsyscall cache as blob to make clearer that user space shouldn't use it
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86_64/kernel/vsyscall.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86_64/kernel/vsyscall.c b/arch/x86_64/kernel/vsyscall.c
index ac48c3857ddb..07c086382059 100644
--- a/arch/x86_64/kernel/vsyscall.c
+++ b/arch/x86_64/kernel/vsyscall.c
@@ -155,8 +155,8 @@ vgetcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
155 We do this here because otherwise user space would do it on 155 We do this here because otherwise user space would do it on
156 its own in a likely inferior way (no access to jiffies). 156 its own in a likely inferior way (no access to jiffies).
157 If you don't like it pass NULL. */ 157 If you don't like it pass NULL. */
158 if (tcache && tcache->t0 == (j = __jiffies)) { 158 if (tcache && tcache->blob[0] == (j = __jiffies)) {
159 p = tcache->t1; 159 p = tcache->blob[1];
160 } else if (__vgetcpu_mode == VGETCPU_RDTSCP) { 160 } else if (__vgetcpu_mode == VGETCPU_RDTSCP) {
161 /* Load per CPU data from RDTSCP */ 161 /* Load per CPU data from RDTSCP */
162 rdtscp(dummy, dummy, p); 162 rdtscp(dummy, dummy, p);
@@ -165,8 +165,8 @@ vgetcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
165 asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG)); 165 asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG));
166 } 166 }
167 if (tcache) { 167 if (tcache) {
168 tcache->t0 = j; 168 tcache->blob[0] = j;
169 tcache->t1 = p; 169 tcache->blob[1] = p;
170 } 170 }
171 if (cpu) 171 if (cpu)
172 *cpu = p & 0xfff; 172 *cpu = p & 0xfff;