mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-13 16:36:53 +07:00
0e4c0e6ea7
Commitaf391b15f7
("arm64: kernel: rename __cpu_suspend to keep it aligned with arm") renamed cpu_suspend() to arm_cpuidle_suspend(), but forgot to update the kerneldoc header. Fixes:af391b15f7
("arm64: kernel: rename __cpu_suspend to keep it aligned with arm") Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Will Deacon <will.deacon@arm.com>
60 lines
1.3 KiB
C
60 lines
1.3 KiB
C
/*
|
|
* ARM64 CPU idle arch support
|
|
*
|
|
* Copyright (C) 2014 ARM Ltd.
|
|
* Author: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
|
|
#include <linux/acpi.h>
|
|
#include <linux/cpuidle.h>
|
|
#include <linux/cpu_pm.h>
|
|
#include <linux/of.h>
|
|
#include <linux/of_device.h>
|
|
|
|
#include <asm/cpuidle.h>
|
|
#include <asm/cpu_ops.h>
|
|
|
|
int arm_cpuidle_init(unsigned int cpu)
|
|
{
|
|
int ret = -EOPNOTSUPP;
|
|
|
|
if (cpu_ops[cpu] && cpu_ops[cpu]->cpu_suspend &&
|
|
cpu_ops[cpu]->cpu_init_idle)
|
|
ret = cpu_ops[cpu]->cpu_init_idle(cpu);
|
|
|
|
return ret;
|
|
}
|
|
|
|
/**
|
|
* arm_cpuidle_suspend() - function to enter a low-power idle state
|
|
* @arg: argument to pass to CPU suspend operations
|
|
*
|
|
* Return: 0 on success, -EOPNOTSUPP if CPU suspend hook not initialized, CPU
|
|
* operations back-end error code otherwise.
|
|
*/
|
|
int arm_cpuidle_suspend(int index)
|
|
{
|
|
int cpu = smp_processor_id();
|
|
|
|
return cpu_ops[cpu]->cpu_suspend(index);
|
|
}
|
|
|
|
#ifdef CONFIG_ACPI
|
|
|
|
#include <acpi/processor.h>
|
|
|
|
int acpi_processor_ffh_lpi_probe(unsigned int cpu)
|
|
{
|
|
return arm_cpuidle_init(cpu);
|
|
}
|
|
|
|
int acpi_processor_ffh_lpi_enter(struct acpi_lpi_state *lpi)
|
|
{
|
|
return CPU_PM_CPU_IDLE_ENTER(arm_cpuidle_suspend, lpi->index);
|
|
}
|
|
#endif
|