Received: by 10.192.165.148 with SMTP id m20csp651750imm; Fri, 4 May 2018 04:18:31 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqC9a24nRjRdpwgkL6YkN7GNJ3SycrCftMMMFkeayOv3Kqthga0J7g10DS24J/+Izphf2xp X-Received: by 2002:a17:902:7c94:: with SMTP id y20-v6mr27732594pll.56.1525432711152; Fri, 04 May 2018 04:18:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525432711; cv=none; d=google.com; s=arc-20160816; b=bSu0XXoaohB1DRCD3Vvcnv6FrRZbL7yMKhLwlJ262rs3K4thw05++MyI9xxBIr2OjZ 7AP9fl4gxYXJ74sP89Lh3b7Rxbtzepxsl/tN4SYipgYjtznyHIjQh5NFrAITb6gEMjea WLA1qthYreAout/1fwVoAW27H2BvSbTfQFTOOyLS/sZL9jkNvy+CCnkrWI7wXmaTZLJZ vAEPF0ryQUsN1HPsA/cA7sJEBh0m6wbXAV/KCGVB2KRfpdZjMXKyJfSIhZYUicO9I9JN Gd6kFU0hECln9rcrq9bq4KHZbmVqHHxucTy0HIO4vfWPfwbiBL+7K3pHsKEY6veBdMio 2fag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:arc-authentication-results; bh=oRd0aq/FsW0D4Dvvdto/3DQZg6TPxhi20DTrfmYSbGI=; b=ImtJ3Iy31lVz4wikbsqc4TlpWlK+1hPS5a2WJm851sUxG6FW3g6x+ALbM14PVBdVw/ c/zWqkrdcnTByYnAubDtZja0wxVM4ecn4hX5UX+1D1Ldqx7PzFZfgNe89R/TTR4/d/lA cy6FMA9fPz81WZOvwEiAhgq7Z49J3Zbqex3qvqX8zdFFf8UU1iWHi39sAopQhTOt19AT eifKRFPMMH0xeGauepvC+iLx7cpJeoDdKJ9M018es2jx32MHFDB9glPIgeR73/xStVCo zLJZEkbobmCiiXDncQlXu+d5XBRkfmU4kbeI2ghNUg57vCVTPKVb1W/HW0eDuj6IbQew 4qbg== 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 w9-v6si14641217plk.28.2018.05.04.04.18.16; Fri, 04 May 2018 04:18:31 -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 S1751261AbeEDLSF (ORCPT + 99 others); Fri, 4 May 2018 07:18:05 -0400 Received: from ozlabs.org ([203.11.71.1]:47589 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750820AbeEDLSE (ORCPT ); Fri, 4 May 2018 07:18:04 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 40cqHr4fbVz9rvt; Fri, 4 May 2018 21:18:00 +1000 (AEST) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ellerman.id.au From: Michael Ellerman To: kbuild test robot , Christophe Leroy Cc: kbuild-all@01.org, Benjamin Herrenschmidt , Paul Mackerras , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 1/3] powerpc/nohash: remove hash related code from nohash headers. In-Reply-To: <201804270438.utPklxgP%fengguang.wu@intel.com> References: <02633d43f29e1ba01865cd334216dc8efb8b4b11.1524587425.git.christophe.leroy@c-s.fr> <201804270438.utPklxgP%fengguang.wu@intel.com> Date: Fri, 04 May 2018 21:17:58 +1000 Message-ID: <878t8z8yah.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org kbuild test robot writes: > Hi Christophe, > > Thank you for the patch! Yet something to improve: > > [auto build test ERROR on powerpc/next] > [also build test ERROR on v4.17-rc2 next-20180426] > [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/Christophe-Leroy/powerpc-nohash-remove-hash-related-code-from-nohash-headers/20180425-182026 > base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next > config: powerpc-ppc64e_defconfig (attached as .config) > compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 > reproduce: > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > make.cross ARCH=powerpc > > All errors (new ones prefixed by >>): > > In file included from arch/powerpc/include/asm/nohash/pgtable.h:6:0, > from arch/powerpc/include/asm/pgtable.h:19, > from include/linux/memremap.h:8, > from include/linux/mm.h:27, > from include/linux/mman.h:5, > from arch/powerpc/kernel/asm-offsets.c:22: > arch/powerpc/include/asm/nohash/64/pgtable.h: In function '__ptep_test_and_clear_young': >>> arch/powerpc/include/asm/nohash/64/pgtable.h:214:6: error: implicit declaration of function 'pte_young'; did you mean 'pte_pud'? [-Werror=implicit-function-declaration] > if (pte_young(*ptep)) > ^~~~~~~~~ > pte_pud Urk. There's a circular dependency here. I fixed it with the patch below, which seems to be the least worst solution. Possibly we can clean things up further in future. cheers diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h index 140f8e74b478..987a658b18e1 100644 --- a/arch/powerpc/include/asm/nohash/32/pgtable.h +++ b/arch/powerpc/include/asm/nohash/32/pgtable.h @@ -267,6 +267,11 @@ static inline void __ptep_set_access_flags(struct mm_struct *mm, pte_update(ptep, clr, set); } +static inline int pte_young(pte_t pte) +{ + return pte_val(pte) & _PAGE_ACCESSED; +} + #define __HAVE_ARCH_PTE_SAME #define pte_same(A,B) ((pte_val(A) ^ pte_val(B)) == 0) diff --git a/arch/powerpc/include/asm/nohash/64/pgtable.h b/arch/powerpc/include/asm/nohash/64/pgtable.h index e8de7cb4d3fb..6ac8381f4c7a 100644 --- a/arch/powerpc/include/asm/nohash/64/pgtable.h +++ b/arch/powerpc/include/asm/nohash/64/pgtable.h @@ -204,6 +204,11 @@ static inline unsigned long pte_update(struct mm_struct *mm, return old; } +static inline int pte_young(pte_t pte) +{ + return pte_val(pte) & _PAGE_ACCESSED; +} + static inline int __ptep_test_and_clear_young(struct mm_struct *mm, unsigned long addr, pte_t *ptep) { diff --git a/arch/powerpc/include/asm/nohash/pgtable.h b/arch/powerpc/include/asm/nohash/pgtable.h index 077472640b35..2160be2e4339 100644 --- a/arch/powerpc/include/asm/nohash/pgtable.h +++ b/arch/powerpc/include/asm/nohash/pgtable.h @@ -17,7 +17,6 @@ static inline int pte_write(pte_t pte) } static inline int pte_read(pte_t pte) { return 1; } static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; } -static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; } static inline int pte_special(pte_t pte) { return pte_val(pte) & _PAGE_SPECIAL; } static inline int pte_none(pte_t pte) { return (pte_val(pte) & ~_PTE_NONE_MASK) == 0; } static inline pgprot_t pte_pgprot(pte_t pte) { return __pgprot(pte_val(pte) & PAGE_PROT_BITS); }