Export jiffies_to_timespec()
PATCH 1/1 Export jiffies_to_timespec()
Export jiffies_to_timespec; previously modules used the inlined header version.
kernel/time.c +0 -0
@@ -607,6 +607,7 @@ jiffies_to_timespec(const unsigned long
u64 nsec = (u64)jiffies * TICK_NSEC; value->tv_sec = div_long_long_rem(nsec, NSEC_PER_SEC, &value->tv_nsec); }
+EXPORT_SYMBOL(jiffies_to_timespec);
/* Same for "timeval"
*
Quoted 1 line · Jeremy Fitzhardinge
Export
jiffies_to_timespec; previously modules used the inlined header version.
any chance you'll tell us which modules? :)
Quoted 7 lines · Arjan van de Ven
Quoted 2 lines · Jeremy Fitzhardinge
Export
jiffies_to_timespec; previously modules used the inlined header version.any chance you'll tell us which modules? :)
Out of tree in this case: the madwifi Atheros wireless driver.
J
Quoted 2 lines · Jeremy Fitzhardinge
Export
jiffies_to_timespec; previously modules used the inlined header version.
NACK, drivers shouldn know about these timekeeping details and no in-tree driver uses it (fortunately)
Quoted 6 lines · On Wed, 11 Oct 2006 17:16:28 +0100 Christoph Hellwig <[email protected]> wrote:
Quoted 2 lines · Jeremy Fitzhardinge
Export
jiffies_to_timespec; previously modules used the inlined header version.NACK, drivers shouldn know about these timekeeping details and no in-tree driver uses it (fortunately)
Disagree.
a) jiffies' and timepsec' are hardly "details". They are basic kernel-wide concepts. timespecs are even known to userspace. Exporting a helper function which converts from one to the other is perfectly reasonable.
b) jiffies_to_timespec() was previously available to modules. We changed that without notice and we changed it *by accident*. There was no intention to withdraw jiffies_to_timespec() from the available-to-modules API.
If we really wanted to withdraw jiffies_to_timespec() then we'd mark it __deprecated_for_modules for a while, then withdraw it. But there's no earthly reason why we'd want to withdraw it: the export makes sense.
Quoted 8 lines · Christoph Hellwig
Quoted 2 lines · Jeremy Fitzhardinge
Export
jiffies_to_timespec; previously modules used the inlined header version.NACK, drivers shouldn know about these timekeeping details and no in-tree driver uses it (fortunately)
timespec_to_jiffies *is* exported, so it would seem to be a symmetry issue if nothing else.
J
Quoted 10 lines · Andrew Morton
Quoted 6 lines · On Wed, 11 Oct 2006 17:16:28 +0100 Christoph Hellwig <[email protected]> wrote:
Quoted 2 lines · Jeremy Fitzhardinge
Export
jiffies_to_timespec; previously modules used the inlined header version.NACK, drivers shouldn know about these timekeeping details and no in-tree driver uses it (fortunately)
Quoted 6 lines
Disagree.
a)
jiffies' andtimepsec' are hardly "details". They are basic kernel-wide concepts. timespecs are even known to userspace. Exporting a helper function which converts from one to the other is perfectly reasonable.
That non one in tree ever uses it is a very good reason no to export it either. While there are still far too many direct jiffy users there is no one directly convertin it to a timespec for good reason.
Quoted 5 lines
b)
jiffies_to_timespec()was previously available to modules. We changed that without notice and we changed it *by accident*. There was no intention to withdrawjiffies_to_timespec()from the available-to-modules API.
By that rationale everything errornously implemented as a macro or inline at some point will need to be exported. Except for you we still maintain that we don't want to keep unused exports. Arjan even put a formal mechanism in to warn about them and has gotten a global buy-in to kill them. This will fall under this ASAP and only give people a short period to keep using it. Not a very useful message.
(especially when the only user is closed source crap where people should help the proper reverse-engineered driver instead)