forked from Mirrors/opensbi
		
	lib: Use bitwise & instead of boolean &&
!(mipval && MIP_MSIP) simplifies to !mipval, which checks if the entire variable is zero, not just a single bit. Fix this to use bitwise & instead. Signed-off-by: Jacob Garber <jgarber1@ualberta.ca> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Atish Patra <atish.patra@wdc.com>
This commit is contained in:
		@@ -339,7 +339,7 @@ void sbi_hart_wait_for_coldboot(struct sbi_scratch *scratch, u32 hartid)
 | 
			
		||||
		spin_lock(&coldboot_wait_bitmap_lock);
 | 
			
		||||
		coldboot_wait_bitmap &= ~(1UL << hartid);
 | 
			
		||||
		spin_unlock(&coldboot_wait_bitmap_lock);
 | 
			
		||||
	} while (!(mipval && MIP_MSIP));
 | 
			
		||||
	} while (!(mipval & MIP_MSIP));
 | 
			
		||||
 | 
			
		||||
	csr_clear(CSR_MIP, MIP_MSIP);
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user