mirror of
https://github.com/ipxe/ipxe
synced 2026-02-28 03:11:18 +03:00
[librm] Correct page table stride calculation
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -307,7 +307,7 @@ static void * ioremap_pages ( unsigned long bus_addr, size_t len ) {
|
|||||||
sizeof ( io_pages.page[0] ) ) );
|
sizeof ( io_pages.page[0] ) ) );
|
||||||
|
|
||||||
/* Round up number of pages to a power of two */
|
/* Round up number of pages to a power of two */
|
||||||
stride = ( 1 << ( fls ( count ) - 1 ) );
|
stride = ( 1 << fls ( count - 1 ) );
|
||||||
assert ( count <= stride );
|
assert ( count <= stride );
|
||||||
|
|
||||||
/* Allocate pages */
|
/* Allocate pages */
|
||||||
|
|||||||
Reference in New Issue
Block a user