Commit d556c4a8 authored by Andrew Jones's avatar Andrew Jones Committed by Paolo Bonzini
Browse files

arm/arm64: psci: cpu_psci_cpu_die operates on itself


Signed-off-by: Andrew Jones's avatarAndrew Jones <drjones@redhat.com>
Message-Id: <20170529135804.22891-3-drjones@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent ff942175
......@@ -8,6 +8,6 @@ extern int psci_invoke(unsigned long function_id, unsigned long arg0,
extern int psci_cpu_on(unsigned long cpuid, unsigned long entry_point);
extern void psci_sys_reset(void);
extern int cpu_psci_cpu_boot(unsigned int cpu);
extern void cpu_psci_cpu_die(unsigned int cpu);
extern void cpu_psci_cpu_die(void);
#endif /* _ASMARM_PSCI_H_ */
......@@ -9,6 +9,7 @@
#include <asm/psci.h>
#include <asm/setup.h>
#include <asm/page.h>
#include <asm/smp.h>
__attribute__((noinline))
int psci_invoke(unsigned long function_id, unsigned long arg0,
......@@ -40,11 +41,11 @@ int cpu_psci_cpu_boot(unsigned int cpu)
}
#define PSCI_POWER_STATE_TYPE_POWER_DOWN (1U << 16)
void cpu_psci_cpu_die(unsigned int cpu)
void cpu_psci_cpu_die(void)
{
int err = psci_invoke(PSCI_0_2_FN_CPU_OFF,
PSCI_POWER_STATE_TYPE_POWER_DOWN, 0, 0);
printf("unable to power off CPU%d (%d)\n", cpu, err);
printf("CPU%d unable to power off (error = %d)\n", smp_processor_id(), err);
}
void psci_sys_reset(void)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment