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