Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4164906ybh; Tue, 6 Aug 2019 07:19:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxrgBcLNuCekiRy1QjeYwvbkUVoaryTcGhqVMyle2GmbzgbBe+UsZzu24D32dh5ZaQsWqUh X-Received: by 2002:a62:1807:: with SMTP id 7mr3817472pfy.149.1565101180931; Tue, 06 Aug 2019 07:19:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565101180; cv=none; d=google.com; s=arc-20160816; b=kGYo+XNTdnH9iewokKpcO4ixYWV6jCrvvV7FY5IIvCx70j8xod6cP60M3/VFpghZED wC4I66TVxeiIAFQTB3OC5P/n8WoK2g+y3jidAKx0SeEp4U8I6AOBVukPjK085QnZYvSS Q5n4J46+jS5f59uBMkX9pUglzDTTezpzQs7SoOgxtrJqzPBSClUnodtmdTuexVC7EH/X 2Lb+c/cQnfi6Vu42Y1xH7npu73Nd9JmY9RjGR5zJm1NOMsirVN6rX84DFqnK51A5BaDT oW6Ew1HoDUjjEw/EutSGnI8XFLmOw64+r6yYNI8DvBkLJ1TUJiFTQWy77VugWoadAn4p p0kQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=TPojNuRGLSxF+mH2CV0xwHzpI+57s3hzvFVlGNX+pTk=; b=dv1cDixxE0d+t1OOTKJt2SlgnamwSRdKTb6aNVQ1CpST3CMRDQbFaQpqbklCQQ0nvS y271oxMGGuNjsSODIAHveJmf26ctDP7ZhEF9GlE+17IYkCZdJIi60KdjjpZUJ1KjurJ9 Z++kiQVU/8U37Ds170hE2+nuiUanP2RpHvDGZOFb7oxpYndEKwD/c0eIyIDufg0JFU+c oeK/QvLqF31rImCgcX8wBBxBW8wGpUcTPL8n95S4p/yZpTAp4Os2Y48jQUI1qJl/HHkM ZxCEBCpwPqP2HB/99SGAWFNqPj1LWs7W1ayWoVCgqt2Z3YZitd4nMQTKN3epEQW1/w+R V2Ng== 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 w6si49411589pfn.84.2019.08.06.07.19.25; Tue, 06 Aug 2019 07:19:40 -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 S1732989AbfHFOSl (ORCPT + 99 others); Tue, 6 Aug 2019 10:18:41 -0400 Received: from mail-il-dmz.mellanox.com ([193.47.165.129]:46723 "EHLO mellanox.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728558AbfHFOSl (ORCPT ); Tue, 6 Aug 2019 10:18:41 -0400 Received: from Internal Mail-Server by MTLPINE2 (envelope-from parav@mellanox.com) with ESMTPS (AES256-SHA encrypted); 6 Aug 2019 17:18:38 +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 x76EIa7h019368; Tue, 6 Aug 2019 17:18:36 +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 v1 0/2] Simplify mtty driver and mdev core Date: Tue, 6 Aug 2019 09:18:24 -0500 Message-Id: <20190806141826.52712-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 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 (derived from UUID) is already available using core kernel dev_name(), this patch 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 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(-) -- 2.21.0.777.g83232e3864