Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1227890ybi; Wed, 3 Jul 2019 11:46:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqxV0JNJSLLaO/A8OSBK30og9xOm3wml8czUusNznSmxhmCnQ8yMkv/uZPMFDXLfI2iPS/HY X-Received: by 2002:a65:4304:: with SMTP id j4mr8482530pgq.419.1562179597395; Wed, 03 Jul 2019 11:46:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562179597; cv=none; d=google.com; s=arc-20160816; b=N/uMpOQYiwHOVrM3xn7J3H7f0YGo/Cts7hWxdCjrcH5Wbu8sNgipcgsRYSddgY1iOj lmOq4VVWbnyD9zto3D7X9dW/jbKGVfEqANcdEe18uA2SyxlzaDvTSntvSjvJ5tygcn8t jJlboPNajXsQEtjILF0CR182OjF6R0Vr82mvT+CZc1w/rwi44tRnmWHtqlDwd72zFLls THp/0x+9P1n3VU5iiKvwHrEWruFPBu5xfjtKtKDoFc/FcAjjO3pRg4UFyZZdFfEUW6Nf oZEemFUMS+FzQr7AFERFBeAlvlXmrUaTA4ExanL0TwG72YIibf1bD7uhTg3MlLU/hkto ipRA== 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=6gkdMJihz+BKdhYSYDXoVp/HUiw1Ip+q05LF7yiN7rY=; b=D3S+3qLv97aZrxP+F+ate2jR6t4b+KO96QOkY/AoDVW9vsJsUoN4oZwZvAodIi5BbL YGExpnajpR+SoQb5EdlOV6aAtqIWjUAqJa02K8mXrquU/KPfpUXqIsxgw/HlblDnNSx1 w7JIG4jHjohEGz6P24466pfKz6EhX4XOoKZiypXzuQjeBIkqTWumoJ1AubkpdWBtHAbc 1dqV+3Qa+xpPkXmN34uoAWTsaw0BB2Uyq4q2gqZurFGc2zKG2ou99eaSows2XVdJMeCl rKq+Vrsag2yvf4/74EZOhNn9sbMNiCBjN5EnpRYf8aDg4jdNpXBVtgB8Vq8QekWDXl91 zdOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ucKTI3Jt; 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 m68si3079156pfb.75.2019.07.03.11.46.22; Wed, 03 Jul 2019 11:46:37 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=ucKTI3Jt; 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 S1727241AbfGCSp0 (ORCPT + 99 others); Wed, 3 Jul 2019 14:45:26 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:57562 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727099AbfGCSpJ (ORCPT ); Wed, 3 Jul 2019 14:45:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=6gkdMJihz+BKdhYSYDXoVp/HUiw1Ip+q05LF7yiN7rY=; b=ucKTI3Jt8HPKO6aQAQZ7BDiOrL JA4m8aEc2YkLhNz0//fOAOG6Y8t08qWufStZFGqAnWYxKPOi0a76+qnTmd5O02jnsQMB5pruHubyf /2+F0XgKJFWuWREiSjqaFDrVOJKlrABvu7R9hLTeiH+ikhD5ICmo7sxkL1FVc71ucDmxQPaEFEyXT Ibj/z7a8efuY6jJeoXi/uVQ2G5dcgrA2Efgd5ddEDS4sqPaWFIEnuaEOAns4nwG8p0iebCG9bj478 2Tqro3odGJdmIAeBqlMIQ3X+fYxnvypX3SWREdvaaSH7rNfG4Y+OliRWm7B5/p0tE6DBihH2aXHBw So0kvONg==; Received: from rap-us.hgst.com ([199.255.44.250] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hikFc-0007IN-2j; Wed, 03 Jul 2019 18:45:04 +0000 From: Christoph Hellwig To: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Jason Gunthorpe , Ben Skeggs Cc: linux-mm@kvack.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/5] mm: remove the legacy hmm_pfn_* APIs Date: Wed, 3 Jul 2019 11:45:02 -0700 Message-Id: <20190703184502.16234-6-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190703184502.16234-1-hch@lst.de> References: <20190703184502.16234-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Switch the one remaining user in nouveau over to its replacement, and remove all the wrappers. Signed-off-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe --- drivers/gpu/drm/nouveau/nouveau_dmem.c | 2 +- include/linux/hmm.h | 34 -------------------------- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c b/drivers/gpu/drm/nouveau/nouveau_dmem.c index 42c026010938..b9ced2e61667 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dmem.c +++ b/drivers/gpu/drm/nouveau/nouveau_dmem.c @@ -844,7 +844,7 @@ nouveau_dmem_convert_pfn(struct nouveau_drm *drm, struct page *page; uint64_t addr; - page = hmm_pfn_to_page(range, range->pfns[i]); + page = hmm_device_entry_to_page(range, range->pfns[i]); if (page == NULL) continue; diff --git a/include/linux/hmm.h b/include/linux/hmm.h index 657606f48796..cdcd78627393 100644 --- a/include/linux/hmm.h +++ b/include/linux/hmm.h @@ -290,40 +290,6 @@ static inline uint64_t hmm_device_entry_from_pfn(const struct hmm_range *range, range->flags[HMM_PFN_VALID]; } -/* - * Old API: - * hmm_pfn_to_page() - * hmm_pfn_to_pfn() - * hmm_pfn_from_page() - * hmm_pfn_from_pfn() - * - * This are the OLD API please use new API, it is here to avoid cross-tree - * merge painfullness ie we convert things to new API in stages. - */ -static inline struct page *hmm_pfn_to_page(const struct hmm_range *range, - uint64_t pfn) -{ - return hmm_device_entry_to_page(range, pfn); -} - -static inline unsigned long hmm_pfn_to_pfn(const struct hmm_range *range, - uint64_t pfn) -{ - return hmm_device_entry_to_pfn(range, pfn); -} - -static inline uint64_t hmm_pfn_from_page(const struct hmm_range *range, - struct page *page) -{ - return hmm_device_entry_from_page(range, page); -} - -static inline uint64_t hmm_pfn_from_pfn(const struct hmm_range *range, - unsigned long pfn) -{ - return hmm_device_entry_from_pfn(range, pfn); -} - /* * Mirroring: how to synchronize device page table with CPU page table. * -- 2.20.1