Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Jan 2012 02:38:45 +0000 (UTC)
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r230183 - head/sys/dev/xen/xenpci
Message-ID:  <201201160238.q0G2cjie011387@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201160238.q0G2cjie011387>