Contributors: 17
Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
Anton Blanchard |
66 |
36.26% |
5 |
16.67% |
Michael Ellerman |
56 |
30.77% |
5 |
16.67% |
Cédric Le Goater |
17 |
9.34% |
2 |
6.67% |
Benjamin Herrenschmidt |
9 |
4.95% |
4 |
13.33% |
Gautham R. Shenoy |
6 |
3.30% |
1 |
3.33% |
Paul Mackerras |
5 |
2.75% |
2 |
6.67% |
Jeremy Kerr |
4 |
2.20% |
1 |
3.33% |
Martin J. Bligh |
4 |
2.20% |
1 |
3.33% |
Stephen Rothwell |
3 |
1.65% |
1 |
3.33% |
Linus Torvalds |
2 |
1.10% |
1 |
3.33% |
Thomas Gleixner |
2 |
1.10% |
1 |
3.33% |
Arnd Bergmann |
2 |
1.10% |
1 |
3.33% |
Deepthi Dharwar |
2 |
1.10% |
1 |
3.33% |
Michael Neuling |
1 |
0.55% |
1 |
3.33% |
Nathan Fontenot |
1 |
0.55% |
1 |
3.33% |
Nicholas Piggin |
1 |
0.55% |
1 |
3.33% |
Christophe Leroy |
1 |
0.55% |
1 |
3.33% |
Total |
182 |
|
30 |
|
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright 2006 Michael Ellerman, IBM Corporation
*/
#include <linux/kernel.h>
#include <linux/interrupt.h>
#include <asm/setup.h>
#include <asm/page.h>
#include <asm/firmware.h>
#include <asm/kexec.h>
#include <asm/xics.h>
#include <asm/xive.h>
#include <asm/smp.h>
#include <asm/plpar_wrappers.h>
#include "pseries.h"
void pseries_kexec_cpu_down(int crash_shutdown, int secondary)
{
/*
* Don't risk a hypervisor call if we're crashing
* XXX: Why? The hypervisor is not crashing. It might be better
* to at least attempt unregister to avoid the hypervisor stepping
* on our memory.
*/
if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
int ret;
int cpu = smp_processor_id();
int hwcpu = hard_smp_processor_id();
if (get_lppaca()->dtl_enable_mask) {
ret = unregister_dtl(hwcpu);
if (ret) {
pr_err("WARNING: DTL deregistration for cpu "
"%d (hw %d) failed with %d\n",
cpu, hwcpu, ret);
}
}
ret = unregister_slb_shadow(hwcpu);
if (ret) {
pr_err("WARNING: SLB shadow buffer deregistration "
"for cpu %d (hw %d) failed with %d\n",
cpu, hwcpu, ret);
}
ret = unregister_vpa(hwcpu);
if (ret) {
pr_err("WARNING: VPA deregistration for cpu %d "
"(hw %d) failed with %d\n", cpu, hwcpu, ret);
}
}
if (xive_enabled()) {
xive_teardown_cpu();
if (!secondary)
xive_shutdown();
} else
xics_kexec_teardown_cpu(secondary);
}