From patchwork Sun Dec 1 01:56:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 11268427 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CD25F17E0 for ; Sun, 1 Dec 2019 01:56:40 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 9AA8C205ED for ; Sun, 1 Dec 2019 01:56:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="07liVXMi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9AA8C205ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6B9466B0358; Sat, 30 Nov 2019 20:56:39 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 669096B035A; Sat, 30 Nov 2019 20:56:39 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 53B3C6B035B; Sat, 30 Nov 2019 20:56:39 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0188.hostedemail.com [216.40.44.188]) by kanga.kvack.org (Postfix) with ESMTP id 36CE16B0358 for ; Sat, 30 Nov 2019 20:56:39 -0500 (EST) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id 00436181AEF0B for ; Sun, 1 Dec 2019 01:56:38 +0000 (UTC) X-FDA: 76214908476.30.wood56_3a06f9e842427 X-Spam-Summary: 2,0,0,c6a8cc69c19b4d9c,d41d8cd98f00b204,akpm@linux-foundation.org,:akpm@linux-foundation.org:ben.dooks@codethink.co.uk:jgg@ziepe.ca::mike.kravetz@oracle.com:mm-commits@vger.kernel.org:mpe@ellerman.id.au:torvalds@linux-foundation.org,RULES_HIT:41:355:379:800:960:967:968:973:988:989:1260:1263:1345:1381:1431:1437:1534:1542:1711:1730:1747:1777:1792:2393:2525:2559:2563:2682:2685:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3353:3865:3866:3867:3868:3870:3871:3872:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4605:5007:6261:6653:7576:7903:8599:9025:9545:10004:10913:11026:11473:11657:11658:11914:12043:12048:12294:12297:12438:12517:12519:12555:12679:12783:12986:13161:13229:13255:13846:14093:14181:14721:14849:21080:21433:21451:21627:21939:30054:30064:30070,0,RBL:error,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:3,LUA_SUMMARY:none X-HE-Tag: wood56_3a06f9e842427 X-Filterd-Recvd-Size: 4249 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf02.hostedemail.com (Postfix) with ESMTP for ; Sun, 1 Dec 2019 01:56:38 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C03E9215F1; Sun, 1 Dec 2019 01:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575165398; bh=uPTonfuwi4BA72Ekh3plL+XMoMqaJXOBm36svPLV29o=; h=Date:From:To:Subject:From; b=07liVXMi4/qhwY/DgE/QFl+TjplyQlvWNzlFKwQ/gUaDL4neTnyiJegBmseeTpFVs ON5mz/tM2/uVDjQ+OdXCdCnKiJ6Wg4M2vooyGF34Qhsn41QKpthGBsAcnmKDgTN1v2 /5Bzj03l+uh6oN1Qceg1RRC4CCnA2epjhbxrwP+Y= Date: Sat, 30 Nov 2019 17:56:37 -0800 From: akpm@linux-foundation.org To: akpm@linux-foundation.org, ben.dooks@codethink.co.uk, jgg@ziepe.ca, linux-mm@kvack.org, mike.kravetz@oracle.com, mm-commits@vger.kernel.org, mpe@ellerman.id.au, torvalds@linux-foundation.org Subject: [patch 125/158] powerpc/mm: remove pmd_huge/pud_huge stubs and include hugetlb.h Message-ID: <20191201015637.F-2eOeVoG%akpm@linux-foundation.org> User-Agent: s-nail v14.8.16 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Mike Kravetz Subject: powerpc/mm: remove pmd_huge/pud_huge stubs and include hugetlb.h Patch series "hugetlbfs: convert macros to static inline, fix sparse warning". The definition for huge_pte_offset() in causes a sparse warning in the !CONFIG_HUGETLB_PAGE. Fix this as well as converting all macros in this block of definitions to static inlines for better type checking. When making the above changes, build errors were found in powerpc due to duplicate definitions. A separate powerpc specific patch is included as a requisite to remove the definitions and get them from . This patch (of 2): This removes the power specific stubs created by commit aad71e3928be ("powerpc/mm: Fix build break with RADIX=y & HUGETLBFS=n") used when !CONFIG_HUGETLB_PAGE. Instead, it addresses the build break by getting the definitions from . This allows the macros in to be replaced with static inlines. Link: http://lkml.kernel.org/r/20191112194558.139389-2-mike.kravetz@oracle.com Signed-off-by: Mike Kravetz Acked-by: Michael Ellerman Cc: Ben Dooks Cc: Jason Gunthorpe Signed-off-by: Andrew Morton --- arch/powerpc/include/asm/book3s/64/pgtable-4k.h | 3 --- arch/powerpc/include/asm/book3s/64/pgtable-64k.h | 3 --- arch/powerpc/mm/book3s64/radix_pgtable.c | 1 + 3 files changed, 1 insertion(+), 6 deletions(-) --- a/arch/powerpc/include/asm/book3s/64/pgtable-4k.h~powerpc-mm-remove-pmd_huge-pud_huge-stubs-and-include-hugetlbh +++ a/arch/powerpc/include/asm/book3s/64/pgtable-4k.h @@ -70,9 +70,6 @@ static inline int get_hugepd_cache_index /* should not reach */ } -#else /* !CONFIG_HUGETLB_PAGE */ -static inline int pmd_huge(pmd_t pmd) { return 0; } -static inline int pud_huge(pud_t pud) { return 0; } #endif /* CONFIG_HUGETLB_PAGE */ #endif /* __ASSEMBLY__ */ --- a/arch/powerpc/include/asm/book3s/64/pgtable-64k.h~powerpc-mm-remove-pmd_huge-pud_huge-stubs-and-include-hugetlbh +++ a/arch/powerpc/include/asm/book3s/64/pgtable-64k.h @@ -59,9 +59,6 @@ static inline int get_hugepd_cache_index BUG(); } -#else /* !CONFIG_HUGETLB_PAGE */ -static inline int pmd_huge(pmd_t pmd) { return 0; } -static inline int pud_huge(pud_t pud) { return 0; } #endif /* CONFIG_HUGETLB_PAGE */ static inline int remap_4k_pfn(struct vm_area_struct *vma, unsigned long addr, --- a/arch/powerpc/mm/book3s64/radix_pgtable.c~powerpc-mm-remove-pmd_huge-pud_huge-stubs-and-include-hugetlbh +++ a/arch/powerpc/mm/book3s64/radix_pgtable.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include