Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp404092img; Wed, 20 Mar 2019 03:10:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqzxlIIV94qDvSmNzpexfE3Oq6zs9QZqFiGijBRtR2KxVfSfPaRFanWDhcXyF3z3lh0kXXg5 X-Received: by 2002:a17:902:9f83:: with SMTP id g3mr7249595plq.296.1553076620836; Wed, 20 Mar 2019 03:10:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553076620; cv=none; d=google.com; s=arc-20160816; b=U6phX8WHzahwqVUPquyUnyb13Z926SGp6ugUygEezAE4rRmliCJFFXCRwOgwYpjM66 2OyQVgJLg/3HlrFU1w5aJgH6k94KggDfi8rqE2u3nBKg0UCEtt9iCcnIbrSUGq9LQo8C DIAy8UaeL9mQn2k0D+qEulY4n2y1lHVBT0MkBRGCsvtf1RGns3j+nRzu3iqodm4zDHrN pNcHqko5itZqWPF7gMC+rUjTGPQkXPAxjq9eKlTA2VG9fl988LzG9ffOAyrgzq6NcpHI fp5iTABc3spGoTQQL2rc3/J2/UKU4WFu6bYmkqrPeHqpsm2BWHDip2de/BrqWafR4SIi iJNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:references :in-reply-to:message-id:dkim-signature; bh=G6Vm/3quih74L835clIz7+C2d4LubKm1kUwxVvftonk=; b=eA49QhKWOi4W302TUJ6xWyERpI4MgyEWAn0wW8i6+UR7jXXXlOZlO4JcSHnIWZedm+ gS8fPsDdACYEKEFZOEYkltIEuIjPhFdp+pTcV0v068x3ccRRskl13HVjgZBoS2SECWqx eDglFP1eGX48mC/xhWcpLYGPnaiXn6+hXNDdtHeS8UYLryr104TnpQd3yuXs93V308LM V3gcq29mLxqA8EcQeJaXq9j8JItK/aaU/rfgxvkb1vyhxl2eegjFbI4xOOOGsQZWOZaf hwlQFjSXozaE0mbTsso6u43ghauF3ztpzdmjCRR2InIPiZWv2tzQ04u+Ie4c/OlchPI/ xCtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@c-s.fr header.s=mail header.b=WEERk3BI; 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 d1si1238670pgo.592.2019.03.20.03.10.05; Wed, 20 Mar 2019 03:10:20 -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=@c-s.fr header.s=mail header.b=WEERk3BI; 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 S1727744AbfCTKIa (ORCPT + 99 others); Wed, 20 Mar 2019 06:08:30 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:8626 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726981AbfCTKGr (ORCPT ); Wed, 20 Mar 2019 06:06:47 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 44PQYw35xMz9vC08; Wed, 20 Mar 2019 11:06:44 +0100 (CET) Authentication-Results: localhost; dkim=pass reason="1024-bit key; insecure key" header.d=c-s.fr header.i=@c-s.fr header.b=WEERk3BI; dkim-adsp=pass; dkim-atps=neutral X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id IhHOa7War9FV; Wed, 20 Mar 2019 11:06:44 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 44PQYw1YR5z9vByx; Wed, 20 Mar 2019 11:06:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=c-s.fr; s=mail; t=1553076404; bh=G6Vm/3quih74L835clIz7+C2d4LubKm1kUwxVvftonk=; h=In-Reply-To:References:From:Subject:To:Cc:Date:From; b=WEERk3BIZxygxDK9j3MgygRPyy4S9ln9RgO8mISuv9HDLu9EbUu38cxSiyimX73VQ sXScJIX9wNxCUhPgvRoH7F1Tha04KoprV9GZI1BBRF/V7r9wupjeuDENFEBTHOOelm mn7a/Q3sAPk7QWiINuqCSEq0b2hVB/s4E05XB768= Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 526FD8B918; Wed, 20 Mar 2019 11:06:45 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id MkCT2cVLQ8dw; Wed, 20 Mar 2019 11:06:45 +0100 (CET) Received: from po16846vm.idsi0.si.c-s.fr (unknown [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 2B36D8B911; Wed, 20 Mar 2019 11:06:45 +0100 (CET) Received: by po16846vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 148E963AEF; Wed, 20 Mar 2019 10:06:45 +0000 (UTC) Message-Id: <46d3ca037a741f2278289f4b8c7ff74a4b20e361.1553076180.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy Subject: [PATCH v1 09/27] powerpc/mm: make hugetlbpage.c depend on CONFIG_HUGETLB_PAGE To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , aneesh.kumar@linux.ibm.com Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Wed, 20 Mar 2019 10:06:45 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The only function in hugetlbpage.c which doesn't depend on CONFIG_HUGETLB_PAGE is gup_hugepte(), and this function is only called from gup_huge_pd() which depends on CONFIG_HUGETLB_PAGE so all the content of hugetlbpage.c depends on CONFIG_HUGETLB_PAGE. This patch modifies Makefile to only compile hugetlbpage.c when CONFIG_HUGETLB_PAGE is set. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/Makefile | 2 +- arch/powerpc/mm/hugetlbpage.c | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/powerpc/mm/Makefile b/arch/powerpc/mm/Makefile index 2c23d1ece034..20b900537fc9 100644 --- a/arch/powerpc/mm/Makefile +++ b/arch/powerpc/mm/Makefile @@ -33,7 +33,7 @@ obj-$(CONFIG_PPC_FSL_BOOK3E) += fsl_booke_mmu.o obj-$(CONFIG_NEED_MULTIPLE_NODES) += numa.o obj-$(CONFIG_PPC_SPLPAR) += vphn.o obj-$(CONFIG_PPC_MM_SLICES) += slice.o -obj-y += hugetlbpage.o +obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o ifdef CONFIG_HUGETLB_PAGE obj-$(CONFIG_PPC_BOOK3S_64) += hugetlbpage-hash64.o obj-$(CONFIG_PPC_RADIX_MMU) += hugetlbpage-radix.o diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c index 202ae006aa39..6d9751b188c1 100644 --- a/arch/powerpc/mm/hugetlbpage.c +++ b/arch/powerpc/mm/hugetlbpage.c @@ -26,9 +26,6 @@ #include #include - -#ifdef CONFIG_HUGETLB_PAGE - #define PAGE_SHIFT_64K 16 #define PAGE_SHIFT_512K 19 #define PAGE_SHIFT_8M 23 @@ -757,8 +754,6 @@ void flush_dcache_icache_hugepage(struct page *page) } } -#endif /* CONFIG_HUGETLB_PAGE */ - int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long addr, unsigned long end, int write, struct page **pages, int *nr) { -- 2.13.3