Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2719557ybt; Mon, 22 Jun 2020 05:29:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCj9LkRuqa0XFmxQGUQG2YzDwezyBbppYUGR9z8gZUf+ffdlzCmEv8alWDSveNA8De+ehZ X-Received: by 2002:a17:906:560b:: with SMTP id f11mr15998374ejq.11.1592828987889; Mon, 22 Jun 2020 05:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592828987; cv=none; d=google.com; s=arc-20160816; b=NF4PJ2C6MrJLwaugrEdCV2f0xKJeXZT3+EsMW1uGvipYtLsPS/KZ8oSusr/hocBi8L ejOvMXZiBiWp1btew4fLpyAx7hKUDzmbmWBHesLK70VOxZuwgZTTSErLiRMQReP8Oaps rXq69q1Ofhwrm7puO4GGRqeIG9SbapFc3DaRcaqRvDmv/XkElcnT7lVkKs25SZX7Q9vt 78YjYRw5euV9MEfymt4al8CUq0vcf9nWpIvz4gdtWh4xTNyQ0LqjAKokzZhl99+JKsId pcpaKDv4G9IiYd+1vYY01enNP0wTfEBoDpmbuPQXO9tZjkgYvbIQUwJFj8CmuaHMdPhH dqIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=W2h10LpTAvNoSkQ5Wfs3ntSIZK6FE0PEMdGXqFWlN0Y=; b=a32CWedOt5HPr5iG198MeNpuk5rproXNMVXKVvfRe/OxT35y30vkQ2HIHeQR1nq4vt g9RWdQgh2LV1FIhhfdgzQ1VQBtdc7GLyFGuMKxyb5aZdHrag025ATWrZE+x8XgvCFLuo x8nFHPEMmMQUVruiHdzWHvC76A/ITflpScAFkkcyGEUgj0zR6MSXji35wxbCi8iDC0/e 8xzqSTCkdL+Q7Mq+IuAy42M8juHmBiBlO7bx1vYck4STYuoW2YRSjyZx34qjEsO2QA/W 2w4SQnFSa3uR4IiR04y8wGo0AexwBkYAC/QjQuOkfjGtmvvPB80RUtkzYMtjquci0LSC DJag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Y4vRIsQn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch5si8620004edb.567.2020.06.22.05.29.24; Mon, 22 Jun 2020 05:29:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Y4vRIsQn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728143AbgFVM13 (ORCPT + 99 others); Mon, 22 Jun 2020 08:27:29 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:50571 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728044AbgFVM12 (ORCPT ); Mon, 22 Jun 2020 08:27:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1592828846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W2h10LpTAvNoSkQ5Wfs3ntSIZK6FE0PEMdGXqFWlN0Y=; b=Y4vRIsQnNtDAwuF3Yi/p0dqPKhEL5wrWVvs/SERTYnkwDIcdXSm0l9uh0whU1ZaJKrrj3t 1uZDZdgW5wB35Bl9vwHOl92ZToLd9oh7hkmFwL3e6LmufjJClt4He8ZlQykS1dvqZE7UC2 1+nACv3BW1eikgKHIRxFPZZBGAr/x8k= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-435-G5HG_SQ0M9uGQRhRyvd_Dg-1; Mon, 22 Jun 2020 08:27:23 -0400 X-MC-Unique: G5HG_SQ0M9uGQRhRyvd_Dg-1 Received: by mail-qk1-f198.google.com with SMTP id s75so7060153qka.1 for ; Mon, 22 Jun 2020 05:27:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=W2h10LpTAvNoSkQ5Wfs3ntSIZK6FE0PEMdGXqFWlN0Y=; b=f6gLkPWExRmgX+CTyXXiK9ClhiQRbsOfh+cYUf4gWzjsskuqrqmHWU75JwJEEwMI1Z lIw+jZn/W0RYA9UbLiP30Tfx/SAWeJuSvNoxo0W5j86yPNY12+ImPN/mAjqInAFxnVQy a4Iuo45vNVlOumtYPuR1mpMN63VHivoaQ4nTBapuUNoAz8WAlhdgOd0leoFm/9c1QmH7 TrNTyuR5N5tyRXmu08ZY87XXKq1Fd8+zg9Jq9b5dn5Wr4WM7/vBj1dxrCaMghfmuqtwm bGxYMmcsq7/Lm1S1Ii9yYl/ZJt0nruoh84zBC0yYJX2Q/7KY/peZXLwrYuHROGB1Rb5u A8CQ== X-Gm-Message-State: AOAM531MGyQU/W/WxmqAdioGZnhBpTCTu8IyJ+9vQazaTSy0ibxZYGMH X3OFVeo6u6B334bN4yuNdC6+ghpCoNRKjzvLBtBJdAYHCu6vMufaQkibvM59xCA57vYoryZgcl4 itaH24xH4aVRN7zu1AU3ympUJ X-Received: by 2002:a37:57c3:: with SMTP id l186mr15256199qkb.498.1592828843117; Mon, 22 Jun 2020 05:27:23 -0700 (PDT) X-Received: by 2002:a37:57c3:: with SMTP id l186mr15256181qkb.498.1592828842808; Mon, 22 Jun 2020 05:27:22 -0700 (PDT) Received: from trix.remote.csb (075-142-250-213.res.spectrum.com. [75.142.250.213]) by smtp.gmail.com with ESMTPSA id b196sm4114868qkg.11.2020.06.22.05.27.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Jun 2020 05:27:22 -0700 (PDT) Subject: Re: [PATCH v7 0/7] Add interrupt support to FPGA DFL drivers To: Xu Yilun , mdf@kernel.org, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: bhu@redhat.com, mtosatti@redhat.com, gregkh@linuxfoundation.org, jun.j.tian@intel.com, hao.wu@intel.com References: <1592280528-6350-1-git-send-email-yilun.xu@intel.com> <20200622064806.GA5101@yilunxu-OptiPlex-7050> From: Tom Rix Message-ID: Date: Mon, 22 Jun 2020 05:27:20 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200622064806.GA5101@yilunxu-OptiPlex-7050> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In addition to reviewing, I have run these changes on the pac a10 card and while i do not have an afu using interrupts, I have exercised some of the new interfaces. The most useful i have submitted to selftests drivers/fpga.  In the future, this would be a good place to put other fpga unit tests.  The selftest patch depends on this change. So you can also add Tested-by: Tom Rix Tom On 6/21/20 11:48 PM, Xu Yilun wrote: > Hi Moritz: > > Could you please help review the patchset when you have time? > > You have already reviewed the first 3 patches some time ago. The > comments are all fixed. Hao and Redhat guys also have done several > rounds of review. The patches are all Acked-by Hao, reviewed by > Marcelo & Tom. > > There is little change to the code for several months, seems it stays > ready and just need your final Ack. > > Actually this is the last feature for our first generation PAC A10 Card, > and is important for users to have the full support. > > We really need your help on code review ... > > Many thanks! > Yilun > > On Tue, Jun 16, 2020 at 12:08:41PM +0800, Xu Yilun wrote: >> This patchset add interrupt support to FPGA DFL drivers. >> >> With these patches, DFL driver will parse and assign interrupt resources >> for enumerated feature devices and their sub features. >> >> This patchset also introduces a set of APIs for user to monitor DFL >> interrupts. Three sub features (DFL FME error, DFL AFU error and user >> interrupt) drivers now support these APIs. >> >> Patch #1: DFL framework change. Accept interrupt info input from DFL bus >> driver, and add interrupt parsing and assignment for feature >> sub devices. >> Patch #2: DFL pci driver change, add interrupt info on DFL enumeration. >> Patch #3: DFL framework change. Add helper functions for feature sub >> device drivers to handle interrupt and notify users. >> Patch #4: Add interrupt support for AFU error reporting sub feature. >> Patch #5: Add interrupt support for FME global error reporting sub >> feature. >> Patch #6: Add interrupt support for a new sub feature, to handle user >> interrupts implemented in AFU. >> Patch #7: Documentation for DFL interrupt handling. >> >> Main changes from v1: >> - Early validating irq table for each feature in parse_feature_irq() >> in Patch #1. >> - Changes IOCTL interfaces. use DFL_FPGA_FME/PORT_XXX_GET_IRQ_NUM >> instead of DFL_FPGA_FME/PORT_XXX_GET_INFO, delete flag field for >> DFL_FPGA_FME/PORT_XXX_SET_IRQ param >> >> Main changes from v2: >> - put parse_feature_irqs() inside create_feature_instance(). >> - refines code for dfl_fpga_set_irq_triggers, delete local variable j. >> - put_user() instead of copy_to_user() for DFL_FPGA_XXX_GET_IRQ_NUM IOCTL >> >> Main changes from v3: >> - rebased to 5.7-rc1. >> - fail the dfl enumeration when irq parsing error happens. >> - Add 2 helper functions in dfl.c to handle generic irq ioctls in feature >> drivers. >> >> Main changes from v4: >> - Minor fixes for Hao's comments. >> >> Main changes from v5: >> - Remove unnecessary type casting in Patch #1 & #3. >> - Minor fixes for Moritz's comments. >> >> Main changes from v6: >> - Add the header file for Patch #1, to fix build >> error on ARCH=xtensa >> - Minor fixes in Patch #2 & #3. >> >> Xu Yilun (7): >> fpga: dfl: parse interrupt info for feature devices on enumeration >> fpga: dfl: pci: add irq info for feature devices enumeration >> fpga: dfl: introduce interrupt trigger setting API >> fpga: dfl: afu: add interrupt support for port error reporting >> fpga: dfl: fme: add interrupt support for global error reporting >> fpga: dfl: afu: add AFU interrupt support >> Documentation: fpga: dfl: add descriptions for interrupt related >> interfaces. >> >> Documentation/fpga/dfl.rst | 19 +++ >> drivers/fpga/dfl-afu-error.c | 17 +++ >> drivers/fpga/dfl-afu-main.c | 32 +++++ >> drivers/fpga/dfl-fme-error.c | 18 +++ >> drivers/fpga/dfl-fme-main.c | 6 + >> drivers/fpga/dfl-pci.c | 76 +++++++++-- >> drivers/fpga/dfl.c | 310 ++++++++++++++++++++++++++++++++++++++++++ >> drivers/fpga/dfl.h | 57 ++++++++ >> include/uapi/linux/fpga-dfl.h | 82 +++++++++++ >> 9 files changed, 608 insertions(+), 9 deletions(-) >> >> -- >> 2.7.4