aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/machine_kexec_64.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/machine_kexec_64.c')
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index be58985c7681..a24b09c27718 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -31,8 +31,8 @@ int default_machine_kexec_prepare(struct kimage *image)
31 unsigned long begin, end; /* limits of segment */ 31 unsigned long begin, end; /* limits of segment */
32 unsigned long low, high; /* limits of blocked memory range */ 32 unsigned long low, high; /* limits of blocked memory range */
33 struct device_node *node; 33 struct device_node *node;
34 unsigned long *basep; 34 const unsigned long *basep;
35 unsigned int *sizep; 35 const unsigned int *sizep;
36 36
37 if (!ppc_md.hpte_clear_all) 37 if (!ppc_md.hpte_clear_all)
38 return -ENOENT; 38 return -ENOENT;
@@ -72,10 +72,8 @@ int default_machine_kexec_prepare(struct kimage *image)
72 /* We also should not overwrite the tce tables */ 72 /* We also should not overwrite the tce tables */
73 for (node = of_find_node_by_type(NULL, "pci"); node != NULL; 73 for (node = of_find_node_by_type(NULL, "pci"); node != NULL;
74 node = of_find_node_by_type(node, "pci")) { 74 node = of_find_node_by_type(node, "pci")) {
75 basep = (unsigned long *)get_property(node, "linux,tce-base", 75 basep = get_property(node, "linux,tce-base", NULL);
76 NULL); 76 sizep = get_property(node, "linux,tce-size", NULL);
77 sizep = (unsigned int *)get_property(node, "linux,tce-size",
78 NULL);
79 if (basep == NULL || sizep == NULL) 77 if (basep == NULL || sizep == NULL)
80 continue; 78 continue;
81 79