Joerg Roedel wrote:
From: Joerg Roedel <[EMAIL PROTECTED]>

This patch simplifies the get_cycles_sync() function by removing
the #ifdefs from it. Further it introduces an optimization for AMD
processors. There the RDTSCP instruction is used instead of CPUID;RDTSC
which is helpfull if the kernel runs as a KVM guest. Running as a guest
makes CPUID very expensive because it causes an intercept of the guest.

+#define RDTSCP ".byte 0x0f, 0x01, 0xf9"
+       alternative_io_two("cpuid\nrdtsc",
+                          "rdtsc", X86_FEATURE_SYNC_RDTSC,
+                          ".byte 0x0f, 0x01, 0xf9", X86_FEATURE_RDTSCP,

why not use the RDTSCP macro here?


--
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to