|
@@ -155,8 +155,8 @@ vgetcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
|
|
|
We do this here because otherwise user space would do it on
|
|
We do this here because otherwise user space would do it on
|
|
|
its own in a likely inferior way (no access to jiffies).
|
|
its own in a likely inferior way (no access to jiffies).
|
|
|
If you don't like it pass NULL. */
|
|
If you don't like it pass NULL. */
|
|
|
- if (tcache && tcache->t0 == (j = __jiffies)) {
|
|
|
|
|
- p = tcache->t1;
|
|
|
|
|
|
|
+ if (tcache && tcache->blob[0] == (j = __jiffies)) {
|
|
|
|
|
+ p = tcache->blob[1];
|
|
|
} else if (__vgetcpu_mode == VGETCPU_RDTSCP) {
|
|
} else if (__vgetcpu_mode == VGETCPU_RDTSCP) {
|
|
|
/* Load per CPU data from RDTSCP */
|
|
/* Load per CPU data from RDTSCP */
|
|
|
rdtscp(dummy, dummy, p);
|
|
rdtscp(dummy, dummy, p);
|
|
@@ -165,8 +165,8 @@ vgetcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *tcache)
|
|
|
asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG));
|
|
asm("lsl %1,%0" : "=r" (p) : "r" (__PER_CPU_SEG));
|
|
|
}
|
|
}
|
|
|
if (tcache) {
|
|
if (tcache) {
|
|
|
- tcache->t0 = j;
|
|
|
|
|
- tcache->t1 = p;
|
|
|
|
|
|
|
+ tcache->blob[0] = j;
|
|
|
|
|
+ tcache->blob[1] = p;
|
|
|
}
|
|
}
|
|
|
if (cpu)
|
|
if (cpu)
|
|
|
*cpu = p & 0xfff;
|
|
*cpu = p & 0xfff;
|