From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F425C433E0 for ; Sun, 7 Jun 2020 15:34:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 8CE3320663 for ; Sun, 7 Jun 2020 15:34:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8CE3320663 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id DE12680008; Sun, 7 Jun 2020 11:34:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D90F380007; Sun, 7 Jun 2020 11:34:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C80DB80008; Sun, 7 Jun 2020 11:34:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0124.hostedemail.com [216.40.44.124]) by kanga.kvack.org (Postfix) with ESMTP id B15D380007 for ; Sun, 7 Jun 2020 11:34:57 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 6F10F180B1654 for ; Sun, 7 Jun 2020 15:34:57 +0000 (UTC) X-FDA: 76902813834.19.snake25_3103cbc26db2 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin19.hostedemail.com (Postfix) with ESMTP id 38D5BD4A82 for ; Sun, 7 Jun 2020 15:34:57 +0000 (UTC) X-HE-Tag: snake25_3103cbc26db2 X-Filterd-Recvd-Size: 16100 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by imf16.hostedemail.com (Postfix) with ESMTP for ; Sun, 7 Jun 2020 15:34:56 +0000 (UTC) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 057FX7xv029151; Sun, 7 Jun 2020 11:34:52 -0400 Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 31g7p3b495-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 07 Jun 2020 11:34:52 -0400 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.16.0.42/8.16.0.42) with SMTP id 057FKkis022944; Sun, 7 Jun 2020 15:34:50 GMT Received: from b06cxnps4076.portsmouth.uk.ibm.com (d06relay13.portsmouth.uk.ibm.com [9.149.109.198]) by ppma04ams.nl.ibm.com with ESMTP id 31g2s7tc2j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 07 Jun 2020 15:34:49 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 057FYlJn59899992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 7 Jun 2020 15:34:47 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id AFDF011C04C; Sun, 7 Jun 2020 15:34:47 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7436B11C04A; Sun, 7 Jun 2020 15:34:46 +0000 (GMT) Received: from linux.ibm.com (unknown [9.145.77.208]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTPS; Sun, 7 Jun 2020 15:34:46 +0000 (GMT) Date: Sun, 7 Jun 2020 18:34:43 +0300 From: Mike Rapoport To: kernel test robot Cc: kbuild-all@lists.01.org, Johannes Weiner , Andrew Morton , Linux Memory Management List Subject: Re: [hnaz-linux-mm:master 432/544] arch/powerpc/include/asm/nohash/32/pgtable.h:237:37: error: implicit declaration of function 'pgd_offset'; did you mean Message-ID: <20200607153443.GB738695@linux.ibm.com> References: <202006071413.AYGlhYXM%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006071413.AYGlhYXM%lkp@intel.com> X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.216,18.0.687 definitions=2020-06-07_09:2020-06-04,2020-06-07 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 malwarescore=0 spamscore=0 bulkscore=0 priorityscore=1501 adultscore=0 mlxlogscore=999 impostorscore=0 suspectscore=0 cotscore=-2147483648 lowpriorityscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2004280000 definitions=main-2006070119 X-Rspamd-Queue-Id: 38D5BD4A82 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Sun, Jun 07, 2020 at 02:18:26PM +0800, kernel test robot wrote: > tree: https://github.com/hnaz/linux-mm master > head: 82f0963cec9bc87571b9666fee12a6a2e47d1193 > commit: aecd6390e2fec5d15dea7c20a8d44d3a00ace96e [432/544] mm: consolidate pgd_index() and pgd_offset{_k}() definitions > config: powerpc-randconfig-r035-20200607 (attached as .config) > compiler: powerpc-linux-gcc (GCC) 9.3.0 > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > git checkout aecd6390e2fec5d15dea7c20a8d44d3a00ace96e > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All error/warnings (new ones prefixed by >>, old ones prefixed by <<): > > In file included from arch/powerpc/include/asm/nohash/pgtable.h:8, > from arch/powerpc/include/asm/pgtable.h:20, > from include/linux/pgtable.h:6, > from arch/powerpc/include/asm/kup.h:42, > from arch/powerpc/include/asm/uaccess.h:9, > from include/linux/uaccess.h:11, > from include/linux/crypto.h:21, > from include/crypto/hash.h:11, > from include/linux/uio.h:10, > from include/linux/socket.h:8, > from include/linux/compat.h:15, > from arch/powerpc/kernel/asm-offsets.c:14: > arch/powerpc/include/asm/nohash/32/pgtable.h: In function 'pte_update': > << from arch/powerpc/include/asm/nohash/32/pgtable.h:5, > >> arch/powerpc/include/asm/nohash/32/pgtable.h:237:37: error: implicit declaration of function 'pgd_offset'; did you mean 'pmd_offset'? [-Werror=implicit-function-declaration] > 237 | pmd_t *pmd = pmd_offset(pud_offset(pgd_offset(mm, addr), addr), addr); > | ^~~~~~~~~~ > | pmd_offset > << from arch/powerpc/include/asm/nohash/32/pgtable.h:5, > >> arch/powerpc/include/asm/nohash/32/pgtable.h:237:37: warning: passing argument 1 of 'pud_offset' makes pointer from integer without a cast [-Wint-conversion] > 237 | pmd_t *pmd = pmd_offset(pud_offset(pgd_offset(mm, addr), addr), addr); > | ^~~~~~~~~~~~~~~~~~~~ > | | > | int Argh, this didn't show up just a few days ago...:( All I can suggest is to restore pgd_index() and pgd_offset() macros like Stephen did in next-20200605 and then look for a better solution after merge window is over... >From 84a833eaacd3593c2487fc6ce5b5dfe5873dfed6 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Thu, 4 Jun 2020 21:06:11 +1000 Subject: [PATCH] mm-consolidate-pgd_index-and-pgd_offset_k-definitions-fix-3 Signed-off-by: Stephen Rothwell --- arch/powerpc/include/asm/nohash/32/pgtable.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/asm/nohash/32/pgtable.h b/arch/powerpc/include/asm/nohash/32/pgtable.h index 7e60bcb8fc26..1927e1b653f2 100644 --- a/arch/powerpc/include/asm/nohash/32/pgtable.h +++ b/arch/powerpc/include/asm/nohash/32/pgtable.h @@ -205,6 +205,9 @@ static inline void pmd_clear(pmd_t *pmdp) *pmdp = __pmd(0); } +/* to find an entry in a page-table-directory */ +#define pgd_index(address) ((address) >> PGDIR_SHIFT) +#define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address)) /* * PTE updates. This function is called whenever an existing @@ -234,7 +237,7 @@ static inline pte_basic_t pte_update(struct mm_struct *mm, unsigned long addr, p pte_basic_t old = pte_val(*p); pte_basic_t new = (old & ~(pte_basic_t)clr) | set; int num, i; - pmd_t *pmd = pmd_offset(pud_offset(pgd_offset(mm, addr), addr), addr); + pmd_t *pmd = pmd_offset(pud_offset(p4d_offset(pgd_offset(mm, addr), addr), addr), addr); if (!huge) num = PAGE_SIZE / SZ_4K; -- 2.26.2 > In file included from include/asm-generic/pgtable-nopmd.h:7, > from arch/powerpc/include/asm/nohash/32/pgtable.h:5, > from arch/powerpc/include/asm/nohash/pgtable.h:8, > from arch/powerpc/include/asm/pgtable.h:20, > from include/linux/pgtable.h:6, > from arch/powerpc/include/asm/kup.h:42, > from arch/powerpc/include/asm/uaccess.h:9, > from include/linux/uaccess.h:11, > from include/linux/crypto.h:21, > from include/crypto/hash.h:11, > from include/linux/uio.h:10, > from include/linux/socket.h:8, > from include/linux/compat.h:15, > from arch/powerpc/kernel/asm-offsets.c:14: > include/asm-generic/pgtable-nopud.h:42:40: note: expected 'p4d_t *' {aka 'struct *'} but argument is of type 'int' > 42 | static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address) > | ~~~~~~~^~~ > cc1: some warnings being treated as errors > make[2]: *** [scripts/Makefile.build:114: arch/powerpc/kernel/asm-offsets.s] Error 1 > make[2]: Target '__build' not remade because of errors. > make[1]: *** [Makefile:1168: prepare0] Error 2 > make[1]: Target 'prepare' not remade because of errors. > make: *** [Makefile:185: __sub-make] Error 2 > > vim +237 arch/powerpc/include/asm/nohash/32/pgtable.h > > f281b5d50c87ec arch/powerpc/include/asm/pgtable-ppc32.h Aneesh Kumar K.V 2015-12-01 207 > f281b5d50c87ec arch/powerpc/include/asm/pgtable-ppc32.h Aneesh Kumar K.V 2015-12-01 208 > f88df14b1f15cd include/asm-powerpc/pgtable-ppc32.h David Gibson 2007-04-30 209 /* > c605782b1c3f1c arch/powerpc/include/asm/pgtable-ppc32.h Benjamin Herrenschmidt 2009-03-10 210 * PTE updates. This function is called whenever an existing > c605782b1c3f1c arch/powerpc/include/asm/pgtable-ppc32.h Benjamin Herrenschmidt 2009-03-10 211 * valid PTE is updated. This does -not- include set_pte_at() > c605782b1c3f1c arch/powerpc/include/asm/pgtable-ppc32.h Benjamin Herrenschmidt 2009-03-10 212 * which nowadays only sets a new PTE. > c605782b1c3f1c arch/powerpc/include/asm/pgtable-ppc32.h Benjamin Herrenschmidt 2009-03-10 213 * > c605782b1c3f1c arch/powerpc/include/asm/pgtable-ppc32.h Benjamin Herrenschmidt 2009-03-10 214 * Depending on the type of MMU, we may need to use atomic updates > c605782b1c3f1c arch/powerpc/include/asm/pgtable-ppc32.h Benjamin Herrenschmidt 2009-03-10 215 * and the PTE may be either 32 or 64 bit wide. In the later case, > c605782b1c3f1c arch/powerpc/include/asm/pgtable-ppc32.h Benjamin Herrenschmidt 2009-03-10 216 * when using atomic updates, only the low part of the PTE is > c605782b1c3f1c arch/powerpc/include/asm/pgtable-ppc32.h Benjamin Herrenschmidt 2009-03-10 217 * accessed atomically. > f88df14b1f15cd include/asm-powerpc/pgtable-ppc32.h David Gibson 2007-04-30 218 * > c605782b1c3f1c arch/powerpc/include/asm/pgtable-ppc32.h Benjamin Herrenschmidt 2009-03-10 219 * In addition, on 44x, we also maintain a global flag indicating > c605782b1c3f1c arch/powerpc/include/asm/pgtable-ppc32.h Benjamin Herrenschmidt 2009-03-10 220 * that an executable user mapping was modified, which is needed > c605782b1c3f1c arch/powerpc/include/asm/pgtable-ppc32.h Benjamin Herrenschmidt 2009-03-10 221 * to properly flush the virtually tagged instruction cache of > c605782b1c3f1c arch/powerpc/include/asm/pgtable-ppc32.h Benjamin Herrenschmidt 2009-03-10 222 * those implementations. > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 223 * > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 224 * On the 8xx, the page tables are a bit special. For 16k pages, we have > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 225 * 4 identical entries. For 512k pages, we have 128 entries as if it was > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 226 * 4k pages, but they are flagged as 512k pages for the hardware. > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 227 * For other page sizes, we have a single entry in the table. > f88df14b1f15cd include/asm-powerpc/pgtable-ppc32.h David Gibson 2007-04-30 228 */ > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 229 #ifdef CONFIG_PPC_8xx > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 230 static inline pte_basic_t pte_update(struct mm_struct *mm, unsigned long addr, pte_t *p, > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 231 unsigned long clr, unsigned long set, int huge) > f88df14b1f15cd include/asm-powerpc/pgtable-ppc32.h David Gibson 2007-04-30 232 { > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 233 pte_basic_t *entry = &p->pte; > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 234 pte_basic_t old = pte_val(*p); > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 235 pte_basic_t new = (old & ~(pte_basic_t)clr) | set; > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 236 int num, i; > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 @237 pmd_t *pmd = pmd_offset(pud_offset(pgd_offset(mm, addr), addr), addr); > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 238 > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 239 if (!huge) > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 240 num = PAGE_SIZE / SZ_4K; > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 241 else if ((pmd_val(*pmd) & _PMD_PAGE_MASK) != _PMD_PAGE_8M) > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 242 num = SZ_512K / SZ_4K; > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 243 else > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 244 num = 1; > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 245 > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 246 for (i = 0; i < num; i++, entry++, new += SZ_4K) > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 247 *entry = new; > 1bc54c03117b90 include/asm-powerpc/pgtable-ppc32.h Benjamin Herrenschmidt 2008-07-08 248 > f88df14b1f15cd include/asm-powerpc/pgtable-ppc32.h David Gibson 2007-04-30 249 return old; > f88df14b1f15cd include/asm-powerpc/pgtable-ppc32.h David Gibson 2007-04-30 250 } > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 251 #else > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 252 static inline pte_basic_t pte_update(struct mm_struct *mm, unsigned long addr, pte_t *p, > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 253 unsigned long clr, unsigned long set, int huge) > f88df14b1f15cd include/asm-powerpc/pgtable-ppc32.h David Gibson 2007-04-30 254 { > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 255 pte_basic_t old = pte_val(*p); > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 256 pte_basic_t new = (old & ~(pte_basic_t)clr) | set; > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 257 > 1158b8c9d53efa arch/powerpc/include/asm/nohash/32/pgtable.h Andrew Morton 2020-06-04 258 *p = __pte(new); > 1bc54c03117b90 include/asm-powerpc/pgtable-ppc32.h Benjamin Herrenschmidt 2008-07-08 259 > > :::::: The code at line 237 was first introduced by commit > :::::: 1158b8c9d53efaf6059d77ccc8cf9b9bcdab8437 linux-next > > :::::: TO: Andrew Morton > :::::: CC: Johannes Weiner > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org -- Sincerely yours, Mike.