WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-ia64-devel

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

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] [PATCH 9/12] remove the init_task definition
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Thu, 20 Dec 2007 16:37:05 +0900
Cc: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Delivery-date: Wed, 19 Dec 2007 23:38:03 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
# 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
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] [PATCH 9/12] remove the init_task definition, Isaku Yamahata <=