[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-ia64-devel] [PATCH 9/12] remove the init_task definition



# HG changeset patch
# User yamahata@xxxxxxxxxxxxx
# Date 1197959926 -32400
# Node ID 8558c0017136dc43f799fc30844bff5091e9973e
# Parent  5cacdbf13f6a8f5a0dfdca5a5ef51b2149929b81
remove init_task definition.
init_task in kernel area shouldn't be referenced.
The corresponding address in the identity mapping area should be used.
i.e. ia64_tpa(init_task) + PAGE_OFFSET, because ia64_switch_rr7() and
vmx_switch_rr7() assume that stack is in indentity mapping area.
To make it sure, remove init_task definition.
PATCHNAME: remove_init_task_definition

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>

diff -r 5cacdbf13f6a -r 8558c0017136 xen/arch/ia64/linux-xen/head.S
--- a/xen/arch/ia64/linux-xen/head.S    Tue Dec 18 15:38:46 2007 +0900
+++ b/xen/arch/ia64/linux-xen/head.S    Tue Dec 18 15:38:46 2007 +0900
@@ -311,6 +311,10 @@ 1: // now we are in virtual mode
 #define isAP   p2      // are we an Application Processor?
 #define isBP   p3      // are we the Bootstrap Processor?
 
+#ifdef XEN
+# define init_task     init_task_mem
+#endif
+
 #ifdef CONFIG_SMP
        /*
         * Find the init_task for the currently booting CPU.  At poweron, and in
diff -r 5cacdbf13f6a -r 8558c0017136 xen/arch/ia64/xen/idle0_task.c
--- a/xen/arch/ia64/xen/idle0_task.c    Tue Dec 18 15:38:46 2007 +0900
+++ b/xen/arch/ia64/xen/idle0_task.c    Tue Dec 18 15:38:46 2007 +0900
@@ -11,17 +11,19 @@
 /*
  * Initial task structure.
  *
- * We need to make sure that this is properly aligned due to the way process 
stacks are
- * handled. This is done by having a special ".data.init_task" section...
+ * We need to make sure that this is properly aligned due to the way process
+ * stacks are handled.
+ * This is done by having a special ".data.init_task" section...
+ *
+ * init_task_mem shouldn't be used directly. the corresponding address in
+ * the identity mapping area should be used.
+ * I.e. __va(ia64_tpa(init_task_mem)) should be used.
  */
 union {
        struct {
                struct vcpu task;
        } s;
        unsigned long stack[KERNEL_STACK_SIZE/sizeof (unsigned long)];
-} init_task_mem asm ("init_task") __attribute__((section(".data.init_task"))) 
= {{
+} init_task_mem __attribute__((section(".data.init_task"))) = {{
        .task = IDLE_VCPU(init_task_mem.s.task)
 }};
-
-EXPORT_SYMBOL(init_task);
-

Attachment: 16641_8558c0017136_remove_init_task_definition.patch
Description: Text Data

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.