Blame SOURCES/Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch

db76f4
From f77b2b0c795f5d2ad7a85ae3bfffcf74232836ec Mon Sep 17 00:00:00 2001
db76f4
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
db76f4
Date: Tue, 6 May 2014 08:47:16 +0200
db76f4
Subject: [PATCH 1/2] Add support for cpu_type on ARM and AArch64 Linux
db76f4
 platforms
db76f4
MIME-Version: 1.0
db76f4
Content-Type: text/plain; charset=UTF-8
db76f4
Content-Transfer-Encoding: 8bit
db76f4
db76f4
The CPU type is listed as Processor (upper-cased P) entry. SMP systems
db76f4
enumerate cores by processor (lower-cased P) entries in addition.
db76f4
The Processor is always first, so case-insesitive look-up is not
db76f4
a problem.
db76f4
db76f4
Signed-off-by: Petr Písař <ppisar@redhat.com>
db76f4
---
db76f4
 CPU.xs | 3 +++
db76f4
 1 file changed, 3 insertions(+)
db76f4
db76f4
diff --git a/CPU.xs b/CPU.xs
db76f4
index 236b14d..067c9cb 100644
db76f4
--- a/CPU.xs
db76f4
+++ b/CPU.xs
db76f4
@@ -395,6 +395,9 @@ CODE:
db76f4
     sysctlbyname("hw.model", value, &len, NULL, 0);
db76f4
 #endif
db76f4
 #ifdef __linux__
db76f4
+#if defined __arm__ || defined __aarch64__
db76f4
+    value = proc_cpuinfo_field ("Processor");
db76f4
+#endif
db76f4
 #if defined __s390__ || defined __s390x__
db76f4
     value = processor_machine_field (proc_cpuinfo_field ("processor") );
db76f4
 #endif
db76f4
-- 
db76f4
1.9.0
db76f4