]> git.baikalelectronics.ru Git - kernel.git/commit
powercap/RAPL: prevent overridding bits outside of the mask
authorAdam Lessnau <adam.lessnau@intel.com>
Thu, 1 Jun 2017 09:21:50 +0000 (11:21 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 27 Jun 2017 22:38:34 +0000 (00:38 +0200)
commit1323dae038fde4091705eb4aabf711a253af5da6
treea689a149912e0efc6a87a1d83ec24cccf4a3bb68
parent392d94e7e48cbd11cc2b3ae100b44fa06d514340
powercap/RAPL: prevent overridding bits outside of the mask

Fixes wrong bits shift operation in the rapl_write_data_raw function, which
might cause overridding bits outside of the mask.

For example, writing new TIME_WINDOW1 value can override POWER_LIMIT1.

Signed-off-by: Adam Lessnau <adam.lessnau@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/powercap/intel_rapl.c