All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Ian Campbell <Ian.Campbell@XenSource.com>
Cc: linux-kernel@vger.kernel.org,
	Chuck Ebbert <76306.1226@compuserve.com>,
	Zachary Amsden <zach@vmware.com>,
	Jan Beulich <jbeulich@novell.com>, Andi Kleen <ak@suse.de>,
	Andrew Morton <akpm@osdl.org>, Chris Wright <chrisw@sous-sol.org>
Subject: Re: [PATCH 7/8] Implement smp_processor_id() with the PDA.
Date: Thu, 31 Aug 2006 09:04:29 -0700	[thread overview]
Message-ID: <44F7088D.7010700@goop.org> (raw)
In-Reply-To: <1157027758.12949.327.camel@localhost.localdomain>

Ian Campbell wrote:
> This doesn't compile for me if CONFIG_SMP=n
>   

Ah, good point.

>           LD      .tmp_vmlinux1
>         arch/i386/kernel/built-in.o: In function `cpu_init':
>         (.init.text+0x1eda): undefined reference to `early_smp_processor_id'
>         arch/i386/kernel/built-in.o: In function `cpu_init':
>         (.init.text+0x1f11): undefined reference to `early_smp_processor_id'
>         
> smp_processor_id() is defined for !SMP in include/linux/smp.h, I don't
> know if it would be appropriate to add early_smp_processor_id() there
> since it seems i386 specific. asm/smp.h isn't included by linux/smp.h
> when !SMP but you could add an explicit include to common.c I suppose.
>   

I'll have a look.

I think my preferred solution would be to get rid of all the early* 
stuff, and try to arrange to have the PDA set up before C code gets 
run.  For the boot CPU, it really could be done statically (I'm not 
quite sure why the boot CPU's GDT is allocated, given that it already 
has a static one; I think this might have been a Xen-related change?).  
The secondary CPUs could have their GDT+PDA completely allocated and 
initialized in advance, making secondary CPU PDA setup just a matter of 
doing lgdt and setting %gs in head.S, even before hitting C code.

    J

  reply	other threads:[~2006-08-31 16:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-30 23:52 [PATCH 0/8] Implement per-processor data areas for i386 Jeremy Fitzhardinge
2006-08-30 23:52 ` [PATCH 1/8] Use asm-offsets for the offsets of registers into the pt_regs struct, rather than having hard-coded constants Jeremy Fitzhardinge
2006-08-30 23:52 ` [PATCH 2/8] Basic definitions for i386-pda Jeremy Fitzhardinge
2006-08-30 23:52 ` [PATCH 3/8] Initialize the per-CPU data area Jeremy Fitzhardinge
2006-08-30 23:52 ` [PATCH 4/8] Use %gs as the PDA base-segment in the kernel Jeremy Fitzhardinge
2006-08-30 23:52 ` [PATCH 5/8] Fix places where using %gs changes the usermode ABI Jeremy Fitzhardinge
2006-08-31  7:11   ` Andi Kleen
2006-08-31  7:22     ` Jeremy Fitzhardinge
2006-08-31  7:36       ` Andi Kleen
2006-08-31  8:04         ` Jeremy Fitzhardinge
2006-08-31  8:13           ` Andi Kleen
2006-08-31  8:39             ` Jeremy Fitzhardinge
2006-08-30 23:52 ` [PATCH 6/8] Update sys_vm86 to cope with changed pt_regs and %gs usage Jeremy Fitzhardinge
2006-08-30 23:52 ` [PATCH 7/8] Implement smp_processor_id() with the PDA Jeremy Fitzhardinge
2006-08-31 12:35   ` Ian Campbell
2006-08-31 16:04     ` Jeremy Fitzhardinge [this message]
2006-08-31 19:10     ` Jeremy Fitzhardinge
2006-08-31 21:34       ` Ian Campbell
2006-08-31 21:39         ` Jeremy Fitzhardinge
2006-08-30 23:52 ` [PATCH 8/8] Implement "current" " Jeremy Fitzhardinge
  -- strict thread matches above, loose matches on Subject: below --
2006-09-01  6:47 [PATCH 0/8] Implement per-processor data areas for i386 Jeremy Fitzhardinge
2006-09-01  6:47 ` [PATCH 7/8] Implement smp_processor_id() with the PDA Jeremy Fitzhardinge

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=44F7088D.7010700@goop.org \
    --to=jeremy@goop.org \
    --cc=76306.1226@compuserve.com \
    --cc=Ian.Campbell@XenSource.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=chrisw@sous-sol.org \
    --cc=jbeulich@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zach@vmware.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.