Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp458660imm; Thu, 5 Jul 2018 03:24:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeZYWzrBs+DBM4IUjJyTYijI5zkXg0PVm6fpBmY7ZVnea2QjcKVDqIPE7kY7ZMlIPmNo4jF X-Received: by 2002:aa7:87d0:: with SMTP id i16-v6mr5795341pfo.82.1530786255068; Thu, 05 Jul 2018 03:24:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530786255; cv=none; d=google.com; s=arc-20160816; b=Af+lzLqaBQ6u2dgr2tIcKl5GAmG511m0G8GnXWZG9/8YB/Kqf4S2SmRQPIujAHq7th gvdQmQ5HczfY0SVFdmkLCtiDPBuhqHSnBr4w1e/i1xFDM+c03qUjdam6uWR4w7nU6gi1 BufhXVF9DkebBAV+n8nk6tU+l3Oe7cr21Hl/Ol86oJP/Z7LLkPrAQls1xSNEdjdac/Vo Yf6omBh/DW9IjxmnemaGVLXh841UekdPnQPUwYDhTOAjF1Xw2srW0kj04tQ8NSRE2R6v 8PEF7AnIoCcVKVjGB7CeKP+4LL5p79JA2EaNMxHw8Tof2vGkji3HpvsKSjmTEGrlvrOW Bz+Q== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:arc-authentication-results; bh=TLa/KBkOU+uJ8hQG6nOWIKJZpcP0h5bnMvFBmJlXCeA=; b=VMYnlOLFi6Www5vLt2Qdx6nMeWD3CYehX3613iYcnJOtkaTOonUOEa92t9VvmEECay OxqXhmghC4cjf9s+PIytaGsCvTHOPUSAhWR76caX4Ii/kM8tOjw5q3OoDFlJpN3aptLm lSXQ9dDb59uAUWFjq0tBk+Z4HCWP/qzguuOyLu+yijnhY9ygT6YGDG3jmtX8hJ7Rl1bs sXivL8dNgsZ5BhP8/KwjB/6Yx4VZ16E0liOu5ylkU8C1bVVUmSpNHqWTY28ded1Vj3s+ HChOdlMUfT/kRUN/6PXxLN34zNpB9hlOxz5HdIHmE5XuBzRhBgbSAbZp4KG8VdK5ElB3 ch7w== ARC-Authentication-Results: i=1; mx.google.com; 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 f132-v6si5324112pgc.20.2018.07.05.03.24.00; Thu, 05 Jul 2018 03:24:15 -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; 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 S1753518AbeGEKXL (ORCPT + 99 others); Thu, 5 Jul 2018 06:23:11 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:51495 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753317AbeGEKXJ (ORCPT ); Thu, 5 Jul 2018 06:23:09 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 41Lv7r3Lptz9ttS1; Thu, 5 Jul 2018 12:23:04 +0200 (CEST) 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 btNar2wGZxeY; Thu, 5 Jul 2018 12:23:04 +0200 (CEST) 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 41Lv7r2cDfz9ttBx; Thu, 5 Jul 2018 12:23:04 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id AF59E8B897; Thu, 5 Jul 2018 12:23:05 +0200 (CEST) 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 R6m_1W6ppBel; Thu, 5 Jul 2018 12:23:05 +0200 (CEST) Received: from po14934vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.4]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0DC1A8B88B; Thu, 5 Jul 2018 12:23:05 +0200 (CEST) Subject: Re: [PATCH v3 02/11] hugetlb: Introduce generic version of hugetlb_free_pgd_range To: Alexandre Ghiti , linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, tony.luck@intel.com, fenghua.yu@intel.com, ralf@linux-mips.org, paul.burton@mips.com, jhogan@kernel.org, jejb@parisc-linux.org, deller@gmx.de, benh@kernel.crashing.org, paulus@samba.org, mpe@ellerman.id.au, ysato@users.sourceforge.jp, dalias@libc.org, davem@davemloft.net, tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-ia64@vger.kernel.org, linux-mips@linux-mips.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-arch@vger.kernel.org References: <20180705051640.790-1-alex@ghiti.fr> <20180705051640.790-3-alex@ghiti.fr> From: Christophe Leroy Message-ID: <005bf713-fb51-bf29-5f86-6f244cd49f35@c-s.fr> Date: Thu, 5 Jul 2018 10:22:30 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180705051640.790-3-alex@ghiti.fr> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/05/2018 05:16 AM, Alexandre Ghiti wrote: > arm, arm64, mips, parisc, sh, x86 architectures use the > same version of hugetlb_free_pgd_range, so move this generic > implementation into asm-generic/hugetlb.h. > > Signed-off-by: Alexandre Ghiti Build failure on mpc885_ads_defconfig CC arch/powerpc/kernel/setup-common.o In file included from arch/powerpc/kernel/setup-common.c:37: ./include/linux/hugetlb.h:191:65: error: expected identifier or '(' before '{' token #define hugetlb_free_pgd_range(tlb, addr, end, floor, ceiling) ({BUG(); 0; }) ^ ./include/asm-generic/hugetlb.h:44:20: note: in expansion of macro 'hugetlb_free_pgd_range' static inline void hugetlb_free_pgd_range(struct mmu_gather *tlb, ^~~~~~~~~~~~~~~~~~~~~~ see below > --- > arch/arm/include/asm/hugetlb.h | 12 ++---------- > arch/arm64/include/asm/hugetlb.h | 10 ---------- > arch/ia64/include/asm/hugetlb.h | 5 +++-- > arch/mips/include/asm/hugetlb.h | 13 ++----------- > arch/parisc/include/asm/hugetlb.h | 12 ++---------- > arch/powerpc/include/asm/hugetlb.h | 4 +++- > arch/sh/include/asm/hugetlb.h | 12 ++---------- > arch/sparc/include/asm/hugetlb.h | 4 +++- > arch/x86/include/asm/hugetlb.h | 11 ++--------- > include/asm-generic/hugetlb.h | 11 +++++++++++ > 10 files changed, 30 insertions(+), 64 deletions(-) > [snip] > diff --git a/arch/powerpc/include/asm/hugetlb.h b/arch/powerpc/include/asm/hugetlb.h > index 3225eb6402cc..de46ee16b615 100644 > --- a/arch/powerpc/include/asm/hugetlb.h > +++ b/arch/powerpc/include/asm/hugetlb.h > @@ -4,7 +4,6 @@ > > #ifdef CONFIG_HUGETLB_PAGE > #include > -#include > > extern struct kmem_cache *hugepte_cache; > > @@ -113,6 +112,7 @@ static inline void flush_hugetlb_page(struct vm_area_struct *vma, > void flush_hugetlb_page(struct vm_area_struct *vma, unsigned long vmaddr); > #endif > > +#define __HAVE_ARCH_HUGETLB_FREE_PGD_RANGE > void hugetlb_free_pgd_range(struct mmu_gather *tlb, unsigned long addr, > unsigned long end, unsigned long floor, > unsigned long ceiling); > @@ -193,4 +193,6 @@ static inline pte_t *hugepte_offset(hugepd_t hpd, unsigned long addr, > } > #endif /* CONFIG_HUGETLB_PAGE */ > > +#include > + That include was previously inside #ifdef CONFIG_HUGETLB_PAGE. Why put it outside ? Christophe