[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XenPPC] [PATCH] [ppc] remove some historical mismerges
4 files changed, 8 insertions(+), 204 deletions(-) linux-2.6-xen-sparse/drivers/xen/core/xen_sysfs.c | 7 xen/arch/ia64/linux-xen/setup.c | 1 xen/arch/ia64/vmx/vmmu.c | 4 xen/arch/ia64/xen/xenmisc.c | 200 --------------------- # HG changeset patch # User Hollis Blanchard <hollisb@xxxxxxxxxx> # Node ID 29861ae27914ea6905d75276fd0d612969878874 # Parent e057a7ee26efb3a50a16f36b5568a8c1c860953c [ppc] remove some historical mismerges Signed-off-by: Hollis Blanchard <hollisb@xxxxxxxxxx> diff -r e057a7ee26ef -r 29861ae27914 linux-2.6-xen-sparse/drivers/xen/core/xen_sysfs.c --- a/linux-2.6-xen-sparse/drivers/xen/core/xen_sysfs.c Tue May 30 15:11:04 2006 -0500 +++ b/linux-2.6-xen-sparse/drivers/xen/core/xen_sysfs.c Tue May 30 15:24:31 2006 -0500 @@ -276,7 +276,12 @@ static void xen_properties_destroy(void) static int __init hyper_sysfs_init(void) { - int ret = xen_sysfs_type_init(); + int ret; + + if (!is_running_on_xen()) + return -ENODEV; + + ret = xen_sysfs_type_init(); if (ret) goto out; ret = xen_sysfs_version_init(); diff -r e057a7ee26ef -r 29861ae27914 xen/arch/ia64/linux-xen/setup.c --- a/xen/arch/ia64/linux-xen/setup.c Tue May 30 15:11:04 2006 -0500 +++ b/xen/arch/ia64/linux-xen/setup.c Tue May 30 15:24:31 2006 -0500 @@ -868,7 +868,6 @@ cpu_init (void) #endif #ifndef XEN atomic_inc(&init_mm.mm_count); -#ifndef XEN current->active_mm = &init_mm; #endif #ifndef XEN diff -r e057a7ee26ef -r 29861ae27914 xen/arch/ia64/vmx/vmmu.c --- a/xen/arch/ia64/vmx/vmmu.c Tue May 30 15:11:04 2006 -0500 +++ b/xen/arch/ia64/vmx/vmmu.c Tue May 30 15:24:31 2006 -0500 @@ -173,8 +173,6 @@ void free_domain_tlb(struct vcpu *v) void free_domain_tlb(struct vcpu *v) { struct page_info *page; - void *vhptbase; - thash_cb_t *tlb; if ( v->arch.vtlb.hash) { page = virt_to_page(v->arch.vtlb.hash); @@ -373,6 +371,8 @@ IA64FAULT vmx_vcpu_itc_d(VCPU *vcpu, UIN return IA64_NO_FAULT; } + + IA64FAULT vmx_vcpu_itr_i(VCPU *vcpu, u64 slot, u64 pte, u64 itir, u64 ifa) diff -r e057a7ee26ef -r 29861ae27914 xen/arch/ia64/xen/xenmisc.c --- a/xen/arch/ia64/xen/xenmisc.c Tue May 30 15:11:04 2006 -0500 +++ b/xen/arch/ia64/xen/xenmisc.c Tue May 30 15:24:31 2006 -0500 @@ -539,203 +539,3 @@ int get_page_type(struct page_info *page return 1; } - -/////////////////////////////// -// from arch/x86/mm.c -/////////////////////////////// - -#ifdef VERBOSE -#define MEM_LOG(_f, _a...) \ - printk("DOM%u: (file=mm.c, line=%d) " _f "\n", \ - current->domain->domain_id , __LINE__ , ## _a ) -#else -#define MEM_LOG(_f, _a...) ((void)0) -#endif - -void cleanup_writable_pagetable(struct domain *d) -{ - return; -} - -void put_page_type(struct page_info *page) -{ - u32 nx, x, y = page->u.inuse.type_info; - - again: - do { - x = y; - nx = x - 1; - - ASSERT((x & PGT_count_mask) != 0); - - /* - * The page should always be validated while a reference is held. The - * exception is during domain destruction, when we forcibly invalidate - * page-table pages if we detect a referential loop. - * See domain.c:relinquish_list(). - */ - ASSERT((x & PGT_validated) || - test_bit(_DOMF_dying, &page_get_owner(page)->domain_flags)); - - if ( unlikely((nx & PGT_count_mask) == 0) ) - { - /* Record TLB information for flush later. Races are harmless. */ - page->tlbflush_timestamp = tlbflush_current_time(); - - if ( unlikely((nx & PGT_type_mask) <= PGT_l4_page_table) && - likely(nx & PGT_validated) ) - { - /* - * Page-table pages must be unvalidated when count is zero. The - * 'free' is safe because the refcnt is non-zero and validated - * bit is clear => other ops will spin or fail. - */ - if ( unlikely((y = cmpxchg(&page->u.inuse.type_info, x, - x & ~PGT_validated)) != x) ) - goto again; - /* We cleared the 'valid bit' so we do the clean up. */ - free_page_type(page, x); - /* Carry on, but with the 'valid bit' now clear. */ - x &= ~PGT_validated; - nx &= ~PGT_validated; - } - } - else if ( unlikely(((nx & (PGT_pinned | PGT_count_mask)) == - (PGT_pinned | 1)) && - ((nx & PGT_type_mask) != PGT_writable_page)) ) - { - /* Page is now only pinned. Make the back pointer mutable again. */ - nx |= PGT_va_mutable; - } - } - while ( unlikely((y = cmpxchg(&page->u.inuse.type_info, x, nx)) != x) ); -} - - -int get_page_type(struct page_info *page, u32 type) -{ - u32 nx, x, y = page->u.inuse.type_info; - - again: - do { - x = y; - nx = x + 1; - if ( unlikely((nx & PGT_count_mask) == 0) ) - { - MEM_LOG("Type count overflow on pfn %lx", page_to_mfn(page)); - return 0; - } - else if ( unlikely((x & PGT_count_mask) == 0) ) - { - if ( (x & (PGT_type_mask|PGT_va_mask)) != type ) - { - if ( (x & PGT_type_mask) != (type & PGT_type_mask) ) - { - /* - * On type change we check to flush stale TLB - * entries. This may be unnecessary (e.g., page - * was GDT/LDT) but those circumstances should be - * very rare. - */ - cpumask_t mask = - page_get_owner(page)->domain_dirty_cpumask; - tlbflush_filter(mask, page->tlbflush_timestamp); - - if ( unlikely(!cpus_empty(mask)) ) - { - perfc_incrc(need_flush_tlb_flush); - flush_tlb_mask(mask); - } - } - - /* We lose existing type, back pointer, and validity. */ - nx &= ~(PGT_type_mask | PGT_va_mask | PGT_validated); - nx |= type; - - /* No special validation needed for writable pages. */ - /* Page tables and GDT/LDT need to be scanned for validity. */ - if ( type == PGT_writable_page ) - nx |= PGT_validated; - } - } - else - { - if ( unlikely((x & (PGT_type_mask|PGT_va_mask)) != type) ) - { - if ( unlikely((x & PGT_type_mask) != (type & PGT_type_mask) ) ) - { - if ( current->domain == page_get_owner(page) ) - { - /* - * This ensures functions like set_gdt() see up-to-date - * type info without needing to clean up writable p.t. - * state on the fast path. - */ - LOCK_BIGLOCK(current->domain); - cleanup_writable_pagetable(current->domain); - y = page->u.inuse.type_info; - UNLOCK_BIGLOCK(current->domain); - /* Can we make progress now? */ - if ( ((y & PGT_type_mask) == (type & PGT_type_mask)) || - ((y & PGT_count_mask) == 0) ) - goto again; - } - if ( ((x & PGT_type_mask) != PGT_l2_page_table) || - ((type & PGT_type_mask) != PGT_l1_page_table) ) - MEM_LOG("Bad type (saw %" PRtype_info - " != exp %" PRtype_info ") " - "for mfn %lx (pfn %lx)", - x, type, page_to_mfn(page), - get_gpfn_from_mfn(page_to_mfn(page))); - return 0; - } - else if ( (x & PGT_va_mask) == PGT_va_mutable ) - { - /* The va backpointer is mutable, hence we update it. */ - nx &= ~PGT_va_mask; - nx |= type; /* we know the actual type is correct */ - } - else if ( ((type & PGT_va_mask) != PGT_va_mutable) && - ((type & PGT_va_mask) != (x & PGT_va_mask)) ) - { -#ifdef CONFIG_X86_PAE - /* We use backptr as extra typing. Cannot be unknown. */ - if ( (type & PGT_type_mask) == PGT_l2_page_table ) - return 0; -#endif - /* This table is possibly mapped at multiple locations. */ - nx &= ~PGT_va_mask; - nx |= PGT_va_unknown; - } - } - if ( unlikely(!(x & PGT_validated)) ) - { - /* Someone else is updating validation of this page. Wait... */ - while ( (y = page->u.inuse.type_info) == x ) - cpu_relax(); - goto again; - } - } - } - while ( unlikely((y = cmpxchg(&page->u.inuse.type_info, x, nx)) != x) ); - - if ( unlikely(!(nx & PGT_validated)) ) - { - /* Try to validate page type; drop the new reference on failure. */ - if ( unlikely(!alloc_page_type(page, type)) ) - { - MEM_LOG("Error while validating mfn %lx (pfn %lx) for type %" - PRtype_info ": caf=%08x taf=%" PRtype_info, - page_to_mfn(page), get_gpfn_from_mfn(page_to_mfn(page)), - type, page->count_info, page->u.inuse.type_info); - /* Noone else can get a reference. We hold the only ref. */ - page->u.inuse.type_info = 0; - return 0; - } - - /* Noone else is updating simultaneously. */ - __set_bit(_PGT_validated, &page->u.inuse.type_info); - } - - return 1; -} _______________________________________________ Xen-ppc-devel mailing list Xen-ppc-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ppc-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |