1. 05 5月, 2015 7 次提交
    • J
      thermal: let governors have private data for each thermal zone · e33df1d2
      Javi Merino 提交于
      A governor may need to store its current state between calls to
      throttle().  That state depends on the thermal zone, so store it as
      private data in struct thermal_zone_device.
      
      The governors may have two new ops: bind_to_tz() and unbind_from_tz().
      When provided, these functions let governors do some initialization
      and teardown when they are bound/unbound to a tz and possibly store that
      information in the governor_data field of the struct
      thermal_zone_device.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      e33df1d2
    • I
      thermal: Add QPNP PMIC temperature alarm driver · c610afaa
      Ivan T. Ivanov 提交于
      Add support for the temperature alarm peripheral found inside
      Qualcomm plug-and-play (QPNP) PMIC chips. The temperature alarm
      peripheral outputs a pulse on an interrupt line whenever the
      thermal over temperature stage value changes.
      
      Register a thermal sensor. The temperature reported by this thermal
      sensor device should reflect the actual PMIC die temperature if an
      ADC is present on the given PMIC. If no ADC is present, then the
      reported temperature should be estimated from the over temperature
      stage value.
      
      Cc: David Collins <collinsd@codeaurora.org>
      Signed-off-by: NIvan T. Ivanov <iivanov@mm-sol.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      c610afaa
    • J
      thermal: fair_share: generalize the weight concept · bcdcbbc7
      Javi Merino 提交于
      The fair share governor has the concept of weights, which is the
      influence of each cooling device in a thermal zone.  The current
      implementation forces the weights of all cooling devices in a thermal
      zone to add up to a 100.  This complicates setups, as you need to know
      in advance how many cooling devices you are going to have.  If you bind a
      new cooling device, you have to modify all the other cooling devices
      weights, which is error prone.  Furthermore, you can't specify a
      "default" weight for platforms since that default value depends on the
      number of cooling devices in the platform.
      
      This patch generalizes the concept of weight by allowing any number to
      be a "weight".  Weights are now relative to each other.  Platforms that
      don't specify weights get the same default value for all their cooling
      devices, so all their cdevs are considered to be equally influential.
      
      It's important to note that previous users of the weights don't need to
      alter the code: percentages continue to work as they used to.  This
      patch just removes the constraint of all the weights in a thermal zone
      having to add up to a 100.  If they do, you get the same behavior as
      before.  If they don't, fair share now works for that platform.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Acked-by: NDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      bcdcbbc7
    • J
      thermal: export weight to sysfs · db916513
      Javi Merino 提交于
      It's useful to have access to the weights for the cooling devices for
      thermal zones and change them if needed.  Export them to sysfs.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      db916513
    • J
      thermal: fair_share: fix typo · 80b89172
      Javi Merino 提交于
      s/asscciated/associated/
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Reviewed-by: NDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      80b89172
    • J
      thermal: fair_share: use the weight from the thermal instance · 8b91e2cb
      Javi Merino 提交于
      The fair share governor is not usable with thermal zones that use the
      bind op and don't populate thermal_zone_parameters, the majority of
      them.  Now that the weight is in the thermal instance, we can use that
      in the fair share governor to allow every thermal zone to trivially use
      this governor.  Furthermore, this simplifies the code.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Reviewed-by: NDurgadoss R <durgadoss.r@intel.com>
      Signed-off-by: NJavi Merino <javi.merino@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      8b91e2cb
    • K
      thermal: of: fix cooling device weights in device tree · 6cd9e9f6
      Kapileshwar Singh 提交于
      Currently you can specify the weight of the cooling device in the device
      tree but that information is not populated to the
      thermal_bind_params where the fair share governor expects it to
      be.  The of thermal zone device doesn't have a thermal_bind_params
      structure and arguably it's better to pass the weight inside the
      thermal_instance as it is specific to the bind of a cooling device to a
      thermal zone parameter.
      
      Core thermal code is fixed to populate the weight in the instance from
      the thermal_bind_params, so platform code that was passing the weight
      inside the thermal_bind_params continue to work seamlessly.
      
      While we are at it, create a default value for the weight parameter for
      those thermal zones that currently don't define it and remove the
      hardcoded default in of-thermal.
      
      Cc: Zhang Rui <rui.zhang@intel.com>
      Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
      Cc: Len Brown <lenb@kernel.org>
      Cc: Peter Feuerer <peter@piie.net>
      Cc: Darren Hart <dvhart@infradead.org>
      Cc: Eduardo Valentin <edubezval@gmail.com>
      Cc: Kukjin Kim <kgene@kernel.org>
      Cc: Durgadoss R <durgadoss.r@intel.com>
      Signed-off-by: NKapileshwar Singh <kapileshwar.singh@arm.com>
      Signed-off-by: NEduardo Valentin <edubezval@gmail.com>
      6cd9e9f6
  2. 02 5月, 2015 1 次提交
    • I
      rbd: end I/O the entire obj_request on error · 082a75da
      Ilya Dryomov 提交于
      When we end I/O struct request with error, we need to pass
      obj_request->length as @nr_bytes so that the entire obj_request worth
      of bytes is completed.  Otherwise block layer ends up confused and we
      trip on
      
          rbd_assert(more ^ (which == img_request->obj_request_count));
      
      in rbd_img_obj_callback() due to more being true no matter what.  We
      already do it in most cases but we are missing some, in particular
      those where we don't even get a chance to submit any obj_requests, due
      to an early -ENOMEM for example.
      
      A number of obj_request->xferred assignments seem to be redundant but
      I haven't touched any of obj_request->xferred stuff to keep this small
      and isolated.
      
      Cc: Alex Elder <elder@linaro.org>
      Cc: stable@vger.kernel.org # 3.10+
      Reported-by: NShawn Edwards <lesser.evil@gmail.com>
      Reviewed-by: NSage Weil <sage@redhat.com>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      082a75da
  3. 01 5月, 2015 5 次提交
  4. 30 4月, 2015 16 次提交
  5. 29 4月, 2015 4 次提交
  6. 28 4月, 2015 7 次提交