#include <linux/compiler.h> #include <linux/types.h> #include "tsc.h" u64 perf_time_to_tsc(u64 ns, struct perf_tsc_conversion *tc) { u64 t, quot, rem; t = ns - tc->time_zero; quot = t / tc->time_mult; rem = t % tc->time_mult; return (quot << tc->time_shift) + (rem << tc->time_shift) / tc->time_mult; } u64 tsc_to_perf_time(u64 cyc, struct perf_tsc_conversion *tc) { u64 quot, rem; quot = cyc >> tc->time_shift; rem = cyc & (((u64)1 << tc->time_shift) - 1); return tc->time_zero + quot * tc->time_mult + ((rem * tc->time_mult) >> tc->time_shift); } u64 __weak rdtsc(void) { return 0; } '><img src='/cgit.png' alt='cgit logo'/></a></td> <td class='main'><a href='/cgit.cgi/'>index</a> : <a href='/cgit.cgi/linux/net-next.git/'>net-next.git</a></td><td class='form'><form method='get'> <input type='hidden' name='id' value='e479ab651f071dbd1518ce8fb121c7f42f2bb97d'/><select name='h' onchange='this.form.submit();'> <option value='emaclite-cleanup'>emaclite-cleanup</option> <option value='master' selected='selected'>master</option> <option value='nds-private-remove'>nds-private-remove</option> <option value='packet-loop-back'>packet-loop-back</option> <option value='packet-rx-pump-back'>packet-rx-pump-back</option> </select> <input type='submit' value='switch'/></form></td></tr> <tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table> <table class='tabs'><tr><td> <a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=e479ab651f071dbd1518ce8fb121c7f42f2bb97d'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/net/key'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/net/key?id=e479ab651f071dbd1518ce8fb121c7f42f2bb97d'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/net/key?id=e479ab651f071dbd1518ce8fb121c7f42f2bb97d'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/net/key?id=e479ab651f071dbd1518ce8fb121c7f42f2bb97d'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/net/key'> <input type='hidden' name='id' value='e479ab651f071dbd1518ce8fb121c7f42f2bb97d'/><select name='qt'> <option value='grep'>log msg</option> <option value='author'>author</option> <option value='committer'>committer</option> <option value='range'>range</option> </select> <input class='txt' type='search' size='10' name='q' value=''/> <input type='submit' value='search'/> </form> </td></tr></table> <div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?id=e479ab651f071dbd1518ce8fb121c7f42f2bb97d'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/net?id=e479ab651f071dbd1518ce8fb121c7f42f2bb97d'>net</a>/<a href='/cgit.cgi/linux/net-next.git/log/net/key?id=e479ab651f071dbd1518ce8fb121c7f42f2bb97d'>key</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/net/key?id=e479ab651f071dbd1518ce8fb121c7f42f2bb97d&showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr> next.git/log/drivers/usb/host?id=06425c308b92eaf60767bc71d359f4cbc7a561f8&showmsg=1'>host</a>/<a href='/cgit.cgi/linux/net-next.git/log/drivers/usb/host/xhci-ring.c?id=06425c308b92eaf60767bc71d359f4cbc7a561f8&showmsg=1'>xhci-ring.c</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/drivers/usb/host/xhci-ring.c?id=06425c308b92eaf60767bc71d359f4cbc7a561f8'>Collapse</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>