<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:"\@MS Mincho";
        panose-1:2 2 6 9 4 2 5 8 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=SV link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>Hi<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>I have seen a problem when it comes to the number of cpus for ARM (32-bits).<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>static int<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>arm_get_smp_cpus(void)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>{<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                           return MAX(get_cpus_active(), get_cpus_online());<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>}<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>In one of my example, “help –k” gives me:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>       cpu_possible_map: 0 1 2 3 <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>        cpu_present_map: 0 1 2 3 <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>         cpu_online_map: 0 3 <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>         cpu_active_map: 3 <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>So the number of cpus will become 2. However there are code in a number of places that will then only accept cpu 0 and 1 as cpus to handle.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>When I changed to code to be the same as for ARM64 things worked as expected:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>static int<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>arm_get_smp_cpus(void)<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>{<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>                           return MAX(get_cpus_online(), get_highest_cpu_online()+1);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>}<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Jan<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='mso-line-height-alt:10.5pt'><b><span lang=EN-US style='font-family:"Arial","sans-serif";color:black'>Jan Karlsson</span></b><span lang=EN-US style='font-family:"Arial","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal style='line-height:10.5pt'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>Senior Software Engineer<o:p></o:p></span></p><p class=MsoNormal style='line-height:10.5pt'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:black'>System Assurance<o:p></o:p></span></p><p class=MsoNormal style='line-height:10.5pt'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'><o:p> </o:p></span></p><p class=MsoNormal style='line-height:10.5pt'><b><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'>Sony Mobile Communications<o:p></o:p></span></b></p><p class=MsoNormal style='line-height:10.5pt'><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'>Tel: +46 703 062 174<o:p></o:p></span></p><p class=MsoNormal style='line-height:10.5pt'><span lang=EN-GB style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'><a href="mailto:Firstname.Lastname@sonymobile.com"><span style='color:blue'>jan.karlsson@sonymobile.com</span></a><o:p></o:p></span></p><p class=MsoNormal style='line-height:10.5pt'><span lang=EN-GB style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#222222'><o:p> </o:p></span></p><p class=MsoNormal style='mso-line-height-alt:10.5pt'><span style='color:#1F497D'><a href="http://sonymobile.com/"><span lang=EN-US style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#002AFF'>sonymobile.com</span></a></span><span lang=EN-US style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal style='mso-line-height-alt:10.5pt'><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='mso-line-height-alt:10.5pt'><span style='color:#1F497D'><img border=0 width=84 height=15 id="Picture_x0020_1" src="cid:image001.gif@01CFE865.529F8280" alt="Sony logotype_23px height_Email_144dpi"></span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#002AFF'><o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p></div></body></html>