/* * Xen stolen ticks accounting. */ #include <linux/kernel.h> #include <linux/kernel_stat.h> #include <linux/math64.h> #include <linux/gfp.h> #include <asm/xen/hypervisor.h> #include <asm/xen/hypercall.h> #include <xen/events.h> #include <xen/features.h> #include <xen/interface/xen.h> #include <xen/interface/vcpu.h> #include <xen/xen-ops.h> /* runstate info updated by Xen */ static DEFINE_PER_CPU(struct vcpu_runstate_info, xen_runstate); /* return an consistent snapshot of 64-bit time/counter value */
static u64 get64(const u64 *p) { u64 ret; if (BITS_PER_LONG < 64) { u32 *p32 = (u32 *)p; u32 h, l, h2; /* * Read high then low, and then make sure high is * still the same; this will only loop if low wraps * and carries into high. * XXX some clean way to make this endian-proof? */ do { h = READ_ONCE(p32[1]); l = READ_ONCE(p32[0]); h2 = READ_ONCE(p32[1]); } while(h2 != h); ret = (((u64)h) << 32) | l; } else ret = READ_ONCE(*p); return ret; }Contributors
Person | Tokens | Prop | Commits | CommitProp | |
stefano stabellini | stefano stabellini | 107 | 100.00% | 2 | 100.00% |
Total | 107 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
stefano stabellini | stefano stabellini | 68 | 100.00% | 2 | 100.00% |
Total | 68 | 100.00% | 2 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
stefano stabellini | stefano stabellini | 20 | 100.00% | 1 | 100.00% |
Total | 20 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
stefano stabellini | stefano stabellini | 41 | 100.00% | 1 | 100.00% |
Total | 41 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
stefano stabellini | stefano stabellini | 283 | 100.00% | 2 | 100.00% |
Total | 283 | 100.00% | 2 | 100.00% |