[lkml]   [2016]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2 0/2] make POSIX timers optional
On Tue, 20 Sep 2016, Nicolas Pitre wrote:
> On Tue, 20 Sep 2016, Richard Cochran wrote:
> > On Tue, Sep 20, 2016 at 10:25:56PM +0200, Richard Cochran wrote:
> > > After this series, if I don't pay enough attention to dmesg, then I
> > > have lost functionality that I had in step #1. That sucks, and it has
> > > nothing to do with the tinification option at all. It will bite even
> > > if I have no knowledge of it. That isn't acceptable to me.
> >
> > Can't you leave all the "select PTP_1588_CLOCK" alone and simply add
> >
> > // global declarations
> > #else
> > // static inlines
> > #endif

Eew. No! That's an even more blantant layering violation.

> > to ptp_clock_kernel.h, and then sandwich ptp_clock.c in
> > #ifdef CONFIG_POSIX_TIMERS ... #endif ?
> Sure I could... but I'm sure I'll be flamed by others for making things
> even more obscure and hackish than they are right now.

I think the whole approach is wrong because it makes the PTP split at the
wrong level.

Currently we have:

tristate "Driver X"
select PTP

In order to make POSIX_CLOCK configurable we should have

tristate "PTP"

Now if you want to distangle PTP from a driver then you split it at the
driver level and not at the PTP level:

tristate "Driver X"

bool "Enable PTP support"
default y if !MAKE_IT_TINY
depends on DRIVER_X
select PTP

We have already drivers following that scheme. That way you make the PTP
support in the driver conditional on DRIVER_X_PTP and have no hassle with
modules and dependencies.

Your tiny config can simply disable all the PTP extra bits and then you can
disable PTP and finally POSIX_TIMERS.



 \ /
  Last update: 2016-09-20 23:13    [W:0.075 / U:26.568 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site