Teach acpi how to get power-of-two
Hi!
I do not know why ACPI people did this... computing 1<<x using lookup table. Its not even funny. Please apply,
Pavel
drivers/acpi/processor.c renamed from linux/drivers/acpi/processor.c +1 -4
@@ -66,9 +66,6 @@#define C2_OVERHEAD 4/* 1us (3.579 ticks per us) */ #define C3_OVERHEAD 4/* 1us (3.579 ticks per us) */ - -const u32 POWER_OF_2 [] = {1 ,2 ,4 ,8 ,16 ,32 ,64 }; -#define ACPI_PROCESSOR_LIMIT_USER 0#define ACPI_PROCESSOR_LIMIT_THERMAL 1
@@ -1489,7 +1486,7 @@return_VALUE (0 ); } - pr->throttling.state_count =POWER_OF_2 [acpi_fadt.duty_width]; + pr->throttling.state_count =1 <<acpi_fadt.duty_width;/* * Compute state values. Note that throttling displays a linear power/
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