ia64/xen-unstable

changeset 9664:8e78e6b391e0

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@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Apr 10 17:32:30 2006 +0100 (2006-04-10)
parents 7a41b35d73f4
children ec68212e72c1
files xen/include/asm-x86/config.h
line diff
     1.1 --- a/xen/include/asm-x86/config.h	Mon Apr 10 17:28:02 2006 +0100
     1.2 +++ b/xen/include/asm-x86/config.h	Mon Apr 10 17:32:30 2006 +0100
     1.3 @@ -65,8 +65,13 @@
     1.4  
     1.5  #define barrier() __asm__ __volatile__("": : :"memory")
     1.6  
     1.7 +/* A power-of-two value greater than or equal to number of hypercalls. */
     1.8  #define NR_hypercalls 32
     1.9  
    1.10 +#if NR_hypercalls & (NR_hypercalls - 1)
    1.11 +#error "NR_hypercalls must be a power-of-two value"
    1.12 +#endif
    1.13 +
    1.14  #ifndef NDEBUG
    1.15  #define MEMORY_GUARD
    1.16  #ifdef __x86_64__