public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* Re: Allow userspace do something special on overtemp
  2004-08-12 15:19 ` Allow userspace do something special on overtemp Len Brown
@ 2004-08-12 15:16   ` Randy.Dunlap
  2004-08-12 15:50     ` Stefan Seyfried
  2004-08-12 17:27   ` [ACPI] " Stefan Dösinger
  1 sibling, 1 reply; 5+ messages in thread
From: Randy.Dunlap @ 2004-08-12 15:16 UTC (permalink / raw)
  To: Len Brown; +Cc: pavel, trenn, seife, linux-kernel, acpi-devel

On 12 Aug 2004 11:19:05 -0400 Len Brown wrote:

| Simpler to delete the usermode call and rely on the (flexible)
| acpid event, yes?
| 
|  thermal.c |   29 +----------------------------
|  1 files changed, 1 insertion(+), 28 deletions(-)

a.  Yes, it should be more flexible than just 'overtemp'.

b.  For userspace, there are:

acpid -  http://sourceforge.net/projects/acpid/

acpi tools, like ospmd (by Andy Grover) - in CVS at
  http://sourceforge.net/projects/acpi/

What others are there?

And ospmd (at least) needs some care.  Andy wanted to give it up
1 or 2 years ago, so I took it over for awhile.  However, it
still needs more care, so if anyone out there wants to maintain it,
please speak up.

--
~Randy

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

* Re: Allow userspace do something special on overtemp
       [not found] <20040811085326.GA11765@elf.ucw.cz>
@ 2004-08-12 15:19 ` Len Brown
  2004-08-12 15:16   ` Randy.Dunlap
  2004-08-12 17:27   ` [ACPI] " Stefan Dösinger
  0 siblings, 2 replies; 5+ messages in thread
From: Len Brown @ 2004-08-12 15:19 UTC (permalink / raw)
  To: Pavel Machek; +Cc: trenn, seife, Kernel Mailing List, ACPI Developers

Simpler to delete the usermode call and rely on the (flexible)
acpid event, yes?

 thermal.c |   29 +----------------------------
 1 files changed, 1 insertion(+), 28 deletions(-)

cheers,
-Len


===== drivers/acpi/thermal.c 1.34 vs edited =====
--- 1.34/drivers/acpi/thermal.c	Thu Jul  8 01:56:01 2004
+++ edited/drivers/acpi/thermal.c	Thu Aug 12 11:13:59 2004
@@ -61,7 +61,6 @@
 #define ACPI_THERMAL_MODE_ACTIVE	0x00
 #define ACPI_THERMAL_MODE_PASSIVE	0x01
 #define ACPI_THERMAL_MODE_CRT   	0xff
-#define ACPI_THERMAL_PATH_POWEROFF	"/sbin/poweroff"
 
 #define ACPI_THERMAL_MAX_ACTIVE	10
 
@@ -422,30 +421,6 @@
 
 
 static int
-acpi_thermal_call_usermode (
-	char			*path)
-{
-	char			*argv[2] = {NULL, NULL};
-	char			*envp[3] = {NULL, NULL, NULL};
-
-	ACPI_FUNCTION_TRACE("acpi_thermal_call_usermode");
-
-	if (!path)
-		return_VALUE(-EINVAL);
-
-	argv[0] = path;
-
-	/* minimal command environment */
-	envp[0] = "HOME=/";
-	envp[1] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin";
-	
-	call_usermodehelper(argv[0], argv, envp, 0);
-
-	return_VALUE(0);
-}
-
-
-static int
 acpi_thermal_critical (
 	struct acpi_thermal	*tz)
 {
@@ -468,10 +443,8 @@
 	if (result)
 		return_VALUE(result);
 
-	printk(KERN_EMERG "Critical temperature reached (%ld C), shutting
down.\n", KELVIN_TO_CELSIUS(tz->temperature));
+	printk(KERN_EMERG "Critical temperature reached (%ld C).\n",
KELVIN_TO_CELSIUS(tz->temperature));
 	acpi_bus_generate_event(device, ACPI_THERMAL_NOTIFY_CRITICAL,
tz->trips.critical.flags.enabled);
-
-	acpi_thermal_call_usermode(ACPI_THERMAL_PATH_POWEROFF);
 
 	return_VALUE(0);
 }

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

* Re: Allow userspace do something special on overtemp
  2004-08-12 15:16   ` Randy.Dunlap
@ 2004-08-12 15:50     ` Stefan Seyfried
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Seyfried @ 2004-08-12 15:50 UTC (permalink / raw)
  To: Randy.Dunlap
  Cc: Len Brown, Pavel Machek, Thomas Renninger, linux-kernel,
	acpi-devel

Randy.Dunlap wrote:
> On 12 Aug 2004 11:19:05 -0400 Len Brown wrote:
> 
> | Simpler to delete the usermode call and rely on the (flexible)
> | acpid event, yes?
> | 
> |  thermal.c |   29 +----------------------------
> |  1 files changed, 1 insertion(+), 28 deletions(-)
> 
> a.  Yes, it should be more flexible than just 'overtemp'.
> 
> b.  For userspace, there are:
> 
> acpid -  http://sourceforge.net/projects/acpid/
> 
> acpi tools, like ospmd (by Andy Grover) - in CVS at
>   http://sourceforge.net/projects/acpi/
> 
> What others are there?

powersaved - http://forge.novell.com/modules/xfmod/project/?powersave
handles APM, ACPI and cpufreq
-- 
seife

"Any ideas, John?"
"Well, surrounding thems out."

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

* Re: [ACPI] Re: Allow userspace do something special on overtemp
  2004-08-12 15:19 ` Allow userspace do something special on overtemp Len Brown
  2004-08-12 15:16   ` Randy.Dunlap
@ 2004-08-12 17:27   ` Stefan Dösinger
       [not found]     ` <200408121927.11277.stefandoesinger-RbZlAiThDcE@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Stefan Dösinger @ 2004-08-12 17:27 UTC (permalink / raw)
  To: acpi-devel; +Cc: Len Brown, Pavel Machek, trenn, seife, Kernel Mailing List

Hi,
Isn't this a little bit dangerous? What if acpid is not set up to handle this?

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

* Re: Re: Allow userspace do something special on overtemp
       [not found]     ` <200408121927.11277.stefandoesinger-RbZlAiThDcE@public.gmane.org>
@ 2004-08-12 22:53       ` Len Brown
  0 siblings, 0 replies; 5+ messages in thread
From: Len Brown @ 2004-08-12 22:53 UTC (permalink / raw)
  To: stefandoesinger-RbZlAiThDcE
  Cc: ACPI Developers, Pavel Machek, trenn-l3A5Bk7waGM,
	seife-l3A5Bk7waGM, Kernel Mailing List

On Thu, 2004-08-12 at 13:27, Stefan Dösinger wrote:
> Hi,
> Isn't this a little bit dangerous? What if acpid is not set up to
> handle this?
> 

There are two levels of hardware thermal control that will
kick in -- TM1 and TM2, and if they fail the hardware will
turn itself off.  Speaking for Intel processors only.

The reason is that the hardware needs to handle this case
where the OS crashes while in ACPI mode and is unable
to do any thermal control itself.

cheers,
-Len




-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285

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

end of thread, other threads:[~2004-08-12 22:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20040811085326.GA11765@elf.ucw.cz>
2004-08-12 15:19 ` Allow userspace do something special on overtemp Len Brown
2004-08-12 15:16   ` Randy.Dunlap
2004-08-12 15:50     ` Stefan Seyfried
2004-08-12 17:27   ` [ACPI] " Stefan Dösinger
     [not found]     ` <200408121927.11277.stefandoesinger-RbZlAiThDcE@public.gmane.org>
2004-08-12 22:53       ` Len Brown

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