Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp2185931ybh; Sun, 15 Mar 2020 21:20:45 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuTwV6FoX5lgVTVR6s1UXLLDfXjO6wbYosQl0MKnVRlWbtTSaV2+Pi4JJNwungI/c1XqLlA X-Received: by 2002:a54:4501:: with SMTP id l1mr16138910oil.33.1584332445767; Sun, 15 Mar 2020 21:20:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584332445; cv=none; d=google.com; s=arc-20160816; b=mk1tUuBUUuz7GzIS1aUd8ulWIHsAab3ZYuuKoUO14SDtUhw5FwtR1r7g6Njs2ECkT6 EoFx8bJq+0aC3iVJy3mV6zNFdpnHWYMvmdYrSFlUGtF3VkTeKNwsKLTEDdTcVhRGrm9W w0JthK0gburWomKhdovON9YM6RiJKR/PFL2jzEMgnOJl1MZy0LWHuQUBfGFymH/t8+1v 2MokMKkl4XkjKxN4OaNp4xKwRbL2jWXrEMfRJhFEqooUWbQ2htI/1bCB0ibFMMKdu2TK uVWSPZjKwx+kEcxAmZp4CsYRAPwTpgkqmXGtqCdWHpLWusk6NWxYnRa/wHvGoJAWUjNO pARA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=UxEenS9ex8HZSKWRUi1ko3kzMFfc9sOpWJl/MPj+T0k=; b=ApPhvNgHQ4eW0jn6oE/zP+1GzccMzaZfu9FMLySkXQ7HW0gnZ103KlWHDTSz+IWp+A jCnzHpD3IMQfMeQ0jMLwLQPC3A3Ps3JkAJ55q386h8QB/cc+cWQMOTdTd+vZU91KZJ8u yyxrMW2kNdnTuwZ5jOTaMjb33FQim0r9Z5oXMSOYz8pVgVrAyuYLVMb6DYF1nCnzC7Qz FWv8Jz1WYzQd/6QnYpWtd+tdycjm/LSy6ItG9GF15LDe++obNhykuNcW0R4Cya0MlR8K 06/YdnYUTJEfL6S+QVt6+DG3GpULsTEGLNGDjXOVy86fzA9Q7UTNvZFupxS09nqg39PQ 4Mng== 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 t18si9506334otq.105.2020.03.15.21.20.33; Sun, 15 Mar 2020 21:20:45 -0700 (PDT) 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 S1729491AbgCPETO (ORCPT + 99 others); Mon, 16 Mar 2020 00:19:14 -0400 Received: from mga12.intel.com ([192.55.52.136]:63079 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728940AbgCPETN (ORCPT ); Mon, 16 Mar 2020 00:19:13 -0400 IronPort-SDR: 0egLvg9iIzScUnDfidJ1uN41kFbuh38rmy65l/wmM/BGmjl4ekJFTO4GcSnjjvYVKsANWApK7w IPxnv8bBSwhg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Mar 2020 21:19:13 -0700 IronPort-SDR: qqKhMkZR/dihWiThgsnpGuua4A2LYMZ14+qcgczyL/vFFtb+8B8fnQQxSXntmbb2vCUuqjtbas S3mSyA+2ssQw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,559,1574150400"; d="scan'208";a="417007218" Received: from yilunxu-optiplex-7050.sh.intel.com ([10.239.159.141]) by orsmga005.jf.intel.com with ESMTP; 15 Mar 2020 21:19:12 -0700 From: Xu Yilun To: mdf@kernel.org, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Xu Yilun Subject: [PATCH v2 0/7] Add interrupt support to FPGA DFL drivers Date: Mon, 16 Mar 2020 12:16:55 +0800 Message-Id: <1584332222-26652-1-git-send-email-yilun.xu@intel.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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 error reporting fpga: dfl: fme: add interrupt support for global error reporting fpga: dfl: afu: add user interrupt support Documentation: fpga: dfl: add descriptions for interrupt related interfaces. Documentation/fpga/dfl.rst | 17 +++ drivers/fpga/dfl-afu-error.c | 64 +++++++++++ drivers/fpga/dfl-afu-main.c | 78 +++++++++++++ drivers/fpga/dfl-fme-error.c | 66 +++++++++++ drivers/fpga/dfl-fme-main.c | 6 + drivers/fpga/dfl-pci.c | 78 +++++++++++-- drivers/fpga/dfl.c | 247 +++++++++++++++++++++++++++++++++++++++++- drivers/fpga/dfl.h | 51 +++++++++ include/uapi/linux/fpga-dfl.h | 75 +++++++++++++ 9 files changed, 669 insertions(+), 13 deletions(-) -- 2.7.4