blob: 52ca3adcafe0784d3be7186b48cc9b4caccc5818 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
diff --git a/src/thd_engine.cpp b/src/thd_engine.cpp
index 82882dd..64e4db2 100644
--- a/src/thd_engine.cpp
+++ b/src/thd_engine.cpp
@@ -35,7 +35,9 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/utsname.h>
+#ifndef __powerpc__
#include <cpuid.h>
+#endif
#include <locale>
#include "thd_engine.h"
#include "thd_cdev_therm_sys_fs.h"
@@ -664,7 +666,7 @@ static supported_ids_t id_table[] = {
#endif
int cthd_engine::check_cpu_id() {
-#ifndef ANDROID
+#ifndef ANDROID && !defined(__powerpc__)
// Copied from turbostat program
unsigned int ebx, ecx, edx, max_level;
unsigned int fms, family, model, stepping;
diff --git a/src/thd_engine_default.cpp b/src/thd_engine_default.cpp
index 3454170..e75fdaf 100644
--- a/src/thd_engine_default.cpp
+++ b/src/thd_engine_default.cpp
@@ -795,14 +795,16 @@ void cthd_engine_default::workarounds()
}
#ifndef ANDROID
+#ifndef __powerpc__
#include <cpuid.h>
+#endif
#include <sys/mman.h>
#define BIT_ULL(nr) (1ULL << (nr))
#endif
void cthd_engine_default::workaround_rapl_mmio_power(void)
{
-#ifndef ANDROID
+#ifndef ANDROID && !defined(__powerpc__)
int map_fd;
void *rapl_mem;
unsigned char *rapl_pkg_pwr_addr;
|