]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/x86/cpu/interrupts.c
Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'
[karo-tx-uboot.git] / arch / x86 / cpu / interrupts.c
index dd30a05a9ddf54a97d69a62e29aa26c7e3bd0106..e733bcb30272fa0da847cac08ca318eac4ee61ee 100644 (file)
@@ -37,6 +37,8 @@
 #include <asm/msr.h>
 #include <asm/u-boot-x86.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #define DECLARE_INTERRUPT(x) \
        ".globl irq_"#x"\n" \
        ".hidden irq_"#x"\n" \
@@ -626,13 +628,12 @@ asm(".globl irq_common_entry\n" \
  */
 u64 get_ticks(void)
 {
-       static u64 tick_base;
        u64 now_tick = rdtsc();
 
-       if (!tick_base)
-               tick_base = now_tick;
+       if (!gd->arch.tsc_base)
+               gd->arch.tsc_base = now_tick;
 
-       return now_tick - tick_base;
+       return now_tick - gd->arch.tsc_base;
 }
 
 #define PLATFORM_INFO_MSR 0xce