diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-06-18 10:30:28 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-06-18 10:30:28 +0100 |
commit | c92018768b91b5250bb41fbc0e29e21f86b89ac2 (patch) | |
tree | 9d02acbff35fedd6bca3c4ed2fdd815bc8d6a896 /xen/include/xen/mm.h | |
parent | 590b3ce1d371e5d53fadb28ee965cdb2a4765c73 (diff) | |
download | xen-c92018768b91b5250bb41fbc0e29e21f86b89ac2.tar.gz xen-c92018768b91b5250bb41fbc0e29e21f86b89ac2.tar.bz2 xen-c92018768b91b5250bb41fbc0e29e21f86b89ac2.zip |
Introduce page_list_move()
This not only allows to remove ia64's special implementation of
page_list_splice_init(), but also fixes the latent issue with the
direct list head assignment in the x86 code if that would ever get
switched back to using normal list entries for linking together pages
(i.e. whenever x86-64 is to support more tha 16Tb of memory).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/include/xen/mm.h')
-rw-r--r-- | xen/include/xen/mm.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h index 50c47b00e2..71e3181e2a 100644 --- a/xen/include/xen/mm.h +++ b/xen/include/xen/mm.h @@ -223,7 +223,15 @@ page_list_remove_head(struct page_list_head *head) return page; } - +static inline void +page_list_move(struct page_list_head *dst, struct page_list_head *src) +{ + if ( !page_list_empty(src) ) + { + *dst = *src; + INIT_PAGE_LIST_HEAD(src); + } +} static inline void page_list_splice(struct page_list_head *list, struct page_list_head *head) { @@ -281,6 +289,8 @@ page_list_splice(struct page_list_head *list, struct page_list_head *head) list_del(&__pg->list); \ __pg; \ }) : NULL) +# define page_list_move(dst, src) (!list_empty(src) ? \ + list_replace_init(src, dst) : (void)0) # define page_list_for_each(pos, head) list_for_each_entry(pos, head, list) # define page_list_for_each_safe(pos, tmp, head) \ list_for_each_entry_safe(pos, tmp, head, list) |