Extra ACPI updates for 5.17-rc1

- Fix a recently introduced endianness-related issue in the ACPI
    CPPC library and clean it up on top of that (Rafael Wysocki).
 
  - Add new device IDs for the Raptor Lake SoC to the ACPI DPTF
    driver (Srinivas Pandruvada).
 -----BEGIN PGP SIGNATURE-----
 
 iQJGBAABCAAwFiEE4fcc61cGeeHD/fCwgsRv/nhiVHEFAmHrBusSHHJqd0Byand5
 c29ja2kubmV0AAoJEILEb/54YlRxyAQP/34po+Bp9eVNvZh6rmgAzKFQavvatAiP
 HpdEpJ1wOVzSGwUuLfkqrLjSRizSAFpfUPVbB/NK/v2Rhi7a36NKzwKKLuw2920K
 SdNejggGHDQZGivNbMFsj2aTN4rpLhu+VHLE8jXRVjwfIqSNy+7/hPv+xLdLquA5
 7RcAmBs5ut668c7NUP7vEuRwBAE9z5d0G75vDLnUuKhkk0ESYWJC/iQdKmwrUr2w
 Z06vnzwThjeMEY7U+s4IxAcpYO71JlKSNoE3rB4M90khgr1x6LWn7gAVYjeuamgT
 xOqPuJgiuw0z+1hyyl7b+5Mx3Vr35OGecsxvSzx7PUQMNOcyYVx1CFt49zorxxCr
 zhQiU+5Bwde36GiSVuaYULMOty0A9lN3OVts3jkvJx+HXmPAfuCnj3zgwIu+kM+K
 7bWxJRfGxWZ60oS0BoceEg5cD88CvpeUNiLmVzmWupcpFCREUTjVEy4+yPp5JUop
 4R74b1n49dJiGujI6z+Tif/KXwQg9LPbkTBCWzo1g9K9v7Rqpz6DEsAM+SiOLMVL
 FFcrKFprK1KJbpC85MitSjaczYClCRB5lq2viWRvtbXAcBUT2LYDp19eBF+shIGR
 LA2hPRjgildS4izrPj1c9qadxgEofayEBsyUkGeuWqK/SimPVqYf7YCYNveQuqSg
 +XlNTjnqTbDr
 =rx5C
 -----END PGP SIGNATURE-----

Merge tag 'acpi-5.17-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull extra ACPI updates from Rafael Wysocki:
 "These fix and clean up the ACPI CPPC driver on top of the recent
  changes in it merged previously and add some new device IDs to the
  ACPI DPTF driver.

  Specifics:

   - Fix a recently introduced endianness-related issue in the ACPI CPPC
     library and clean it up on top of that (Rafael Wysocki)

   - Add new device IDs for the Raptor Lake SoC to the ACPI DPTF driver
     (Srinivas Pandruvada)"

* tag 'acpi-5.17-rc1-3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: DPTF: Support Raptor Lake
  ACPI: CPPC: Drop redundant local variable from cpc_read()
  ACPI: CPPC: Fix up I/O port access in cpc_read()
This commit is contained in:
Linus Torvalds 2022-01-22 10:09:51 +02:00
commit 71f1b916d5
5 changed files with 16 additions and 5 deletions

View File

@ -915,30 +915,31 @@ int __weak cpc_write_ffh(int cpunum, struct cpc_reg *reg, u64 val)
static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val)
{
int ret_val = 0;
void __iomem *vaddr = NULL;
int pcc_ss_id = per_cpu(cpu_pcc_subspace_idx, cpu);
struct cpc_reg *reg = &reg_res->cpc_entry.reg;
if (reg_res->type == ACPI_TYPE_INTEGER) {
*val = reg_res->cpc_entry.int_value;
return ret_val;
return 0;
}
*val = 0;
if (reg->space_id == ACPI_ADR_SPACE_SYSTEM_IO) {
u32 width = 8 << (reg->access_width - 1);
u32 val_u32;
acpi_status status;
status = acpi_os_read_port((acpi_io_address)reg->address,
(u32 *)val, width);
&val_u32, width);
if (ACPI_FAILURE(status)) {
pr_debug("Error: Failed to read SystemIO port %llx\n",
reg->address);
return -EFAULT;
}
*val = val_u32;
return 0;
} else if (reg->space_id == ACPI_ADR_SPACE_PLATFORM_COMM && pcc_ss_id >= 0)
vaddr = GET_PCC_VADDR(reg->address, pcc_ss_id);
@ -966,10 +967,10 @@ static int cpc_read(int cpu, struct cpc_register_resource *reg_res, u64 *val)
default:
pr_debug("Error: Cannot read %u bit width from PCC for ss: %d\n",
reg->bit_width, pcc_ss_id);
ret_val = -EFAULT;
return -EFAULT;
}
return ret_val;
return 0;
}
static int cpc_write(int cpu, struct cpc_register_resource *reg_res, u64 val)

View File

@ -151,6 +151,7 @@ static int pch_fivr_remove(struct platform_device *pdev)
static const struct acpi_device_id pch_fivr_device_ids[] = {
{"INTC1045", 0},
{"INTC1049", 0},
{"INTC10A3", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, pch_fivr_device_ids);

View File

@ -231,6 +231,8 @@ static const struct acpi_device_id int3407_device_ids[] = {
{"INTC1050", 0},
{"INTC1060", 0},
{"INTC1061", 0},
{"INTC10A4", 0},
{"INTC10A5", 0},
{"", 0},
};
MODULE_DEVICE_TABLE(acpi, int3407_device_ids);

View File

@ -37,6 +37,12 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
{"INTC1050"},
{"INTC1060"},
{"INTC1061"},
{"INTC10A0"},
{"INTC10A1"},
{"INTC10A2"},
{"INTC10A3"},
{"INTC10A4"},
{"INTC10A5"},
{""},
};

View File

@ -10,4 +10,5 @@
{"INT3404", }, /* Fan */ \
{"INTC1044", }, /* Fan for Tiger Lake generation */ \
{"INTC1048", }, /* Fan for Alder Lake generation */ \
{"INTC10A2", }, /* Fan for Raptor Lake generation */ \
{"PNP0C0B", } /* Generic ACPI fan */