From mboxrd@z Thu Jan 1 00:00:00 1970 From: alexdeucher@gmail.com Subject: [PATCH] drm/radeon: fix 64 bit divide in SI spm code Date: Thu, 1 Aug 2013 09:03:29 -0400 Message-ID: <1375362209-2867-1-git-send-email-alexdeucher@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-qc0-f172.google.com (mail-qc0-f172.google.com [209.85.216.172]) by gabe.freedesktop.org (Postfix) with ESMTP id B98A4E6EE9 for ; Thu, 1 Aug 2013 06:03:39 -0700 (PDT) Received: by mail-qc0-f172.google.com with SMTP id a1so1054796qcx.31 for ; Thu, 01 Aug 2013 06:03:39 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org Cc: Alex Deucher List-Id: dri-devel@lists.freedesktop.org From: Alex Deucher Forgot to use the appropriate math64 function. Signed-off-by: Alex Deucher --- This is already in my -fixes queue, but for those that are running into issues, here's the fix. drivers/gpu/drm/radeon/si_dpm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/radeon/si_dpm.c b/drivers/gpu/drm/radeon/si_dpm.c index 7ad22e8..4182557 100644 --- a/drivers/gpu/drm/radeon/si_dpm.c +++ b/drivers/gpu/drm/radeon/si_dpm.c @@ -1767,7 +1767,7 @@ static void si_calculate_leakage_for_v_and_t_formula(const struct ni_leakage_coe s64 temperature, t_slope, t_intercept, av, bv, t_ref; s64 tmp; - i_leakage = drm_int2fixp(ileakage) / 100; + i_leakage = div64_s64(drm_int2fixp(ileakage), 100); vddc = div64_s64(drm_int2fixp(v), 1000); temperature = div64_s64(drm_int2fixp(t), 1000); -- 1.7.7.5