public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* smpenum patch updated to 2.6.9-rc2
@ 2004-09-14  0:23 Grover, Andrew
       [not found] ` <F760B14C9561B941B89469F59BA3A847077BA236-sBd4vmA9Se6krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Grover, Andrew @ 2004-09-14  0:23 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi all,

The smpenum patch, which separates the ACPI and MPS-specific code from
each other in SMP init, has been updated to 2.6.9-rc2.

Latest Changes:
- Moved ACPI-specific code from io_apic.c and mpparse.c to acpi/boot.c
- Moved MPS-specific code from io_apic.c to mpparse.c
- Removed obsolete X86_CONFIG_MPPARSE config option

It is available at:

<http://www.kernel.org/pub/linux/kernel/people/grover/smp-20040913-2.6.9
-rc2.diff.gz>

Thanks -- Andy



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: smpenum patch updated to 2.6.9-rc2
       [not found] ` <F760B14C9561B941B89469F59BA3A847077BA236-sBd4vmA9Se6krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2004-09-14 22:00   ` Stian Jordet
  0 siblings, 0 replies; 6+ messages in thread
From: Stian Jordet @ 2004-09-14 22:00 UTC (permalink / raw)
  To: Grover, Andrew; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

man, 13,.09.2004 kl. 17.23 -0700, skrev Grover, Andrew:
> Hi all,
> 
> The smpenum patch, which separates the ACPI and MPS-specific code from
> each other in SMP init, has been updated to 2.6.9-rc2.

Hi Andy,

I have a Asus CUV266-DLS smp motherboard with Via Apollo Pro 266
chipset. It has never booted with io-apic in non-ACPI mode, and still
doesn't. I just want to let you know my experiences with your patch.

1) With ACPI enabled everything works as it always has (one ACPI bug,
but that's another story)

2) With acpi=off and CONFIG_X86_MPS the boot hangs at "ENABLING IO-
APIC's"

3) With acpi=off and !CONFIG_X86_MPS the boot hangs at "Uncompressing
Linux... Ok, booting the kernel".

4) Without your patch and acpi=off the boot hangs at:

ENABLING IO-APIC IRQs
Setting 2 in the phys_id_present_map
...changing IO-APIC Physical APIC ID to 2 ... ok.

Since you asked for testing in your earlier mail, here you go :)

Sorry that my MB is so stupid :P

Best regards,
Stian



-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: smpenum patch updated to 2.6.9-rc2
@ 2004-09-15 21:17 Grover, Andrew
       [not found] ` <F760B14C9561B941B89469F59BA3A847077F835A-sBd4vmA9Se6krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Grover, Andrew @ 2004-09-15 21:17 UTC (permalink / raw)
  To: Stian Jordet; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

[-- Attachment #1: Type: text/plain, Size: 920 bytes --]

> From: Stian Jordet [mailto:liste-NI9zH3lwcMKHXe+LvDLADg@public.gmane.org] 

Hi Stian thanks a lot!

> I have a Asus CUV266-DLS smp motherboard with Via Apollo Pro 266
> chipset. It has never booted with io-apic in non-ACPI mode, and still
> doesn't. I just want to let you know my experiences with your patch.
> 
> 1) With ACPI enabled everything works as it always has (one ACPI bug,
> but that's another story)

great...

> 2) With acpi=off and CONFIG_X86_MPS the boot hangs at "ENABLING IO-
> APIC's"

ok not a new bug...

> 3) With acpi=off and !CONFIG_X86_MPS the boot hangs at "Uncompressing
> Linux... Ok, booting the kernel".

Fixed, please try the attached patch.

> 4) Without your patch and acpi=off the boot hangs at:
> 
> ENABLING IO-APIC IRQs
> Setting 2 in the phys_id_present_map
> ...changing IO-APIC Physical APIC ID to 2 ... ok.

ok great.

Thanks -- Regards -- Andy

[-- Attachment #2: smpenum.diff --]
[-- Type: application/octet-stream, Size: 1382 bytes --]

diff -Nru a/arch/i386/kernel/apic.c b/arch/i386/kernel/apic.c
--- a/arch/i386/kernel/apic.c	2004-09-15 14:13:36 -07:00
+++ b/arch/i386/kernel/apic.c	2004-09-15 14:13:36 -07:00
@@ -666,6 +666,7 @@
 static int __init detect_init_APIC (void)
 {
 	u32 h, l, features;
+	unsigned long lapic_addr;
 	extern void get_cpu_vendor(struct cpuinfo_x86*);
 
 	/* Disabled by DMI scan or kernel option? */
@@ -717,12 +718,12 @@
 		return -1;
 	}
 	set_bit(X86_FEATURE_APIC, boot_cpu_data.x86_capability);
-	smp_lapic_addr = APIC_DEFAULT_PHYS_BASE;
+	lapic_addr = APIC_DEFAULT_PHYS_BASE;
 
 	/* The BIOS may have set up the APIC at some other address */
 	rdmsr(MSR_IA32_APICBASE, l, h);
 	if (l & MSR_IA32_APICBASE_ENABLE)
-		smp_lapic_addr = l & MSR_IA32_APICBASE_BASE;
+		lapic_addr = l & MSR_IA32_APICBASE_BASE;
 
 	if (nmi_watchdog != NMI_NONE)
 		nmi_watchdog = NMI_LOCAL_APIC;
@@ -730,6 +731,8 @@
 	apic_printk(APIC_VERBOSE, "Found and enabled local APIC!\n");
 
 	apic_pm_activate();
+
+	smp_set_lapic_address(lapic_addr);
 
 	return 0;
 
diff -Nru a/arch/i386/kernel/io_apic.c b/arch/i386/kernel/io_apic.c
--- a/arch/i386/kernel/io_apic.c	2004-09-15 14:13:36 -07:00
+++ b/arch/i386/kernel/io_apic.c	2004-09-15 14:13:36 -07:00
@@ -735,7 +735,7 @@
 {
 	int irq;
 
-	if (skip_ioapic_setup == 1)
+	if (skip_ioapic_setup == 1 || !nr_ioapics)
 		return;
 
 	for (irq = 0; irq < NR_IRQS; irq++)

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: smpenum patch updated to 2.6.9-rc2
       [not found] ` <F760B14C9561B941B89469F59BA3A847077F835A-sBd4vmA9Se6krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2004-09-20 12:59   ` Stian Jordet
  0 siblings, 0 replies; 6+ messages in thread
From: Stian Jordet @ 2004-09-20 12:59 UTC (permalink / raw)
  To: Grover, Andrew; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

ons, 15,.09.2004 kl. 14.17 -0700, skrev Grover, Andrew:
> > From: Stian Jordet [mailto:liste-NI9zH3lwcMKHXe+LvDLADg@public.gmane.org] 
> 
> Hi Stian thanks a lot!

My pleasure :)

> > I have a Asus CUV266-DLS smp motherboard with Via Apollo Pro 266
> > chipset. It has never booted with io-apic in non-ACPI mode, and still
> > doesn't. I just want to let you know my experiences with your patch.
> > 
> > 1) With ACPI enabled everything works as it always has (one ACPI bug,
> > but that's another story)
> 
> great...
> 
> > 2) With acpi=off and CONFIG_X86_MPS the boot hangs at "ENABLING IO-
> > APIC's"
> 
> ok not a new bug...
> 
> > 3) With acpi=off and !CONFIG_X86_MPS the boot hangs at "Uncompressing
> > Linux... Ok, booting the kernel".
> 
> Fixed, please try the attached patch.

Yes, works now :)

> > 4) Without your patch and acpi=off the boot hangs at:
> > 
> > ENABLING IO-APIC IRQs
> > Setting 2 in the phys_id_present_map
> > ...changing IO-APIC Physical APIC ID to 2 ... ok.

Why do I get two more lines without your patch? With your patch I only
get the first line before it hangs...

Best regards,
Stian



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: smpenum patch updated to 2.6.9-rc2
@ 2004-09-20 18:29 Grover, Andrew
       [not found] ` <F760B14C9561B941B89469F59BA3A847078E2B48-sBd4vmA9Se6krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Grover, Andrew @ 2004-09-20 18:29 UTC (permalink / raw)
  To: Stian Jordet; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

> From: Stian Jordet [mailto:liste-NI9zH3lwcMKHXe+LvDLADg@public.gmane.org] 
> > > 2) With acpi=off and CONFIG_X86_MPS the boot hangs at 
> "ENABLING IO-
> > > APIC's"

> > > 4) Without your patch and acpi=off the boot hangs at:
> > > 
> > > ENABLING IO-APIC IRQs
> > > Setting 2 in the phys_id_present_map
> > > ...changing IO-APIC Physical APIC ID to 2 ... ok.
> 
> Why do I get two more lines without your patch? With your patch I only
> get the first line before it hangs...

The patch redoes arch/i386/kernel/io_apic.c setup_ioapic_ids_from_mpc.
(Its name loses the "from_mpc" part because it is used by both MPS and
ACPI in the smpenum patch.) The function is completely different and
some of the error messages changed verbosity.

If you'd like to really figure out why this system isn't working via
MPS, here are some things to try:

1) Is it hanging in that function? insert a printk at the very end, to
see.
2) Find the line that says "#define Dprintk (x...)" in
include/asm-i386/apic.h and change it to "#define Dprintk (x...) printk
(x...)". That should print out everything that's going on, so we can
compare the working ACPI case with the non-working MPS case.

Regards -- Andy


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: smpenum patch updated to 2.6.9-rc2
       [not found] ` <F760B14C9561B941B89469F59BA3A847078E2B48-sBd4vmA9Se6krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2004-09-21  2:01   ` Stian Jordet
  0 siblings, 0 replies; 6+ messages in thread
From: Stian Jordet @ 2004-09-21  2:01 UTC (permalink / raw)
  To: Grover, Andrew; +Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

man, 20,.09.2004 kl. 11.29 -0700, skrev Grover, Andrew:
> If you'd like to really figure out why this system isn't working via
> MPS, here are some things to try:
> 
> 1) Is it hanging in that function? insert a printk at the very end, to
> see.
> 2) Find the line that says "#define Dprintk (x...)" in
> include/asm-i386/apic.h and change it to "#define Dprintk (x...) printk
> (x...)". That should print out everything that's going on, so we can
> compare the working ACPI case with the non-working MPS case.


First, thank you very much for your answer, you have really helped me a
lot. 

stianj@chevrolet:~$ uname -a
Linux chevrolet 2.6.9-rc2 #38 SMP Tue Sep 21 03:46:40 CEST 2004 i686
GNU/Linux

I have now recompiled my kernel 37 times, and I have rebooted twice that
amount :) Anyway, after testing 1000 things, I have actually found the
reason (I think). In arch/i386/kernel/mpparse.c, in the function
mps_setup_io_apic_irqs, I changed

for (pin = 0; pin < nr_ioapic_registers[apic]; pin++) {

to

for (pin = 3; pin < nr_ioapic_registers[apic]; pin++) {

and now it works. I found out this after using printk's which told me
that it hanged at pin 2. I have no idea why, since all this is just
magic for me, but I hope you can help me understand it.

I'm now running in IO-APIC mode without ACPI for the first time :) USB
don't work, but they never do on VIA boards in IO-APIC mode I'm told, so
that's ok (for now... :)

Bedtime now. The clock is 4 AM :)

Best regards,
Stian



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-09-21  2:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-14  0:23 smpenum patch updated to 2.6.9-rc2 Grover, Andrew
     [not found] ` <F760B14C9561B941B89469F59BA3A847077BA236-sBd4vmA9Se6krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-09-14 22:00   ` Stian Jordet
  -- strict thread matches above, loose matches on Subject: below --
2004-09-15 21:17 Grover, Andrew
     [not found] ` <F760B14C9561B941B89469F59BA3A847077F835A-sBd4vmA9Se6krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-09-20 12:59   ` Stian Jordet
2004-09-20 18:29 Grover, Andrew
     [not found] ` <F760B14C9561B941B89469F59BA3A847078E2B48-sBd4vmA9Se6krb+BlOpmy7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-09-21  2:01   ` Stian Jordet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox