public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] 2.6.1-mm3 acpi frees free irq0
@ 2004-01-15 14:56 Jes Sorensen
       [not found] ` <16390.43574.867869.286685-4mDQ13Tdud8Jw5R7aSpS0dP8p4LwMBBS@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Jes Sorensen @ 2004-01-15 14:56 UTC (permalink / raw)
  To: akpm-3NddpPZAyC0
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	len.brown-ral2JQCrhuEAvxtiuMwx3w, Jesse Barnes

Hi,

There is a bug in the ACPI code found in 2.6.1-mm3 where if it can't
find the interrupt source for the ACPI System Control Interrupt Handler,
it end up trying to free irq 0.

Included patch fixes the problem.

Cheers,
Jes

--- linux-2.6.1-mm3/drivers/acpi/osl.c~	Wed Jan 14 05:00:25 2004
+++ linux-2.6.1-mm3/drivers/acpi/osl.c	Thu Jan 15 06:43:28 2004
@@ -257,13 +257,13 @@
 		return AE_OK;
 	}
 #endif
-	acpi_irq_irq = irq;
 	acpi_irq_handler = handler;
 	acpi_irq_context = context;
 	if (request_irq(irq, acpi_irq, SA_SHIRQ, "acpi", acpi_irq)) {
 		printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq);
 		return AE_NOT_ACQUIRED;
 	}
+	acpi_irq_irq = irq;
 
 	return AE_OK;
 }
@@ -271,12 +271,13 @@
 acpi_status
 acpi_os_remove_interrupt_handler(u32 irq, OSD_HANDLER handler)
 {
-	if (acpi_irq_handler) {
+	if (irq) {
 #if defined(CONFIG_IA64) || defined(CONFIG_PCI_USE_VECTOR)
 		irq = acpi_irq_to_vector(irq);
 #endif
 		free_irq(irq, acpi_irq);
 		acpi_irq_handler = NULL;
+		acpi_irq_irq = 0;
 	}
 
 	return AE_OK;


-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html

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

* Re: [patch] 2.6.1-mm3 acpi frees free irq0
       [not found] ` <16390.43574.867869.286685-4mDQ13Tdud8Jw5R7aSpS0dP8p4LwMBBS@public.gmane.org>
@ 2004-01-15 15:11   ` Martin Lorenz
  2004-01-26 20:30   ` Len Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Martin Lorenz @ 2004-01-15 15:11 UTC (permalink / raw)
  To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Jes Sorensen wrote:

> Hi,
> 
> There is a bug in the ACPI code found in 2.6.1-mm3 where if it can't
> find the interrupt source for the ACPI System Control Interrupt Handler,
> it end up trying to free irq 0.
> 
> Included patch fixes the problem.
> 
could this bug have caused a panic on system halt?
...it went away so fast into reboot, i could not read the oops

[...]
martin lorenz
--
	They that can give up essential liberty
	to obtain a little temporary safety
	deserve neither liberty nor safety.
				-- Benjamin Franklin



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html

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

* RE: [patch] 2.6.1-mm3 acpi frees free irq0
@ 2004-01-15 17:19 Brown, Len
       [not found] ` <BF1FE1855350A0479097B3A0D2A80EE0CC89CC-N2PTB0HCzHJF3Yvz3xaN/VDQ4js95KgL@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Brown, Len @ 2004-01-15 17:19 UTC (permalink / raw)
  To: Jes Sorensen, akpm-3NddpPZAyC0
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Jesse Barnes

The primary failure is that the SCI was not found, and the secondary
symptom is that we failed to handle that error properly -- which you've
patched.

Can you tell me more about the primary failure?
Was the SCI found in other releases?

Thanks,
-Len

> -----Original Message-----
> From: Jes Sorensen [mailto:jes-dtAfj9ClZIwnoBwkMbRkTB2eb7JE58TQ@public.gmane.org] 
> Sent: Thursday, January 15, 2004 9:57 AM
> To: akpm-3NddpPZAyC0@public.gmane.org
> Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; 
> acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org; Brown, Len; Jesse Barnes
> Subject: [patch] 2.6.1-mm3 acpi frees free irq0
> 
> 
> Hi,
> 
> There is a bug in the ACPI code found in 2.6.1-mm3 where if it can't
> find the interrupt source for the ACPI System Control 
> Interrupt Handler,
> it end up trying to free irq 0.
> 
> Included patch fixes the problem.
> 
> Cheers,
> Jes
> 
> --- linux-2.6.1-mm3/drivers/acpi/osl.c~	Wed Jan 14 05:00:25 2004
> +++ linux-2.6.1-mm3/drivers/acpi/osl.c	Thu Jan 15 06:43:28 2004
> @@ -257,13 +257,13 @@
>  		return AE_OK;
>  	}
>  #endif
> -	acpi_irq_irq = irq;
>  	acpi_irq_handler = handler;
>  	acpi_irq_context = context;
>  	if (request_irq(irq, acpi_irq, SA_SHIRQ, "acpi", acpi_irq)) {
>  		printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation 
> failed\n", irq);
>  		return AE_NOT_ACQUIRED;
>  	}
> +	acpi_irq_irq = irq;
>  
>  	return AE_OK;
>  }
> @@ -271,12 +271,13 @@
>  acpi_status
>  acpi_os_remove_interrupt_handler(u32 irq, OSD_HANDLER handler)
>  {
> -	if (acpi_irq_handler) {
> +	if (irq) {
>  #if defined(CONFIG_IA64) || defined(CONFIG_PCI_USE_VECTOR)
>  		irq = acpi_irq_to_vector(irq);
>  #endif
>  		free_irq(irq, acpi_irq);
>  		acpi_irq_handler = NULL;
> +		acpi_irq_irq = 0;
>  	}
>  
>  	return AE_OK;
> 


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

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

* Re: [patch] 2.6.1-mm3 acpi frees free irq0
       [not found] ` <BF1FE1855350A0479097B3A0D2A80EE0CC89CC-N2PTB0HCzHJF3Yvz3xaN/VDQ4js95KgL@public.gmane.org>
@ 2004-01-15 22:01   ` Jes Sorensen
  0 siblings, 0 replies; 7+ messages in thread
From: Jes Sorensen @ 2004-01-15 22:01 UTC (permalink / raw)
  To: Brown, Len
  Cc: akpm-3NddpPZAyC0, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Jesse Barnes

>>>>> "Len" == Brown, Len <len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> writes:

Len> The primary failure is that the SCI was not found, and the
Len> secondary symptom is that we failed to handle that error properly
Len> -- which you've patched.

Len> Can you tell me more about the primary failure?  Was the SCI
Len> found in other releases?

Hi Len,

In this specific case the prom doesn't have it in it's tables, so not
finding it is expected behavior.

Cheers,
Jes


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

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

* RE: [patch] 2.6.1-mm3 acpi frees free irq0
@ 2004-01-18  6:29 Yu, Luming
       [not found] ` <3ACA40606221794F80A5670F0AF15F8401720CEE-SRlDPOYGfgogGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Yu, Luming @ 2004-01-18  6:29 UTC (permalink / raw)
  To: Jes Sorensen, Brown, Len
  Cc: akpm-3NddpPZAyC0, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Jesse Barnes


> In this specific case the prom doesn't have it in it's tables, so not
> finding it is expected behavior.

What's your machine type, and BIOS version?
This specific box seems to be short of
fundamental ACPI power button support.

Please refer ACPI spec 3.2.1


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

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

* Re: [patch] 2.6.1-mm3 acpi frees free irq0
       [not found] ` <3ACA40606221794F80A5670F0AF15F8401720CEE-SRlDPOYGfgogGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2004-01-19  7:59   ` Jes Sorensen
  0 siblings, 0 replies; 7+ messages in thread
From: Jes Sorensen @ 2004-01-19  7:59 UTC (permalink / raw)
  To: Yu, Luming
  Cc: Brown, Len, akpm-3NddpPZAyC0, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, Jesse Barnes

>>>>> ">" == Yu, Luming <luming.yu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> writes:

>> In this specific case the prom doesn't have it in it's tables, so
>> not finding it is expected behavior.

>> What's your machine type, and BIOS version?  This specific box
>> seems to be short of fundamental ACPI power button support.

Oh it's very short of those features, it really only uses ACPI to
provide system setup information and thats about it. It's an Altix box
fwiw.

Cheers,
Jes


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

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

* Re: [patch] 2.6.1-mm3 acpi frees free irq0
       [not found] ` <16390.43574.867869.286685-4mDQ13Tdud8Jw5R7aSpS0dP8p4LwMBBS@public.gmane.org>
  2004-01-15 15:11   ` Martin Lorenz
@ 2004-01-26 20:30   ` Len Brown
  1 sibling, 0 replies; 7+ messages in thread
From: Len Brown @ 2004-01-26 20:30 UTC (permalink / raw)
  To: Jes Sorensen
  Cc: Andrew Morton, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	ACPI Developers, Jesse Barnes

Accepted.

thanks,
-Len

On Thu, 2004-01-15 at 09:56, Jes Sorensen wrote:
> Hi,
> 
> There is a bug in the ACPI code found in 2.6.1-mm3 where if it can't
> find the interrupt source for the ACPI System Control Interrupt Handler,
> it end up trying to free irq 0.
> 
> Included patch fixes the problem.
> 
> Cheers,
> Jes
> 
> --- linux-2.6.1-mm3/drivers/acpi/osl.c~	Wed Jan 14 05:00:25 2004
> +++ linux-2.6.1-mm3/drivers/acpi/osl.c	Thu Jan 15 06:43:28 2004
> @@ -257,13 +257,13 @@
>  		return AE_OK;
>  	}
>  #endif
> -	acpi_irq_irq = irq;
>  	acpi_irq_handler = handler;
>  	acpi_irq_context = context;
>  	if (request_irq(irq, acpi_irq, SA_SHIRQ, "acpi", acpi_irq)) {
>  		printk(KERN_ERR PREFIX "SCI (IRQ%d) allocation failed\n", irq);
>  		return AE_NOT_ACQUIRED;
>  	}
> +	acpi_irq_irq = irq;
>  
>  	return AE_OK;
>  }
> @@ -271,12 +271,13 @@
>  acpi_status
>  acpi_os_remove_interrupt_handler(u32 irq, OSD_HANDLER handler)
>  {
> -	if (acpi_irq_handler) {
> +	if (irq) {
>  #if defined(CONFIG_IA64) || defined(CONFIG_PCI_USE_VECTOR)
>  		irq = acpi_irq_to_vector(irq);
>  #endif
>  		free_irq(irq, acpi_irq);
>  		acpi_irq_handler = NULL;
> +		acpi_irq_irq = 0;
>  	}
>  
>  	return AE_OK;



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

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

end of thread, other threads:[~2004-01-26 20:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-18  6:29 [patch] 2.6.1-mm3 acpi frees free irq0 Yu, Luming
     [not found] ` <3ACA40606221794F80A5670F0AF15F8401720CEE-SRlDPOYGfgogGBtAFL8yw7fspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-01-19  7:59   ` Jes Sorensen
  -- strict thread matches above, loose matches on Subject: below --
2004-01-15 17:19 Brown, Len
     [not found] ` <BF1FE1855350A0479097B3A0D2A80EE0CC89CC-N2PTB0HCzHJF3Yvz3xaN/VDQ4js95KgL@public.gmane.org>
2004-01-15 22:01   ` Jes Sorensen
2004-01-15 14:56 Jes Sorensen
     [not found] ` <16390.43574.867869.286685-4mDQ13Tdud8Jw5R7aSpS0dP8p4LwMBBS@public.gmane.org>
2004-01-15 15:11   ` Martin Lorenz
2004-01-26 20:30   ` Len Brown

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