All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ryan Harper <ryanh@us.ibm.com>
To: "Santos, Jose Renato G" <joserenato.santos@hp.com>
Cc: "Turner, Yoshio" <yoshio_turner@hp.com>,
	Aravind Menon <aravind.menon@epfl.ch>,
	xen-devel@lists.xensource.com,
	G John Janakiraman <john@arivalai.hpl.hp.com>
Subject: Re: Is there an equivalent to logical_proc_id[] ?
Date: Mon, 20 Jun 2005 14:28:03 -0500	[thread overview]
Message-ID: <20050620192803.GD867@us.ibm.com> (raw)
In-Reply-To: <6C21311CEE34E049B74CC0EF339464B924B3E3@cacexc12.americas.cpqcorp.net>

* Santos, Jose Renato G <joserenato.santos@hp.com> [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@lists.xensource.com
> 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@us.ibm.com

  reply	other threads:[~2005-06-20 19:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-20 19:08 Is there an equivalent to logical_proc_id[] ? Santos, Jose Renato G
2005-06-20 19:28 ` Ryan Harper [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-06-20 20:12 Santos, Jose Renato G

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050620192803.GD867@us.ibm.com \
    --to=ryanh@us.ibm.com \
    --cc=aravind.menon@epfl.ch \
    --cc=john@arivalai.hpl.hp.com \
    --cc=joserenato.santos@hp.com \
    --cc=xen-devel@lists.xensource.com \
    --cc=yoshio_turner@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.