From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754432AbcITWrH (ORCPT ); Tue, 20 Sep 2016 18:47:07 -0400 Received: from mail-qk0-f181.google.com ([209.85.220.181]:32933 "EHLO mail-qk0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753889AbcITWrF (ORCPT ); Tue, 20 Sep 2016 18:47:05 -0400 Date: Tue, 20 Sep 2016 18:47:02 -0400 (EDT) From: Nicolas Pitre To: Thomas Gleixner cc: Richard Cochran , John Stultz , Josh Triplett , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 0/2] make POSIX timers optional In-Reply-To: Message-ID: References: <1474401400-18491-1-git-send-email-nicolas.pitre@linaro.org> <20160920202556.GA6713@localhost.localdomain> <20160920204556.GA7555@localhost.localdomain> User-Agent: Alpine 2.20 (LFD 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 20 Sep 2016, Thomas Gleixner wrote: > I think the whole approach is wrong because it makes the PTP split at the > wrong level. > > Currently we have: > > DRIVER_X > tristate "Driver X" > select PTP > > In order to make POSIX_CLOCK configurable we should have > > PTP > tristate "PTP" > select POSIX_CLOCK > > Now if you want to distangle PTP from a driver then you split it at the > driver level and not at the PTP level: > > DRIVER_X > tristate "Driver X" > > DRIVER_X_PTP > 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. I beg to disagree. There are way more drivers than subsystems and if you had to go around unselecting all NIC drivers for CONFIG_ETHERNET to be turned off, and with CONFIG_ETHERNET=n you'd finally be able to turn networking off, then this would be a nightmare. IMHO it is much nicer for the poor user configuring the kernel to have a single configuration prompt for PTP support, and then have whatever driver that can provide a PTP clock just do it (or omit it) based on that single prompt. Prompting for PTP support for each individual ethernet driver is silly. Nicolas