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, 3 insertions, 7 deletions
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index d6431440c54f..ee166c586642 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -26,8 +26,6 @@
26#include <asm/prom.h> 26#include <asm/prom.h>
27#include <asm/smp.h> 27#include <asm/smp.h>
28 28
29#define HASH_GROUP_SIZE 0x80 /* size of each hash group, asm/mmu.h */
30
31int default_machine_kexec_prepare(struct kimage *image) 29int default_machine_kexec_prepare(struct kimage *image)
32{ 30{
33 int i; 31 int i;
@@ -61,7 +59,7 @@ int default_machine_kexec_prepare(struct kimage *image)
61 */ 59 */
62 if (htab_address) { 60 if (htab_address) {
63 low = __pa(htab_address); 61 low = __pa(htab_address);
64 high = low + (htab_hash_mask + 1) * HASH_GROUP_SIZE; 62 high = low + htab_size_bytes;
65 63
66 for (i = 0; i < image->nr_segments; i++) { 64 for (i = 0; i < image->nr_segments; i++) {
67 begin = image->segment[i].mem; 65 begin = image->segment[i].mem;
@@ -294,7 +292,7 @@ void default_machine_kexec(struct kimage *image)
294} 292}
295 293
296/* Values we need to export to the second kernel via the device tree. */ 294/* Values we need to export to the second kernel via the device tree. */
297static unsigned long htab_base, htab_size, kernel_end; 295static unsigned long htab_base, kernel_end;
298 296
299static struct property htab_base_prop = { 297static struct property htab_base_prop = {
300 .name = "linux,htab-base", 298 .name = "linux,htab-base",
@@ -305,7 +303,7 @@ static struct property htab_base_prop = {
305static struct property htab_size_prop = { 303static struct property htab_size_prop = {
306 .name = "linux,htab-size", 304 .name = "linux,htab-size",
307 .length = sizeof(unsigned long), 305 .length = sizeof(unsigned long),
308 .value = (unsigned char *)&htab_size, 306 .value = (unsigned char *)&htab_size_bytes,
309}; 307};
310 308
311static struct property kernel_end_prop = { 309static struct property kernel_end_prop = {
@@ -331,8 +329,6 @@ static void __init export_htab_values(void)
331 329
332 htab_base = __pa(htab_address); 330 htab_base = __pa(htab_address);
333 prom_add_property(node, &htab_base_prop); 331 prom_add_property(node, &htab_base_prop);
334
335 htab_size = 1UL << ppc64_pft_size;
336 prom_add_property(node, &htab_size_prop); 332 prom_add_property(node, &htab_size_prop);
337 333
338 out: 334 out: