Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2931979ybv; Mon, 24 Feb 2020 14:41:31 -0800 (PST) X-Google-Smtp-Source: APXvYqxpQhko/jira2PRDaxTIV3ltnBOu7hx+GJ74PYO/oZdjfyClDRtnDx0F4Ni8pXAbEX9DS+m X-Received: by 2002:a05:6830:22cd:: with SMTP id q13mr42359122otc.224.1582584090900; Mon, 24 Feb 2020 14:41:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582584090; cv=none; d=google.com; s=arc-20160816; b=C2OWoNr3mgrS/TeMpwKuQou6PYuJufMosheWgwK7TxvLBT4DGalFuxThDQuNzRUhUM gcSZ9pwPrjjAg9oE9CvrdkFUnxGn/0RW6xo5V8pwjqY1x7S/nIr7zoH7XDXu2tCqr4/Q Vdq6ZbtIodEeFiMjW5qJuTpIv9H1wO+GR8lFlKuF/X2HDI0zrLjH/VgCHvkPqjnBBxyf 0LYA9DQpD4QbxBWJGh6JcOgZeCwMo9plh2GIWlytyIKy3ZNt3Op2R/CNvEos2ijDiVg+ EZndOQaux7RXS6rj7KWTNol+lzIgCOoS9Uq9Y3k0Ej2zuu13ncx4XKn5K2T25WOwHh27 kVGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=25luozYH91xSEvNm0GDjJJSYizGXAbES+gOfw3E/Oec=; b=aLk1utuI6ZTYB5ENLPdzTJpPYlUY7h45ojK6cziZu1WOwMjgsc0ut4ttMZ2ou1r51z rJv8uxtoOMJV9R1yAlMSNt5gAoSlxVXZT6I/VpCJ9wQlu+BL89gls92innh2XDeAvLSk Q6gS5DXB5vnZYcpxEwXZHHtlLM/l0wg6PAOZi0zxB4tGrMAC4a5EFzEEkSjwDjw2hEj9 QhIt7HrxOeL+xKznIvmSTmdXpoo4TsW4ksRQfcz5xdeYO6wqSP4kXuFWEl7fzcAjh1EJ f+L91PDbNsbBw0i/gxi8GarO+YHT7lZb4X69uY1bT+oIe92INpeDL6ZG+gmUy2s3rjiW n+lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k184si6263214oib.239.2020.02.24.14.41.17; Mon, 24 Feb 2020 14:41:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727976AbgBXWlL (ORCPT + 99 others); Mon, 24 Feb 2020 17:41:11 -0500 Received: from mga14.intel.com ([192.55.52.115]:51792 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726651AbgBXWlL (ORCPT ); Mon, 24 Feb 2020 17:41:11 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Feb 2020 14:41:11 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,481,1574150400"; d="scan'208";a="260493792" Received: from wtczc53028gn.jf.intel.com (HELO skl-build) ([10.54.87.17]) by fmsmga004.fm.intel.com with ESMTP; 24 Feb 2020 14:41:09 -0800 Date: Mon, 24 Feb 2020 14:40:59 -0800 From: "Christopher S. Hall" To: Thomas Gleixner Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com, x86@kernel.org, jacob.e.keller@intel.com, richardcochran@gmail.com, davem@davemloft.net, sean.v.kelley@intel.com Subject: Re: [Intel PMC TGPIO Driver 0/5] Add support for Intel PMC Time GPIO Driver with PHC interface changes to support additional H/W Features Message-ID: <20200224224059.GC1508@skl-build> References: <20191211214852.26317-1-christopher.s.hall@intel.com> <87eevf4hnq.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87eevf4hnq.fsf@nanos.tec.linutronix.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Thanks for reviewing. On Fri, Jan 31, 2020 at 07:14:49PM +0100, Thomas Gleixner wrote: > christopher.s.hall@intel.com writes: > > From: Christopher Hall > > > > The TGPIO hardware doesn't implement interrupts. For TGPIO input, the > > output edge-timestamp API is re-used to implement a user-space polling > > interface. For periodic input (e.g. PPS) this is fairly efficient, > > requiring only a marginally faster poll rate than the input event > > frequency. > > I really have a hard time to understand why this is implemented as part > of PTP while you talk about PPS at the same time. We primarily need support for periodic input and output uses cases. Apologies for omitting the periodic output use case from the cover letter. While TGPIO isn't associated with a PTP timestamp clock, the PHC pin/clock interface fits the usage otherwise. The PHC periodic output API is the closest fit for periodic output without creating a new API. The PHC interface can also register as a PPS source. I am, however, concerned in general about implementing PPS input in the driver because the hardware doesn't implement interrupts - requiring polling. > Proper information about why this approach was chosen and what that > magic device is used for would be really helpful. The customer requested usages are 1 kHz and 1 Hz for both input and output. Some higher level use cases are: - using a GPS PPS signal to sync the system clock - auditing timesync precision for financial services, especially high frequency trading (e.g. MiFID). Apart from clock import/export applications, timestamping single I/O events are potentially valuable for industrial control applications (e.g. motor position sensing vs. time). As time sync precision requirements for these applications are tightened, standard GPIO timing precision will not be good enough. > Thanks, > > tglx Thanks, Christopher