diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2011-09-02 16:34:04 -0700 |
---|---|---|
committer | Vadim Bendebury <vbendeb@chromium.org> | 2011-09-06 10:32:11 -0700 |
commit | 51511b60489063b404f6d7809b761d56e1d3d426 (patch) | |
tree | ba869309531a2fd07e3c3e927e18cfe5ee4d0a6d /arch/x86/include | |
parent | f3d075964621ba7a80ae89ce0a15a8e40811f09a (diff) |
Fix AHCI driver to operate on Intel controllers.
First - make sure the ahci driver compiles and links properly when
building for x86 platforms.
Then it turned out that when trying to use AHCI driver on an x86
platform with an Intel AHCI controller, the driver does not operate
properly if the requested amount of blocks to read was exceeding 255.
It is probably possible to specify 0 as the block count and the driver
will read 256 blocks, but it was decided to limit the number of blocks
read at once to 128 (it should be a power of 2 for the optimal
performance of solid state drives).
BUG=chromium-os:19837
TEST=manual
. program updated image (including vbexport SATA support extension)
on an Alex.
. restart the machine and enter `vboot_twostop' at u-boot prompt.
Observe ChromeOS booting all the way to login screen.
Change-Id: I7224ca14ae60f414db6dbe9e2f0a649312a9459c
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/7232
Reviewed-by: Gabe Black (Do Not Use) <gabeblack@google.com>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/bitops.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/include/asm/bitops.h b/arch/x86/include/asm/bitops.h index c7a38f237a5..5c68c5f30fa 100644 --- a/arch/x86/include/asm/bitops.h +++ b/arch/x86/include/asm/bitops.h @@ -315,6 +315,13 @@ static __inline__ int find_next_zero_bit (void * addr, int size, int offset) return (offset + set + res); } +extern __inline__ int __ilog2(unsigned int x) +{ + int lz; + __asm__("bsr %1, %0" : "=r" (lz) : "r" (x) : "cc"); + return lz; +} + /** * ffz - find first zero in word. * @word: The word to search |