1. 28 6月, 2019 4 次提交
  2. 27 6月, 2019 15 次提交
  3. 26 6月, 2019 11 次提交
  4. 25 6月, 2019 8 次提交
  5. 24 6月, 2019 2 次提交
    • V
      mlxsw: core: Add support for negative temperature readout · f485cc36
      Vadim Pasternak 提交于
      Extend macros MLXSW_REG_MTMP_TEMP_TO_MC() to allow support of negative
      temperature readout, since chip and others thermal components are
      capable of operating within the negative temperature.
      With no such support negative temperature will be consider as very high
      temperature and it will cause wrong readout and thermal shutdown.
      For negative values 2`s complement is used.
      Tested in chamber.
      Example of chip ambient temperature readout with chamber temperature:
      -10 Celsius:
      temp1:             -6.0C  (highest =  -5.0C)
      -5 Celsius:
      temp1:             -1.0C  (highest =  -1.0C)
      
      v2 (Andrew Lunn):
      * Replace '%u' with '%d' in mlxsw_hwmon_module_temp_show()
      Signed-off-by: NVadim Pasternak <vadimp@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f485cc36
    • V
      mlxsw: core: Add the hottest thermal zone detection · 6f73862f
      Vadim Pasternak 提交于
      When multiple sensors are mapped to the same cooling device, the
      cooling device should be set according the worst sensor from the
      sensors associated with this cooling device.
      
      Provide the hottest thermal zone detection and enforce cooling device
      to follow the temperature trends of the hottest zone only.
      Prevent competition for the cooling device control from others zones,
      by "stable trend" indication. A cooling device will not perform any
      actions associated with a zone with a "stable trend".
      
      When other thermal zone is detected as a hottest, a cooling device is
      to be switched to following temperature trends of new hottest zone.
      
      Thermal zone score is represented by 32 bits unsigned integer and
      calculated according to the next formula:
      For T < TZ<t><i>, where t from {normal trip = 0, high trip = 1, hot
      trip = 2, critical = 3}:
      TZ<i> score = (T + (TZ<t><i> - T) / 2) / (TZ<t><i> - T) * 256 ** j;
      Highest thermal zone score s is set as MAX(TZ<i>score);
      Following this formula, if TZ<i> is in trip point higher than TZ<k>,
      the higher score is to be always assigned to TZ<i>.
      
      For two thermal zones located at the same kind of trip point, the higher
      score will be assigned to the zone which is closer to the next trip
      point. Thus, the highest score will always be assigned objectively to
      the hottest thermal zone.
      
      All the thermal zones initially are to be configured with mode
      "enabled" with the "step_wise" governor.
      Signed-off-by: NVadim Pasternak <vadimp@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6f73862f