Fix ia64 compilation broken (RE: [Xen-changelog] General start-of-day cleanups, resulting in the)
PATCH 1/1 Fix ia64 compilation broken (RE: [Xen-changelog] General start-of-day cleanups, resulting in the)
Hi, Keir,
Xen-unstable is broken for ia64 due to following change. Attached patch fixed the compilation issue and also change xen/ia64 to use one single, multi-cpu, idle domain created dynamically correspondingly. Only difference is vcpu0 of idle domain is still built at compilation phase, due to some code copied from Linux requiring that.
Please help check in.
Signed-off-by Kevin Tian <[email protected]>
Thank,
Kevin
Quoted 16 lines
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Xen patchbot -unstable
Sent: 2006年1月10日 3:38
To: [email protected]
Subject: [Xen-changelog] General start-of-day cleanups, resulting in the# HG changeset patch
# User [email protected]
# Node ID1572681e4e5a06cfd08cd5bffe4736c61dce4335# Parentdfb8362648982b51d80ef589eafd74688c09ccc3General start-of-day cleanups, resulting in the x86/32map_domain_page()mapcache now being per-domain rather than global.
Quoted 6 lines
Other cleanups include removal of static definition of CPU0's idle domain. Instead a single, multi-cpu, idle domain is dynamically created early during bootstrap.
Signed-off-by Keir Fraser <[email protected]>
Change to single, multi-cpu, idle domain dynamically created early during bootstrap for ia64, like what happens on x86. One difference is vcpu0 of idle domain is still built at compilation phase, due to some code copying from Linux requiring that.
This also fix compilation broke, together with some cleanups.
Signed-off-by Kevin Tian <[email protected]>
xen/arch/ia64/linux-xen/smpboot.c +2 -3
@@ -482,9 +482,8 @@struct vcpu *v;void *stack; -if ( (idle =do_createdomain (IDLE_DOMAIN_ID , cpu)) ==NULL ) -panic ("failed 'createdomain' for CPU %d" , cpu); - v = idle->vcpu[0 ]; + v = idle_vcpu[cpu] =alloc_vcpu (idle_vcpu[0 ]->domain, cpu, cpu); +BUG_ON (v ==NULL );printf ("do_boot_cpu: cpu=%d, domain=%p, vcpu=%p\n" , cpu, idle, v);
xen/arch/ia64/xen/domain.c +34 -28
102 lines not on this page · raw message
xen/arch/ia64/xen/idle0_task.c +6 -24
@@ -11,29 +11,14 @@ .mmlist = LIST_HEAD_INIT(name.mmlist), \ } -#define IDLE0_EXEC_DOMAIN (_ed,_d) \ +#define IDLE_VCPU (_v) \ { \ processor: 0, \ - mm: 0, \ - thread: INIT_THREAD, \ - domain: (_d) \ -} - -#define IDLE0_DOMAIN (_t) \ -{ \ - domain_id: IDLE_DOMAIN_ID, \ - refcnt: ATOMIC_INIT(1) \ + domain: 0 \ }struct mm_struct init_mm =INIT_MM (init_mm);EXPORT_SYMBOL (init_mm); - -struct domain idle0_domain =IDLE0_DOMAIN (idle0_domain); -#if 0 -struct vcpu idle0_vcpu =IDLE0_EXEC_DOMAIN (idle0_vcpu, - &idle0_domain); -#endif -/* * Initial task structure.
@@ -43,15 +28,12 @@*/ union {struct { -struct domain task; +struct vcpu task; } s;unsigned long stack[KERNEL_STACK_SIZE /sizeof (unsigned long )]; -} init_task_mem asm ("init_task") __attribute__((section(".data.init_task"))); -// = {{ - ; -//.task = IDLE0_EXEC_DOMAIN(init_task_mem.s.task,&idle0_domain), -//}; -//}; +} init_task_mem asm ("init_task") __attribute__((section(".data.init_task"))) = {{ + .task = IDLE_VCPU(init_task_mem.s.task) +}};EXPORT_SYMBOL (init_task);
xen/arch/ia64/xen/xensetup.c +11 -20
@@ -26,7 +26,7 @@char saved_command_line[COMMAND_LINE_SIZE ]; -struct vcpu *idle_vcpu[NR_CPUS ] = { &idle0_vcpu }; +struct vcpu *idle_vcpu[NR_CPUS ];cpumask_t cpu_present_map;
@@ -156,15 +156,11 @@unsigned long dom0_memory_start, dom0_memory_size;unsigned long dom0_initrd_start, dom0_initrd_size;unsigned long initial_images_start, initial_images_end; +struct domain *idle_domain; running_on_sim =is_platform_hp_ski ();/* Kernel may be relocated by EFI loader */ xen_pstart =ia64_tpa (KERNEL_START ); - -/* Must do this early -- e.g., spinlocks rely on get_current(). */ -//set_current(&idle0_vcpu); - ia64_r13 = (void *)&idle0_vcpu; - idle0_vcpu.domain = &idle0_domain;early_setup_arch (&cmdline);
@@ -281,12 +277,16 @@ (xenheap_phys_end-__pa (heap_start)) >>20 , (xenheap_phys_end-__pa(heap_start)) >> 10); +printk ("About to call scheduler_init()\n" ); +scheduler_init (); + idle_vcpu[0 ] = (struct vcpu *) ia64_r13; + idle_domain =do_createdomain (IDLE_DOMAIN_ID ,0 ); +BUG_ON (idle_domain ==NULL ); +late_setup_arch (&cmdline);setup_per_cpu_areas ();mem_init (); -printk ("About to call scheduler_init()\n" ); -scheduler_init ();local_irq_disable ();init_IRQ ();printk ("About to call init_xen_time()\n" );
@@ -308,13 +308,9 @@ }smp_prepare_cpus (max_cpus); -/* We aren't hotplug-capable yet. */ -//BUG_ON(!cpus_empty(cpu_present_map)); for_each_cpu ( i )cpu_set (i, cpu_present_map); - -//BUG_ON(!local_irq_is_enabled()); /* Enable IRQ to receive IPI (needed for ITC sync). */ local_irq_enable ();
@@ -344,12 +340,7 @@/* Create initial domain 0. */ printk ("About to call do_createdomain()\n" ); dom0 =do_createdomain (0 ,0 ); - init_task.domain = &idle0_domain; - init_task.processor =0 ; -// init_task.mm = &init_mm; - init_task.domain->arch.mm = &init_mm; -// init_task.thread = INIT_THREAD; -//arch_do_createdomain(current); +#ifdef CLONE_DOMAIN0 {int i;
@@ -431,8 +422,8 @@local_irq_enable (); -printf ("About to call schedulers_start dom0=%p, idle0_dom=%p\n" , - dom0, &idle0_domain); +printf ("About to call schedulers_start dom0=%p, idle_dom=%p\n" , + dom0, &idle_domain);schedulers_start ();domain_unpause_by_systemcontroller (dom0);
xen/include/asm-ia64/config.h +0 -4
@@ -141,10 +141,6 @@#undef alloc_task_struct#define get_thread_info (v) alloc_thread_info(v) -// initial task has a different name in Xen -//#define idle0_task init_task -#define idle0_vcpu init_task -// avoid redefining task_t in asm/thread_info.h #define task_t struct domain
xen/include/public/arch-ia64.h +1 -1
@@ -9,7 +9,7 @@/* Maximum number of virtual CPUs in multi-processor guests. */ /* WARNING: before changing this, check that shared_info fits on a page */ -#define MAX_VIRT_CPUS 1 +#define MAX_VIRT_CPUS 4#ifndef __ASSEMBLY__
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel