From patchwork Thu Jul 28 19:21:25 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ira Weiny X-Patchwork-Id: 9251643 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4C9856077C for ; Thu, 28 Jul 2016 19:22:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C52127E22 for ; Thu, 28 Jul 2016 19:22:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1F65427E63; Thu, 28 Jul 2016 19:22:06 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 A070527E22 for ; Thu, 28 Jul 2016 19:22:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755794AbcG1TWD (ORCPT ); Thu, 28 Jul 2016 15:22:03 -0400 Received: from mga01.intel.com ([192.55.52.88]:52822 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754844AbcG1TWC (ORCPT ); Thu, 28 Jul 2016 15:22:02 -0400 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 28 Jul 2016 12:22:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,434,1464678000"; d="scan'208";a="741124490" Received: from phlsvsds.ph.intel.com ([10.228.195.38]) by FMSMGA003.fm.intel.com with ESMTP; 28 Jul 2016 12:22:01 -0700 Received: from phlsvsds.ph.intel.com (localhost.localdomain [127.0.0.1]) by phlsvsds.ph.intel.com (8.13.8/8.13.8) with ESMTP id u6SJM1ek027498; Thu, 28 Jul 2016 15:22:01 -0400 Received: (from iweiny@localhost) by phlsvsds.ph.intel.com (8.13.8/8.13.8/Submit) id u6SJM1uS027495; Thu, 28 Jul 2016 15:22:01 -0400 X-Authentication-Warning: phlsvsds.ph.intel.com: iweiny set sender to ira.weiny@intel.com using -f From: ira.weiny@intel.com To: dledford@redhat.com Cc: linux-rdma@vger.kernel.org, Dean Luick Subject: [PATCH 14/16] IB/hfi1: Remove unneeded mm argument in remove function Date: Thu, 28 Jul 2016 15:21:25 -0400 Message-Id: <1469733687-31738-15-git-send-email-ira.weiny@intel.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: <1469733687-31738-1-git-send-email-ira.weiny@intel.com> References: <1469733687-31738-1-git-send-email-ira.weiny@intel.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dean Luick The reworked mmu_rb interface allows the unused mm argument to be removed. Reviewed-by: Ira Weiny Signed-off-by: Dean Luick --- drivers/infiniband/hw/hfi1/mmu_rb.c | 7 +++---- drivers/infiniband/hw/hfi1/mmu_rb.h | 3 +-- drivers/infiniband/hw/hfi1/user_exp_rcv.c | 10 ++++------ drivers/infiniband/hw/hfi1/user_sdma.c | 5 ++--- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/drivers/infiniband/hw/hfi1/mmu_rb.c b/drivers/infiniband/hw/hfi1/mmu_rb.c index 76f7b0403207..a02344a9d746 100644 --- a/drivers/infiniband/hw/hfi1/mmu_rb.c +++ b/drivers/infiniband/hw/hfi1/mmu_rb.c @@ -253,8 +253,7 @@ void hfi1_mmu_rb_evict(struct mmu_rb_handler *handler, void *evict_arg) while (!list_empty(&del_list)) { rbnode = list_first_entry(&del_list, struct mmu_rb_node, list); list_del(&rbnode->list); - handler->ops->remove(handler->ops_arg, rbnode, - handler->mm); + handler->ops->remove(handler->ops_arg, rbnode); } } @@ -275,7 +274,7 @@ void hfi1_mmu_rb_remove(struct mmu_rb_handler *handler, __mmu_int_rb_remove(node, &handler->root); spin_unlock_irqrestore(&handler->lock, flags); - handler->ops->remove(handler->ops_arg, node, NULL); + handler->ops->remove(handler->ops_arg, node); } static inline void mmu_notifier_page(struct mmu_notifier *mn, @@ -335,7 +334,7 @@ static void do_remove(struct mmu_rb_handler *handler, while (!list_empty(del_list)) { node = list_first_entry(del_list, struct mmu_rb_node, list); list_del(&node->list); - handler->ops->remove(handler->ops_arg, node, handler->mm); + handler->ops->remove(handler->ops_arg, node); } } diff --git a/drivers/infiniband/hw/hfi1/mmu_rb.h b/drivers/infiniband/hw/hfi1/mmu_rb.h index e4f853fa91e6..754f6ebf13fb 100644 --- a/drivers/infiniband/hw/hfi1/mmu_rb.h +++ b/drivers/infiniband/hw/hfi1/mmu_rb.h @@ -65,8 +65,7 @@ struct mmu_rb_ops { bool (*filter)(struct mmu_rb_node *node, unsigned long addr, unsigned long len); int (*insert)(void *ops_arg, struct mmu_rb_node *mnode); - void (*remove)(void *ops_arg, struct mmu_rb_node *mnode, - struct mm_struct *mm); + void (*remove)(void *ops_arg, struct mmu_rb_node *mnode); int (*invalidate)(void *ops_arg, struct mmu_rb_node *node); int (*evict)(void *ops_arg, struct mmu_rb_node *mnode, void *evict_arg, bool *stop); diff --git a/drivers/infiniband/hw/hfi1/user_exp_rcv.c b/drivers/infiniband/hw/hfi1/user_exp_rcv.c index 3bcda22e7b87..8717e11fe3f5 100644 --- a/drivers/infiniband/hw/hfi1/user_exp_rcv.c +++ b/drivers/infiniband/hw/hfi1/user_exp_rcv.c @@ -87,8 +87,7 @@ static u32 find_phys_blocks(struct page **, unsigned, struct tid_pageset *); static int set_rcvarray_entry(struct file *, unsigned long, u32, struct tid_group *, struct page **, unsigned); static int tid_rb_insert(void *, struct mmu_rb_node *); -static void tid_rb_remove(void *, struct mmu_rb_node *, - struct mm_struct *); +static void tid_rb_remove(void *, struct mmu_rb_node *); static int tid_rb_invalidate(void *, struct mmu_rb_node *); static int program_rcvarray(struct file *, unsigned long, struct tid_group *, struct tid_pageset *, unsigned, u16, struct page **, @@ -901,7 +900,7 @@ static int unprogram_rcvarray(struct file *fp, u32 tidinfo, if (!node || node->rcventry != (uctxt->expected_base + rcventry)) return -EBADF; if (!fd->handler) - tid_rb_remove(fd, &node->mmu, fd->mm); + tid_rb_remove(fd, &node->mmu); else hfi1_mmu_rb_remove(fd->handler, &node->mmu); @@ -964,7 +963,7 @@ static void unlock_exp_tids(struct hfi1_ctxtdata *uctxt, if (!node || node->rcventry != rcventry) continue; if (!fd->handler) - tid_rb_remove(fd, &node->mmu, fd->mm); + tid_rb_remove(fd, &node->mmu); else hfi1_mmu_rb_remove(fd->handler, &node->mmu); @@ -1028,8 +1027,7 @@ static int tid_rb_insert(void *arg, struct mmu_rb_node *node) return 0; } -static void tid_rb_remove(void *arg, struct mmu_rb_node *node, - struct mm_struct *mm) +static void tid_rb_remove(void *arg, struct mmu_rb_node *node) { struct hfi1_filedata *fdata = arg; struct tid_rb_node *tnode = diff --git a/drivers/infiniband/hw/hfi1/user_sdma.c b/drivers/infiniband/hw/hfi1/user_sdma.c index 751aa2260c1c..0ecf27903dc2 100644 --- a/drivers/infiniband/hw/hfi1/user_sdma.c +++ b/drivers/infiniband/hw/hfi1/user_sdma.c @@ -310,7 +310,7 @@ static bool sdma_rb_filter(struct mmu_rb_node *, unsigned long, unsigned long); static int sdma_rb_insert(void *, struct mmu_rb_node *); static int sdma_rb_evict(void *arg, struct mmu_rb_node *mnode, void *arg2, bool *stop); -static void sdma_rb_remove(void *, struct mmu_rb_node *, struct mm_struct *); +static void sdma_rb_remove(void *, struct mmu_rb_node *); static int sdma_rb_invalidate(void *, struct mmu_rb_node *); static struct mmu_rb_ops sdma_rb_ops = { @@ -1643,8 +1643,7 @@ static int sdma_rb_evict(void *arg, struct mmu_rb_node *mnode, return 1; /* remove this node */ } -static void sdma_rb_remove(void *arg, struct mmu_rb_node *mnode, - struct mm_struct *mm) +static void sdma_rb_remove(void *arg, struct mmu_rb_node *mnode) { struct sdma_mmu_node *node = container_of(mnode, struct sdma_mmu_node, rb);