svn commit: r230183 - head/sys/dev/xen/xenpci

Colin Percival cperciva at FreeBSD.org
Mon Jan 16 02:38:46 UTC 2012


Author: cperciva
Date: Mon Jan 16 02:38:45 2012
New Revision: 230183
URL: http://svn.freebsd.org/changeset/base/230183

Log:
  Make XENHVM work on i386.  The __ffs() function counts bits starting from
  zero, unlike ffs(3), which starts counting from 1.

Modified:
  head/sys/dev/xen/xenpci/evtchn.c

Modified: head/sys/dev/xen/xenpci/evtchn.c
==============================================================================
--- head/sys/dev/xen/xenpci/evtchn.c	Mon Jan 16 01:14:07 2012	(r230182)
+++ head/sys/dev/xen/xenpci/evtchn.c	Mon Jan 16 02:38:45 2012	(r230183)
@@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$");
 #include <dev/xen/xenpci/xenpcivar.h>
 
 #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)
 {


More information about the svn-src-all mailing list