]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/kernel/machine_kexec_64.c
powerpc: Find and destroy possible stale kernel added properties
[linux-2.6-omap-h63xx.git] / arch / powerpc / kernel / machine_kexec_64.c
index a168514d8609652335269211c723fb795a2f4865..4bd8b4f5e70d46931a86be30ff731416f49b3dac 100644 (file)
@@ -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);