Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1448082rwb; Fri, 18 Nov 2022 19:29:43 -0800 (PST) X-Google-Smtp-Source: AA0mqf7bj6H18vMlsV/oz8fCZiGvWDykbCBw9dog/XGAT81SEDwG8irA3io5zJCs4jMbSlKYykGh X-Received: by 2002:a63:e802:0:b0:46f:ed3a:f36c with SMTP id s2-20020a63e802000000b0046fed3af36cmr9335774pgh.372.1668828583594; Fri, 18 Nov 2022 19:29:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668828583; cv=pass; d=google.com; s=arc-20160816; b=btxWe7fSmUZZOf7SH25ebY+gp3nxZCWcbRTZv1vp2SlEf7xFJ0TQy3xUpLfvxOwcxP eILR/G8M/L8GVHW6WKAGm43YGoGoTnEMJ3nxf1wFV9Fwhr7gzH+9Ui9KvWcWoGA7kGfF KGRu3CztpdtbPUTh8RvduafpLhK5M/oIjvELTZ21VZ7s1M0G9CY/f2muMCN5G2fqe8ru q/FyzQlePmiNb2ab7zLkgZFmR+hJcRSqN265msbjAEwdHo7CiWeJiYeMDi/bbKF48tJ7 2duG6NEbcthY1x2oI2IjczTfxRKbsIE9EuX12deoN0RXi9+5HL58Vg6m62dDQhtFbGZk GBjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=6UEFSG0OYKlGqjZ/PRWkj0OJ+UzSo/gKsrrXE46jPo0=; b=Tzyd5CCvcLoDw4YqWdFEFPKPzvh9X4mk592A9Ih8WRGR/9KvW6XTVcjRDXDi1wJd02 p/RMpCLfVAcgi+P1IuOENAB90zdZ8eGtPYRf0K1APPy6BUmHvaXqiiz1hRJTWCEM7/aX JrOIKj+YookiBDICIPNXZbKkrX1PWiDDcgLjmnGhxNACaAhDf/EU9Wj36Q3qXdXfLwmB E1mYKWBuai89Pv94SuJRtlG9Y0tD7mNvjMtEHCn56heTRm8197QKzny/17HaT398shhU VX6fNiDYxCYHpR0lYZRYJUBUBqkYxMvh9yMcKLIePS20XoVEDTr0ikV5rPZWV80XOEyi oW+Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=kfO5J9IA; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n6-20020a170902f60600b00188f4d6c28csi5259391plg.167.2022.11.18.19.29.32; Fri, 18 Nov 2022 19:29:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=kfO5J9IA; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232670AbiKSCu0 (ORCPT + 90 others); Fri, 18 Nov 2022 21:50:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231376AbiKSCuC (ORCPT ); Fri, 18 Nov 2022 21:50:02 -0500 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2064.outbound.protection.outlook.com [40.107.93.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B82CD10B45 for ; Fri, 18 Nov 2022 18:33:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aXp5Nk+R8l8votvvqtuvZhMpFpqQmoX3eSYpYU92RltVnN3M6ihb8vYjFriAr019GcaoSCJc7LuqxyZMMKyU0hM/dmP3S/Um4P40DHqTTPgPOIqoJaT2S03L0e0hqWO66pH+eqn7GW43tiw19jCF5B7qRzwaMWYTb0Uj5PX8K8OrwFT8oexaWjeMhGfUeBb13+bKbMs8nIbZetGqWxgHR4eErF1VagofTU0OW1inu24FhR0bFQ+7Dlh9cspJJY1SIizimftTs3yDpTC87Y8OMg+X7DMpLytt1xlpPontIgNnI+CAnTXP2eewz0eeCitThNtBxb5vQQnLMy2m2TB1Nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=6UEFSG0OYKlGqjZ/PRWkj0OJ+UzSo/gKsrrXE46jPo0=; b=SwPGtwAXm4QT8+bnj8OdhkGHCDCGuh5iakSnQyyAPHJUuW8QKxTbNIqcIih466tHjFx61ciivGI15/nHiPItKkOFOjwp+JjHOg1sedpnEqHnobp5BZuxY4invOXCfRllg0PId/w/DpGKm0ADFTlGuNVJrwM2Z7SK0D09nSOgDyMU/x7eMuJFWtvc6YS1n6bNUrCcKez25Vuq5Ayg5Kt3w2520db+XEsxTNGPEoBk/Fu/tlwpUBHcQJ0Yl/WK8f2E3XaZ48RFlqDQrvQaZe6YEfDzBLXR1HrNbnx2lmu5F5cDA3UXGRvCpxwQRo6bGYw9nwnS0A2t+lRQcWMkYShS1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=6UEFSG0OYKlGqjZ/PRWkj0OJ+UzSo/gKsrrXE46jPo0=; b=kfO5J9IAQsUPBeBBNfd6klOsVYJv9b/S/7DRt7AI1w/4TsS/u4wdH4r1l3ul7+Hpieb076ngF7ZCYl+Q1ja8sBKHzLuWnZY86sQsBcCU0tSnNKk7KnwI0wNh5YFBwJdqOsIdhxkqlFze4Tmwb49o7vgWLhUVy5yZQOteAmDBwtZHrSERMBF6s+GB60bm+nyDRqPEvxQ7MDF6SUCvMYzuwy8hK95+rLxxuxdx+aK8UkylRkhmmXnn8vlV3c9PRtDYq3/FSa/d20e51qJvNwaF7ld690QHXP9V1YAU7E/fa0vtLk4qpvqEAsHo7hbKzkr1FWqU3SGrs1+EbNQdGtVfIA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from IA1PR12MB6604.namprd12.prod.outlook.com (2603:10b6:208:3a0::7) by SA1PR12MB7317.namprd12.prod.outlook.com (2603:10b6:806:2ba::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5813.17; Sat, 19 Nov 2022 02:33:36 +0000 Received: from IA1PR12MB6604.namprd12.prod.outlook.com ([fe80::2349:ec6b:2442:8c52]) by IA1PR12MB6604.namprd12.prod.outlook.com ([fe80::2349:ec6b:2442:8c52%3]) with mapi id 15.20.5813.018; Sat, 19 Nov 2022 02:33:35 +0000 Message-ID: <7de35859-97ab-8e88-f590-d5851b81773b@nvidia.com> Date: Fri, 18 Nov 2022 18:33:30 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: Intel timed i/o driver in HTE Content-Language: en-US To: "N, Pandith" , linus.walleij@linaro.org Cc: "linux-kernel@vger.kernel.org" , "Hall, Christopher S" , "Gross, Mark" , "Sangannavar, Mallikarjunappa" , "D, Lakshmi Sowjanya" , "T R, Thejesh Reddy" , "andriy.shevchenko@linux.intel.com" , timestamp@lists.linux.dev, dipenp@nvidia.com References: X-Nvconfidentiality: public From: Dipen Patel In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BYAPR11CA0055.namprd11.prod.outlook.com (2603:10b6:a03:80::32) To IA1PR12MB6604.namprd12.prod.outlook.com (2603:10b6:208:3a0::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR12MB6604:EE_|SA1PR12MB7317:EE_ X-MS-Office365-Filtering-Correlation-Id: a765d5a2-fffa-4b65-f0bc-08dac9d6756a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 27L7yV+wbt/Bmn0SVnItavO9D9HxcwHyEHGjY9Zc/cshKkqU1jZwoyU2US4FSI87ArnCCQ2/K3EwkEFBABBlZgrnefzADu4z8YcGKDQsm8E20O8AGVlOZCSoD75DyX50wsVv9R6ImVLdaCDTK9xa/iUQkku1yMQuWhsuYnR1wnQfGOviDPoBZB6KAMBa9o0qwD3RzG1czzpQM4Es2O8r4fPASYXHVU3v4yC2u1+r7BV6sHRbgOZpmlg5zyGvRGxLefvG2+KaRZpg2x30Oyq8oDa0KScWMGtGZwx1PBbXeq/qYNPOpxkJzQ+Fd6pIjj7RLuP7Ltm4MuCBdAT+zN2H5DkEN5CrKSqbr82CoFwhIrrVmsKvxR3WImxu1CxBc+CAhTe/6Y3Oww/B4n1+5oM3yCH0R3+GzKNFqGWZXpH/ini/shXtL9/K3xd/Qb1ywih2DbMVA5MeHVAXcFLfQcQ/agjOqC9Y0MDzfbunNXAEPXTpWDMDIa9XPz6KF0MOwYu2I5vkrfHZmaBm2yq0Pjbktx9LkYQr1awwDYkfroBZm5NNnc6/LycP3Swo/j8OT8cduXhv+mrICCOayxMtxZXuege/Lu1bq4NLqNlTDRsZErUJPoe6lloULIApwsDuxzkUM7iVoEDucYnI0hawcdiJbTxGdJOUeeiRZ+nayrNjd1vykxWTnsu5nVg/2FfUl5bTRhunqZbPr/7PGzOFqXyPhgbGmNjR9cMP98meS3wAcnk= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR12MB6604.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(376002)(396003)(136003)(366004)(39860400002)(346002)(451199015)(6486002)(316002)(107886003)(31686004)(6666004)(478600001)(53546011)(6506007)(54906003)(7416002)(66476007)(2616005)(86362001)(4326008)(36756003)(26005)(8936002)(8676002)(41300700001)(5660300002)(6512007)(66556008)(186003)(2906002)(83380400001)(31696002)(38100700002)(66946007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QWxxTnB1SUV1azdOckEyb3F1aTc2aUJxeVBITHpFZGxFcW4vdFB0RWNuVjJR?= =?utf-8?B?ZUozd2hveElhNEc5Y3B6STVzVVd0ZFdRU1NSTkZTRWhRMVBxa0xUNDdFRk1V?= =?utf-8?B?cGpjYjNXcmpMeXdWWUoxcGJrcWtvb3k5RnZXY2ZzRDZ2cXc5VmhJOEJxVzZR?= =?utf-8?B?UGJ3M2p2V0FuVjVRZDIwVkp2bFVGRS9LNEs5SmMxb2s2S3ZSMHp0Yk41bXRz?= =?utf-8?B?NnJRODVJaWNPaEpvV25kKzdSMld3SERNMnhCcDZGbytkS3BXRTd5RERDeTV3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U0wSEIyeHMwUWhLRnhIUUV4MGE3WVFOeElUcmtL?= =?utf-8?Q?a3MciAMqBYdpf+SRa9t0Fy1+e?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: a765d5a2-fffa-4b65-f0bc-08dac9d6756a X-MS-Exchange-CrossTenant-AuthSource: IA1PR12MB6604.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2022 02:33:35.8504 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: +6beDXYv/jT/5dO5JnVZ7hdLlAltGer6fE6Wh2pqrb7v5K27B+EUyu6YyKDCoH49ucr1l0VigPD2YwNi/GmEqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7317 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/17/22 10:47 AM, N, Pandith wrote: > Hi Dipen, > > To support Intel timed i/o driver, it was suggested by Linux community to enhance hte framework. > However, we see some limitations to support complete Intel timed i/o device. > > 1. The current framework supports Nvidia IP, which has two IP blocks (hw timestamping engine interfaced with GPIO) > Intel timed i/o is a single IP block handling multiple functionalities like: > > a. Input timestamping with event counter. > b. Timed output - single shot or periodic pulse train. > Uses TSC(Timestamp counter) for timestamp or generate events, which could be translated to system time. > c. Implement PPS functionality to export time. Isn't 1c similar to 1b, where IO (mostly GPIO) is programmed to toggle/periodic pulse train at 1s. > > This requires new functionality(interface) to be developed in hte framework specific to timed-io device. I can see 1a is straight case for the HTE. For 1b, the timestamp part can be added as hte provider. I see opportunity to enhance hte framework to provide translation facility between the domain, system time in this case. However programming interface to facilitate timed IO output can not fit into HTE the way it is right now. May be one possible way is to enchance HTE with API something like hte_configure_timestamp_periodic/timed could be possible in which case HTE does something more than just timestamping the event. I have to see how in GPIO case that proposed API works out, if it will bypass gpio framework etc... Adding Linus W into the discussion.... > > 2. The current hte framework has a provider and consumer concept. > Consumer is responsible for user space interaction. > Currently Nvidia is using GPIO for input timestamping (by adding hw timestamps in gpiolib-cdev.c) > > For Intel timed i/o functionalities, current gpio user interfaces cannot support event counter > or output modes. Can you elaborate on event counter and output mode? > Rather than jigging hte consumer into other subsystems to support timed i/o device. > Any possibility of developing a native consumer in hte subsystem, which could handle user space interactions for timestamping engines. yes, feel free to send patches to me and cc timestamp@lists.linux.dev, I guess you can register your IP as one of the provider. To explain why GPIO was treated specially, there was already a user facing framework i,e gpio-cdev and range of userspace tools which could be leveraged for the HTE GPIO consumers. However this does not prevent kernel space GPIO HTE consumer from using HTE core directly. > > I cannot think of an existing subsystem that handles Intel timed i/o functionalities 1a, 1b and 1c (mentioned above). > > Regards, > Pandith > > > > Best Regards, Dipen Patel