Skip to content

Commit

Permalink
[POWERPC] pseries: phyp dump: Disable phyp-dump through boot-var
Browse files Browse the repository at this point in the history
This adds a kernel command line option "phyp_dump", which takes a 0/1
value for disabling/ enabling phyp_dump at boot time.  Kdump can use
this on cmdline (phyp_dump=0) to disable phyp-dump during boot when
enabling itself.  This will ensure only one dumping mechanism is active
at any given time.

Signed-off-by: Manish Ahuja <mahuja@us.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Manish Ahuja authored and Paul Mackerras committed Mar 25, 2008
1 parent 242f271 commit 654f596
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,11 @@ static void __init phyp_dump_reserve_mem(void)
return;
}

if (!phyp_dump_info->phyp_dump_at_boot) {
printk(KERN_INFO "Phyp-dump disabled at boot time\n");
return;
}

if (phyp_dump_info->phyp_dump_is_active) {
/* Reserve *everything* above RMR.Area freed by userland tools*/
base = PHYP_DUMP_RMR_END;
Expand Down
18 changes: 18 additions & 0 deletions arch/powerpc/platforms/pseries/phyp_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,3 +460,21 @@ int __init early_init_dt_scan_phyp_dump(unsigned long node,
*((unsigned long *)&sizes[4]);
return 1;
}

/* Look for phyp_dump= cmdline option */
static int __init early_phyp_dump_enabled(char *p)
{
phyp_dump_info->phyp_dump_at_boot = 1;

if (!p)
return 0;

if (strncmp(p, "1", 1) == 0)
phyp_dump_info->phyp_dump_at_boot = 1;
else if (strncmp(p, "0", 1) == 0)
phyp_dump_info->phyp_dump_at_boot = 0;

return 0;
}
early_param("phyp_dump", early_phyp_dump_enabled);

1 change: 1 addition & 0 deletions include/asm-powerpc/phyp_dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ struct phyp_dump {
unsigned long init_reserve_start;
unsigned long init_reserve_size;
/* Check status during boot if dump supported, active & present*/
unsigned long phyp_dump_at_boot;
unsigned long phyp_dump_configured;
unsigned long phyp_dump_is_active;
/* store cpu & hpte size */
Expand Down

0 comments on commit 654f596

Please sign in to comment.