arch/x86/kernel/acpi/cppc.c

Source file repositories/reference/linux-study-clean/arch/x86/kernel/acpi/cppc.c

File Facts

System
Linux kernel
Corpus path
arch/x86/kernel/acpi/cppc.c
Extension
.c
Size
7272 bytes
Lines
299
Domain
Architecture Layer
Bucket
arch/x86
Inferred role
Architecture Layer: exported/initcall integration point
Status
integration implementation candidate

Why This File Exists

CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.

Dependency Surface

Detected Declarations

Annotated Snippet

switch (boot_cpu_data.x86_model) {
		case 0x70 ... 0x7f:
			*numerator = CPPC_HIGHEST_PERF_PERFORMANCE;
			return 0;
		default:
			break;
		}
	}

	/* detect if running on heterogeneous design */
	if (cpu_feature_enabled(X86_FEATURE_AMD_HTR_CORES)) {
		switch (core_type) {
		case TOPO_CPU_TYPE_UNKNOWN:
			pr_warn("Undefined core type found for cpu %d\n", cpu);
			break;
		case TOPO_CPU_TYPE_PERFORMANCE:
			/* use the max scale for performance cores */
			*numerator = CPPC_HIGHEST_PERF_PERFORMANCE;
			return 0;
		case TOPO_CPU_TYPE_EFFICIENCY:
			/* use the highest perf value for efficiency cores */
			ret = amd_get_highest_perf(cpu, &tmp);
			if (ret)
				return ret;
			*numerator = tmp;
			return 0;
		}
	}

	*numerator = CPPC_HIGHEST_PERF_PREFCORE;

	return 0;
}
EXPORT_SYMBOL_GPL(amd_get_boost_ratio_numerator);

Annotation

Implementation Notes