aboutsummaryrefslogtreecommitdiffstats
path: root/testing/perl-sys-cpu/Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch
blob: 2d81347db6cbd8cbee7142352ac627acfed473ff (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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>
<head>
<title>rpms/perl-Sys-CPU.git - perl-Sys-CPU</title>
<meta name='generator' content='cgit v0.12'/>
<meta name='robots' content='index, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit-data/cgit.css'/>
<link rel='shortcut icon' href='/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='http://pkgs.fedoraproject.org/cgit/rpms/perl-Sys-CPU.git/atom/Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch?h=master' type='application/atom+xml'/>
<link rel='vcs-git' href='git://pkgs.fedoraproject.org/rpms/perl-Sys-CPU.git' title='rpms/perl-Sys-CPU.git Git repository'/>
<link rel='vcs-git' href='ssh://pkgs.fedoraproject.org/rpms/perl-Sys-CPU.git' title='rpms/perl-Sys-CPU.git Git repository'/>
<link rel='vcs-git' href='http://pkgs.fedoraproject.org/git/rpms/perl-Sys-CPU.git' title='rpms/perl-Sys-CPU.git Git repository'/>
</head>
<body>
<script src="https://apps.fedoraproject.org/fedmenu/js/jquery-1.11.2.min.js"></script>
<script src="https://apps.fedoraproject.org/fedmenu/js/fedmenu.js"></script>

<script>
    var base = 'https://apps.fedoraproject.org/';
    var tokens = window.location.href.split('/');
  var repo = null;
  if (tokens.length > 4 && tokens[4] != '') {
    repo = tokens[4].split('.')[0];
  }
  fedmenu({
      'url': base + 'js/data.js',
      'mimeType': 'application/javascript',
      'position': 'bottom-right',
      'package': repo,
  });
</script>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/cgit/'><img src='/cgit-data/cgit.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/cgit/'>index</a> : <a title='rpms/perl-Sys-CPU.git' href='/cgit/rpms/perl-Sys-CPU.git/'>rpms/perl-Sys-CPU.git</a></td><td class='form'><form method='get' action=''>
<select name='h' onchange='this.form.submit();'>
<option value='el5'>el5</option>
<option value='el6'>el6</option>
<option value='f12'>f12</option>
<option value='f13'>f13</option>
<option value='f14'>f14</option>
<option value='f15'>f15</option>
<option value='f16'>f16</option>
<option value='f17'>f17</option>
<option value='f18'>f18</option>
<option value='f19'>f19</option>
<option value='f20'>f20</option>
<option value='f21'>f21</option>
<option value='f22'>f22</option>
<option value='f23'>f23</option>
<option value='f24'>f24</option>
<option value='f25'>f25</option>
<option value='master' selected='selected'>master</option>
</select> <input type='submit' name='' value='switch'/></form></td></tr>
<tr><td class='sub'>perl-Sys-CPU</td><td class='sub right'>Jesse Keating</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit/rpms/perl-Sys-CPU.git/'>summary</a><a href='/cgit/rpms/perl-Sys-CPU.git/refs/'>refs</a><a href='/cgit/rpms/perl-Sys-CPU.git/log/Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch'>log</a><a class='active' href='/cgit/rpms/perl-Sys-CPU.git/tree/Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch'>tree</a><a href='/cgit/rpms/perl-Sys-CPU.git/commit/Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch'>commit</a><a href='/cgit/rpms/perl-Sys-CPU.git/diff/Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch'>diff</a><a href='/cgit/rpms/perl-Sys-CPU.git/stats/Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch'>stats</a></td><td class='form'><form class='right' method='get' action='/cgit/rpms/perl-Sys-CPU.git/log/Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch'>
<select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='text' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit/rpms/perl-Sys-CPU.git/tree/'>root</a>/<a href='/cgit/rpms/perl-Sys-CPU.git/tree/Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch'>Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch</a></div><div class='content'>blob: 7f724eec469e2dd302c8dd068ccc22bc2d21ad65 (<a href='/cgit/rpms/perl-Sys-CPU.git/plain/Sys-CPU-0.61-Add-support-for-cpu_type-on-ARM-and-AArch64-Linux-pl.patch'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
<a id='n9' href='#n9'>9</a>
<a id='n10' href='#n10'>10</a>
<a id='n11' href='#n11'>11</a>
<a id='n12' href='#n12'>12</a>
<a id='n13' href='#n13'>13</a>
<a id='n14' href='#n14'>14</a>
<a id='n15' href='#n15'>15</a>
<a id='n16' href='#n16'>16</a>
<a id='n17' href='#n17'>17</a>
<a id='n18' href='#n18'>18</a>
<a id='n19' href='#n19'>19</a>
<a id='n20' href='#n20'>20</a>
<a id='n21' href='#n21'>21</a>
<a id='n22' href='#n22'>22</a>
<a id='n23' href='#n23'>23</a>
<a id='n24' href='#n24'>24</a>
<a id='n25' href='#n25'>25</a>
<a id='n26' href='#n26'>26</a>
<a id='n27' href='#n27'>27</a>
<a id='n28' href='#n28'>28</a>
<a id='n29' href='#n29'>29</a>
<a id='n30' href='#n30'>30</a>
<a id='n31' href='#n31'>31</a>
<a id='n32' href='#n32'>32</a>
<a id='n33' href='#n33'>33</a>
<a id='n34' href='#n34'>34</a>
<a id='n35' href='#n35'>35</a>
<a id='n36' href='#n36'>36</a>
</pre></td>
<td class='lines'><pre><code>From f77b2b0c795f5d2ad7a85ae3bfffcf74232836ec Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= &lt;ppisar@redhat.com&gt;
Date: Tue, 6 May 2014 08:47:16 +0200
Subject: [PATCH 1/2] Add support for cpu_type on ARM and AArch64 Linux
 platforms
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The CPU type is listed as Processor (upper-cased P) entry. SMP systems
enumerate cores by processor (lower-cased P) entries in addition.
The Processor is always first, so case-insesitive look-up is not
a problem.

Signed-off-by: Petr Písař &lt;ppisar@redhat.com&gt;
---
 CPU.xs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/CPU.xs b/CPU.xs
index 236b14d..067c9cb 100644
--- a/CPU.xs
+++ b/CPU.xs
@@ -395,6 +395,9 @@ CODE:
     sysctlbyname("hw.model", value, &amp;len, NULL, 0);
 #endif
 #ifdef __linux__
+#if defined __arm__ || defined __aarch64__
+    value = proc_cpuinfo_field ("Processor");
+#endif
 #if defined __s390__ || defined __s390x__
     value = processor_machine_field (proc_cpuinfo_field ("processor") );
 #endif
-- 
1.9.0

</code></pre></td></tr></table>
</div> <!-- class=content -->
<div class='footer'>generated by <a href='http://git.zx2c4.com/cgit/about/'>cgit v0.12</a> at 2016-08-29 21:51:15 (GMT)</div>
</div> <!-- id=cgit -->
</body>
</html>