ia64/xen-unstable

diff xen/arch/x86/setup.c @ 9878:ef0a56c0784d

Add BUILD_BUG_ON() and a handful of users.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Apr 27 15:55:09 2006 +0100 (2006-04-27)
parents 428babd7c1e0
children 4122e88b6c75
line diff
     1.1 --- a/xen/arch/x86/setup.c	Thu Apr 27 14:13:42 2006 +0100
     1.2 +++ b/xen/arch/x86/setup.c	Thu Apr 27 15:55:09 2006 +0100
     1.3 @@ -391,17 +391,17 @@ void __init __start_xen(multiboot_info_t
     1.4      total_pages = nr_pages;
     1.5  
     1.6      /* Sanity check for unwanted bloat of dom0_op structure. */
     1.7 -    BUG_ON(sizeof(((struct dom0_op *)0)->u) !=
     1.8 -           sizeof(((struct dom0_op *)0)->u.pad));
     1.9 +    BUILD_BUG_ON(sizeof(((struct dom0_op *)0)->u) !=
    1.10 +                 sizeof(((struct dom0_op *)0)->u.pad));
    1.11  
    1.12 -    BUG_ON(sizeof(start_info_t) > PAGE_SIZE);
    1.13 -    BUG_ON(sizeof(shared_info_t) > PAGE_SIZE);
    1.14 -    BUG_ON(sizeof(vcpu_info_t) != 64);
    1.15 +    BUILD_BUG_ON(sizeof(start_info_t) > PAGE_SIZE);
    1.16 +    BUILD_BUG_ON(sizeof(shared_info_t) > PAGE_SIZE);
    1.17 +    BUILD_BUG_ON(sizeof(vcpu_info_t) != 64);
    1.18  
    1.19      /* __foo are defined in public headers. Check they match internal defs. */
    1.20 -    BUG_ON(__HYPERVISOR_VIRT_START != HYPERVISOR_VIRT_START);
    1.21 +    BUILD_BUG_ON(__HYPERVISOR_VIRT_START != HYPERVISOR_VIRT_START);
    1.22  #ifdef HYPERVISOR_VIRT_END
    1.23 -    BUG_ON(__HYPERVISOR_VIRT_END   != HYPERVISOR_VIRT_END);
    1.24 +    BUILD_BUG_ON(__HYPERVISOR_VIRT_END   != HYPERVISOR_VIRT_END);
    1.25  #endif
    1.26  
    1.27      init_frametable();