Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754725AbdDRDUW (ORCPT ); Mon, 17 Apr 2017 23:20:22 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:32869 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753726AbdDRDUU (ORCPT ); Mon, 17 Apr 2017 23:20:20 -0400 From: "Aneesh Kumar K.V" To: kbuild test robot Cc: kbuild-all@01.org, akpm@linux-foundation.org, mpe@ellerman.id.au, Naoya Horiguchi , Anshuman Khandual , linux-mm@kvack.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 5/7] mm/follow_page_mask: Add support for hugepage directory entry In-Reply-To: <201704180224.jNqHZuTL%fengguang.wu@intel.com> References: <201704180224.jNqHZuTL%fengguang.wu@intel.com> Date: Tue, 18 Apr 2017 08:49:14 +0530 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable x-cbid: 17041803-0052-0000-0000-0000022E8313 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17041803-0053-0000-0000-000008089EB4 Message-Id: <87a87eh07h.fsf@skywalker.in.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-04-18_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1704180028 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4066 Lines: 118 kbuild test robot writes: > Hi Aneesh, > > [auto build test ERROR on linus/master] > [also build test ERROR on v4.11-rc7 next-20170413] > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] > > url: https://github.com/0day-ci/linux/commits/Aneesh-Kumar-K-V/HugeTLB-migration-support-for-PPC64/20170418-011540 > config: x86_64-randconfig-a0-04180109 (attached as .config) > compiler: gcc-4.4 (Debian 4.4.7-8) 4.4.7 > reproduce: > # save the attached .config to linux build tree > make ARCH=x86_64 > > All errors (new ones prefixed by >>): > > In file included from mm//swap.c:35: >>> include/linux/hugetlb.h:121: error: expected declaration specifiers or '...' before 'hugepd_t' > > vim +121 include/linux/hugetlb.h > > 115 unsigned long addr, unsigned long sz); > 116 pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr); > 117 int huge_pmd_unshare(struct mm_struct *mm, unsigned long *addr, pte_t *ptep); > 118 struct page *follow_huge_addr(struct mm_struct *mm, unsigned long address, > 119 int write); > 120 struct page *follow_huge_pd(struct vm_area_struct *vma, > > 121 unsigned long address, hugepd_t hpd, > 122 int flags, int pdshift); > 123 struct page *follow_huge_pmd(struct mm_struct *mm, unsigned long address, > 124 pmd_t *pmd, int flags); > Thanks for the report. How about >From 64033ea38962f69271169129277bbb0482299c31 Mon Sep 17 00:00:00 2001 From: "Aneesh Kumar K.V" Date: Tue, 18 Apr 2017 08:39:09 +0530 Subject: [PATCH] mm/hugetlb: Move default definition of hugepd_t earlier in the header This enable to use the hugepd_t type early. No functional change in this patch. Signed-off-by: Aneesh Kumar K.V --- include/linux/hugetlb.h | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index edab98f0a7b8..f66c1d4e0d1f 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -14,6 +14,30 @@ struct ctl_table; struct user_struct; struct mmu_gather; +#ifndef is_hugepd +/* + * Some architectures requires a hugepage directory format that is + * required to support multiple hugepage sizes. For example + * a4fe3ce76 "powerpc/mm: Allow more flexible layouts for hugepage pagetables" + * introduced the same on powerpc. This allows for a more flexible hugepage + * pagetable layout. + */ +typedef struct { unsigned long pd; } hugepd_t; +#define is_hugepd(hugepd) (0) +#define __hugepd(x) ((hugepd_t) { (x) }) +static inline int gup_huge_pd(hugepd_t hugepd, unsigned long addr, + unsigned pdshift, unsigned long end, + int write, struct page **pages, int *nr) +{ + return 0; +} +#else +extern int gup_huge_pd(hugepd_t hugepd, unsigned long addr, + unsigned pdshift, unsigned long end, + int write, struct page **pages, int *nr); +#endif + + #ifdef CONFIG_HUGETLB_PAGE #include @@ -222,29 +246,6 @@ static inline int pud_write(pud_t pud) } #endif -#ifndef is_hugepd -/* - * Some architectures requires a hugepage directory format that is - * required to support multiple hugepage sizes. For example - * a4fe3ce76 "powerpc/mm: Allow more flexible layouts for hugepage pagetables" - * introduced the same on powerpc. This allows for a more flexible hugepage - * pagetable layout. - */ -typedef struct { unsigned long pd; } hugepd_t; -#define is_hugepd(hugepd) (0) -#define __hugepd(x) ((hugepd_t) { (x) }) -static inline int gup_huge_pd(hugepd_t hugepd, unsigned long addr, - unsigned pdshift, unsigned long end, - int write, struct page **pages, int *nr) -{ - return 0; -} -#else -extern int gup_huge_pd(hugepd_t hugepd, unsigned long addr, - unsigned pdshift, unsigned long end, - int write, struct page **pages, int *nr); -#endif - #define HUGETLB_ANON_FILE "anon_hugepage" enum { -- 2.7.4