From 206d503b92d08bd0e8aa5d476bb5abba9ceab7f2 Mon Sep 17 00:00:00 2001 From: Colin Percival Date: Mon, 16 Jan 2012 02:38:45 +0000 Subject: [PATCH] Make XENHVM work on i386. The __ffs() function counts bits starting from zero, unlike ffs(3), which starts counting from 1. --- sys/dev/xen/xenpci/evtchn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/xen/xenpci/evtchn.c b/sys/dev/xen/xenpci/evtchn.c index 96c83f0a62b..2d9dd6d664d 100644 --- a/sys/dev/xen/xenpci/evtchn.c +++ b/sys/dev/xen/xenpci/evtchn.c @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #if defined(__i386__) -#define __ffs(word) ffs(word) +#define __ffs(word) (ffs(word) - 1) #elif defined(__amd64__) static inline unsigned long __ffs(unsigned long word) {