ACPI / CPPC: restructure read/writes for efficient sys mapped reg ops

For cases where sys mapped CPC registers need to be accessed
frequently, it helps immensly to pre-map them rather than map
and unmap for each operation. e.g. case where feedback counters
are sys mem map registers.

Restructure cpc_read/write and the cpc_regs structure to allow
pre-mapping the system addresses and unmap them when the CPU exits.

Signed-off-by: Ashwin Chaugule <[email protected]>
Signed-off-by: Prashanth Prakash <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
Ashwin Chaugule 2016-08-16 14:39:38 -06:00 • committed by Rafael J. Wysocki
commit 5bbb86aa4b
2 changed files with 72 additions and 37 deletions

View file

@ -49,6 +49,7 @@ struct cpc_reg {
*/
struct cpc_register_resource {
acpi_object_type type;
u64 __iomem *sys_mem_vaddr;
union {
struct cpc_reg reg;
u64 int_value;