Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4498110ybi; Tue, 30 Jul 2019 03:08:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqzoJZOh9hjUbnR4EmTHwDYWBLi1F02nFha+UTClqC1ZGLeQofR2hN2rOmFFyveN8Bv/ychg X-Received: by 2002:a17:90a:8c90:: with SMTP id b16mr115577496pjo.133.1564481281992; Tue, 30 Jul 2019 03:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564481281; cv=none; d=google.com; s=arc-20160816; b=SBOMd16KK+xHvBT4f4mu43JolmnTOqXNIp+UFF2qQfjtWNIPzGvZbiW5o5JBwtkYQc VLSB94PpLzNno4P0wjC8B8BMIcTmHU0mCCoKtSvmkzWX7FeOGvBfLtmvJpOe1M3GNNJB mD46DIS1EgHOsqe9/E8ci5c29SC+bmyVjcxsWvwEAbeAUv1SJuYYRBueb9RPI63/S2G3 wkU7W+BDSBm7lw8PsOYQtwSR6Dw75cyI7e5rHnDmsWL2tc0KHwEd2wU8p1ZHpljLPAPO 8f8iGzh2NFUDiM6zoyz/9eCAYQrqSyzSYs0r37ZayKNMlZhhdUgv1nr9fLuD9HOE1Qjm GtXQ== 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=WWqUlWBk9SeNDsTgchqiBvCPPdXQGby4eLwA4l1Wn/c=; b=KuRbn/87vpBlyg+BX+56PF3NQxMgZUWIuDL+K9lDmZsLqvxpnJ9liQR73Kp2C/jWoB kqaigCxur8+XRtU9hyy0RxPaurnRgZ/PBk3Tdj39xLqp+h4i9dCDX6i3cWDbjDgatzwN oVYKGGl7aTIgS0ajgQ/mTYLE3pJGH7mydT2ETS1eBfCjHZFVYUUzVDsbItVTx9ohsS85 8BdyS6zjIEf7teMvZXjzF4iYTkkRG0k4uMvkBfONF0be88RkSEPXkb1fZiIdOMR53iGo m9QcpTfoknrMwTziWjPFn15lp3sxSbGD9NLJ0qlaOTixv6FVvox8ioRp6obdVHXATgLv RP5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=UQt+nBOC; 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 q26si29214571pgm.188.2019.07.30.03.07.47; Tue, 30 Jul 2019 03:08:01 -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=UQt+nBOC; 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 S1729713AbfG3Fwy (ORCPT + 99 others); Tue, 30 Jul 2019 01:52:54 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47008 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729685AbfG3Fwv (ORCPT ); Tue, 30 Jul 2019 01:52:51 -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=WWqUlWBk9SeNDsTgchqiBvCPPdXQGby4eLwA4l1Wn/c=; b=UQt+nBOCFLuTt9lR9m80f7mUgE lS9m/3kgkBnUgWm075wpjDvoWcfsvGjj6XNdiPu0xYJSsIR91F3EVZwqjOtGPHT3tWlZR1g4Z/KQV sMdXE4d3yo6a78yBkEuoY1UtuG8aYk83pTsB59Pqnw9yKDyyqlzcymrOVg3Ou7ovmKyZvBhF6NEzZ YLcfiBi183KQGYbKJQFVbR+/FEJmnM8Cf0NcQFhzluMjCVBfbn7EewshSuoqwtxhgBLdNx+a/2VgS 05Skzq6tlpaW0rNMPwXleuGdfG+87MF1AAS0XJXPfCY9/nfdHzoMBWXoCqJG0YWhBv5LN55u8SyqL DNIqFunQ==; Received: from [195.167.85.94] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hsL43-0001QQ-Bt; Tue, 30 Jul 2019 05:52:47 +0000 From: Christoph Hellwig To: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Jason Gunthorpe , Ben Skeggs , Felix Kuehling Cc: Ralph Campbell , linux-mm@kvack.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 11/13] mm: cleanup the hmm_vma_handle_pmd stub Date: Tue, 30 Jul 2019 08:52:01 +0300 Message-Id: <20190730055203.28467-12-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190730055203.28467-1-hch@lst.de> References: <20190730055203.28467-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 Stub out the whole function when CONFIG_TRANSPARENT_HUGEPAGE is not set to make the function easier to read. Signed-off-by: Christoph Hellwig --- mm/hmm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index 4d3bd41b6522..f4e90ea5779f 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -455,13 +455,10 @@ static inline uint64_t pmd_to_hmm_pfn_flags(struct hmm_range *range, pmd_t pmd) range->flags[HMM_PFN_VALID]; } -static int hmm_vma_handle_pmd(struct mm_walk *walk, - unsigned long addr, - unsigned long end, - uint64_t *pfns, - pmd_t pmd) -{ #ifdef CONFIG_TRANSPARENT_HUGEPAGE +static int hmm_vma_handle_pmd(struct mm_walk *walk, unsigned long addr, + unsigned long end, uint64_t *pfns, pmd_t pmd) +{ struct hmm_vma_walk *hmm_vma_walk = walk->private; struct hmm_range *range = hmm_vma_walk->range; struct dev_pagemap *pgmap = NULL; @@ -490,11 +487,14 @@ static int hmm_vma_handle_pmd(struct mm_walk *walk, put_dev_pagemap(pgmap); hmm_vma_walk->last = end; return 0; -#else - /* If THP is not enabled then we should never reach this code ! */ +} +#else /* CONFIG_TRANSPARENT_HUGEPAGE */ +static int hmm_vma_handle_pmd(struct mm_walk *walk, unsigned long addr, + unsigned long end, uint64_t *pfns, pmd_t pmd) +{ return -EINVAL; -#endif } +#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ static inline uint64_t pte_to_hmm_pfn_flags(struct hmm_range *range, pte_t pte) { -- 2.20.1