Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
at v6.16 44 lines 1.1 kB view raw
1// SPDX-License-Identifier: MIT 2/* 3 * Copyright © 2024 Intel Corporation 4 * 5 * Avoid INTEL_<PLATFORM> name collisions between asm/intel-family.h and 6 * intel_device_info.h by having a separate file. 7 */ 8 9#include "intel_cpu_info.h" 10 11#ifdef CONFIG_X86 12#include <asm/cpu_device_id.h> 13#include <asm/intel-family.h> 14 15static const struct x86_cpu_id g8_cpu_ids[] = { 16 X86_MATCH_VFM(INTEL_ALDERLAKE, NULL), 17 X86_MATCH_VFM(INTEL_ALDERLAKE_L, NULL), 18 X86_MATCH_VFM(INTEL_COMETLAKE, NULL), 19 X86_MATCH_VFM(INTEL_KABYLAKE, NULL), 20 X86_MATCH_VFM(INTEL_KABYLAKE_L, NULL), 21 X86_MATCH_VFM(INTEL_RAPTORLAKE, NULL), 22 X86_MATCH_VFM(INTEL_RAPTORLAKE_P, NULL), 23 X86_MATCH_VFM(INTEL_RAPTORLAKE_S, NULL), 24 X86_MATCH_VFM(INTEL_ROCKETLAKE, NULL), 25 {} 26}; 27 28/** 29 * intel_match_g8_cpu - match current CPU against g8_cpu_ids 30 * 31 * This matches current CPU against g8_cpu_ids, which are applicable 32 * for G8 workaround. 33 * 34 * Returns: %true if matches, %false otherwise. 35 */ 36bool intel_match_g8_cpu(void) 37{ 38 return x86_match_cpu(g8_cpu_ids); 39} 40#else /* CONFIG_X86 */ 41 42bool intel_match_g8_cpu(void) { return false; } 43 44#endif /* CONFIG_X86 */