* Teach acpi how to get power-of-two
@ 2004-02-28 15:44 Pavel Machek
0 siblings, 0 replies; only message in thread
From: Pavel Machek @ 2004-02-28 15:44 UTC (permalink / raw)
To: ACPI mailing list, Rusty trivial patch monkey Russell
Hi!
I do not know why ACPI people did this... computing 1<<x using lookup
table. Its not even funny. Please apply,
Pavel
--- tmp/linux/drivers/acpi/processor.c 2004-02-20 12:29:21.000000000 +0100
+++ linux/drivers/acpi/processor.c 2004-02-28 15:30:52.000000000 +0100
@@ -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/
--
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-02-28 15:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-28 15:44 Teach acpi how to get power-of-two Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox