diff options
Diffstat (limited to 'drivers/platform/x86/intel_ips.c')
-rw-r--r-- | drivers/platform/x86/intel_ips.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel_ips.c b/drivers/platform/x86/intel_ips.c index 85c8ad43c0c5..5ffe7c398148 100644 --- a/drivers/platform/x86/intel_ips.c +++ b/drivers/platform/x86/intel_ips.c | |||
@@ -344,6 +344,19 @@ struct ips_driver { | |||
344 | static bool | 344 | static bool |
345 | ips_gpu_turbo_enabled(struct ips_driver *ips); | 345 | ips_gpu_turbo_enabled(struct ips_driver *ips); |
346 | 346 | ||
347 | #ifndef readq | ||
348 | static inline __u64 readq(const volatile void __iomem *addr) | ||
349 | { | ||
350 | const volatile u32 __iomem *p = addr; | ||
351 | u32 low, high; | ||
352 | |||
353 | low = readl(p); | ||
354 | high = readl(p + 1); | ||
355 | |||
356 | return low + ((u64)high << 32); | ||
357 | } | ||
358 | #endif | ||
359 | |||
347 | /** | 360 | /** |
348 | * ips_cpu_busy - is CPU busy? | 361 | * ips_cpu_busy - is CPU busy? |
349 | * @ips: IPS driver struct | 362 | * @ips: IPS driver struct |