Skip to content

Commit c8d9f2c

Browse files
committed
Merge tag 'platform-drivers-x86-v6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86
Pull x86 platform driver fixes from Hans de Goede: - Intel PMC fix for suspend/resume issues on some Sky and Kaby Lake laptops - Intel Diamond Rapids hw-id additions - Documentation and MAINTAINERS fixes - Some other small fixes * tag 'platform-drivers-x86-v6.12-2' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86: x86-android-tablets: Fix use after free on platform_device_register() errors platform/x86: wmi: Update WMI driver API documentation platform/x86: dell-ddv: Fix typo in documentation platform/x86: dell-sysman: add support for alienware products platform/x86/intel: power-domains: Add Diamond Rapids support platform/x86: ISST: Add Diamond Rapids to support list platform/x86:intel/pmc: Disable ACPI PM Timer disabling on Sky and Kaby Lake platform/x86: dell-laptop: Do not fail when encountering unsupported batteries MAINTAINERS: Update Intel In Field Scan(IFS) entry platform/x86: ISST: Fix the KASAN report slab-out-of-bounds bug
2 parents 4563243 + 2fae312 commit c8d9f2c

File tree

9 files changed

+30
-17
lines changed

9 files changed

+30
-17
lines changed

Documentation/driver-api/wmi.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,11 @@ WMI Driver API
77
The WMI driver core supports a more modern bus-based interface for interacting
88
with WMI devices, and an older GUID-based interface. The latter interface is
99
considered to be deprecated, so new WMI drivers should generally avoid it since
10-
it has some issues with multiple WMI devices and events sharing the same GUIDs
11-
and/or notification IDs. The modern bus-based interface instead maps each
12-
WMI device to a :c:type:`struct wmi_device <wmi_device>`, so it supports
13-
WMI devices sharing GUIDs and/or notification IDs. Drivers can then register
14-
a :c:type:`struct wmi_driver <wmi_driver>`, which will be bound to compatible
15-
WMI devices by the driver core.
10+
it has some issues with multiple WMI devices sharing the same GUID.
11+
The modern bus-based interface instead maps each WMI device to a
12+
:c:type:`struct wmi_device <wmi_device>`, so it supports WMI devices sharing the
13+
same GUID. Drivers can then register a :c:type:`struct wmi_driver <wmi_driver>`
14+
which will be bound to compatible WMI devices by the driver core.
1615

1716
.. kernel-doc:: include/linux/wmi.h
1817
:internal:

Documentation/wmi/devices/dell-wmi-ddv.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Introduction
88
============
99

1010
Many Dell notebooks made after ~2020 support a WMI-based interface for
11-
retrieving various system data like battery temperature, ePPID, diagostic data
11+
retrieving various system data like battery temperature, ePPID, diagnostic data
1212
and fan/thermal sensor data.
1313

1414
This interface is likely used by the `Dell Data Vault` software on Windows,
@@ -277,7 +277,7 @@ Reverse-Engineering the DDV WMI interface
277277
4. Try to deduce the meaning of a certain WMI method by comparing the control
278278
flow with other ACPI methods (_BIX or _BIF for battery related methods
279279
for example).
280-
5. Use the built-in UEFI diagostics to view sensor types/values for fan/thermal
280+
5. Use the built-in UEFI diagnostics to view sensor types/values for fan/thermal
281281
related methods (sometimes overwriting static ACPI data fields can be used
282282
to test different sensor type values, since on some machines this data is
283283
not reinitialized upon a warm reset).

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11499,7 +11499,7 @@ F: include/uapi/linux/idxd.h
1149911499

1150011500
INTEL IN FIELD SCAN (IFS) DEVICE
1150111501
M: Jithu Joseph <jithu.joseph@intel.com>
11502-
R: Ashok Raj <ashok.raj@intel.com>
11502+
R: Ashok Raj <ashok.raj.linux@gmail.com>
1150311503
R: Tony Luck <tony.luck@intel.com>
1150411504
S: Maintained
1150511505
F: drivers/platform/x86/intel/ifs

drivers/platform/x86/dell/dell-laptop.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,19 +2391,28 @@ static struct attribute *dell_battery_attrs[] = {
23912391
};
23922392
ATTRIBUTE_GROUPS(dell_battery);
23932393

2394+
static bool dell_battery_supported(struct power_supply *battery)
2395+
{
2396+
/* We currently only support the primary battery */
2397+
return strcmp(battery->desc->name, "BAT0") == 0;
2398+
}
2399+
23942400
static int dell_battery_add(struct power_supply *battery,
23952401
struct acpi_battery_hook *hook)
23962402
{
2397-
/* this currently only supports the primary battery */
2398-
if (strcmp(battery->desc->name, "BAT0") != 0)
2399-
return -ENODEV;
2403+
/* Return 0 instead of an error to avoid being unloaded */
2404+
if (!dell_battery_supported(battery))
2405+
return 0;
24002406

24012407
return device_add_groups(&battery->dev, dell_battery_groups);
24022408
}
24032409

24042410
static int dell_battery_remove(struct power_supply *battery,
24052411
struct acpi_battery_hook *hook)
24062412
{
2413+
if (!dell_battery_supported(battery))
2414+
return 0;
2415+
24072416
device_remove_groups(&battery->dev, dell_battery_groups);
24082417
return 0;
24092418
}

drivers/platform/x86/dell/dell-wmi-sysman/sysman.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ static int __init sysman_init(void)
521521
int ret = 0;
522522

523523
if (!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Dell System", NULL) &&
524+
!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "Alienware", NULL) &&
524525
!dmi_find_device(DMI_DEV_TYPE_OEM_STRING, "www.dell.com", NULL)) {
525526
pr_err("Unable to run on non-Dell system\n");
526527
return -ENODEV;

drivers/platform/x86/intel/pmc/spt.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ const struct pmc_reg_map spt_reg_map = {
130130
.ppfear_buckets = SPT_PPFEAR_NUM_ENTRIES,
131131
.pm_cfg_offset = SPT_PMC_PM_CFG_OFFSET,
132132
.pm_read_disable_bit = SPT_PMC_READ_DISABLE_BIT,
133-
.acpi_pm_tmr_ctl_offset = SPT_PMC_ACPI_PM_TMR_CTL_OFFSET,
134-
.acpi_pm_tmr_disable_bit = SPT_PMC_BIT_ACPI_PM_TMR_DISABLE,
135133
.ltr_ignore_max = SPT_NUM_IP_IGN_ALLOWED,
136134
.pm_vric1_offset = SPT_PMC_VRIC1_OFFSET,
137135
};

drivers/platform/x86/intel/speed_select_if/isst_if_common.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,9 @@ static struct pci_dev *_isst_if_get_pci_dev(int cpu, int bus_no, int dev, int fn
316316
cpu >= nr_cpu_ids || cpu >= num_possible_cpus())
317317
return NULL;
318318

319-
pkg_id = topology_physical_package_id(cpu);
319+
pkg_id = topology_logical_package_id(cpu);
320+
if (pkg_id >= topology_max_packages())
321+
return NULL;
320322

321323
bus_number = isst_cpu_info[cpu].bus_info[bus_no];
322324
if (bus_number < 0)
@@ -807,6 +809,7 @@ static const struct x86_cpu_id isst_cpu_ids[] = {
807809
X86_MATCH_VFM(INTEL_GRANITERAPIDS_X, SST_HPM_SUPPORTED),
808810
X86_MATCH_VFM(INTEL_ICELAKE_D, 0),
809811
X86_MATCH_VFM(INTEL_ICELAKE_X, 0),
812+
X86_MATCH_VFM(INTEL_PANTHERCOVE_X, SST_HPM_SUPPORTED),
810813
X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X, 0),
811814
X86_MATCH_VFM(INTEL_SKYLAKE_X, SST_MBOX_SUPPORTED),
812815
{}

drivers/platform/x86/intel/tpmi_power_domains.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ static const struct x86_cpu_id tpmi_cpu_ids[] = {
8282
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT_X, NULL),
8383
X86_MATCH_VFM(INTEL_ATOM_CRESTMONT, NULL),
8484
X86_MATCH_VFM(INTEL_GRANITERAPIDS_D, NULL),
85+
X86_MATCH_VFM(INTEL_PANTHERCOVE_X, NULL),
8586
{}
8687
};
8788
MODULE_DEVICE_TABLE(x86cpu, tpmi_cpu_ids);

drivers/platform/x86/x86-android-tablets/core.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,8 +390,9 @@ static __init int x86_android_tablet_probe(struct platform_device *pdev)
390390
for (i = 0; i < pdev_count; i++) {
391391
pdevs[i] = platform_device_register_full(&dev_info->pdev_info[i]);
392392
if (IS_ERR(pdevs[i])) {
393+
ret = PTR_ERR(pdevs[i]);
393394
x86_android_tablet_remove(pdev);
394-
return PTR_ERR(pdevs[i]);
395+
return ret;
395396
}
396397
}
397398

@@ -443,8 +444,9 @@ static __init int x86_android_tablet_probe(struct platform_device *pdev)
443444
PLATFORM_DEVID_AUTO,
444445
&pdata, sizeof(pdata));
445446
if (IS_ERR(pdevs[pdev_count])) {
447+
ret = PTR_ERR(pdevs[pdev_count]);
446448
x86_android_tablet_remove(pdev);
447-
return PTR_ERR(pdevs[pdev_count]);
449+
return ret;
448450
}
449451
pdev_count++;
450452
}

0 commit comments

Comments
 (0)