WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Fail the build if NR_hypercalls is not a power of two.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Fail the build if NR_hypercalls is not a power of two.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Apr 2006 10:14:15 +0000
Delivery-date: Tue, 11 Apr 2006 03:16:36 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 8e78e6b391e00f0831e5fac485b1a0a8202e3e0e
# Parent  7a41b35d73f40246ea839a0628f50dd937b21d50
Fail the build if NR_hypercalls is not a power of two.
Making this requirement clearer originally suggested by
Muli Ben Yehuda.

Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>

diff -r 7a41b35d73f4 -r 8e78e6b391e0 xen/include/asm-x86/config.h
--- a/xen/include/asm-x86/config.h      Mon Apr 10 16:28:02 2006
+++ b/xen/include/asm-x86/config.h      Mon Apr 10 16:32:30 2006
@@ -65,7 +65,12 @@
 
 #define barrier() __asm__ __volatile__("": : :"memory")
 
+/* A power-of-two value greater than or equal to number of hypercalls. */
 #define NR_hypercalls 32
+
+#if NR_hypercalls & (NR_hypercalls - 1)
+#error "NR_hypercalls must be a power-of-two value"
+#endif
 
 #ifndef NDEBUG
 #define MEMORY_GUARD

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fail the build if NR_hypercalls is not a power of two., Xen patchbot -unstable <=