[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] [IA64] ia64 counter part of 19374:e655cb27d085.
# HG changeset patch # User Isaku Yamahata <yamahata@xxxxxxxxxxxxx> # Date 1238118848 -32400 # Node ID 5e4dd7079c484192e8621e64d817d58b995b4f75 # Parent dee5bc89873e33641c5ad4f5ae3990e8a5ddc246 [IA64] ia64 counter part of 19374:e655cb27d085. This patch is the ia64 counter part of 19374:e655cb27d085. Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx> --- xen/include/asm-ia64/mm.h | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff -r dee5bc89873e -r 5e4dd7079c48 xen/include/asm-ia64/mm.h --- a/xen/include/asm-ia64/mm.h Tue Mar 10 11:00:34 2009 +0900 +++ b/xen/include/asm-ia64/mm.h Fri Mar 27 10:54:08 2009 +0900 @@ -228,10 +228,18 @@ static inline struct domain *page_get_ow do { x = y; - if (unlikely((x & PGC_count_mask) == 0) || /* Not allocated? */ - unlikely(((x + 1) & PGC_count_mask) == 0) ) {/* Count overflow? */ + /* + * Count == 0: Page is not allocated, so we cannot take a reference. + * Count == -1: Reference count would wrap, which is invalid. + * Count == -2: Remaining unused ref is reserved for get_page_light(). + */ + /* + * On ia64, get_page_light() isn't defined so that it doesn't + * make sense to take care of Count == -2. + * Just for consistency with x86. + */ + if ( unlikely(((x + 2) & PGC_count_mask) <= 2) ) return NULL; - } y = cmpxchg_acq(&page->count_info, x, x + 1); } while (unlikely(y != x)); @@ -247,7 +255,8 @@ static inline int get_page(struct page_i if (likely(owner == domain)) return 1; - put_page(page); + if (owner != NULL) + put_page(page); /* if (!domain->is_dying) */ /* XXX: header inclusion hell */ gdprintk(XENLOG_INFO, _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |