-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 48262 b: refs/heads/master c: dce623e h: refs/heads/master v: v3
- Loading branch information
Michael Ellerman
authored and
Paul Mackerras
committed
Feb 14, 2007
1 parent
e7c6b90
commit 3205c73
Showing
5 changed files
with
84 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 8feaeca23ab8f520e7af2a862fd6ea8e7bfd8854 | ||
refs/heads/master: dce623e0827e8d0ad60ce7f385c3394bf1b0bae0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* Copyright 2006 Michael Ellerman, IBM Corporation | ||
* | ||
* This program is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU General Public License | ||
* as published by the Free Software Foundation; either version | ||
* 2 of the License, or (at your option) any later version. | ||
*/ | ||
|
||
#include <asm/machdep.h> | ||
#include <asm/page.h> | ||
#include <asm/firmware.h> | ||
#include <asm/kexec.h> | ||
#include <asm/mpic.h> | ||
|
||
#include "pseries.h" | ||
#include "xics.h" | ||
#include "plpar_wrappers.h" | ||
|
||
static void pseries_kexec_cpu_down(int crash_shutdown, int secondary) | ||
{ | ||
/* Don't risk a hypervisor call if we're crashing */ | ||
if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) { | ||
unsigned long addr; | ||
|
||
addr = __pa(get_slb_shadow()); | ||
if (unregister_slb_shadow(hard_smp_processor_id(), addr)) | ||
printk("SLB shadow buffer deregistration of " | ||
"cpu %u (hw_cpu_id %d) failed\n", | ||
smp_processor_id(), | ||
hard_smp_processor_id()); | ||
|
||
addr = __pa(get_lppaca()); | ||
if (unregister_vpa(hard_smp_processor_id(), addr)) { | ||
printk("VPA deregistration of cpu %u (hw_cpu_id %d) " | ||
"failed\n", smp_processor_id(), | ||
hard_smp_processor_id()); | ||
} | ||
} | ||
} | ||
|
||
static void pseries_kexec_cpu_down_mpic(int crash_shutdown, int secondary) | ||
{ | ||
pseries_kexec_cpu_down(crash_shutdown, secondary); | ||
mpic_teardown_this_cpu(secondary); | ||
} | ||
|
||
void __init setup_kexec_cpu_down_mpic(void) | ||
{ | ||
ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_mpic; | ||
} | ||
|
||
static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary) | ||
{ | ||
pseries_kexec_cpu_down(crash_shutdown, secondary); | ||
xics_teardown_cpu(secondary); | ||
} | ||
|
||
void __init setup_kexec_cpu_down_xics(void) | ||
{ | ||
ppc_md.kexec_cpu_down = pseries_kexec_cpu_down_xics; | ||
} | ||
|
||
static int __init pseries_kexec_setup(void) | ||
{ | ||
ppc_md.machine_kexec = default_machine_kexec; | ||
ppc_md.machine_kexec_prepare = default_machine_kexec_prepare; | ||
ppc_md.machine_crash_shutdown = default_machine_crash_shutdown; | ||
|
||
return 0; | ||
} | ||
__initcall(pseries_kexec_setup); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters