diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2014-04-28 12:18:18 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-04-28 19:28:17 -0400 |
commit | 6712d2931933ada259b82f06c03a855b19937074 (patch) | |
tree | 5409ea5f79f6fd8d99496b8a5874cdbbf33a3cd3 | |
parent | 8997b185119966c62c6e95e7b010b4060407e358 (diff) |
cpufreq: ppc-corenet-cpufreq: Fix __udivdi3 modpost error
bfa709bc823fc32ee8dd5220d1711b46078235d8 (cpufreq: powerpc: add cpufreq
transition latency for FSL e500mc SoCs) introduced a modpost error:
ERROR: "__udivdi3" [drivers/cpufreq/ppc-corenet-cpufreq.ko] undefined!
make[1]: *** [__modpost] Error 1
Fix this by avoiding 64 bit integer division.
gcc version 4.8.2
Fixes: bfa709bc823f (cpufreq: powerpc: add cpufreq transition latency for FSL e500mc SoCs)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r-- | drivers/cpufreq/ppc-corenet-cpufreq.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/cpufreq/ppc-corenet-cpufreq.c b/drivers/cpufreq/ppc-corenet-cpufreq.c index a1ca3dd04a8e..0af618abebaf 100644 --- a/drivers/cpufreq/ppc-corenet-cpufreq.c +++ b/drivers/cpufreq/ppc-corenet-cpufreq.c | |||
@@ -138,6 +138,7 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
138 | struct cpufreq_frequency_table *table; | 138 | struct cpufreq_frequency_table *table; |
139 | struct cpu_data *data; | 139 | struct cpu_data *data; |
140 | unsigned int cpu = policy->cpu; | 140 | unsigned int cpu = policy->cpu; |
141 | u64 transition_latency_hz; | ||
141 | 142 | ||
142 | np = of_get_cpu_node(cpu, NULL); | 143 | np = of_get_cpu_node(cpu, NULL); |
143 | if (!np) | 144 | if (!np) |
@@ -205,8 +206,10 @@ static int corenet_cpufreq_cpu_init(struct cpufreq_policy *policy) | |||
205 | for_each_cpu(i, per_cpu(cpu_mask, cpu)) | 206 | for_each_cpu(i, per_cpu(cpu_mask, cpu)) |
206 | per_cpu(cpu_data, i) = data; | 207 | per_cpu(cpu_data, i) = data; |
207 | 208 | ||
209 | transition_latency_hz = 12ULL * NSEC_PER_SEC; | ||
208 | policy->cpuinfo.transition_latency = | 210 | policy->cpuinfo.transition_latency = |
209 | (12ULL * NSEC_PER_SEC) / fsl_get_sys_freq(); | 211 | do_div(transition_latency_hz, fsl_get_sys_freq()); |
212 | |||
210 | of_node_put(np); | 213 | of_node_put(np); |
211 | 214 | ||
212 | return 0; | 215 | return 0; |