lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 11 Feb 2013 23:24:08 +0400
From:	Artem Savkov <artem.savkov@...il.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>,
	Dirk Brandewie <dirk.brandewie@...il.com>
Cc:	Viresh Kumar <viresh.kumar@...aro.org>, linux-pm@...r.kernel.org,
	linux-kernel@...r.kernel.org, Artem Savkov <artem.savkov@...il.com>
Subject: [PATCH] cpufreq: 64bit divide in intel_pstate_calc_busy()

intel_pstate.c won't compile on i686 because of a linking error:
drivers/cpufreq/intel_pstate.c:459: undefined reference to `__udivdi3'

Signed-off-by: Artem Savkov <artem.savkov@...il.com>
---
 drivers/cpufreq/intel_pstate.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 86ad482..dc43208 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -456,7 +456,9 @@ static inline void intel_pstate_calc_busy(struct cpudata *cpu,
 	core_pct = div64_u64(sample->aperf * 100, sample->mperf);
 	sample->freq = cpu->pstate.turbo_pstate * core_pct * 1000;
 
-	sample->core_pct_busy = sample->pstate_pct_busy * core_pct / 100;
+	sample->core_pct_busy = div64_u64(
+					sample->pstate_pct_busy * core_pct,
+					100);
 }
 
 static inline void intel_pstate_sample(struct cpudata *cpu)
-- 
1.8.1.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ