From patchwork Mon Nov 18 10:35:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11249387 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 835FC930 for ; Mon, 18 Nov 2019 10:37:20 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EA5820726 for ; Mon, 18 Nov 2019 10:37:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="BXixQVq2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EA5820726 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iWeO1-0000WY-7S; Mon, 18 Nov 2019 10:36:01 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iWeO0-0000WS-7O for xen-devel@lists.xenproject.org; Mon, 18 Nov 2019 10:36:00 +0000 X-Inumbo-ID: 35b6384c-09ef-11ea-b678-bc764e2007e4 Received: from mail-wm1-x344.google.com (unknown [2a00:1450:4864:20::344]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 35b6384c-09ef-11ea-b678-bc764e2007e4; Mon, 18 Nov 2019 10:35:59 +0000 (UTC) Received: by mail-wm1-x344.google.com with SMTP id j18so15592089wmk.1 for ; Mon, 18 Nov 2019 02:35:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=jjDLxOz7IsbnL7t2/1Ejysn56H4IEYN8ktzvCCiHtFg=; b=BXixQVq2k/7tC9dPX/bMsg1etG8/LX8ir3zvqVJdCRc9RkrCObDs6PrdHtTu/EuVbP kXNiyijwPNqrzOCCwygOzMmden/lVtzOEhP5DGJclsF+p6uup6MP4o7LzYQxt9v+bRE7 Fh9x2wWvTXXnQf3phCJdqLRs5xDWQ/1s4FmnE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jjDLxOz7IsbnL7t2/1Ejysn56H4IEYN8ktzvCCiHtFg=; b=qjPWn9aVeHjy5x2kyZpbdWJ9LjYbeVCfLL9ppEYdtRFQbPT405tYO9WrRQO0Ede989 mPlHmy+q7BWxr9XBu7snkNgqtWkCDaKgO9QxhzhAnbH/x6o11i738DZlt1bAb4pFZCZ5 h4DP8RSUo7uJbDBsFvQ/HxEcJiqdzokItxHAEhovG8KZiDTNLQHRo7OlsaA8l3GJj/6+ 68lM+DM7+Z916blcq5SS8Ui7JQtGCP43dUO3STo7BuP+8H5ca4R1qCD7qsO1eyrx1bQe WVgBu8rGw7NqHBCHFLn5GBVcVlrI2oCy9FY+1yJJAVQUPWQNTW2ACjU94xIOFBeF5Adf VpRA== X-Gm-Message-State: APjAAAVOXgUQ7Vbn4tb6SOGwrakmztwifAhD++0tULO6o5qpH/IFfHt4 HrMKDgUUznt/20qEOrjc80TGow== X-Google-Smtp-Source: APXvYqxuf8Z1g6JRhix6c1l9qTmhAZvxcDDPcHNmw/YqNTYy8nEysXzPhnZ/YuoW4u1Ee+f/OudQtQ== X-Received: by 2002:a7b:c255:: with SMTP id b21mr29898342wmj.39.1574073358651; Mon, 18 Nov 2019 02:35:58 -0800 (PST) Received: from phenom.ffwll.local (212-51-149-96.fiber7.init7.net. [212.51.149.96]) by smtp.gmail.com with ESMTPSA id j2sm22749200wrt.61.2019.11.18.02.35.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 02:35:58 -0800 (PST) From: Daniel Vetter To: DRI Development Date: Mon, 18 Nov 2019 11:35:34 +0100 Message-Id: <20191118103536.17675-14-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191118103536.17675-1-daniel.vetter@ffwll.ch> References: <20191118103536.17675-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 13/15] xen/gntdev-dmabuf: Ditch dummy map functions X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , Stefano Stabellini , Daniel Vetter , Intel Graphics Development , xen-devel@lists.xenproject.org, Daniel Vetter , Boris Ostrovsky Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" There's no in-kernel users for the k(un)map stuff. And the mmap one is actively harmful - return 0 and then _not_ actually mmaping can't end well. Signed-off-by: Daniel Vetter Cc: Boris Ostrovsky Cc: Juergen Gross Cc: Stefano Stabellini Cc: xen-devel@lists.xenproject.org Reviewed-by: Oleksandr Andrushchenko Reviewed-by: Juergen Gross --- Ack for merging this through drm trees very much appreciated. -Daniel --- drivers/xen/gntdev-dmabuf.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/drivers/xen/gntdev-dmabuf.c b/drivers/xen/gntdev-dmabuf.c index 2c4f324f8626..fe7bd69d6955 100644 --- a/drivers/xen/gntdev-dmabuf.c +++ b/drivers/xen/gntdev-dmabuf.c @@ -342,35 +342,12 @@ static void dmabuf_exp_ops_release(struct dma_buf *dma_buf) mutex_unlock(&priv->lock); } -static void *dmabuf_exp_ops_kmap(struct dma_buf *dma_buf, - unsigned long page_num) -{ - /* Not implemented. */ - return NULL; -} - -static void dmabuf_exp_ops_kunmap(struct dma_buf *dma_buf, - unsigned long page_num, void *addr) -{ - /* Not implemented. */ -} - -static int dmabuf_exp_ops_mmap(struct dma_buf *dma_buf, - struct vm_area_struct *vma) -{ - /* Not implemented. */ - return 0; -} - static const struct dma_buf_ops dmabuf_exp_ops = { .attach = dmabuf_exp_ops_attach, .detach = dmabuf_exp_ops_detach, .map_dma_buf = dmabuf_exp_ops_map_dma_buf, .unmap_dma_buf = dmabuf_exp_ops_unmap_dma_buf, .release = dmabuf_exp_ops_release, - .map = dmabuf_exp_ops_kmap, - .unmap = dmabuf_exp_ops_kunmap, - .mmap = dmabuf_exp_ops_mmap, }; struct gntdev_dmabuf_export_args {