[PATCH AUTOSEL for 4.9 151/293] powercap/RAPL: prevent overridding bits outside of the mask

2018-04-08 Thread Sasha Levin
From: Adam Lessnau [ Upstream commit edbdabc62328ec0ac98d83ca384bf9fd5251ade6 ] 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

[PATCH AUTOSEL for 4.9 151/293] powercap/RAPL: prevent overridding bits outside of the mask

2018-04-08 Thread Sasha Levin
From: Adam Lessnau [ Upstream commit edbdabc62328ec0ac98d83ca384bf9fd5251ade6 ] 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: