diff options
Diffstat (limited to 'kernel/time/clocksource.c')
| -rw-r--r-- | kernel/time/clocksource.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index df140cd3ea47..6519cf62d9cd 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
| @@ -113,7 +113,7 @@ EXPORT_SYMBOL_GPL(timecounter_cyc2time); | |||
| 113 | * @shift: pointer to shift variable | 113 | * @shift: pointer to shift variable |
| 114 | * @from: frequency to convert from | 114 | * @from: frequency to convert from |
| 115 | * @to: frequency to convert to | 115 | * @to: frequency to convert to |
| 116 | * @minsec: guaranteed runtime conversion range in seconds | 116 | * @maxsec: guaranteed runtime conversion range in seconds |
| 117 | * | 117 | * |
| 118 | * The function evaluates the shift/mult pair for the scaled math | 118 | * The function evaluates the shift/mult pair for the scaled math |
| 119 | * operations of clocksources and clockevents. | 119 | * operations of clocksources and clockevents. |
| @@ -122,7 +122,7 @@ EXPORT_SYMBOL_GPL(timecounter_cyc2time); | |||
| 122 | * NSEC_PER_SEC == 1GHz and @from is the counter frequency. For clock | 122 | * NSEC_PER_SEC == 1GHz and @from is the counter frequency. For clock |
| 123 | * event @to is the counter frequency and @from is NSEC_PER_SEC. | 123 | * event @to is the counter frequency and @from is NSEC_PER_SEC. |
| 124 | * | 124 | * |
| 125 | * The @minsec conversion range argument controls the time frame in | 125 | * The @maxsec conversion range argument controls the time frame in |
| 126 | * seconds which must be covered by the runtime conversion with the | 126 | * seconds which must be covered by the runtime conversion with the |
| 127 | * calculated mult and shift factors. This guarantees that no 64bit | 127 | * calculated mult and shift factors. This guarantees that no 64bit |
| 128 | * overflow happens when the input value of the conversion is | 128 | * overflow happens when the input value of the conversion is |
| @@ -131,7 +131,7 @@ EXPORT_SYMBOL_GPL(timecounter_cyc2time); | |||
| 131 | * factors. | 131 | * factors. |
| 132 | */ | 132 | */ |
| 133 | void | 133 | void |
| 134 | clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec) | 134 | clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 maxsec) |
| 135 | { | 135 | { |
| 136 | u64 tmp; | 136 | u64 tmp; |
| 137 | u32 sft, sftacc= 32; | 137 | u32 sft, sftacc= 32; |
| @@ -140,7 +140,7 @@ clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec) | |||
| 140 | * Calculate the shift factor which is limiting the conversion | 140 | * Calculate the shift factor which is limiting the conversion |
| 141 | * range: | 141 | * range: |
| 142 | */ | 142 | */ |
| 143 | tmp = ((u64)minsec * from) >> 32; | 143 | tmp = ((u64)maxsec * from) >> 32; |
| 144 | while (tmp) { | 144 | while (tmp) { |
| 145 | tmp >>=1; | 145 | tmp >>=1; |
| 146 | sftacc--; | 146 | sftacc--; |
| @@ -679,7 +679,7 @@ EXPORT_SYMBOL_GPL(__clocksource_updatefreq_scale); | |||
| 679 | int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq) | 679 | int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq) |
| 680 | { | 680 | { |
| 681 | 681 | ||
| 682 | /* Intialize mult/shift and max_idle_ns */ | 682 | /* Initialize mult/shift and max_idle_ns */ |
| 683 | __clocksource_updatefreq_scale(cs, scale, freq); | 683 | __clocksource_updatefreq_scale(cs, scale, freq); |
| 684 | 684 | ||
| 685 | /* Add clocksource to the clcoksource list */ | 685 | /* Add clocksource to the clcoksource list */ |
