Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp4686925ybh; Tue, 6 Aug 2019 16:17:59 -0700 (PDT) X-Google-Smtp-Source: APXvYqwre0pLU10r9xqyAK24nPVHSH3lDWuY5ZU6P/xuaOroZ7ZvzvZLFxyGrlambrTg02TVGM/i X-Received: by 2002:a63:2006:: with SMTP id g6mr5013730pgg.287.1565133479707; Tue, 06 Aug 2019 16:17:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565133479; cv=none; d=google.com; s=arc-20160816; b=o6b52WHizbCuJU6JHZ2fe7F1A0FXfh36Hm743FJ+CAsbUrFELk4JXz0+ezbP9ImQBb VfsyU5/trFy9bKlwSuM5wsP3lsBwF9BNd3nSt6dsSJtscgi6aS4irhZ8W5OirpYCMwdo igSqnkluiyQr6GoWRqHAkVANSjhtK5AC+NtkEJTWi8RpS84T92eN79TE0xfMpl3EeBVe lX7qlcRoYnapsBhUemc/+8q8uldxyJNEo1N1TKdZ+i3kHFQ2NuKT1UkZuxY6k+OKD8st JspsBOC0q7TUUacpNUMFuky/7ApqC6zWLvOS2AV9iiPyUdCusqrHy+TSu1VdtcvvcPXN FFkQ== 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 :dkim-signature; bh=pkHeCt/hoSJAt//UHPk0X0I7hZeOiqjMeNu5wqmOhVU=; b=icS+oIJ7GRMA01GPNUXxRSD5/2V99oc0IyVLUOGf7JVKtUS4UXTO4FnBzsw66MzDDt wMgEjYBpp5XHV2z5fVVEHxC/yhdqanVOTkD9jZl2smV6T8eDZukX0hi858jWG6re5pqN tkEh7lCYwsSOh1r96sGbquBjpgMvoDtHUCYlBaIZHXqml3SyLJfCNZ3Zrm/OKonzPxox Anip2b2TREXfJIznIWbChWQoxVxFNgpxzjOtgOjcCDB6Hy2G1xum86ehMkRaNTL7VLhi 9wa2zpbOm8DY0ScSknlxXpyC6B+NWJZg0BMDZEbGtqMiH0VMdUvMToB5lAVHblpYnL0Y k8EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=EO1RyLd4; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 19si12978523pgw.163.2019.08.06.16.17.44; Tue, 06 Aug 2019 16:17:59 -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; dkim=pass header.i=@ziepe.ca header.s=google header.b=EO1RyLd4; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727593AbfHFXQw (ORCPT + 99 others); Tue, 6 Aug 2019 19:16:52 -0400 Received: from mail-qt1-f194.google.com ([209.85.160.194]:41914 "EHLO mail-qt1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726686AbfHFXQS (ORCPT ); Tue, 6 Aug 2019 19:16:18 -0400 Received: by mail-qt1-f194.google.com with SMTP id d17so7513944qtj.8 for ; Tue, 06 Aug 2019 16:16:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pkHeCt/hoSJAt//UHPk0X0I7hZeOiqjMeNu5wqmOhVU=; b=EO1RyLd4d0AnXDRqElYRzxtyKz38WeGeNBRIkYdo+3VFgs/T0oIQs20Zy/5GKhTnqI UfyYPmrt29HX9vdxZVEwKEX/vOCaV33r4IcvjjLv+dvBVpY91WnTDcNJXzjaMgjBsFFt FdxAfV5Xk74BDXvs4obq2oP6Eu9zK7wtAWH8j4mJyF0Ged8Qf759ly97ojGQOxxLbF+m EBz8VKm2ELuy2OvTFchRCVHhBVH+J3NM3xKbJA1b+9RKe4syO0dO8Tpu7jcVbUS84W+G X1zRmwp67vSBaYZNs5bfg6X3fWLEdZzDSXoP+HJcr6VhTvigDkmOWFIoLfep3TCPpIME lbKg== 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=pkHeCt/hoSJAt//UHPk0X0I7hZeOiqjMeNu5wqmOhVU=; b=Ysstzi2OGvmFh/gH3603tWSfgRfgcolcqAi4hCWg2TubljmFNgi97p2X1wQZx9+0jf qgCUi1GPscYhTsZRI1xbEZgcZ6Y9H7BYp0wsCRrlOQvDZsbRVgasXzOZnSZx6WFYDlot cqmtAxORXYtbSjz/zqNjduBs8BoFHA43VDg1TdNqBRMFlQfq3nTrg5FeLxDv6p3g0C65 nELGLjfqihiu157jsGcp8o6hMY1MniHtSkwerFPQ/SsVuPvibkrI5rpskeFYrKFwyfjU Aj63lpIk5XT+1h5Z1W8091xxP+ZFTyslnI3sD6oTpHTEPKbMNelMSY4uPreKBEA/TWpl Hewg== X-Gm-Message-State: APjAAAUfwSpJXyF7uwaByCAREsjokNFkgFgl3/tx3CmPQM7sEk9OkeDO YMznCFQyvXUz8DWw/YEROW11Vg== X-Received: by 2002:ac8:2b01:: with SMTP id 1mr5497725qtu.177.1565133377682; Tue, 06 Aug 2019 16:16:17 -0700 (PDT) Received: from ziepe.ca (hlfxns017vw-156-34-55-100.dhcp-dynamic.fibreop.ns.bellaliant.net. [156.34.55.100]) by smtp.gmail.com with ESMTPSA id r14sm36816958qkm.100.2019.08.06.16.16.14 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 06 Aug 2019 16:16:17 -0700 (PDT) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1hv8gg-0006fG-Jc; Tue, 06 Aug 2019 20:16:14 -0300 From: Jason Gunthorpe To: linux-mm@kvack.org Cc: Andrea Arcangeli , Christoph Hellwig , John Hubbard , =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Ralph Campbell , "Kuehling, Felix" , Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , "David (ChunMing) Zhou" , Dimitri Sivanich , dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org, iommu@lists.linux-foundation.org, intel-gfx@lists.freedesktop.org, Gavin Shan , Andrea Righi , Jason Gunthorpe Subject: [PATCH v3 hmm 11/11] mm/mmu_notifiers: remove unregister_no_release Date: Tue, 6 Aug 2019 20:15:48 -0300 Message-Id: <20190806231548.25242-12-jgg@ziepe.ca> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190806231548.25242-1-jgg@ziepe.ca> References: <20190806231548.25242-1-jgg@ziepe.ca> 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 From: Jason Gunthorpe mmu_notifier_unregister_no_release() and mmu_notifier_call_srcu() no longer have any users, they have all been converted to use mmu_notifier_put(). So delete this difficult to use interface. Signed-off-by: Jason Gunthorpe --- include/linux/mmu_notifier.h | 5 ----- mm/mmu_notifier.c | 31 ------------------------------- 2 files changed, 36 deletions(-) diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index 31aa971315a142..52929e5ef70826 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h @@ -271,8 +271,6 @@ extern int __mmu_notifier_register(struct mmu_notifier *mn, struct mm_struct *mm); extern void mmu_notifier_unregister(struct mmu_notifier *mn, struct mm_struct *mm); -extern void mmu_notifier_unregister_no_release(struct mmu_notifier *mn, - struct mm_struct *mm); extern void __mmu_notifier_mm_destroy(struct mm_struct *mm); extern void __mmu_notifier_release(struct mm_struct *mm); extern int __mmu_notifier_clear_flush_young(struct mm_struct *mm, @@ -513,9 +511,6 @@ static inline void mmu_notifier_range_init(struct mmu_notifier_range *range, set_pte_at(___mm, ___address, __ptep, ___pte); \ }) -extern void mmu_notifier_call_srcu(struct rcu_head *rcu, - void (*func)(struct rcu_head *rcu)); - #else /* CONFIG_MMU_NOTIFIER */ struct mmu_notifier_range { diff --git a/mm/mmu_notifier.c b/mm/mmu_notifier.c index 4a770b5211b71d..2ec48f8ba9e288 100644 --- a/mm/mmu_notifier.c +++ b/mm/mmu_notifier.c @@ -21,18 +21,6 @@ /* global SRCU for all MMs */ DEFINE_STATIC_SRCU(srcu); -/* - * This function allows mmu_notifier::release callback to delay a call to - * a function that will free appropriate resources. The function must be - * quick and must not block. - */ -void mmu_notifier_call_srcu(struct rcu_head *rcu, - void (*func)(struct rcu_head *rcu)) -{ - call_srcu(&srcu, rcu, func); -} -EXPORT_SYMBOL_GPL(mmu_notifier_call_srcu); - /* * This function can't run concurrently against mmu_notifier_register * because mm->mm_users > 0 during mmu_notifier_register and exit_mmap @@ -453,25 +441,6 @@ void mmu_notifier_unregister(struct mmu_notifier *mn, struct mm_struct *mm) } EXPORT_SYMBOL_GPL(mmu_notifier_unregister); -/* - * Same as mmu_notifier_unregister but no callback and no srcu synchronization. - */ -void mmu_notifier_unregister_no_release(struct mmu_notifier *mn, - struct mm_struct *mm) -{ - spin_lock(&mm->mmu_notifier_mm->lock); - /* - * Can not use list_del_rcu() since __mmu_notifier_release - * can delete it before we hold the lock. - */ - hlist_del_init_rcu(&mn->hlist); - spin_unlock(&mm->mmu_notifier_mm->lock); - - BUG_ON(atomic_read(&mm->mm_count) <= 0); - mmdrop(mm); -} -EXPORT_SYMBOL_GPL(mmu_notifier_unregister_no_release); - static void mmu_notifier_free_rcu(struct rcu_head *rcu) { struct mmu_notifier *mn = container_of(rcu, struct mmu_notifier, rcu); -- 2.22.0