* [PATCH] radeon: Use Linux division macro in si_calculate_leakage_for_v_and_t_formula
@ 2013-08-09 15:58 Andi Kleen
2013-08-09 16:22 ` Deucher, Alexander
0 siblings, 1 reply; 2+ messages in thread
From: Andi Kleen @ 2013-08-09 15:58 UTC (permalink / raw)
To: linux-kernel; +Cc: Andi Kleen, airlied, alexander.deucher
From: Andi Kleen <ak@linux.intel.com>
This fixes my 32bit build which failed with:
drivers/built-in.o: In function
`si_calculate_leakage_for_v_and_t_formula':
/home/ak/lsrc/git/linux-2.6/drivers/gpu/drm/radeon/si_dpm.c:1770:
undefined reference to `__divdi3'
Cc: airlied@linux.ie
Cc: alexander.deucher@amd.com
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
drivers/gpu/drm/radeon/si_dpm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] radeon: Use Linux division macro in si_calculate_leakage_for_v_and_t_formula
2013-08-09 15:58 [PATCH] radeon: Use Linux division macro in si_calculate_leakage_for_v_and_t_formula Andi Kleen
@ 2013-08-09 16:22 ` Deucher, Alexander
0 siblings, 0 replies; 2+ messages in thread
From: Deucher, Alexander @ 2013-08-09 16:22 UTC (permalink / raw)
To: Andi Kleen, linux-kernel; +Cc: Andi Kleen, airlied
Fix is already merged:
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=adfb8e51332153016857194b85309150ac560286
> -----Original Message-----
> From: Andi Kleen [mailto:andi@firstfloor.org]
> Sent: Friday, August 09, 2013 11:58 AM
> To: linux-kernel@vger.kernel.org
> Cc: Andi Kleen; airlied@linux.ie; Deucher, Alexander
> Subject: [PATCH] radeon: Use Linux division macro in
> si_calculate_leakage_for_v_and_t_formula
>
> From: Andi Kleen <ak@linux.intel.com>
>
> This fixes my 32bit build which failed with:
>
> drivers/built-in.o: In function
> `si_calculate_leakage_for_v_and_t_formula':
> /home/ak/lsrc/git/linux-2.6/drivers/gpu/drm/radeon/si_dpm.c:1770:
> undefined reference to `__divdi3'
>
> Cc: airlied@linux.ie
> Cc: alexander.deucher@amd.com
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> drivers/gpu/drm/radeon/si_dpm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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.8.3.1
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-08-09 16:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-09 15:58 [PATCH] radeon: Use Linux division macro in si_calculate_leakage_for_v_and_t_formula Andi Kleen
2013-08-09 16:22 ` Deucher, Alexander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.