Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753239AbbHNGc6 (ORCPT ); Fri, 14 Aug 2015 02:32:58 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:35482 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752373AbbHNGc4 (ORCPT ); Fri, 14 Aug 2015 02:32:56 -0400 Date: Fri, 14 Aug 2015 08:32:51 +0200 From: Richard Cochran To: "Hall, Christopher S" Cc: "john.stultz@linaro.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "Kirsher, Jeffrey T" , "Ronciak, John" , "hpa@zytor.com" , "x86@kernel.org" , "linux-kernel@vger.kernel.org" , "netdev@vger.kernel.org" Subject: Re: [PATCH v2 4/4] Added getsynctime64() callback Message-ID: <20150814063250.GB18603@localhost.localdomain> References: <1438988495-9942-1-git-send-email-christopher.s.hall@intel.com> <1438988495-9942-5-git-send-email-christopher.s.hall@intel.com> <20150810084949.GA18566@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 933 Lines: 24 On Thu, Aug 13, 2015 at 09:10:36PM +0000, Hall, Christopher S wrote: > > > + if (!cpu_has_art) > > > + return -EOPNOTSUPP; > > > > Perform this check before registration, setting .getsynctime64 > > accordingly. > > The problem here is that ART initialization doesn't happen until we > install TSC as a clocksource. This design is per Thomas' > suggestion. That occurs after the driver is loaded (as a module). So that 'cpu_has_art' actually means 'cpu_has_art_and_has_been_initialized'? In any case, returning EOPNOTSUPP early on, but OK later seems mean to me. If the clocks aren't ready yet, the error should be EBUSY so that user space knows it can try again. Thanks, Richard -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/