|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH 08 of 15] hvmloader: Add a simple "scratch alloca
> +void *scratch_alloc(uint32_t size, uint32_t align)
> +{
> + uint32_t s, e;
> +
> + /* Align to at least one kilobyte. */
> + if ( align < 1024 )
> + align = 1024;
> +
> + s = (scratch_start + align - 1) & ~(align - 1);
> + e = s + size - 1;
> +
> + BUG_ON(e < s);
> +
> + scratch_start = e;
> +
> + return (void *)(unsigned long)s;
Why the double cast?
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-devel] [PATCH 07 of 15] hvmloader: make SMBIOS initialisation more general, (continued)
- [Xen-devel] [PATCH 07 of 15] hvmloader: make SMBIOS initialisation more general, Ian Campbell
- [Xen-devel] [PATCH 09 of 15] hvmloader: refactor BIOS info setup, Ian Campbell
- [Xen-devel] [PATCH 11 of 15] hvmloader: allow create_mp_tables() to allocate the table, Ian Campbell
- [Xen-devel] [PATCH 02 of 15] hvmloader: enable PCI_COMMAND_IO on primary VGA device, Ian Campbell
- [Xen-devel] [PATCH 13 of 15] hvmloader: further support for SeaBIOS, Ian Campbell
- [Xen-devel] [PATCH 06 of 15] hvmloader: make ACPI initialisation hook more general, Ian Campbell
- [Xen-devel] [PATCH 15 of 15] hvmloader: add code to generate a $PIR table, Ian Campbell
- [Xen-devel] [PATCH 04 of 15] hvmloader: setup APICs in a common function again, Ian Campbell
- [Xen-devel] [PATCH 08 of 15] hvmloader: Add a simple "scratch allocator", Ian Campbell
- Re: [Xen-devel] [PATCH 08 of 15] hvmloader: Add a simple "scratch allocator",
Konrad Rzeszutek Wilk <=
- [Xen-devel] [PATCH 10 of 15] hvmloader: return MPFPS from create_mp_tables(), Ian Campbell
- [Xen-devel] [PATCH 14 of 15] hvmloader: allow the possibility to allocate the size of smbios table we actually need, Ian Campbell
- [Xen-devel] [PATCH 12 of 15] hvmloader: smbios: allow the entry point data structure to be located separately, Ian Campbell
|
|
|
|
|