aports/testing/thermald/ppc64le.patch
2019-08-21 18:46:22 -03:00

47 lines
1.2 KiB
Diff

diff --git a/src/thd_engine.cpp b/src/thd_engine.cpp
index 82882dd..51266d3 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
+#if !defined(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..170a148 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
+#if !defined(ANDROID) && !defined(__powerpc__)
int map_fd;
void *rapl_mem;
unsigned char *rapl_pkg_pwr_addr;