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

Re: [Xen-devel] [PATCH v2 1/2] hvmloader: Use MB(x) and GB(x) macros



>>> On 29.09.16 at 01:48, <konrad.wilk@xxxxxxxxxx> wrote:
> --- a/tools/firmware/hvmloader/e820.c
> +++ b/tools/firmware/hvmloader/e820.c
> @@ -82,7 +82,7 @@ void adjust_memory_map(void)
>  
>          /* Modify the existing highmem region if it exists. */
>          if ( memory_map.map[i].type == E820_RAM &&
> -             high_mem_end && map_start == ((uint64_t)1 << 32) )
> +             high_mem_end && map_start == (uint64_t)GB(4) )

Please drop these casts, considering that you use ULL in the
macros.

> --- a/tools/firmware/hvmloader/util.h
> +++ b/tools/firmware/hvmloader/util.h
> @@ -48,6 +48,9 @@ void __bug(char *file, int line) __attribute__((noreturn));
>  #define max_t(type,x,y) \
>          ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
>  
> +#define MB(_mb) (_mb##ULL << 20)
> +#define GB(_gb) (_gb##ULL << 30)

No leading underscores please in macro parameter names.

With those adjustments
Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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