All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mika Penttilä" <mika.penttila@kolumbus.fi>
To: William Lee Irwin III <wli@holomorphy.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Numaq in 2.4 and 2.6
Date: Sat, 06 Dec 2003 15:09:10 +0200	[thread overview]
Message-ID: <3FD1D4F6.7000106@kolumbus.fi> (raw)
In-Reply-To: <20031206123622.GQ8039@holomorphy.com>



William Lee Irwin III wrote:

>On Sat, Dec 06, 2003 at 02:19:24PM +0200, Mika Penttil? wrote:
>  
>
>>Ok...the only thing that still confuses is the apicid to actually used 
>>to start the cpu. In NUMA-Q case we don't program the LDRs in either 2.4 
>>or 2.6, the bios does this. So the NMI IPI must have the same 
>>destinations in both 2.4 and 2.6 in order to lauch the same cpus.
>>    
>>
>
>On Sat, Dec 06, 2003 at 02:19:24PM +0200, Mika Penttil? wrote:
>  
>
>>In 2.4, the mpc_apicids are used as such as NMI IPI destinations. In 
>>2.6, the mangled ones (by generate_logical_apicid()) are used as NMI IPI 
>>destinations. If the mpc_apicid is already in sort of (cluster, cpu) 
>>format (and used in 2.4 NMI IPI), it can't be the same after mangling?
>>    
>>
>
>The mangled physical APIC ID used as an index into phys_cpu_present_map
>happens to determine the clustered hierarchical logical APIC ID, and so
>wakeup_secondary_cpu() (switched via #ifdef) gets the right number.
>There is a correspondence between (node, physical APIC ID) pairs and
>logical APIC ID's that's part of the BIOS's bootstrap protocol. The
>calculations you're looking at are based on that, and the logical APIC
>ID's are encoded in that paired format by the BIOS, and in the mangled
>format as indices into phys_cpu_present_map.
>
>Both 2.4 and 2.6 use cpu_present_to_apicid() to do that translation on
>the fly given an index into phys_cpu_present_map().
>
>
>-- wli
>  
>
Thanks, I understand what's happening in 2.6. So I think there might be 
a problem with 2.4.23 then. In mpparse.c :

void __init MP_processor_info (struct mpc_config_processor *m)
{
int ver, quad, logical_apicid;

if (!(m->mpc_cpuflag & CPU_ENABLED))
return;

logical_apicid = m->mpc_apicid;
if (clustered_apic_mode == CLUSTERED_APIC_NUMAQ) {
quad = translation_table[mpc_record]->trans_quad;
logical_apicid = (quad << 4) +
(m->mpc_apicid ? m->mpc_apicid << 1 : 1);
printk("Processor #%d %s APIC version %d (quad %d, apic %d)\n",
m->mpc_apicid,
mpc_family((m->mpc_cpufeature & CPU_FAMILY_MASK)>>8 ,
(m->mpc_cpufeature & CPU_MODEL_MASK)>>4),
m->mpc_apicver, quad, logical_apicid);
.....
and later in same function :

phys_cpu_present_map |= apicid_to_phys_cpu_present(m->mpc_apicid);

but _not_

phys_cpu_present_map |= apicid_to_phys_cpu_present(logical_apicid);

as one would expect (and would make it identical to 2.6 behaviour).... A 
bug?


--Mika









  reply	other threads:[~2003-12-06 13:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-06  9:45 Numaq in 2.4 and 2.6 Mika Penttilä
2003-12-06 11:23 ` William Lee Irwin III
2003-12-06 12:20   ` Mika Penttilä
     [not found]   ` <3FD1C94C.1020104@kolumbus.fi>
2003-12-06 12:36     ` William Lee Irwin III
2003-12-06 13:09       ` Mika Penttilä [this message]
2003-12-06 13:07         ` William Lee Irwin III
2003-12-06 13:23           ` Mika Penttilä
2003-12-06 13:23             ` William Lee Irwin III

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=3FD1D4F6.7000106@kolumbus.fi \
    --to=mika.penttila@kolumbus.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wli@holomorphy.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.