From patchwork Thu Aug 8 14:12:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Parav Pandit X-Patchwork-Id: 11084231 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 404E51399 for ; Thu, 8 Aug 2019 14:13:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30367289FC for ; Thu, 8 Aug 2019 14:13:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2483028A0C; Thu, 8 Aug 2019 14:13:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6D9928B15 for ; Thu, 8 Aug 2019 14:13:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390022AbfHHONT (ORCPT ); Thu, 8 Aug 2019 10:13:19 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:36557 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1732811AbfHHONT (ORCPT ); Thu, 8 Aug 2019 10:13:19 -0400 Received: from Internal Mail-Server by MTLPINE2 (envelope-from parav@mellanox.com) with ESMTPS (AES256-SHA encrypted); 8 Aug 2019 17:13:17 +0300 Received: from sw-mtx-036.mtx.labs.mlnx (sw-mtx-036.mtx.labs.mlnx [10.12.150.149]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x78EDFcW025404; Thu, 8 Aug 2019 17:13:15 +0300 From: Parav Pandit To: kvm@vger.kernel.org, kwankhede@nvidia.com, linux-kernel@vger.kernel.org Cc: parav@mellanox.com, alex.williamson@redhat.com, cohuck@redhat.com, cjia@nvidia.com Subject: [PATCH v2 0/2] Simplify mtty driver and mdev core Date: Thu, 8 Aug 2019 09:12:53 -0500 Message-Id: <20190808141255.45236-1-parav@mellanox.com> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20190802065905.45239-1-parav@mellanox.com> References: <20190802065905.45239-1-parav@mellanox.com> MIME-Version: 1.0 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently mtty sample driver uses mdev state and UUID in convoluated way to generate an interrupt. It uses several translations from mdev_state to mdev_device to mdev uuid. After which it does linear search of long uuid comparision to find out mdev_state in mtty_trigger_interrupt(). mdev_state is already available while generating interrupt from which all such translations are done to reach back to mdev_state. This translations are done during interrupt generation path. This is unnecessary and reduandant. Hence, Patch-1 simplifies mtty sample driver to directly use mdev_state. Patch-2, Since no production driver uses mdev_uuid(), simplifies and removes redandant mdev_uuid() exported symbol. --- Changelog: v1->v2: - Corrected email of Kirti - Updated cover letter commit log to address comment from Cornelia - Added Reviewed-by tag v0->v1: - Updated commit log Parav Pandit (2): vfio-mdev/mtty: Simplify interrupt generation vfio/mdev: Removed unused and redundant API for mdev UUID drivers/vfio/mdev/mdev_core.c | 6 ------ include/linux/mdev.h | 1 - samples/vfio-mdev/mtty.c | 39 +++++++---------------------------- 3 files changed, 8 insertions(+), 38 deletions(-)