Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp480496imm; Thu, 5 Jul 2018 03:49:57 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeJhAPRa4gv2gZ902bwfNWLOUyhVeAP58NpGK13u+zBS1rOCQLWX4+CepUdUSfB1jV3kYsf X-Received: by 2002:a62:9652:: with SMTP id c79-v6mr5926150pfe.114.1530787797752; Thu, 05 Jul 2018 03:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530787797; cv=none; d=google.com; s=arc-20160816; b=t3gp3poEDkBFIT14zfRqBRpBpU8L5Dw3r9/zDVDnNkhHo2hirO1Si9zL/3To2cW/A6 1lwoox9MMAnyYlRzk5wWhCDU85/HGxfnq7P59jqKp0OC+hWFnfu1s2dyZx1AMLbpdeh0 ElWdmahl1VvLHkZs3eusmAGm/5IMgNTfQJptZ8nLBKE8/22rRrYqGtwy5WZAHJzZ0hmI 2Hw6JQDh4pe8IP9P7zG5HwByPgLrDxFUAYAzy4ybR3klQ1FUSM5xz+WnRowzmpUMbod1 eValHjAc7iuHOkKRXBW1S7Dg+PsA+Jj8qCmB+9MZnzGxPoEQDrj+JBWiE9HYMbZQRXr6 J1Hw== 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:in-reply-to :mime-version:user-agent:date:message-id:references:subject:cc:to :from:arc-authentication-results; bh=V/hYxEhhvCv1XdNvw0NZ+KQf5ZOY+W1oU9YZ0kR5KOE=; b=hcjmC4Grqh3SJd5lDR1xoZcZGrWFowgt9gIKP3x1FOTCOMh1Xp/ciHqF63u2OztBye jLG0lUcuxylx7TkbC2m/umcvB5OmmvbsOWOjXJ8PZeaXdvn8IP9lsZ5XmIIoM5D/reYC qm8Y0yfJvdfmTZ4D5qJxA4Et3WwYRO+gBOEObcMbmjknOHw8UB5Ad0RMnh7zm8/9c1Nt tfJ9I5Ff2In1FCeUw90352giqC7zge8QHHtEWTZhUezbylu4E2XNRrPzRt0nFOr2XKUE a7WQ3tDGiHl2oDTFD6XxGpojuT9YIyYzlc1l6DhXqKBaXnxROjD8FPrjCkXaLLxLMNIA hzyg== 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 g16-v6si4967933pgv.78.2018.07.05.03.49.42; Thu, 05 Jul 2018 03:49:57 -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 S1753658AbeGEKtG (ORCPT + 99 others); Thu, 5 Jul 2018 06:49:06 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:46367 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753461AbeGEKtE (ORCPT ); Thu, 5 Jul 2018 06:49:04 -0400 X-Originating-IP: 79.86.19.127 Received: from [192.168.0.11] (127.19.86.79.rev.sfr.net [79.86.19.127]) (Authenticated sender: alex@ghiti.fr) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 9C159E0002; Thu, 5 Jul 2018 10:48:53 +0000 (UTC) From: Alex Ghiti To: Christophe Leroy Cc: 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 Subject: Re: [PATCH v3 02/11] hugetlb: Introduce generic version of hugetlb_free_pgd_range References: <20180705051640.790-1-alex@ghiti.fr> <20180705051640.790-3-alex@ghiti.fr> <005bf713-fb51-bf29-5f86-6f244cd49f35@c-s.fr> Message-ID: Date: Thu, 5 Jul 2018 10:48:53 +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: <005bf713-fb51-bf29-5f86-6f244cd49f35@c-s.fr> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Level: * Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org My bad, when I moved the #include at the bottom of the file, I did not pay attention to that #ifdef. I'm going to fix powerpc and check other architectures if I did not make the same mistake. I'll send a v4 as soon as possible. Thanks for your comment, Alex On 07/05/2018 10:22 AM, Christophe Leroy wrote: > > > 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 >