From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Ian Campbell <ian.campbell@citrix.com>
Cc: xen-devel@lists.xensource.com
Subject: Re: [PATCH 08 of 15] hvmloader: Add a simple "scratch allocator"
Date: Thu, 2 Jun 2011 15:43:31 -0400 [thread overview]
Message-ID: <20110602194331.GA32344@dumpdata.com> (raw)
In-Reply-To: <3c920f4ec4f24e1c1347.1306921203@cosworth.uk.xensource.com>
> +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?
next prev parent reply other threads:[~2011-06-02 19:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-01 9:39 [PATCH 00 of 15] Further SeaBIOS support Ian Campbell
2011-06-01 9:39 ` [PATCH 01 of 15] hvmloader: allow per-BIOS decision on loading option ROMS Ian Campbell
2011-06-01 9:39 ` [PATCH 02 of 15] hvmloader: enable PCI_COMMAND_IO on primary VGA device Ian Campbell
2011-06-01 10:04 ` Ian Campbell
2011-06-01 9:39 ` [PATCH 03 of 15] hvmloader: setup PCI bus in a common function again Ian Campbell
2011-06-01 10:05 ` Ian Campbell
2011-06-01 10:44 ` Ian Campbell
2011-06-01 9:39 ` [PATCH 04 of 15] hvmloader: setup APICs " Ian Campbell
2011-06-01 9:40 ` [PATCH 05 of 15] hvmloader: call SMP setup from common code again Ian Campbell
2011-06-01 9:40 ` [PATCH 06 of 15] hvmloader: make ACPI initialisation hook more general Ian Campbell
2011-06-01 9:40 ` [PATCH 07 of 15] hvmloader: make SMBIOS initialisation " Ian Campbell
2011-06-01 9:40 ` [PATCH 08 of 15] hvmloader: Add a simple "scratch allocator" Ian Campbell
2011-06-02 19:43 ` Konrad Rzeszutek Wilk [this message]
2011-06-02 20:00 ` Keir Fraser
2011-06-01 9:40 ` [PATCH 09 of 15] hvmloader: refactor BIOS info setup Ian Campbell
2011-06-01 9:40 ` [PATCH 10 of 15] hvmloader: return MPFPS from create_mp_tables() Ian Campbell
2011-06-01 9:40 ` [PATCH 11 of 15] hvmloader: allow create_mp_tables() to allocate the table Ian Campbell
2011-06-01 9:40 ` [PATCH 12 of 15] hvmloader: smbios: allow the entry point data structure to be located separately Ian Campbell
2011-06-01 9:40 ` [PATCH 13 of 15] hvmloader: further support for SeaBIOS Ian Campbell
2011-06-01 9:40 ` [PATCH 14 of 15] hvmloader: allow the possibility to allocate the size of smbios table we actually need Ian Campbell
2011-06-01 9:40 ` [PATCH 15 of 15] hvmloader: add code to generate a $PIR table Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110602194331.GA32344@dumpdata.com \
--to=konrad.wilk@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.