// SPDX-License-Identifier: GPL-2.0 /* * Intel PCONFIG instruction support. * * Copyright (C) 2017 Intel Corporation * * Author: * Kirill A. Shutemov <kirill.shutemov@linux.intel.com> */ #include <asm/cpufeature.h> #include <asm/intel_pconfig.h> #define PCONFIG_CPUID 0x1b #define PCONFIG_CPUID_SUBLEAF_MASK ((1 << 12) - 1) /* Subleaf type (EAX) for PCONFIG CPUID leaf (0x1B) */ enum { PCONFIG_CPUID_SUBLEAF_INVALID = 0, PCONFIG_CPUID_SUBLEAF_TARGETID = 1, }; /* Bitmask of supported targets */ static u64 targets_supported __read_mostly;
int pconfig_target_supported(enum pconfig_target target) { /* * We would need to re-think the implementation once we get > 64 * PCONFIG targets. Spec allows up to 2^32 targets. */ BUILD_BUG_ON(PCONFIG_TARGET_NR >= 64); if (WARN_ON_ONCE(target >= 64)) return 0; return targets_supported & (1ULL << target); }Contributors
Person | Tokens | Prop | Commits | CommitProp |
Kirill A. Shutemov | 38 | 100.00% | 1 | 100.00% |
Total | 38 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Kirill A. Shutemov | 154 | 100.00% | 1 | 100.00% |
Total | 154 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp |
Kirill A. Shutemov | 231 | 100.00% | 1 | 100.00% |
Total | 231 | 100.00% | 1 | 100.00% |