public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6.19-rc1-mm1] Export jiffies_to_timespec()
@ 2006-10-11  0:36 Jeremy Fitzhardinge
  2006-10-11  7:02 ` Arjan van de Ven
  2006-10-11 16:16 ` Christoph Hellwig
  0 siblings, 2 replies; 7+ messages in thread
From: Jeremy Fitzhardinge @ 2006-10-11  0:36 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Ingo Molnar,
	john stultz

Export jiffies_to_timespec; previously modules used the inlined header version.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Andrew Morton <akpm@osdl.org>
Cc: tglx@linutronix.de
Cc: mingo@elte.hu
Cc: johnstul@us.ibm.com 

diff -r 821dbffe1ec5 kernel/time.c
--- a/kernel/time.c	Tue Oct 10 16:35:36 2006 -0700
+++ b/kernel/time.c	Tue Oct 10 16:35:55 2006 -0700
@@ -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"
  *



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2.6.19-rc1-mm1] Export jiffies_to_timespec()
  2006-10-11  0:36 [PATCH 2.6.19-rc1-mm1] Export jiffies_to_timespec() Jeremy Fitzhardinge
@ 2006-10-11  7:02 ` Arjan van de Ven
  2006-10-11  7:07   ` Jeremy Fitzhardinge
  2006-10-11 16:16 ` Christoph Hellwig
  1 sibling, 1 reply; 7+ messages in thread
From: Arjan van de Ven @ 2006-10-11  7:02 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Andrew Morton, Linux Kernel Mailing List, Thomas Gleixner,
	Ingo Molnar, john stultz

On Tue, 2006-10-10 at 17:36 -0700, Jeremy Fitzhardinge wrote:
> Export jiffies_to_timespec; previously modules used the inlined header version.

any chance you'll tell us which modules? :)



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2.6.19-rc1-mm1] Export jiffies_to_timespec()
  2006-10-11  7:02 ` Arjan van de Ven
@ 2006-10-11  7:07   ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 7+ messages in thread
From: Jeremy Fitzhardinge @ 2006-10-11  7:07 UTC (permalink / raw)
  To: Arjan van de Ven
  Cc: Andrew Morton, Linux Kernel Mailing List, Thomas Gleixner,
	Ingo Molnar, john stultz

Arjan van de Ven wrote:
> On Tue, 2006-10-10 at 17:36 -0700, Jeremy Fitzhardinge wrote:
>   
>> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2.6.19-rc1-mm1] Export jiffies_to_timespec()
  2006-10-11  0:36 [PATCH 2.6.19-rc1-mm1] Export jiffies_to_timespec() Jeremy Fitzhardinge
  2006-10-11  7:02 ` Arjan van de Ven
@ 2006-10-11 16:16 ` Christoph Hellwig
  2006-10-11 18:17   ` Andrew Morton
  2006-10-11 19:48   ` Jeremy Fitzhardinge
  1 sibling, 2 replies; 7+ messages in thread
From: Christoph Hellwig @ 2006-10-11 16:16 UTC (permalink / raw)
  To: Jeremy Fitzhardinge
  Cc: Andrew Morton, Linux Kernel Mailing List, Thomas Gleixner,
	Ingo Molnar, john stultz

On Tue, Oct 10, 2006 at 05:36:54PM -0700, Jeremy Fitzhardinge wrote:
> 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)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2.6.19-rc1-mm1] Export jiffies_to_timespec()
  2006-10-11 16:16 ` Christoph Hellwig
@ 2006-10-11 18:17   ` Andrew Morton
  2006-10-28 16:50     ` Christoph Hellwig
  2006-10-11 19:48   ` Jeremy Fitzhardinge
  1 sibling, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2006-10-11 18:17 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Jeremy Fitzhardinge, Linux Kernel Mailing List, Thomas Gleixner,
	Ingo Molnar, john stultz

On Wed, 11 Oct 2006 17:16:28 +0100
Christoph Hellwig <hch@infradead.org> wrote:

> On Tue, Oct 10, 2006 at 05:36:54PM -0700, Jeremy Fitzhardinge wrote:
> > 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2.6.19-rc1-mm1] Export jiffies_to_timespec()
  2006-10-11 16:16 ` Christoph Hellwig
  2006-10-11 18:17   ` Andrew Morton
@ 2006-10-11 19:48   ` Jeremy Fitzhardinge
  1 sibling, 0 replies; 7+ messages in thread
From: Jeremy Fitzhardinge @ 2006-10-11 19:48 UTC (permalink / raw)
  To: Christoph Hellwig, Jeremy Fitzhardinge, Andrew Morton,
	Linux Kernel Mailing List, Thomas Gleixner, Ingo Molnar,
	john stultz

Christoph Hellwig wrote:
> On Tue, Oct 10, 2006 at 05:36:54PM -0700, Jeremy Fitzhardinge wrote:
>   
>> 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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2.6.19-rc1-mm1] Export jiffies_to_timespec()
  2006-10-11 18:17   ` Andrew Morton
@ 2006-10-28 16:50     ` Christoph Hellwig
  0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2006-10-28 16:50 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Christoph Hellwig, Jeremy Fitzhardinge, Linux Kernel Mailing List,
	Thomas Gleixner, Ingo Molnar, john stultz

On Wed, Oct 11, 2006 at 11:17:39AM -0700, Andrew Morton wrote:
> On Wed, 11 Oct 2006 17:16:28 +0100
> Christoph Hellwig <hch@infradead.org> wrote:
> 
> > On Tue, Oct 10, 2006 at 05:36:54PM -0700, Jeremy Fitzhardinge wrote:
> > > 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.

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.

> 
> 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.

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)


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-10-28 16:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-11  0:36 [PATCH 2.6.19-rc1-mm1] Export jiffies_to_timespec() Jeremy Fitzhardinge
2006-10-11  7:02 ` Arjan van de Ven
2006-10-11  7:07   ` Jeremy Fitzhardinge
2006-10-11 16:16 ` Christoph Hellwig
2006-10-11 18:17   ` Andrew Morton
2006-10-28 16:50     ` Christoph Hellwig
2006-10-11 19:48   ` Jeremy Fitzhardinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox