Skip to contentSkip to conversation

ACPI C4 support

PATCH Pavel Machek 3 participants 5 messages Feb 28, 2004 – Mar 2, 2004 4 messages not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

Hi!

Thomas told me:

Quoted 4 lines

what about C4 - Cn states in the kernel implementation?
A short look into the /proc/acpi/processor/.../power file let me think that only C0-C3 is supported by the kernel, even specification talks about Cn states?

As a first step, it would be nice if kernel at least used C0..C3 if the machine supports them... This should do the trick. Does it look okay?

Pavel

drivers/acpi/processor.c renamed from linux/drivers/acpi/processor.c +2 -1
@@ -2205,7 +2202,8 @@
 
 	if (!object.processor.pblk_address)
 		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No PBLK (NULL address)\n"));
-	else if (object.processor.pblk_length != 6)
+	else if (object.processor.pblk_length < 6)
+		/* pblk_length of 7 is okay if cpu supports C4 */
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid PBLK length [%d]\n",
 			object.processor.pblk_length));
 	else {
Signature · 9 lines
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

A message that is not in the archive (sent off-list or not yet received): 20040228161011.GA10448-I/[email protected]

#2 lore raw
Quoted 4 lines · Pavel Machek

Hi!

Thomas told me:

Quoted 8 lines
Quoted 4 lines

what about C4 - Cn states in the kernel implementation?
A short look into the /proc/acpi/processor/.../power file let me think that only C0-C3 is supported by the kernel, even specification talks about Cn states?

As a first step, it would be nice if kernel at least used C0..C3 if the machine supports them... This should do the trick. Does it look okay?

No. pblk_length is 0 or 6. Not 5 nor 7 ;)

Look at http://bugzilla.kernel.org/show_bug.cgi?id=1958

Note that I don't have time to work on it by now. When the acpi video extension will be OK, I will rework on that one unless someone else do the work.

Signature · 11 lines
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

Moin,

Quoted 7 lines · Bruno Ducrot
Quoted 6 lines · Pavel Machek

Hi!
Thomas told me:

Quoted 4 lines

what about C4 - Cn states in the kernel implementation?
A short look into the /proc/acpi/processor/.../power file let me think that only C0-C3 is supported by the kernel, even specification talks about Cn states?

Quoted 5 lines
Quoted 3 lines

As a first step, it would be nice if kernel at least used C0..C3 if the machine supports them... This should do the trick. Does it look okay?

No. pblk_length is 0 or 6. Not 5 nor 7 ;)

Sorry, I don't understand: We've a Laptop with a DSDT with
Processor (\_PR.CPU0, 0x01, 0x00001010, 0x07)
in it.
Comment from the responsible BIOS-team:
"Our processor block object is 7 bytes in length because we also support
C4 (P_LVL4) which is at <P_BLK>+6. Therefore, the size/length must be reported as 7 and not 6."

Is the '7' the BIOS-developer mentioned the same '7' as mentioned by you?

Quoted 7 lines

Look at http://bugzilla.kernel.org/show_bug.cgi?id=1958

Note that I don't have time to work on it by now. When the acpi video extension will be OK, I will rework on that one unless someone else do the work.

Thanks.

Quoted 3 lines
Signature · 2 lines
-- 
Bruno Ducrot

caio,
Stefan

Signature · 12 lines
Stefan Behlert, SUSE LINUX AG,
Mobile Devices
 
Maxfeldstr. 5, D-90409 Nuernberg, Germany
Phone +49-(0)911-74053-173


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

A message that is not in the archive (sent off-list or not yet received): [email protected]

#6 lore raw
Quoted 24 lines · Stefan Behlert

Moin,

Quoted 7 lines · Bruno Ducrot
Quoted 6 lines · Pavel Machek

Hi!
Thomas told me:

Quoted 4 lines

what about C4 - Cn states in the kernel implementation?
A short look into the /proc/acpi/processor/.../power file let me think that only C0-C3 is supported by the kernel, even specification talks about Cn states?

Quoted 5 lines
Quoted 3 lines

As a first step, it would be nice if kernel at least used C0..C3 if the machine supports them... This should do the trick. Does it look okay?

No. pblk_length is 0 or 6. Not 5 nor 7 ;)

Sorry, I don't understand: We've a Laptop with a DSDT with
Processor (\_PR.CPU0, 0x01, 0x00001010, 0x07)
in it.
Comment from the responsible BIOS-team:
"Our processor block object is 7 bytes in length because we also support
C4 (P_LVL4) which is at <P_BLK>+6. Therefore, the size/length must be reported as 7 and not 6."

Quoted 2 lines

Is the '7' the BIOS-developer mentioned the same '7' as mentioned by you?

No. Bad documentation. Change documentation. Look at acpi spec at
http://www.acpi.info/

You can define only latencies for C2 and C3 via FADT, so if you allow C4 via the p_blk, you *don't* have latency for C4. You *must* define C4 in a _CST object in order to get at least the latency, amongst other informations.

Signature · 11 lines
Bruno Ducrot

--  Which is worse:  ignorance or apathy?
--  Don't know.  Don't care.


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click

A message that is not in the archive (sent off-list or not yet received): [email protected]

#8 lore raw

Moin,

Thanks for the information. With it I can communicate what's wrong and how to fix it. Helps us a lot.

ciao,
Stefan

Quoted 15 lines · Bruno Ducrot
Quoted 3 lines · Stefan Behlert

Is the '7' the BIOS-developer mentioned the same '7' as mentioned by you?

No. Bad documentation. Change documentation. Look at acpi spec at
http://www.acpi.info/

You can define only latencies for C2 and C3 via FADT, so if you allow C4 via the p_blk, you *don't* have latency for C4. You *must* define C4 in a _CST object in order to get at least the latency, amongst other informations.

Signature · 1 line
Bruno Ducrot
Signature · 12 lines
Stefan Behlert, SUSE LINUX AG,
Mobile Devices
 
Maxfeldstr. 5, D-90409 Nuernberg, Germany
Phone +49-(0)911-74053-173


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click