]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/machine_kexec_64.c
powerpc: Kexec exit should not use magic numbers
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / machine_kexec_64.c
index b732b5f8e3568299ae5f706db09ba0cdbfe925ee..3c4ca046e854c9e88ab587c1672eae97b2c69c4a 100644 (file)
@@ -158,7 +158,7 @@ void kexec_copy_flush(struct kimage *image)
  * on calling the interrupts, but we would like to call it off irq level
  * so that the interrupt controller is clean.
  */
-void kexec_smp_down(void *arg)
+static void kexec_smp_down(void *arg)
 {
        if (ppc_md.kexec_cpu_down)
                ppc_md.kexec_cpu_down(0, 1);
@@ -249,7 +249,7 @@ static void kexec_prepare_cpus(void)
  * We could use a smaller stack if we don't care about anything using
  * current, but that audit has not been performed.
  */
-union thread_union kexec_stack
+static union thread_union kexec_stack
        __attribute__((__section__(".data.init_task"))) = { };
 
 /* Our assembly helper, in kexec_stub.S */
@@ -270,8 +270,8 @@ void default_machine_kexec(struct kimage *image)
         * using debugger IPI.
         */
 
-       if (crashing_cpu == -1)
-               kexec_prepare_cpus();
+       if (crashing_cpu == -1)
+               kexec_prepare_cpus();
 
        /* switch to a staticly allocated stack.  Based on irq stack code.
         * XXX: the task struct will likely be invalid once we do the copy!
@@ -312,11 +312,24 @@ static struct property kernel_end_prop = {
 static void __init export_htab_values(void)
 {
        struct device_node *node;
+       struct property *prop;
 
        node = of_find_node_by_path("/chosen");
        if (!node)
                return;
 
+       /* remove any stale propertys so ours can be found */
+       prop = of_find_property(node, kernel_end_prop.name, NULL);
+       if (prop)
+               prom_remove_property(node, prop);
+       prop = of_find_property(node, htab_base_prop.name, NULL);
+       if (prop)
+               prom_remove_property(node, prop);
+       prop = of_find_property(node, htab_size_prop.name, NULL);
+       if (prop)
+               prom_remove_property(node, prop);
+
+       /* information needed by userspace when using default_machine_kexec */
        kernel_end = __pa(_end);
        prom_add_property(node, &kernel_end_prop);