1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define _CPU_DEVICE_ID 1
6 * Declare drivers belonging to specific x86 CPUs
7 * Similar in spirit to pci_device_id and related PCI functions
10 #include <linux/mod_devicetable.h>
12 #define X86_STEPPINGS(mins, maxs) GENMASK(maxs, mins)
15 * X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE - Base macro for CPU matching
16 * @_vendor: The vendor name, e.g. INTEL, AMD, HYGON, ..., ANY
17 * The name is expanded to X86_VENDOR_@_vendor
18 * @_family: The family number or X86_FAMILY_ANY
19 * @_model: The model number, model constant or X86_MODEL_ANY
20 * @_steppings: Bitmask for steppings, stepping constant or X86_STEPPING_ANY
21 * @_feature: A X86_FEATURE bit or X86_FEATURE_ANY
22 * @_data: Driver specific data or NULL. The internal storage
23 * format is unsigned long. The supplied value, pointer
24 * etc. is casted to unsigned long internally.
26 * Backport version to keep the SRBDS pile consistant. No shorter variants
29 #define X86_MATCH_VENDOR_FAM_MODEL_STEPPINGS_FEATURE(_vendor, _family, _model, \
30 _steppings, _feature, _data) { \
31 .vendor = X86_VENDOR_##_vendor, \
34 .steppings = _steppings, \
35 .feature = _feature, \
36 .driver_data = (unsigned long) _data \
39 extern const struct x86_cpu_id *x86_match_cpu(const struct x86_cpu_id *match);