History

Merge tag 'platform-drivers-x86-v6.18-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86

Pull x86 platform driver fixes from Ilpo Järvinen: "This one has lots of new HW entries which adds to the size in diffstat but the individual changes are simple. Fixes - acer-wmi: Ignore backlight event - alienware-wmi-wmax: Fix quirk match table order & drop redundant entries - amd/pmc: - Add Xbox Ally to spurious 8042 quirk list - Quirk list Lenovo Legion Go 2 NVMe resume - msi-wmi-platform: - Correct GUID to uppercase - GUID is uncleverly copy-pasted from an example so add a DMI whitelist - intel/speed_select_if: PCIBIOS_* return code conversion - intel-uncore-freq & ISST: Fix kernel doc warnings New HW support - alienware-wmi-wmax: - Alienware 16 Aurora support - Alienware M support - Alienware X support - Dell G support - amd/pmc: - ROG Xbox Ally (non-X) support - huaway-wmi: HONOR MagicBoox X16/X14 PrintScreen & YOYO keys - hp-wmi: - Omen 16-wf1xxx fan support - Omen MAX 16-ah0xx fan + thermal profile support - Victus 16-r0 and 16-s0 fan + thermal profile support - intel/hid: Intel Nova Lake support - intel-uncore-freq: - Intel Panther Lake support - Intel Wildcat Lake support - Intel Nova Lake support" * tag 'platform-drivers-x86-v6.18-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: (21 commits) platform/x86: intel-uncore-freq: fix all header kernel-doc warnings platform/x86: acer-wmi: Ignore backlight event platform/x86/intel/speed_select_if: Convert PCIBIOS_* return codes to errnos platform/x86/intel/hid: Add Nova Lake support platform/x86: alienware-wmi-wmax: Add AWCC support to Alienware 16 Aurora platform/x86: hp-wmi: Add Omen MAX 16-ah0xx fan support and thermal profile platform/x86: msi-wmi-platform: Fix typo in WMI GUID platform/x86: msi-wmi-platform: Only load on MSI devices platform/x86/amd: pmc: Add Lenovo Legion Go 2 to pmc quirk list platform/x86/amd/pmc: Add spurious_8042 to Xbox Ally platform/x86/amd/pmc: Add support for Van Gogh SoC platform/x86: alienware-wmi-wmax: Add support for the whole "G" family platform/x86: alienware-wmi-wmax: Add support for the whole "X" family platform/x86: alienware-wmi-wmax: Add support for the whole "M" family platform/x86: alienware-wmi-wmax: Drop redundant DMI entries platform/x86: alienware-wmi-wmax: Fix "Alienware m16 R1 AMD" quirk order platform/x86: ISST: isst_if.h: fix all kernel-doc warnings platform/x86: intel-uncore-freq: Add additional client processors platform/x86: hp-wmi: Add Omen 16-wf1xxx fan support platform/x86: huawei-wmi: add keys for HONOR models ...

Linus Torvalds committed 11 months ago

Commit 6ba3bb32 parents 8e621c9 db3023315 files · +148 −114Browse files

Unified · Split

15 files
  1. Documentation/wmi/driver-development-guide.rst +1 −0
  2. drivers/platform/x86/Kconfig +1 −0
  3. drivers/platform/x86/acer-wmi.c +4 −0
  4. drivers/platform/x86/amd/pmc/pmc-quirks.c +25 −0
  5. drivers/platform/x86/amd/pmc/pmc.c +3 −0
  6. drivers/platform/x86/amd/pmc/pmc.h +1 −0
  7. drivers/platform/x86/dell/alienware-wmi-wmax.c +25 −81
  8. drivers/platform/x86/hp/hp-wmi.c +4 −2
  9. drivers/platform/x86/huawei-wmi.c +4 −0
  10. drivers/platform/x86/intel/hid.c +1 −0
  11. drivers/platform/x86/intel/speed_select_if/isst_if_mmio.c +2 −2
  12. drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.h +5 −4
  13. drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c +4 −0
  14. drivers/platform/x86/msi-wmi-platform.c +41 −2
  15. include/uapi/linux/isst_if.h +27 −23
Documentation/wmi/driver-development-guide.rst+1−0
@@ -54,6 +54,7 @@ to matching WMI devices using a struct wmi_device_id table: · 53 unmodified lines
5454 ::
5555
5656 static const struct wmi_device_id foo_id_table[] = {
57+ /* Only use uppercase letters! */
5758 { "936DA01F-9ABD-4D9D-80C7-02AF85C822A8", NULL },
5859 { }
5960 };
drivers/platform/x86/Kconfig+1−0
@@ -545,6 +545,7 @@ config MSI_WMI · 544 unmodified lines
545545 config MSI_WMI_PLATFORM
546546 tristate "MSI WMI Platform features"
547547 depends on ACPI_WMI
548+ depends on DMI
548549 depends on HWMON
549550 help
550551 Say Y here if you want to have support for WMI-based platform features
drivers/platform/x86/acer-wmi.c+4−0
@@ -102,6 +102,7 @@ MODULE_ALIAS("wmi:676AA15E-6A47-4D9F-A2CC-1E6D18D14026"); · 101 unmodified lines
102102
103103 enum acer_wmi_event_ids {
104104 WMID_HOTKEY_EVENT = 0x1,
105+ WMID_BACKLIGHT_EVENT = 0x4,
105106 WMID_ACCEL_OR_KBD_DOCK_EVENT = 0x5,
106107 WMID_GAMING_TURBO_KEY_EVENT = 0x7,
107108 WMID_AC_EVENT = 0x8,
@@ -2369,6 +2370,9 @@ static void acer_wmi_notify(union acpi_object *obj, void *context) · 2261 unmodified lines
23692370 sparse_keymap_report_event(acer_wmi_input_dev, scancode, 1, true);
23702371 }
23712372 break;
2373+ case WMID_BACKLIGHT_EVENT:
2374+ /* Already handled by acpi-video */
2375+ break;
23722376 case WMID_ACCEL_OR_KBD_DOCK_EVENT:
23732377 acer_gsensor_event();
23742378 acer_kbd_dock_event(&return_value);
drivers/platform/x86/amd/pmc/pmc-quirks.c+25−0
@@ -122,6 +122,14 @@ static const struct dmi_system_id fwbug_list[] = { · 121 unmodified lines
122122 DMI_MATCH(DMI_PRODUCT_NAME, "21A1"),
123123 }
124124 },
125+ {
126+ .ident = "ROG Xbox Ally RC73YA",
127+ .driver_data = &quirk_spurious_8042,
128+ .matches = {
129+ DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."),
130+ DMI_MATCH(DMI_BOARD_NAME, "RC73YA"),
131+ }
132+ },
125133 /* https://bugzilla.kernel.org/show_bug.cgi?id=218024 */
126134 {
127135 .ident = "V14 G4 AMN",
@@ -204,6 +212,23 @@ static const struct dmi_system_id fwbug_list[] = { · 76 unmodified lines
204212 DMI_MATCH(DMI_PRODUCT_NAME, "82ND"),
205213 }
206214 },
215+ /* https://gitlab.freedesktop.org/drm/amd/-/issues/4618 */
216+ {
217+ .ident = "Lenovo Legion Go 2",
218+ .driver_data = &quirk_s2idle_bug,
219+ .matches = {
220+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
221+ DMI_MATCH(DMI_PRODUCT_NAME, "83N0"),
222+ }
223+ },
224+ {
225+ .ident = "Lenovo Legion Go 2",
226+ .driver_data = &quirk_s2idle_bug,
227+ .matches = {
228+ DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"),
229+ DMI_MATCH(DMI_PRODUCT_NAME, "83N1"),
230+ }
231+ },
207232 /* https://gitlab.freedesktop.org/drm/amd/-/issues/2684 */
208233 {
209234 .ident = "HP Laptop 15s-eq2xxx",
drivers/platform/x86/amd/pmc/pmc.c+3−0
@@ -106,6 +106,7 @@ static void amd_pmc_get_ip_info(struct amd_pmc_dev *dev) · 105 unmodified lines
106106 switch (dev->cpu_id) {
107107 case AMD_CPU_ID_PCO:
108108 case AMD_CPU_ID_RN:
109+ case AMD_CPU_ID_VG:
109110 case AMD_CPU_ID_YC:
110111 case AMD_CPU_ID_CB:
111112 dev->num_ips = 12;
@@ -517,6 +518,7 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev) · 405 unmodified lines
517518 case AMD_CPU_ID_PCO:
518519 return MSG_OS_HINT_PCO;
519520 case AMD_CPU_ID_RN:
521+ case AMD_CPU_ID_VG:
520522 case AMD_CPU_ID_YC:
521523 case AMD_CPU_ID_CB:
522524 case AMD_CPU_ID_PS:
@@ -717,6 +719,7 @@ static const struct pci_device_id pmc_pci_ids[] = { · 194 unmodified lines
717719 { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_RV) },
718720 { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SP) },
719721 { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_SHP) },
722+ { PCI_DEVICE(PCI_VENDOR_ID_AMD, AMD_CPU_ID_VG) },
720723 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M20H_ROOT) },
721724 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_1AH_M60H_ROOT) },
722725 { }
drivers/platform/x86/amd/pmc/pmc.h+1−0
@@ -156,6 +156,7 @@ void amd_mp2_stb_deinit(struct amd_pmc_dev *dev); · 155 unmodified lines
156156 #define AMD_CPU_ID_RN 0x1630
157157 #define AMD_CPU_ID_PCO AMD_CPU_ID_RV
158158 #define AMD_CPU_ID_CZN AMD_CPU_ID_RN
159+#define AMD_CPU_ID_VG 0x1645
159160 #define AMD_CPU_ID_YC 0x14B5
160161 #define AMD_CPU_ID_CB 0x14D8
161162 #define AMD_CPU_ID_PS 0x14E8
drivers/platform/x86/dell/alienware-wmi-wmax.c+25−81
@@ -90,34 +90,34 @@ static struct awcc_quirks empty_quirks; · 89 unmodified lines
9090
9191 static const struct dmi_system_id awcc_dmi_table[] __initconst = {
9292 {
93− .ident = "Alienware Area-51m",
93+ .ident = "Alienware 16 Aurora",
9494 .matches = {
9595 DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
96− DMI_MATCH(DMI_PRODUCT_NAME, "Alienware Area-51m"),
96+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware 16 Aurora"),
9797 },
98− .driver_data = &generic_quirks,
98+ .driver_data = &g_series_quirks,
9999 },
100100 {
101− .ident = "Alienware Area-51m R2",
101+ .ident = "Alienware Area-51m",
102102 .matches = {
103103 DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
104− DMI_MATCH(DMI_PRODUCT_NAME, "Alienware Area-51m R2"),
104+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware Area-51m"),
105105 },
106106 .driver_data = &generic_quirks,
107107 },
108108 {
109− .ident = "Alienware m15 R5",
109+ .ident = "Alienware m15",
110110 .matches = {
111111 DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
112− DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m15 R5"),
112+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m15"),
113113 },
114114 .driver_data = &generic_quirks,
115115 },
116116 {
117− .ident = "Alienware m15 R7",
117+ .ident = "Alienware m16 R1 AMD",
118118 .matches = {
119119 DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
120− DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m15 R7"),
120+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R1 AMD"),
121121 },
122122 .driver_data = &generic_quirks,
123123 },
@@ -129,14 +129,6 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = { · 5 unmodified lines
129129 },
130130 .driver_data = &g_series_quirks,
131131 },
132− {
133− .ident = "Alienware m16 R1 AMD",
134− .matches = {
135− DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
136− DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m16 R1 AMD"),
137− },
138− .driver_data = &generic_quirks,
139− },
140132 {
141133 .ident = "Alienware m16 R2",
142134 .matches = {
@@ -146,114 +138,66 @@ static const struct dmi_system_id awcc_dmi_table[] __initconst = { · 3 unmodified lines
146138 .driver_data = &generic_quirks,
147139 },
148140 {
149− .ident = "Alienware m17 R5",
141+ .ident = "Alienware m17",
150142 .matches = {
151143 DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
152− DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m17 R5 AMD"),
144+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m17"),
153145 },
154146 .driver_data = &generic_quirks,
155147 },
156148 {
157− .ident = "Alienware m18 R2",
149+ .ident = "Alienware m18",
158150 .matches = {
159151 DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
160− DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m18 R2"),
152+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware m18"),
161153 },
162154 .driver_data = &generic_quirks,
163155 },
164156 {
165− .ident = "Alienware x15 R1",
157+ .ident = "Alienware x15",
166158 .matches = {
167159 DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
168− DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x15 R1"),
160+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x15"),
169161 },
170162 .driver_data = &generic_quirks,
171163 },
172164 {
173− .ident = "Alienware x15 R2",
165+ .ident = "Alienware x17",
174166 .matches = {
175167 DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
176− DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x15 R2"),
168+ DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x17"),
177169 },
178170 .driver_data = &generic_quirks,
179171 },
180172 {
181− .ident = "Alienware x17 R2",
182− .matches = {
183− DMI_MATCH(DMI_SYS_VENDOR, "Alienware"),
184− DMI_MATCH(DMI_PRODUCT_NAME, "Alienware x17 R2"),
185− },
186− .driver_data = &generic_quirks,
187− },
188− {
189− .ident = "Dell Inc. G15 5510",
190− .matches = {
191− DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
192− DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5510"),
193− },
194− .driver_data = &g_series_quirks,
195− },
196− {
197− .ident = "Dell Inc. G15 5511",
198− .matches = {
199− DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
200− DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5511"),
201− },
202− .driver_data = &g_series_quirks,
203− },
204− {
205− .ident = "Dell Inc. G15 5515",
206− .matches = {
207− DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
208− DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5515"),
209− },
210− .driver_data = &g_series_quirks,
211− },
212− {
213− .ident = "Dell Inc. G15 5530",
214− .matches = {
215− DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
216− DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15 5530"),
217− },
218− .driver_data = &g_series_quirks,
219− },
220− {
221− .ident = "Dell Inc. G16 7630",
222− .matches = {
223− DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
224− DMI_MATCH(DMI_PRODUCT_NAME, "Dell G16 7630"),
225− },
226− .driver_data = &g_series_quirks,
227− },
228− {
229− .ident = "Dell Inc. G3 3500",
173+ .ident = "Dell Inc. G15",
230174 .matches = {
231175 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
232− DMI_MATCH(DMI_PRODUCT_NAME, "G3 3500"),
176+ DMI_MATCH(DMI_PRODUCT_NAME, "Dell G15"),
233177 },
234178 .driver_data = &g_series_quirks,
235179 },
236180 {
237− .ident = "Dell Inc. G3 3590",
181+ .ident = "Dell Inc. G16",
238182 .matches = {
239183 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
240− DMI_MATCH(DMI_PRODUCT_NAME, "G3 3590"),
184+ DMI_MATCH(DMI_PRODUCT_NAME, "Dell G16"),
241185 },
242186 .driver_data = &g_series_quirks,
243187 },
244188 {
245− .ident = "Dell Inc. G5 5500",
189+ .ident = "Dell Inc. G3",
246190 .matches = {
247191 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
248− DMI_MATCH(DMI_PRODUCT_NAME, "G5 5500"),
192+ DMI_MATCH(DMI_PRODUCT_NAME, "G3"),
249193 },
250194 .driver_data = &g_series_quirks,
251195 },
252196 {
253− .ident = "Dell Inc. G5 5505",
197+ .ident = "Dell Inc. G5",
254198 .matches = {
255199 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
256− DMI_MATCH(DMI_PRODUCT_NAME, "G5 5505"),
200+ DMI_MATCH(DMI_PRODUCT_NAME, "G5"),
257201 },
258202 .driver_data = &g_series_quirks,
259203 },
drivers/platform/x86/hp/hp-wmi.c+4−2
@@ -92,9 +92,11 @@ static const char * const victus_thermal_profile_boards[] = { · 91 unmodified lines
9292 "8A25"
9393 };
9494
95−/* DMI Board names of Victus 16-r1000 and Victus 16-s1000 laptops */
95+/* DMI Board names of Victus 16-r and Victus 16-s laptops */
9696 static const char * const victus_s_thermal_profile_boards[] = {
97− "8C99", "8C9C"
97+ "8BBE", "8BD4", "8BD5",
98+ "8C78", "8C99", "8C9C",
99+ "8D41",
98100 };
99101
100102 enum hp_wmi_radio {
drivers/platform/x86/huawei-wmi.c+4−0
@@ -81,6 +81,10 @@ static const struct key_entry huawei_wmi_keymap[] = { · 80 unmodified lines
8181 { KE_KEY, 0x289, { KEY_WLAN } },
8282 // Huawei |M| key
8383 { KE_KEY, 0x28a, { KEY_CONFIG } },
84+ // HONOR YOYO key
85+ { KE_KEY, 0x28b, { KEY_NOTIFICATION_CENTER } },
86+ // HONOR print screen
87+ { KE_KEY, 0x28e, { KEY_PRINT } },
8488 // Keyboard backlit
8589 { KE_IGNORE, 0x293, { KEY_KBDILLUMTOGGLE } },
8690 { KE_IGNORE, 0x294, { KEY_KBDILLUMUP } },
drivers/platform/x86/intel/hid.c+1−0
@@ -55,6 +55,7 @@ static const struct acpi_device_id intel_hid_ids[] = { · 54 unmodified lines
5555 { "INTC10CB" },
5656 { "INTC10CC" },
5757 { "INTC10F1" },
58+ { "INTC10F2" },
5859 { }
5960 };
6061 MODULE_DEVICE_TABLE(acpi, intel_hid_ids);
drivers/platform/x86/intel/speed_select_if/isst_if_mmio.c+2−2
@@ -108,11 +108,11 @@ static int isst_if_probe(struct pci_dev *pdev, const struct pci_device_id *ent) · 107 unmodified lines
108108
109109 ret = pci_read_config_dword(pdev, 0xD0, &mmio_base);
110110 if (ret)
111− return ret;
111+ return pcibios_err_to_errno(ret);
112112
113113 ret = pci_read_config_dword(pdev, 0xFC, &pcu_base);
114114 if (ret)
115− return ret;
115+ return pcibios_err_to_errno(ret);
116116
117117 pcu_base &= GENMASK(10, 0);
118118 base_addr = (u64)mmio_base << 23 | (u64) pcu_base << 12;
drivers/platform/x86/intel/uncore-frequency/uncore-frequency-common.h+5−4
@@ -40,7 +40,7 @@ · 39 unmodified lines
4040 * @agent_type_mask: Bit mask of all hardware agents for this domain
4141 * @uncore_attr_group: Attribute group storage
4242 * @max_freq_khz_kobj_attr: Storage for kobject attribute max_freq_khz
43− * @mix_freq_khz_kobj_attr: Storage for kobject attribute min_freq_khz
43+ * @min_freq_khz_kobj_attr: Storage for kobject attribute min_freq_khz
4444 * @initial_max_freq_khz_kobj_attr: Storage for kobject attribute initial_max_freq_khz
4545 * @initial_min_freq_khz_kobj_attr: Storage for kobject attribute initial_min_freq_khz
4646 * @current_freq_khz_kobj_attr: Storage for kobject attribute current_freq_khz
@@ -48,13 +48,14 @@ · 1 unmodified line
4848 * @fabric_cluster_id_kobj_attr: Storage for kobject attribute fabric_cluster_id
4949 * @package_id_kobj_attr: Storage for kobject attribute package_id
5050 * @elc_low_threshold_percent_kobj_attr:
51− Storage for kobject attribute elc_low_threshold_percent
51+ * Storage for kobject attribute elc_low_threshold_percent
5252 * @elc_high_threshold_percent_kobj_attr:
53− Storage for kobject attribute elc_high_threshold_percent
53+ * Storage for kobject attribute elc_high_threshold_percent
5454 * @elc_high_threshold_enable_kobj_attr:
55− Storage for kobject attribute elc_high_threshold_enable
55+ * Storage for kobject attribute elc_high_threshold_enable
5656 * @elc_floor_freq_khz_kobj_attr: Storage for kobject attribute elc_floor_freq_khz
5757 * @agent_types_kobj_attr: Storage for kobject attribute agent_type
58+ * @die_id_kobj_attr: Attribute storage for die_id information
5859 * @uncore_attrs: Attribute storage for group creation
5960 *
6061 * This structure is used to encapsulate all data related to uncore sysfs
drivers/platform/x86/intel/uncore-frequency/uncore-frequency.c+4−0
@@ -256,6 +256,10 @@ static const struct x86_cpu_id intel_uncore_cpu_ids[] = { · 255 unmodified lines
256256 X86_MATCH_VFM(INTEL_ARROWLAKE, NULL),
257257 X86_MATCH_VFM(INTEL_ARROWLAKE_H, NULL),
258258 X86_MATCH_VFM(INTEL_LUNARLAKE_M, NULL),
259+ X86_MATCH_VFM(INTEL_PANTHERLAKE_L, NULL),
260+ X86_MATCH_VFM(INTEL_WILDCATLAKE_L, NULL),
261+ X86_MATCH_VFM(INTEL_NOVALAKE, NULL),
262+ X86_MATCH_VFM(INTEL_NOVALAKE_L, NULL),
259263 {}
260264 };
261265 MODULE_DEVICE_TABLE(x86cpu, intel_uncore_cpu_ids);
drivers/platform/x86/msi-wmi-platform.c+41−2
@@ -14,6 +14,7 @@ · 13 unmodified lines
1414 #include <linux/debugfs.h>
1515 #include <linux/device.h>
1616 #include <linux/device/driver.h>
17+#include <linux/dmi.h>
1718 #include <linux/errno.h>
1819 #include <linux/hwmon.h>
1920 #include <linux/kernel.h>
@@ -28,7 +29,7 @@ · 8 unmodified lines
2829
2930 #define DRIVER_NAME "msi-wmi-platform"
3031
31−#define MSI_PLATFORM_GUID "ABBC0F6E-8EA1-11d1-00A0-C90629100000"
32+#define MSI_PLATFORM_GUID "ABBC0F6E-8EA1-11D1-00A0-C90629100000"
3233
3334 #define MSI_WMI_PLATFORM_INTERFACE_VERSION 2
3435
@@ -448,7 +449,45 @@ static struct wmi_driver msi_wmi_platform_driver = { · 413 unmodified lines
448449 .probe = msi_wmi_platform_probe,
449450 .no_singleton = true,
450451 };
451−module_wmi_driver(msi_wmi_platform_driver);
452+
453+/*
454+ * MSI reused the WMI GUID from the WMI-ACPI sample code provided by Microsoft,
455+ * so other manufacturers might use it as well for their WMI-ACPI implementations.
456+ */
457+static const struct dmi_system_id msi_wmi_platform_whitelist[] __initconst = {
458+ {
459+ .matches = {
460+ DMI_MATCH(DMI_SYS_VENDOR, "MICRO-STAR INT"),
461+ },
462+ },
463+ {
464+ .matches = {
465+ DMI_MATCH(DMI_SYS_VENDOR, "Micro-Star International"),
466+ },
467+ },
468+ { }
469+};
470+
471+static int __init msi_wmi_platform_module_init(void)
472+{
473+ if (!dmi_check_system(msi_wmi_platform_whitelist)) {
474+ if (!force)
475+ return -ENODEV;
476+
477+ pr_warn("Ignoring DMI whitelist\n");
478+ }
479+
480+ return wmi_driver_register(&msi_wmi_platform_driver);
481+}
482+
483+static void __exit msi_wmi_platform_module_exit(void)
484+{
485+ wmi_driver_unregister(&msi_wmi_platform_driver);
486+}
487+
488+module_init(msi_wmi_platform_module_init);
489+module_exit(msi_wmi_platform_module_exit);
490+
452491
453492 MODULE_AUTHOR("Armin Wolf <W_Armin@gmx.de>");
454493 MODULE_DESCRIPTION("MSI WMI platform features");
include/uapi/linux/isst_if.h+27−23
@@ -52,7 +52,7 @@ struct isst_if_cpu_map { · 51 unmodified lines
5252 /**
5353 * struct isst_if_cpu_maps - structure for CPU map IOCTL
5454 * @cmd_count: Number of CPU mapping command in cpu_map[]
55− * @cpu_map[]: Holds one or more CPU map data structure
55+ * @cpu_map: Holds one or more CPU map data structure
5656 *
5757 * This structure used with ioctl ISST_IF_GET_PHY_ID to send
5858 * one or more CPU mapping commands. Here IOCTL return value indicates
@@ -82,8 +82,8 @@ struct isst_if_io_reg { · 23 unmodified lines
8282
8383 /**
8484 * struct isst_if_io_regs - structure for IO register commands
85− * @cmd_count: Number of io reg commands in io_reg[]
86− * @io_reg[]: Holds one or more io_reg command structure
85+ * @req_count: Number of io reg commands in io_reg[]
86+ * @io_reg: Holds one or more io_reg command structure
8787 *
8888 * This structure used with ioctl ISST_IF_IO_CMD to send
8989 * one or more read/write commands to PUNIT. Here IOCTL return value
@@ -120,7 +120,7 @@ struct isst_if_mbox_cmd { · 30 unmodified lines
120120 /**
121121 * struct isst_if_mbox_cmds - structure for mailbox commands
122122 * @cmd_count: Number of mailbox commands in mbox_cmd[]
123− * @mbox_cmd[]: Holds one or more mbox commands
123+ * @mbox_cmd: Holds one or more mbox commands
124124 *
125125 * This structure used with ioctl ISST_IF_MBOX_COMMAND to send
126126 * one or more mailbox commands to PUNIT. Here IOCTL return value
@@ -152,7 +152,7 @@ struct isst_if_msr_cmd { · 25 unmodified lines
152152 /**
153153 * struct isst_if_msr_cmds - structure for msr commands
154154 * @cmd_count: Number of mailbox commands in msr_cmd[]
155− * @msr_cmd[]: Holds one or more msr commands
155+ * @msr_cmd: Holds one or more msr commands
156156 *
157157 * This structure used with ioctl ISST_IF_MSR_COMMAND to send
158158 * one or more MSR commands. IOCTL return value indicates number of
@@ -167,8 +167,9 @@ struct isst_if_msr_cmds { · 8 unmodified lines
167167 * struct isst_core_power - Structure to get/set core_power feature
168168 * @get_set: 0: Get, 1: Set
169169 * @socket_id: Socket/package id
170− * @power_domain: Power Domain id
170+ * @power_domain_id: Power Domain id
171171 * @enable: Feature enable status
172+ * @supported: Power domain supports SST_CP interface
172173 * @priority_type: Priority type for the feature (ordered/proportional)
173174 *
174175 * Structure to get/set core_power feature state using IOCTL
@@ -187,11 +188,11 @@ struct isst_core_power { · 12 unmodified lines
187188 * struct isst_clos_param - Structure to get/set clos praram
188189 * @get_set: 0: Get, 1: Set
189190 * @socket_id: Socket/package id
190− * @power_domain: Power Domain id
191− * clos: Clos ID for the parameters
192− * min_freq_mhz: Minimum frequency in MHz
193− * max_freq_mhz: Maximum frequency in MHz
194− * prop_prio: Proportional priority from 0-15
191+ * @power_domain_id: Power Domain id
192+ * @clos: Clos ID for the parameters
193+ * @min_freq_mhz: Minimum frequency in MHz
194+ * @max_freq_mhz: Maximum frequency in MHz
195+ * @prop_prio: Proportional priority from 0-15
195196 *
196197 * Structure to get/set per clos property using IOCTL
197198 * ISST_IF_CLOS_PARAM.
@@ -209,7 +210,7 @@ struct isst_clos_param { · 11 unmodified lines
209210 /**
210211 * struct isst_if_clos_assoc - Structure to assign clos to a CPU
211212 * @socket_id: Socket/package id
212− * @power_domain: Power Domain id
213+ * @power_domain_id: Power Domain id
213214 * @logical_cpu: CPU number
214215 * @clos: Clos ID to assign to the logical CPU
215216 *
@@ -228,6 +229,7 @@ struct isst_if_clos_assoc { · 12 unmodified lines
228229 * @get_set: Request is for get or set
229230 * @punit_cpu_map: Set to 1 if the CPU number is punit numbering not
230231 * Linux CPU number
232+ * @assoc_info: CLOS data for this CPU
231233 *
232234 * Structure used to get/set associate CPUs to clos using IOCTL
233235 * ISST_IF_CLOS_ASSOC.
@@ -257,7 +259,7 @@ struct isst_tpmi_instance_count { · 23 unmodified lines
257259 /**
258260 * struct isst_perf_level_info - Structure to get information on SST-PP levels
259261 * @socket_id: Socket/package id
260− * @power_domain: Power Domain id
262+ * @power_domain_id: Power Domain id
261263 * @logical_cpu: CPU number
262264 * @clos: Clos ID to assign to the logical CPU
263265 * @max_level: Maximum performance level supported by the platform
@@ -267,8 +269,8 @@ struct isst_tpmi_instance_count { · 3 unmodified lines
267269 * @feature_state: SST-BF and SST-TF (enabled/disabled) status at current level
268270 * @locked: SST-PP performance level change is locked/unlocked
269271 * @enabled: SST-PP feature is enabled or not
270− * @sst-tf_support: SST-TF support status at this level
271− * @sst-bf_support: SST-BF support status at this level
272+ * @sst_tf_support: SST-TF support status at this level
273+ * @sst_bf_support: SST-BF support status at this level
272274 *
273275 * Structure to get SST-PP details using IOCTL ISST_IF_PERF_LEVELS.
274276 */
@@ -289,7 +291,7 @@ struct isst_perf_level_info { · 14 unmodified lines
289291 /**
290292 * struct isst_perf_level_control - Structure to set SST-PP level
291293 * @socket_id: Socket/package id
292− * @power_domain: Power Domain id
294+ * @power_domain_id: Power Domain id
293295 * @level: level to set
294296 *
295297 * Structure used change SST-PP level using IOCTL ISST_IF_PERF_SET_LEVEL.
@@ -303,7 +305,7 @@ struct isst_perf_level_control { · 7 unmodified lines
303305 /**
304306 * struct isst_perf_feature_control - Structure to activate SST-BF/SST-TF
305307 * @socket_id: Socket/package id
306− * @power_domain: Power Domain id
308+ * @power_domain_id: Power Domain id
307309 * @feature: bit 0 = SST-BF state, bit 1 = SST-TF state
308310 *
309311 * Structure used to enable SST-BF/SST-TF using IOCTL ISST_IF_PERF_SET_FEATURE.
@@ -320,7 +322,7 @@ struct isst_perf_feature_control { · 10 unmodified lines
320322 /**
321323 * struct isst_perf_level_data_info - Structure to get SST-PP level details
322324 * @socket_id: Socket/package id
323− * @power_domain: Power Domain id
325+ * @power_domain_id: Power Domain id
324326 * @level: SST-PP level for which caller wants to get information
325327 * @tdp_ratio: TDP Ratio
326328 * @base_freq_mhz: Base frequency in MHz
@@ -341,8 +343,8 @@ struct isst_perf_feature_control { · 14 unmodified lines
341343 * @pm_fabric_freq_mhz: Fabric (Uncore) minimum frequency
342344 * @max_buckets: Maximum trl buckets
343345 * @max_trl_levels: Maximum trl levels
344− * @bucket_core_counts[TRL_MAX_BUCKETS]: Number of cores per bucket
345− * @trl_freq_mhz[TRL_MAX_LEVELS][TRL_MAX_BUCKETS]: maximum frequency
346+ * @bucket_core_counts: Number of cores per bucket
347+ * @trl_freq_mhz: maximum frequency
346348 * for a bucket and trl level
347349 *
348350 * Structure used to get information on frequencies and TDP for a SST-PP
@@ -402,7 +404,7 @@ struct isst_perf_level_fabric_info { · 53 unmodified lines
402404 /**
403405 * struct isst_perf_level_cpu_mask - Structure to get SST-PP level CPU mask
404406 * @socket_id: Socket/package id
405− * @power_domain: Power Domain id
407+ * @power_domain_id: Power Domain id
406408 * @level: SST-PP level for which caller wants to get information
407409 * @punit_cpu_map: Set to 1 if the CPU number is punit numbering not
408410 * Linux CPU number. If 0 CPU buffer is copied to user space
@@ -430,7 +432,7 @@ struct isst_perf_level_cpu_mask { · 21 unmodified lines
430432 /**
431433 * struct isst_base_freq_info - Structure to get SST-BF frequencies
432434 * @socket_id: Socket/package id
433− * @power_domain: Power Domain id
435+ * @power_domain_id: Power Domain id
434436 * @level: SST-PP level for which caller wants to get information
435437 * @high_base_freq_mhz: High priority CPU base frequency
436438 * @low_base_freq_mhz: Low priority CPU base frequency
@@ -453,9 +455,11 @@ struct isst_base_freq_info { · 16 unmodified lines
453455 /**
454456 * struct isst_turbo_freq_info - Structure to get SST-TF frequencies
455457 * @socket_id: Socket/package id
456− * @power_domain: Power Domain id
458+ * @power_domain_id: Power Domain id
457459 * @level: SST-PP level for which caller wants to get information
458460 * @max_clip_freqs: Maximum number of low priority core clipping frequencies
461+ * @max_buckets: Maximum trl buckets
462+ * @max_trl_levels: Maximum trl levels
459463 * @lp_clip_freq_mhz: Clip frequencies per trl level
460464 * @bucket_core_counts: Maximum number of cores for a bucket
461465 * @trl_freq_mhz: Frequencies per trl level for each bucket