diff options
author | Ronald G. Minnich <rminnich@gmail.com> | 2012-11-27 11:32:38 -0800 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2012-11-28 07:57:17 +0100 |
commit | 5079a0d32f2824445cf593dfbcb65598eaa97dee (patch) | |
tree | 2e6edd336c00f1f3e4937410a9be9537553702be /src/devices | |
parent | acf443191bd035c26ee89c3ca56f065a5111901b (diff) |
Remove assembly coded log2 function
As we move to supporting other systems we need to get rid of assembly
where we can. The log2 function in src/lib is identical to the assembly
one (tested for all 32-bit signed integers :-) and takes about 10 ns
to run as opposed to 5ns for the non-portable assembly version. While speed
is good, I think we can spare the 15 ns or so we add to boot time
by using the C version only.
Change-Id: Icafa565eae282c85fa5fc01b3bd1f110cd9aaa91
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-on: http://review.coreboot.org/1928
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/devices')
-rw-r--r-- | src/devices/device.c | 1 | ||||
-rw-r--r-- | src/devices/hypertransport.c | 2 | ||||
-rw-r--r-- | src/devices/pci_device.c | 1 | ||||
-rw-r--r-- | src/devices/pnp_device.c | 1 |
4 files changed, 1 insertions, 4 deletions
diff --git a/src/devices/device.c b/src/devices/device.c index 03e7ea7c63..07bbc7a72a 100644 --- a/src/devices/device.c +++ b/src/devices/device.c @@ -33,7 +33,6 @@ */ #include <console/console.h> -#include <bitops.h> #include <arch/io.h> #include <device/device.h> #include <device/pci.h> diff --git a/src/devices/hypertransport.c b/src/devices/hypertransport.c index 420054ecb3..a6320fe666 100644 --- a/src/devices/hypertransport.c +++ b/src/devices/hypertransport.c @@ -23,7 +23,7 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <bitops.h> +#include <lib.h> #include <console/console.h> #include <device/device.h> #include <device/path.h> diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c index e2a49402c9..d9e6b27738 100644 --- a/src/devices/pci_device.c +++ b/src/devices/pci_device.c @@ -26,7 +26,6 @@ #include <console/console.h> #include <stdlib.h> #include <stdint.h> -#include <bitops.h> #include <string.h> #include <arch/io.h> #include <device/device.h> diff --git a/src/devices/pnp_device.c b/src/devices/pnp_device.c index fb6c9d6868..19b492db78 100644 --- a/src/devices/pnp_device.c +++ b/src/devices/pnp_device.c @@ -24,7 +24,6 @@ #include <console/console.h> #include <stdlib.h> #include <stdint.h> -#include <bitops.h> #include <string.h> #include <arch/io.h> #include <device/device.h> |