intel_rapl: abstract register access operations
authorZhang Rui <rui.zhang@intel.com>
Wed, 10 Jul 2019 13:44:27 +0000 (21:44 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 11 Jul 2019 13:08:57 +0000 (15:08 +0200)
commitbeea8df821d928e7755917da6c1e45d6afde5148
treed3cfe4f73a1c5215e93b34c5f3215c5352cc89ea
parent7fde2712a7adab721eaabafbd8ff93dff3262d35
intel_rapl: abstract register access operations

MSR and MMIO RAPL interfaces have different ways to access the registers,
thus in order to abstract the register access operations, two callbacks,
.read_raw()/.write_raw() are introduced, and they should be implemented by
MSR RAPL and MMIO RAPL interface driver respectly.

This patch implements them for the MSR I/F only.

Reviewed-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Tested-by: Pandruvada, Srinivas <srinivas.pandruvada@intel.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/powercap/intel_rapl.c
include/linux/intel_rapl.h