Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4273288ybi; Mon, 29 Jul 2019 22:59:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqw4I0E4JARDWBJHm0BIJNqq8ZBcLKWx+TnAmBFdDXUT3jRMuqIs+7ngIBnTcapPdhLFDn34 X-Received: by 2002:aa7:8b52:: with SMTP id i18mr40882950pfd.194.1564466349219; Mon, 29 Jul 2019 22:59:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564466349; cv=none; d=google.com; s=arc-20160816; b=XDExzo3tJwPeJoXpcpiojSJZ4GLTb27LCxkyyvlaAI4r5xl/HxlVybQOMbbITlq0BE 3+akX9EBobJohdoAo5g7sUnHUb2Dgs0JUN1XgAnCDyQrKP14WgLdOvRKH5xBfZ5NNL12 9Oc2CMe07r2TCxUDA7gti99fufeiIC45k8wGY3kPdR54pTlmGH+cRDMkDKhYvthVkB2+ ePoBM4gW0Y2zAVQ7ozmD6amLfxXIZ37ZE85LYx5bCcMYGF0Ffue+vI+A8B4H9zSysehu 2WN7fWHGF6msnlJqlFqZJ9eAM/QZSReABc/s1DbrYZtjK4k4m5IcJVKvo4Q0K/+fG0Dq YRqg== 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=5I6cv8rPAulGunfRGkEsTPG6LGj3MyO3rpoe2rANz8U=; b=V72CYK99BB/1/A3u1ega99mejYaRrSsuH2ptNhCAzO1mCqvNVdPJpdSobqTXNASb+i 3m/y9XMICE67YP4MOv7z8WS28HYbR9p4GjnOW4Gy9g7gTfB4T/YhbkfZCgbCwZ/4wWd1 fwrE9zgJ77YYJAF79mzdkTLlsB3CsNpvZMEJyQqtwWtcFM/pbu4QifFRkoLWBnDJdwPd hkQeDAAfUvpEuaIqRZLvz8TBrSadGypL3FIO2eazTeLguTkv81X4+NG8Pj20hS3kHbAm zI5AbcvGh32Z2LBKi3v75VuuECUW7VlfOhyYn0gE94g5lN4nQLq0CupBnGJCRQ1mcm4Y H2pg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=oDf9sTqL; 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 a1si6019999pgh.570.2019.07.29.22.58.55; Mon, 29 Jul 2019 22:59:09 -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=oDf9sTqL; 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 S1729735AbfG3Fw4 (ORCPT + 99 others); Tue, 30 Jul 2019 01:52:56 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:47276 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728449AbfG3Fwy (ORCPT ); Tue, 30 Jul 2019 01:52:54 -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=5I6cv8rPAulGunfRGkEsTPG6LGj3MyO3rpoe2rANz8U=; b=oDf9sTqLOFXjgtQQfZeUNN/vp5 lCVFV/7Tr8JxHR/pQ+/TMmCyjB6NjzjA2mMLkEkCi7jL4ivm6humWCpK5bUJBpgGkIVEIqxfqPwDM 4YTgjZfSuNSKi4iH6bf2ix1BFnAHfKSiDJt5tuFXYnbRAPanFBN7galzFX5sH/RzaX/Ar5BkCfFvd 41uRDFgvEN7sG3tRwMzHosXwxm3yjKdGtPSFyxJvDop/5dTh5Q/5Zvl1zocmST9V55oZcYCaE7QDT 9yH7K0Mb6/P0GmUwfW3WtYnIUZ9WM04YEB6aiSTy77a+Q6/+Ce1zgMON+82ync3MS6VeeHv8iSw9J klDnrBYw==; Received: from [195.167.85.94] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hsL46-0001T1-B3; Tue, 30 Jul 2019 05:52:50 +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 12/13] mm: cleanup the hmm_vma_walk_hugetlb_entry stub Date: Tue, 30 Jul 2019 08:52:02 +0300 Message-Id: <20190730055203.28467-13-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 and assign NULL to the .hugetlb_entry method if CONFIG_HUGETLB_PAGE is not set, as the method won't ever be called in that case. Signed-off-by: Christoph Hellwig --- mm/hmm.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index f4e90ea5779f..2b56a4af1001 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -769,11 +769,11 @@ static int hmm_vma_walk_pud(pud_t *pudp, unsigned long start, unsigned long end, #define hmm_vma_walk_pud NULL #endif +#ifdef CONFIG_HUGETLB_PAGE static int hmm_vma_walk_hugetlb_entry(pte_t *pte, unsigned long hmask, unsigned long start, unsigned long end, struct mm_walk *walk) { -#ifdef CONFIG_HUGETLB_PAGE unsigned long addr = start, i, pfn; struct hmm_vma_walk *hmm_vma_walk = walk->private; struct hmm_range *range = hmm_vma_walk->range; @@ -812,10 +812,10 @@ static int hmm_vma_walk_hugetlb_entry(pte_t *pte, unsigned long hmask, return hmm_vma_walk_hole_(addr, end, fault, write_fault, walk); return ret; -#else /* CONFIG_HUGETLB_PAGE */ - return -EINVAL; -#endif } +#else +#define hmm_vma_walk_hugetlb_entry NULL +#endif /* CONFIG_HUGETLB_PAGE */ static void hmm_pfns_clear(struct hmm_range *range, uint64_t *pfns, -- 2.20.1