Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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

Pull x86 platform driver fixes from Ilpo Järvinen:

- amd/hsmp:
- Ensure sock->metric_tbl_addr is non-NULL
- Register driver even if hwmon registration fails

- amd/pmc: Drop SMU F/W match for Cezanne

- dell-smbios-wmi: Separate "priority" from WMI device ID

- hp-wmi: mark Victus 16-r1xxx for Victus s fan and thermal profile
support

- intel-uncore-freq: Check write blocked for efficiency latency control

* tag 'platform-drivers-x86-v6.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86:
platform/x86: hp-wmi: mark Victus 16-r1xxx for victus_s fan and thermal profile support
platform/x86/amd/hsmp: Ensure success even if hwmon registration fails
platform/x86/amd/hsmp: Ensure sock->metric_tbl_addr is non-NULL
platform/x86/intel-uncore-freq: Check write blocked for ELC
platform/x86/amd: pmc: Drop SMU F/W match for Cezanne
platform/x86: dell-smbios-wmi: Stop touching WMI device ID

+59 -52
+1 -1
drivers/platform/x86/amd/hsmp/acpi.c
··· 504 504 505 505 dev_set_drvdata(dev, &hsmp_pdev->sock[sock_ind]); 506 506 507 - return ret; 507 + return 0; 508 508 } 509 509 510 510 static const struct bin_attribute hsmp_metric_tbl_attr = {
+5
drivers/platform/x86/amd/hsmp/hsmp.c
··· 356 356 if (!sock || !buf) 357 357 return -EINVAL; 358 358 359 + if (!sock->metric_tbl_addr) { 360 + dev_err(sock->dev, "Metrics table address not available\n"); 361 + return -ENOMEM; 362 + } 363 + 359 364 /* Do not support lseek(), also don't allow more than the size of metric table */ 360 365 if (size != sizeof(struct hsmp_metric_table)) { 361 366 dev_err(sock->dev, "Wrong buffer size\n");
+34 -20
drivers/platform/x86/amd/pmc/pmc-quirks.c
··· 28 28 .spurious_8042 = true, 29 29 }; 30 30 31 + static struct quirk_entry quirk_s2idle_spurious_8042 = { 32 + .s2idle_bug_mmio = FCH_PM_BASE + FCH_PM_SCRATCH, 33 + .spurious_8042 = true, 34 + }; 35 + 31 36 static const struct dmi_system_id fwbug_list[] = { 32 37 { 33 38 .ident = "L14 Gen2 AMD", 34 - .driver_data = &quirk_s2idle_bug, 39 + .driver_data = &quirk_s2idle_spurious_8042, 35 40 .matches = { 36 41 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 37 42 DMI_MATCH(DMI_PRODUCT_NAME, "20X5"), ··· 44 39 }, 45 40 { 46 41 .ident = "T14s Gen2 AMD", 47 - .driver_data = &quirk_s2idle_bug, 42 + .driver_data = &quirk_s2idle_spurious_8042, 48 43 .matches = { 49 44 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 50 45 DMI_MATCH(DMI_PRODUCT_NAME, "20XF"), ··· 52 47 }, 53 48 { 54 49 .ident = "X13 Gen2 AMD", 55 - .driver_data = &quirk_s2idle_bug, 50 + .driver_data = &quirk_s2idle_spurious_8042, 56 51 .matches = { 57 52 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 58 53 DMI_MATCH(DMI_PRODUCT_NAME, "20XH"), ··· 60 55 }, 61 56 { 62 57 .ident = "T14 Gen2 AMD", 63 - .driver_data = &quirk_s2idle_bug, 58 + .driver_data = &quirk_s2idle_spurious_8042, 64 59 .matches = { 65 60 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 66 61 DMI_MATCH(DMI_PRODUCT_NAME, "20XK"), ··· 68 63 }, 69 64 { 70 65 .ident = "T14 Gen1 AMD", 71 - .driver_data = &quirk_s2idle_bug, 66 + .driver_data = &quirk_s2idle_spurious_8042, 72 67 .matches = { 73 68 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 74 69 DMI_MATCH(DMI_PRODUCT_NAME, "20UD"), ··· 76 71 }, 77 72 { 78 73 .ident = "T14 Gen1 AMD", 79 - .driver_data = &quirk_s2idle_bug, 74 + .driver_data = &quirk_s2idle_spurious_8042, 80 75 .matches = { 81 76 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 82 77 DMI_MATCH(DMI_PRODUCT_NAME, "20UE"), ··· 84 79 }, 85 80 { 86 81 .ident = "T14s Gen1 AMD", 87 - .driver_data = &quirk_s2idle_bug, 82 + .driver_data = &quirk_s2idle_spurious_8042, 88 83 .matches = { 89 84 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 90 85 DMI_MATCH(DMI_PRODUCT_NAME, "20UH"), ··· 92 87 }, 93 88 { 94 89 .ident = "T14s Gen1 AMD", 95 - .driver_data = &quirk_s2idle_bug, 90 + .driver_data = &quirk_s2idle_spurious_8042, 96 91 .matches = { 97 92 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 98 93 DMI_MATCH(DMI_PRODUCT_NAME, "20UJ"), ··· 100 95 }, 101 96 { 102 97 .ident = "P14s Gen1 AMD", 103 - .driver_data = &quirk_s2idle_bug, 98 + .driver_data = &quirk_s2idle_spurious_8042, 104 99 .matches = { 105 100 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 106 101 DMI_MATCH(DMI_PRODUCT_NAME, "20Y1"), ··· 108 103 }, 109 104 { 110 105 .ident = "P14s Gen2 AMD", 111 - .driver_data = &quirk_s2idle_bug, 106 + .driver_data = &quirk_s2idle_spurious_8042, 112 107 .matches = { 113 108 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 114 109 DMI_MATCH(DMI_PRODUCT_NAME, "21A0"), ··· 116 111 }, 117 112 { 118 113 .ident = "P14s Gen2 AMD", 119 - .driver_data = &quirk_s2idle_bug, 114 + .driver_data = &quirk_s2idle_spurious_8042, 120 115 .matches = { 121 116 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 122 117 DMI_MATCH(DMI_PRODUCT_NAME, "21A1"), ··· 157 152 }, 158 153 { 159 154 .ident = "IdeaPad 1 14AMN7", 160 - .driver_data = &quirk_s2idle_bug, 155 + .driver_data = &quirk_s2idle_spurious_8042, 161 156 .matches = { 162 157 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 163 158 DMI_MATCH(DMI_PRODUCT_NAME, "82VF"), ··· 165 160 }, 166 161 { 167 162 .ident = "IdeaPad 1 15AMN7", 168 - .driver_data = &quirk_s2idle_bug, 163 + .driver_data = &quirk_s2idle_spurious_8042, 169 164 .matches = { 170 165 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 171 166 DMI_MATCH(DMI_PRODUCT_NAME, "82VG"), ··· 173 168 }, 174 169 { 175 170 .ident = "IdeaPad 1 15AMN7", 176 - .driver_data = &quirk_s2idle_bug, 171 + .driver_data = &quirk_s2idle_spurious_8042, 177 172 .matches = { 178 173 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 179 174 DMI_MATCH(DMI_PRODUCT_NAME, "82X5"), ··· 181 176 }, 182 177 { 183 178 .ident = "IdeaPad Slim 3 14AMN8", 184 - .driver_data = &quirk_s2idle_bug, 179 + .driver_data = &quirk_s2idle_spurious_8042, 185 180 .matches = { 186 181 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 187 182 DMI_MATCH(DMI_PRODUCT_NAME, "82XN"), ··· 189 184 }, 190 185 { 191 186 .ident = "IdeaPad Slim 3 15AMN8", 192 - .driver_data = &quirk_s2idle_bug, 187 + .driver_data = &quirk_s2idle_spurious_8042, 193 188 .matches = { 194 189 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 195 190 DMI_MATCH(DMI_PRODUCT_NAME, "82XQ"), ··· 198 193 /* https://gitlab.freedesktop.org/drm/amd/-/issues/4434 */ 199 194 { 200 195 .ident = "Lenovo Yoga 6 13ALC6", 201 - .driver_data = &quirk_s2idle_bug, 196 + .driver_data = &quirk_s2idle_spurious_8042, 202 197 .matches = { 203 198 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 204 199 DMI_MATCH(DMI_PRODUCT_NAME, "82ND"), ··· 207 202 /* https://gitlab.freedesktop.org/drm/amd/-/issues/2684 */ 208 203 { 209 204 .ident = "HP Laptop 15s-eq2xxx", 210 - .driver_data = &quirk_s2idle_bug, 205 + .driver_data = &quirk_s2idle_spurious_8042, 211 206 .matches = { 212 207 DMI_MATCH(DMI_SYS_VENDOR, "HP"), 213 208 DMI_MATCH(DMI_PRODUCT_NAME, "HP Laptop 15s-eq2xxx"), ··· 290 285 { 291 286 const struct dmi_system_id *dmi_id; 292 287 288 + /* 289 + * IRQ1 may cause an interrupt during resume even without a keyboard 290 + * press. 291 + * 292 + * Affects Renoir, Cezanne and Barcelo SoCs 293 + * 294 + * A solution is available in PMFW 64.66.0, but it must be activated by 295 + * SBIOS. If SBIOS is known to have the fix a quirk can be added for 296 + * a given system to avoid workaround. 297 + */ 293 298 if (dev->cpu_id == AMD_CPU_ID_CZN) 294 299 dev->disable_8042_wakeup = true; 295 300 ··· 310 295 if (dev->quirks->s2idle_bug_mmio) 311 296 pr_info("Using s2idle quirk to avoid %s platform firmware bug\n", 312 297 dmi_id->ident); 313 - if (dev->quirks->spurious_8042) 314 - dev->disable_8042_wakeup = true; 298 + dev->disable_8042_wakeup = dev->quirks->spurious_8042; 315 299 }
-13
drivers/platform/x86/amd/pmc/pmc.c
··· 530 530 static int amd_pmc_wa_irq1(struct amd_pmc_dev *pdev) 531 531 { 532 532 struct device *d; 533 - int rc; 534 - 535 - /* cezanne platform firmware has a fix in 64.66.0 */ 536 - if (pdev->cpu_id == AMD_CPU_ID_CZN) { 537 - if (!pdev->major) { 538 - rc = amd_pmc_get_smu_version(pdev); 539 - if (rc) 540 - return rc; 541 - } 542 - 543 - if (pdev->major > 64 || (pdev->major == 64 && pdev->minor > 65)) 544 - return 0; 545 - } 546 533 547 534 d = bus_find_device_by_name(&serio_bus, NULL, "serio0"); 548 535 if (!d)
+9 -10
drivers/platform/x86/dell/dell-smbios-base.c
··· 39 39 struct smbios_device { 40 40 struct list_head list; 41 41 struct device *device; 42 + int priority; 42 43 int (*call_fn)(struct calling_interface_buffer *arg); 43 44 }; 44 45 ··· 146 145 } 147 146 EXPORT_SYMBOL_GPL(dell_smbios_error); 148 147 149 - int dell_smbios_register_device(struct device *d, void *call_fn) 148 + int dell_smbios_register_device(struct device *d, int priority, void *call_fn) 150 149 { 151 150 struct smbios_device *priv; 152 151 ··· 155 154 return -ENOMEM; 156 155 get_device(d); 157 156 priv->device = d; 157 + priv->priority = priority; 158 158 priv->call_fn = call_fn; 159 159 mutex_lock(&smbios_mutex); 160 160 list_add_tail(&priv->list, &smbios_device_list); ··· 294 292 295 293 int dell_smbios_call(struct calling_interface_buffer *buffer) 296 294 { 297 - int (*call_fn)(struct calling_interface_buffer *) = NULL; 298 - struct device *selected_dev = NULL; 295 + struct smbios_device *selected = NULL; 299 296 struct smbios_device *priv; 300 297 int ret; 301 298 302 299 mutex_lock(&smbios_mutex); 303 300 list_for_each_entry(priv, &smbios_device_list, list) { 304 - if (!selected_dev || priv->device->id >= selected_dev->id) { 305 - dev_dbg(priv->device, "Trying device ID: %d\n", 306 - priv->device->id); 307 - call_fn = priv->call_fn; 308 - selected_dev = priv->device; 301 + if (!selected || priv->priority >= selected->priority) { 302 + dev_dbg(priv->device, "Trying device ID: %d\n", priv->priority); 303 + selected = priv; 309 304 } 310 305 } 311 306 312 - if (!selected_dev) { 307 + if (!selected) { 313 308 ret = -ENODEV; 314 309 pr_err("No dell-smbios drivers are loaded\n"); 315 310 goto out_smbios_call; 316 311 } 317 312 318 - ret = call_fn(buffer); 313 + ret = selected->call_fn(buffer); 319 314 320 315 out_smbios_call: 321 316 mutex_unlock(&smbios_mutex);
+1 -2
drivers/platform/x86/dell/dell-smbios-smm.c
··· 125 125 if (ret) 126 126 goto fail_platform_device_add; 127 127 128 - ret = dell_smbios_register_device(&platform_device->dev, 129 - &dell_smbios_smm_call); 128 + ret = dell_smbios_register_device(&platform_device->dev, 0, &dell_smbios_smm_call); 130 129 if (ret) 131 130 goto fail_register; 132 131
+1 -3
drivers/platform/x86/dell/dell-smbios-wmi.c
··· 264 264 if (ret) 265 265 return ret; 266 266 267 - /* ID is used by dell-smbios to set priority of drivers */ 268 - wdev->dev.id = 1; 269 - ret = dell_smbios_register_device(&wdev->dev, &dell_smbios_wmi_call); 267 + ret = dell_smbios_register_device(&wdev->dev, 1, &dell_smbios_wmi_call); 270 268 if (ret) 271 269 return ret; 272 270
+1 -1
drivers/platform/x86/dell/dell-smbios.h
··· 64 64 struct calling_interface_token tokens[]; 65 65 } __packed; 66 66 67 - int dell_smbios_register_device(struct device *d, void *call_fn); 67 + int dell_smbios_register_device(struct device *d, int priority, void *call_fn); 68 68 void dell_smbios_unregister_device(struct device *d); 69 69 70 70 int dell_smbios_error(int value);
+2 -2
drivers/platform/x86/hp/hp-wmi.c
··· 92 92 "8A25" 93 93 }; 94 94 95 - /* DMI Board names of Victus 16-s1000 laptops */ 95 + /* DMI Board names of Victus 16-r1000 and Victus 16-s1000 laptops */ 96 96 static const char * const victus_s_thermal_profile_boards[] = { 97 - "8C9C" 97 + "8C99", "8C9C" 98 98 }; 99 99 100 100 enum hp_wmi_radio {
+5
drivers/platform/x86/intel/uncore-frequency/uncore-frequency-tpmi.c
··· 192 192 static int write_eff_lat_ctrl(struct uncore_data *data, unsigned int val, enum uncore_index index) 193 193 { 194 194 struct tpmi_uncore_cluster_info *cluster_info; 195 + struct tpmi_uncore_struct *uncore_root; 195 196 u64 control; 196 197 197 198 cluster_info = container_of(data, struct tpmi_uncore_cluster_info, uncore_data); 199 + uncore_root = cluster_info->uncore_root; 200 + 201 + if (uncore_root->write_blocked) 202 + return -EPERM; 198 203 199 204 if (cluster_info->root_domain) 200 205 return -ENODATA;