From 426c721e32c32b084146eaf7ef90f138232f3efa Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Mon, 27 Oct 2025 14:02:50 +0000 Subject: [PATCH] [librm] Correct page table stride calculation Signed-off-by: Michael Brown --- src/arch/x86/transitions/librm_mgmt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/arch/x86/transitions/librm_mgmt.c b/src/arch/x86/transitions/librm_mgmt.c index 77aecdb7d..e51f0e649 100644 --- a/src/arch/x86/transitions/librm_mgmt.c +++ b/src/arch/x86/transitions/librm_mgmt.c @@ -307,7 +307,7 @@ static void * ioremap_pages ( unsigned long bus_addr, size_t len ) { sizeof ( io_pages.page[0] ) ) ); /* Round up number of pages to a power of two */ - stride = ( 1 << ( fls ( count ) - 1 ) ); + stride = ( 1 << fls ( count - 1 ) ); assert ( count <= stride ); /* Allocate pages */ -- 2.47.3