// SPDX-License-Identifier: GPL-2.0-or-later/* * PowerNV cpuidle code * * Copyright 2015 IBM Corp. */#include<linux/types.h>#include<linux/mm.h>#include<linux/slab.h>#include<linux/of.h>#include<linux/device.h>#include<linux/cpu.h>#include<asm/asm-prototypes.h>#include<asm/firmware.h>#include<asm/machdep.h>#include<asm/opal.h>#include<asm/cputhreads.h>#include<asm/cpuidle.h>#include<asm/code-patching.h>#include<asm/smp.h>#include<asm/runlatch.h>#include<asm/dbell.h>#include"powernv.h"#include"subcore.h"/* Power ISA 3.0 allows for stop states 0x0 - 0xF */#define MAX_STOP_STATE 0xF#define P9_STOP_SPR_MSR 2000#define P9_STOP_SPR_PSSCR 855staticu32supported_cpuidle_states;structpnv_idle_states_t*pnv_idle_states;intnr_pnv_idle_states;/* * The default stop state that will be used by ppc_md.power_save * function on platforms that support stop instruction.