platform-drivers-x86 for v6.8-4
Highlights: - Fix P2SB regression causing ACPI errors and high CPU load - Fix error return path in amd_pmf_init_smart_pc() The following is an automated git shortlog grouped by driver: p2sb: - On Goldmont only cache P2SB and SPI devfn BAR platform/x86/amd/pmf: - Fix missing error code in amd_pmf_init_smart_pc() -----BEGIN PGP SIGNATURE----- iQFIBAABCAAyFiEEuvA7XScYQRpenhd+kuxHeUQDJ9wFAmXm5sIUHGhkZWdvZWRl QHJlZGhhdC5jb20ACgkQkuxHeUQDJ9ziBgf8DrSSHfwsLseOV0wqzv2ewn0/YwGD 0/KUWoEe8Q6RYU2iFPj912r3ky2qtA5I4ZUJXLcD6lTL23FzdOagsJMEr0iwPC5s p1nnNCsVChkZvyU6BOvPa8m7W9Od0FY2RnNqtGhC8x9hsnhWOVDW4yG0n7tC+gbN 3tNqUZDpPotY8jZhpO7kazVHS0gTbYw6ABOvaz73FcDjdfM0TnkVOjDy7+1CGH7t wSIo9bQvGvjXqjXk8NQg0GtQt1qZiwpbCycmkJEYXXMnx1HEkdi/UClW74CX2wmr YknM05A2hLBLSmHCyODjZnZ3689ODx4nv4H6226Az8B6dW8j81dmIQEPzQ== =8CgQ -----END PGP SIGNATURE----- Merge tag 'platform-drivers-x86-v6.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86 Pull x86 platform driver fixes from Hans de Goede: - Fix P2SB regression causing ACPI errors and high CPU load - Fix error return path in amd_pmf_init_smart_pc() * tag 'platform-drivers-x86-v6.8-4' of git://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86: platform/x86/amd/pmf: Fix missing error code in amd_pmf_init_smart_pc() platform/x86: p2sb: On Goldmont only cache P2SB and SPI devfn BAR
This commit is contained in:
commit
127ec4c0b2
@ -458,8 +458,10 @@ int amd_pmf_init_smart_pc(struct amd_pmf_dev *dev)
|
||||
amd_pmf_hex_dump_pb(dev);
|
||||
|
||||
dev->prev_data = kzalloc(sizeof(*dev->prev_data), GFP_KERNEL);
|
||||
if (!dev->prev_data)
|
||||
if (!dev->prev_data) {
|
||||
ret = -ENOMEM;
|
||||
goto error;
|
||||
}
|
||||
|
||||
ret = amd_pmf_start_policy_engine(dev);
|
||||
if (ret)
|
||||
|
@ -20,9 +20,11 @@
|
||||
#define P2SBC_HIDE BIT(8)
|
||||
|
||||
#define P2SB_DEVFN_DEFAULT PCI_DEVFN(31, 1)
|
||||
#define P2SB_DEVFN_GOLDMONT PCI_DEVFN(13, 0)
|
||||
#define SPI_DEVFN_GOLDMONT PCI_DEVFN(13, 2)
|
||||
|
||||
static const struct x86_cpu_id p2sb_cpu_ids[] = {
|
||||
X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT, PCI_DEVFN(13, 0)),
|
||||
X86_MATCH_INTEL_FAM6_MODEL(ATOM_GOLDMONT, P2SB_DEVFN_GOLDMONT),
|
||||
{}
|
||||
};
|
||||
|
||||
@ -98,21 +100,12 @@ static void p2sb_scan_and_cache_devfn(struct pci_bus *bus, unsigned int devfn)
|
||||
|
||||
static int p2sb_scan_and_cache(struct pci_bus *bus, unsigned int devfn)
|
||||
{
|
||||
unsigned int slot, fn;
|
||||
/* Scan the P2SB device and cache its BAR0 */
|
||||
p2sb_scan_and_cache_devfn(bus, devfn);
|
||||
|
||||
if (PCI_FUNC(devfn) == 0) {
|
||||
/*
|
||||
* When function number of the P2SB device is zero, scan it and
|
||||
* other function numbers, and if devices are available, cache
|
||||
* their BAR0s.
|
||||
*/
|
||||
slot = PCI_SLOT(devfn);
|
||||
for (fn = 0; fn < NR_P2SB_RES_CACHE; fn++)
|
||||
p2sb_scan_and_cache_devfn(bus, PCI_DEVFN(slot, fn));
|
||||
} else {
|
||||
/* Scan the P2SB device and cache its BAR0 */
|
||||
p2sb_scan_and_cache_devfn(bus, devfn);
|
||||
}
|
||||
/* On Goldmont p2sb_bar() also gets called for the SPI controller */
|
||||
if (devfn == P2SB_DEVFN_GOLDMONT)
|
||||
p2sb_scan_and_cache_devfn(bus, SPI_DEVFN_GOLDMONT);
|
||||
|
||||
if (!p2sb_valid_resource(&p2sb_resources[PCI_FUNC(devfn)].res))
|
||||
return -ENOENT;
|
||||
|
Loading…
x
Reference in New Issue
Block a user