equal
deleted
inserted
replaced
657 */ |
657 */ |
658 result = scaled_div(s, R); |
658 result = scaled_div(s, R); |
659 return scaled_div32(result, f); |
659 return scaled_div32(result, f); |
660 } |
660 } |
661 |
661 |
662 EXPORT_SYMBOL_GPL(tfrc_calc_x); |
|
663 |
|
664 /** |
662 /** |
665 * tfrc_calc_x_reverse_lookup - try to find p given f(p) |
663 * tfrc_calc_x_reverse_lookup - try to find p given f(p) |
666 * |
664 * |
667 * @fvalue: function value to match, scaled by 1000000 |
665 * @fvalue: function value to match, scaled by 1000000 |
668 * Returns closest match for p, also scaled by 1000000 |
666 * Returns closest match for p, also scaled by 1000000 |
691 |
689 |
692 /* else ... it must be in the coarse-grained column */ |
690 /* else ... it must be in the coarse-grained column */ |
693 index = tfrc_binsearch(fvalue, 0); |
691 index = tfrc_binsearch(fvalue, 0); |
694 return (index + 1) * 1000000 / TFRC_CALC_X_ARRSIZE; |
692 return (index + 1) * 1000000 / TFRC_CALC_X_ARRSIZE; |
695 } |
693 } |
696 |
|
697 EXPORT_SYMBOL_GPL(tfrc_calc_x_reverse_lookup); |
|