Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp672696ybi; Fri, 2 Aug 2019 02:22:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgZdn0S7N1Wumz4sJetxg5E/8hPAtSwRdiGliEmXdn9tGaPJs/Hb/Jmua6HuUC+yYXAWNs X-Received: by 2002:a63:f941:: with SMTP id q1mr124268110pgk.350.1564737727191; Fri, 02 Aug 2019 02:22:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564737727; cv=none; d=google.com; s=arc-20160816; b=F2qKWcTXfQZcqpcirzQDP0XPU8KVNYrGJz22qSXztK+sz7I3jK4SMlGkn3J8NSVoBE nCg/l78g1L7Yr0GJBxDnHHmpnRxjxkt0vCYftMdml+Ywe3AjvfBTT+d3PAsg4uJuUXkh y/NTJuetUGjlVOG5pNOn5wCTa3uwj/Kp9L3PFbI6pvl/oYdHVcbNJ7rqJK8wWQ99+5NA wH+Q24AGV/z05A/CMiHz/mN0W8GAX0zKBSJVlm/WDiWGlA1SAN2eEzGZeiSxfP9trJIZ ifhQwqM1q3bhgUgE/Zfv1nM8vwWwT+H+3ZRbXlmSND1sSCkwnSb6dQOE23PUnBOhJpSc CEoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=1dGo9NBnMKqEu1Msk+T+mD8g1hJEFIjSwfbbkfJMYkM=; b=h4PUfnaCAAujQ75jfAOJKV9VxlhrIAYO+pcR5E1HTouUQOSApWFH+fon4qpVlAH0Gu 6voXI0wCH3mZCFKxlXZ45EzDDGdzgy5jkE/qfPEgEPxpvfNG23yXGTvZ+c6yqbOZLmgy 95sVxxwULrSIfpN1s75ZwP73F0HaHdPAWaW2jjIr1XQD+RAEC7Q0zyBmGFcpfROSFENc 5l6X60ohP1wyHI+6MlykmiUEpPE99ihNhzLgwZGEbL7xEBzTZ8/+AAjGU03fZHFarR63 uc+VX0TDEfO2VdHcDrw7I+XMx8JmnvgYd7Fiy/SBau7DUzsCYaQZjcBSuuimfOfMB7T9 T+Dw== 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=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j7si44446993pfi.10.2019.08.02.02.21.52; Fri, 02 Aug 2019 02:22:07 -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=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389221AbfHBG7P (ORCPT + 99 others); Fri, 2 Aug 2019 02:59:15 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:39030 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2389203AbfHBG7O (ORCPT ); Fri, 2 Aug 2019 02:59:14 -0400 Received: from Internal Mail-Server by MTLPINE2 (envelope-from parav@mellanox.com) with ESMTPS (AES256-SHA encrypted); 2 Aug 2019 09:59:09 +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 x726x7pW004367; Fri, 2 Aug 2019 09:59:08 +0300 From: Parav Pandit To: kvm@vger.kernel.org, wankhede@nvidia.com, linux-kernel@vger.kernel.org Cc: parav@mellanox.com, alex.williamson@redhat.com, cohuck@redhat.com, cjia@nvidia.com Subject: [PATCH 0/2] Simplify mtty driver and mdev core Date: Fri, 2 Aug 2019 01:59:03 -0500 Message-Id: <20190802065905.45239-1-parav@mellanox.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(), and mdev's name is already available using core kernel dev_name(), simplifies and removes redandant mdev_uuid() exported symbol. Parav Pandit (2): vfio-mdev/mtty: Simplify interrupt generation vfio/mdev: Removed unused and redundant API for mdev name 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(-) -- 2.21.0.777.g83232e3864