Received: by 10.192.165.148 with SMTP id m20csp731120imm; Fri, 4 May 2018 05:38:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpVfhRqp6BTccxrI00wWYe1/q+BPF9G3MXfOATIu1wibekg5noUszTs7Czt1B8RkLLWnZP6 X-Received: by 2002:a17:902:3a5:: with SMTP id d34-v6mr28188310pld.103.1525437530944; Fri, 04 May 2018 05:38:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525437530; cv=none; d=google.com; s=arc-20160816; b=cyHaRJmD6c7MGQiSUQjHaMz1p+6qu2aSR4Uqi2OvEo+jKsI7RhXZ7IoBQHEM5My2Tv wPpE2PannXdSKNLO419UDULZfqc6KN2KSURVtJRr4MIUKESsVaLdJkzjyZ8cc0nVZCPu 2UIsr4DW3WDUXMq3QF4VsABIvJvEAyGMr4WZughwAALKYXLThY3tcQL8qk694yjqBw91 HekIYlEE4thQ6PltxkrndVpYX/z395gPLKMg4arw8sFxrSICGrIB4jopU1MPgoygYC6I lH/GPvqW7C54oRIlrF0genlOCOsXgD/b0tCDa8TYx2yHpMyyLPLMNbNAJJVVzK6qwSML UZ7A== 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:cc:to:subject:arc-authentication-results; bh=/p7h/cy7WDPqxNHWAZH3y1YA7upN7zZ7yYDeO/QLDxs=; b=c72FXE0QpmOSNdMgUnoa6pEE1dJL1eOdFe6+WkO3l2JhUbJDG9scWRMscbtQ/WANjn Ix4jvMY5HevGRbNN+2gfXJgEtatZOJfN9G7+WbDerxiHYk0dBm+1Z8vO83JOWBvYgZZh Z4EEIiT6b4wB3ojX9lQeaYHMdu6KUSBy9xWaxKK0cbey7oC4xSCgZpluvu8yIZFCtAp7 Gv6l3cpmO1EHAEKyOMp915jR9UdjL1i7/SAHWnBd7+PrIdFYrzr5ik+runZ5H5bdhWV/ CgSGUVnQkDlCZdomwQymeauBiFT9DrvQx+PAOKEulLDSbtan+9rPnoSk4LHIa0J4Rk9R RrhQ== 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 f15-v6si13592923pgu.455.2018.05.04.05.38.36; Fri, 04 May 2018 05:38:50 -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 S1751936AbeEDMgB (ORCPT + 99 others); Fri, 4 May 2018 08:36:01 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:21049 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751890AbeEDMfq (ORCPT ); Fri, 4 May 2018 08:35:46 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 40cs1T5Ljfz9ttC1; Fri, 4 May 2018 14:35:41 +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 yFNqzP1mzn7m; Fri, 4 May 2018 14:35:41 +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 40cs1T3ln4z9ty7k; Fri, 4 May 2018 14:35:41 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 572FA8B976; Fri, 4 May 2018 14:35:45 +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 BV3N8RQlZFru; Fri, 4 May 2018 14:35:45 +0200 (CEST) Received: from PO15451 (po15451.idsi0.si.c-s.fr [172.25.231.2]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 307408B972; Fri, 4 May 2018 14:35:45 +0200 (CEST) Subject: Re: [PATCH 1/3] powerpc/nohash: remove hash related code from nohash headers. To: Michael Ellerman , kbuild test robot Cc: kbuild-all@01.org, Benjamin Herrenschmidt , Paul Mackerras , linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org References: <02633d43f29e1ba01865cd334216dc8efb8b4b11.1524587425.git.christophe.leroy@c-s.fr> <201804270438.utPklxgP%fengguang.wu@intel.com> <878t8z8yah.fsf@concordia.ellerman.id.au> From: Christophe LEROY Message-ID: <7b5e3ac5-57d8-d846-247b-422858c01016@c-s.fr> Date: Fri, 4 May 2018 14:35:45 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <878t8z8yah.fsf@concordia.ellerman.id.au> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 04/05/2018 à 13:17, Michael Ellerman a écrit : > 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. Oops, I just sent you a new version of the patch not using pte_young() anymore. I'll let you decide what to do. Christophe > > 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); } >