From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751535AbcDRIot (ORCPT ); Mon, 18 Apr 2016 04:44:49 -0400 Received: from e28smtp09.in.ibm.com ([125.16.236.9]:45885 "EHLO e28smtp09.in.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750931AbcDRIos (ORCPT ); Mon, 18 Apr 2016 04:44:48 -0400 X-IBM-Helo: d28relay08.in.ibm.com X-IBM-MailFrom: khandual@linux.vnet.ibm.com X-IBM-RcptTo: linux-kernel@vger.kernel.org Message-ID: <57149E68.5020207@linux.vnet.ibm.com> Date: Mon, 18 Apr 2016 14:14:24 +0530 From: Anshuman Khandual User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: kbuild test robot CC: dave.hansen@intel.com, mgorman@techsingularity.net, hughd@google.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kbuild-all@01.org, kirill@shutemov.name, n-horiguchi@ah.jp.nec.com, linuxppc-dev@lists.ozlabs.org, akpm@linux-foundation.org, aneesh.kumar@linux.vnet.ibm.com Subject: Re: [PATCH 03/10] mm/hugetlb: Protect follow_huge_(pud|pgd) functions from race References: <201604071717.fjhqVZh6%fengguang.wu@intel.com> In-Reply-To: <201604071717.fjhqVZh6%fengguang.wu@intel.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-TM-AS-MML: disable x-cbid: 16041808-0041-0000-0000-00000C1A19E0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/07/2016 02:46 PM, kbuild test robot wrote: > Hi Anshuman, > > [auto build test ERROR on powerpc/next] > [also build test ERROR on v4.6-rc2 next-20160407] > [if your patch is applied to the wrong git tree, please drop us a note to help improving the system] > > url: https://github.com/0day-ci/linux/commits/Anshuman-Khandual/Enable-HugeTLB-page-migration-on-POWER/20160407-165841 > base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next > config: sparc64-allyesconfig (attached as .config) > reproduce: > wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > make.cross ARCH=sparc64 > > All error/warnings (new ones prefixed by >>): > > mm/hugetlb.c: In function 'follow_huge_pgd': >>> >> mm/hugetlb.c:4395:3: error: implicit declaration of function 'pgd_page' [-Werror=implicit-function-declaration] > page = pgd_page(*pgd) + ((address & ~PGDIR_MASK) >> PAGE_SHIFT); > ^ The following change seems to fix the build problem on SPARC but will require some inputs from SPARC maintainers regarding the functional correctness of the patch. diff --git a/arch/sparc/include/asm/pgtable_64.h b/arch/sparc/include/asm/pgtable_64.h index f089cfa..7b7e6a0 100644 --- a/arch/sparc/include/asm/pgtable_64.h +++ b/arch/sparc/include/asm/pgtable_64.h @@ -804,6 +804,7 @@ static inline unsigned long __pmd_page(pmd_t pmd) #define pmd_clear(pmdp) (pmd_val(*(pmdp)) = 0UL) #define pud_present(pud) (pud_val(pud) != 0U) #define pud_clear(pudp) (pud_val(*(pudp)) = 0UL) +#define pgd_page(pgd) (pgd_val(pgd)) #define pgd_page_vaddr(pgd) \ ((unsigned long) __va(pgd_val(pgd))) #define pgd_present(pgd) (pgd_val(pgd) != 0U)