Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp47696pxb; Tue, 12 Jan 2021 19:38:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxLS23Q0c+vGZOUQNIoOeUgf5PO1IZl6Casv/iV9hsUuUeF197pPVHzRSiwdy4V/GSMI6Qq X-Received: by 2002:a17:907:7255:: with SMTP id ds21mr98741ejc.258.1610509122990; Tue, 12 Jan 2021 19:38:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610509122; cv=none; d=google.com; s=arc-20160816; b=mkqwKWpA8WxJMIUYqBXw3xxCK7x/5HiUyzr/WsopVlW8kJZ4j3vX0bIiWEISq7GK4F IkqynbJ5J1i0cAwP69X1bnue5sMbnO3B9jL0xY7+Du82I/hN9Of1+d3IHx97UmGat8g0 OMrCa3xhsM3o4VudYe0mdUoL1Ewf7HytEQS0zfMG1m0g/W7uTZ8a6Y9zYuQVoowLK+If fgFsHN/Y08jaaWuZ+rUxrQxGcluUvEq5Ho9PACCsj59HjLhoku55yKo0R+otviYv37xA fhKa0ULmlfk7bSXzUIhOEZv5ZLQbHBE++0mkG9Aijd7pHK9X7eI9Km3LxhfgsUn9+YZi jicQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=De+MN43cECMKNtkx7DTHFdo+0qHYpphoIQKQR3ejV58=; b=zShZbBX4VIlxq5bPBH9PR0KDz9vUUZCxaM1+X76l+f8Sk7vFQrcUa2xsospDGkcKGA Dve5f1271ebsmT0QwEbIvBZfYb7baSnqRxgltkthrf0gmlq6D5dwqx5CMrh/22em5j21 ++eIOH42FzOz9q03yEDt6qJgYS09ZuHn/T0KCLoCS2HlvAHkfIH9WyyQ1tt8YM5tU+8y ekI9GSS3Kig4olVeInL54TkLhhij3Mm8W9wUsVvMj8LU99qPp/kkLdtdqKvbwz7siHcm 8QKaM8tkbTDmHNsEc729J9lloWeKarCyzKNymL6UywB4eTimskyFNFTuwQ2OY5XUyh+G eWyA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g8si367815edu.166.2021.01.12.19.38.20; Tue, 12 Jan 2021 19:38:42 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727477AbhAMB7z (ORCPT + 99 others); Tue, 12 Jan 2021 20:59:55 -0500 Received: from mga02.intel.com ([134.134.136.20]:20589 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725601AbhAMB7y (ORCPT ); Tue, 12 Jan 2021 20:59:54 -0500 IronPort-SDR: xl0VswBe+xwsKtvXN3Exo1sztssFLyZJONtydh2vuViA+mjb4w9sGbUCRdUJFY23EYs0aBNl8b 0/GhcMhXVdLg== X-IronPort-AV: E=McAfee;i="6000,8403,9862"; a="165222721" X-IronPort-AV: E=Sophos;i="5.79,343,1602572400"; d="scan'208";a="165222721" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Jan 2021 17:59:10 -0800 IronPort-SDR: dbJ9jqlQgAM4+MtDT3cb3sozTmSXXLm7l6Y+svNAkCe8A6KYH3zpKt984p1dWS3SDOuUc+/yZC 3iwDFszxRwtw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,343,1602572400"; d="scan'208";a="363726033" Received: from yilunxu-optiplex-7050.sh.intel.com ([10.239.159.141]) by orsmga002.jf.intel.com with ESMTP; 12 Jan 2021 17:59:08 -0800 From: Xu Yilun To: mdf@kernel.org, linux-fpga@vger.kernel.org, linux-kernel@vger.kernel.org Cc: gregkh@linuxfoundation.org, trix@redhat.com, lgoncalv@redhat.com, yilun.xu@intel.com, hao.wu@intel.com Subject: [PATCH v6 0/2] UIO support for dfl devices Date: Wed, 13 Jan 2021 09:54:06 +0800 Message-Id: <1610502848-30345-1-git-send-email-yilun.xu@intel.com> X-Mailer: git-send-email 2.7.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset supports some dfl device drivers written in userspace. In the patchset v1, the "driver_override" interface should be used to bind the DFL UIO driver to DFL devices. But there is concern that the "driver_override" interface is not OK itself. In v2, we use a new matching algorithem. The "driver_override" interface is abandoned, the DFL UIO driver matches any DFL device which could not be handled by other DFL drivers. So the DFL UIO driver could be used for new DFL devices which are not supported by kernel. The concern is the UIO may not be suitable as a default/generic driver for all dfl features, such as features with multiple interrupts. In v4, we specify each matching device in the id_table of the UIO driver, just the same as other dfl drivers do. Now the UIO driver supports Ether Group feature. To support more DFL features, their feature ids should be added to the driver's id_table. Main changes from v1: - switch to the new matching algorithem. It matches DFL devices which could not be handled by other DFL drivers. - refacor the code about device resources filling. - add the documentation. Main changes from v2: - split the match ops changes in dfl.c to an independent patch. - move the declarations needed for dfl-uio-pdev from include/linux/dfl.h to driver/fpga/dfl.h - some minor fixes. Main changes from v3: - switch to specifying each matching device in the driver's id_table. - refactor the irq handling code. Main changes from v4: - refactor the irq handling code. Main changes from v5: - fix the res[] zero initialization issue. - improve the return code for probe(). - some doc improvement. Xu Yilun (2): fpga: dfl: add the userspace I/O device support for DFL devices Documentation: fpga: dfl: Add description for DFL UIO support Documentation/fpga/dfl.rst | 24 ++++++++++++ drivers/fpga/Kconfig | 10 +++++ drivers/fpga/Makefile | 1 + drivers/fpga/dfl-uio-pdev.c | 93 +++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 128 insertions(+) create mode 100644 drivers/fpga/dfl-uio-pdev.c -- 2.7.4