[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-ia64-devel] Re: PATCH: increase MAX_VIRT_CPUS to 64



On Tue, 2006-04-04 at 09:11 +0100, Tristan Gingold wrote:
> diff -r 40d96f4e9fcb -r 65b3a99122e5 xen/arch/ia64/xen/xensetup.c
> --- a/xen/arch/ia64/xen/xensetup.c      Mon Apr  3 20:39:27 2006
> +++ b/xen/arch/ia64/xen/xensetup.c      Tue Apr  4 03:57:29 2006
> @@ -24,6 +24,12 @@
>  #include <asm/vmx.h>
>  #include <linux/efi.h>
>  
> +/* Be sure the struct shared_info fits on a page because it is mapped
> in
> +   domain.
> +   This is a static check.  */
> +extern char assert_struct_shared_info_fits_on_a_page
> +    [(sizeof (struct shared_info) <= PAGE_SIZE) ? 1 : -1];
> +

  Would it make more sense to try to get this into a #error?  The error
message this test generates is not entirely obvious.  Maybe this could
be done by adding a DEFINE(SHARED_INFO_SIZE, sizeof(struct shared_info))
in asm-offsets.c, then the test is simply:

#if SHARED_INFO_SIZE > PAGE_SIZE
 #error "struct shared_info does not not fit in PAGE_SIZE"
#endif

Is there a better way?  Thanks,

        Alex

-- 
Alex Williamson                             HP Linux & Open Source Lab


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.