Re: Crash with SMP on post 2.6.15 -git kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 11, 2006 at 12:12:40PM +0100, Andi Kleen wrote:
> On Wednesday 11 January 2006 10:32, Vivek Goyal wrote:
> 
> > Few x86_64 APIC related kexec changes are still in Andi's tree and have not
> > been pushed to Linus tree. So there are no new x86_64 kexec patches in latest
> > git repository.
> > 
> > Andrew has pushed x86_64 kdump related patches to Linus tree. And these become
> > effective only under CONFIG_CRASH_DUMP. These patches are very less likely
> > to botch with this stuff.
> 
> Yes, it was only a very quick look through the change log. Sorry for
> hitting on you. I have no clue what could have broken. And my machines boot 
> too with -git7 and his config.
> 
> Stephen, can you please do a binary search?
> 

Andi,

While testing this I ran into another problem with same symtoms. If 
I compile my kernel for physical location greater than or equal to 
16MB then only BP boots and applicatoin processors don't come up. I had
noticed this problem in i386 and posted a patch. Here is the similar  patch 
for x86_64.

Though the symtoms are same but this does not seem to be related to the
problem which Stephen is facing as he seems to be compiling the kernel
for 1MB location only.

Thanks
Vivek




o This fix was posted for i386 long back. Posting it for x86_64.

  http://marc.theaimsgroup.com/?l=linux-kernel&m=110380103229830&w=2

o This patch fixes the problem of secondary cpus boot up. This situation
  is faced when kernel is built for non default locations like 16MB and
  onwards. In this configuration, only primary cpu (BP) comes and
  secondary cpus don't boot.
                                                                                
o Problem occurs because in trampoline code, lgdt is not able to load the
  GDT as it happens to be situated beyond 16MB. This is due to the fact
  that cpu is still in real mode and default operand size is 16bit.
                                                                                
o This patch uses lgdtl instead of lgdt to force operand size to 32
  instead of 16.


Signed-off-by: Vivek Goyal <[email protected]>
---


diff -puN arch/x86_64/kernel/trampoline.S~x86_64-non-default-location-smp-kernel-boot-fix arch/x86_64/kernel/trampoline.S
--- linux-2.6.15-git7/arch/x86_64/kernel/trampoline.S~x86_64-non-default-location-smp-kernel-boot-fix	2006-01-11 10:32:30.000000000 -0800
+++ linux-2.6.15-git7-root/arch/x86_64/kernel/trampoline.S	2006-01-11 10:34:42.000000000 -0800
@@ -42,8 +42,15 @@ r_base = .
 	movl	$0xA5A5A5A5, trampoline_data - r_base
 				# write marker for master knows we're running
 
-	lidt	idt_48 - r_base	# load idt with 0, 0
-	lgdt	gdt_48 - r_base	# load gdt with whatever is appropriate
+	/*
+	 * GDT tables in non default location kernel can be beyond 16MB and
+	 * lgdt will not be able to load the address as in real mode default
+	 * operand size is 16bit. Use lgdtl instead to force operand size
+	 * to 32 bit.
+	 */
+
+	lidtl	idt_48 - r_base	# load idt with 0, 0
+	lgdtl	gdt_48 - r_base	# load gdt with whatever is appropriate
 
 	xor	%ax, %ax
 	inc	%ax		# protected mode (PE) bit
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux