Skip to content
  • Qian Cai's avatar
    a534e924
    PM: QoS: annotate data races in pm_qos_*_value() · a534e924
    Qian Cai authored
    
    
    The target_value field in struct pm_qos_constraints is used for
    lockless access to the effective constraint value of a given QoS
    list, so the readers of it cannot expect it to always reflect the
    most recent effective constraint value.  However, they can and do
    expect it to be equal to a valid effective constraint value computed
    at a certain time in the past (event though it may not be the most
    recent one), so add READ|WRITE_ONCE() annotations around the
    target_value accesses to prevent the compiler from possibly causing
    that expectation to be unmet by generating code in an exceptionally
    convoluted way.
    
    Signed-off-by: default avatarQian Cai <cai@lca.pw>
    [ rjw: Changelog ]
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    a534e924
    PM: QoS: annotate data races in pm_qos_*_value()
    Qian Cai authored
    
    
    The target_value field in struct pm_qos_constraints is used for
    lockless access to the effective constraint value of a given QoS
    list, so the readers of it cannot expect it to always reflect the
    most recent effective constraint value.  However, they can and do
    expect it to be equal to a valid effective constraint value computed
    at a certain time in the past (event though it may not be the most
    recent one), so add READ|WRITE_ONCE() annotations around the
    target_value accesses to prevent the compiler from possibly causing
    that expectation to be unmet by generating code in an exceptionally
    convoluted way.
    
    Signed-off-by: default avatarQian Cai <cai@lca.pw>
    [ rjw: Changelog ]
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Loading