WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Is there an equivalent to logical_proc_id[] ?

To: "Santos, Jose Renato G" <joserenato.santos@xxxxxx>
Subject: Re: [Xen-devel] Is there an equivalent to logical_proc_id[] ?
From: Ryan Harper <ryanh@xxxxxxxxxx>
Date: Mon, 20 Jun 2005 14:28:03 -0500
Cc: "Turner, Yoshio" <yoshio_turner@xxxxxx>, Aravind Menon <aravind.menon@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, G John Janakiraman <john@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 20 Jun 2005 19:27:06 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <6C21311CEE34E049B74CC0EF339464B924B3E3@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <6C21311CEE34E049B74CC0EF339464B924B3E3@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
* Santos, Jose Renato G <joserenato.santos@xxxxxx> [2005-06-20 14:10]:
> 
>   Hi,
> 
>   I am trying to port xenoprof to the latest version of xen-unstable
>   and noticed the variable "logical_proc_id[]" that used to be defined
>   in setup.c is gone. I spent sometime trying to find an equivalent
>   variable/function without success.
>  
>   Does anyone know a simple way of determining the logical CPU id in
>   a given physical CPU (i.e an id in the range [0,smp_num_siblings-1])?
> 
>   Thanks in advance for any help
> 
>   Renato
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

I used the cpuid_apic id which I found in arch/i386/kernel/cpu/common.c
in the detech_ht() routine.

   unsigned int logical_proc_id;
   u32   eax, ebx, ecx, edx;

   cpuid(1, &eax, &ebx, &ecx, &edx);
   logical_proc_id = (ebx >> 24 & 0xff) & 1;


That worked for me when I was trying to get xenoprof to build/work
against unstable tree.


-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@xxxxxxxxxx

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>