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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6455C54E58 for ; Sat, 23 Mar 2024 17:25:17 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F3A646B0082; Sat, 23 Mar 2024 13:25:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id EEA036B0083; Sat, 23 Mar 2024 13:25:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DD9A26B0085; Sat, 23 Mar 2024 13:25:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id CA30F6B0082 for ; Sat, 23 Mar 2024 13:25:16 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 63AFEC027D for ; Sat, 23 Mar 2024 17:25:16 +0000 (UTC) X-FDA: 81928979832.21.5DE9F9D Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by imf20.hostedemail.com (Postfix) with ESMTP id 0AB381C001B for ; Sat, 23 Mar 2024 17:25:12 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="ipXL/M1B"; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf20.hostedemail.com: domain of lkp@intel.com designates 198.175.65.13 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1711214713; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=MhebtwWdkxOizSCStZTU3VEtvznv9hze9POiG7oza5s=; b=JZXuvDgifx7rFqb2+q5v4FGrD8sPxoEmF4DCjGnFPB+jgF0JH92tPQY9pd23Kr76voVbFj liZXLH8JV5cjjyPoains+IyjQbo4lMXy8eRBfY4XcbnDKd+dYvwQ/PmVZ/fsXp9RE31Eh9 tDwD4aZcu3/3IpMly2Rn7WjyHWg1ydM= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b="ipXL/M1B"; dmarc=pass (policy=none) header.from=intel.com; spf=pass (imf20.hostedemail.com: domain of lkp@intel.com designates 198.175.65.13 as permitted sender) smtp.mailfrom=lkp@intel.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1711214713; a=rsa-sha256; cv=none; b=5cBT6bXAD+2byy0F2m89tra859eZNLhbb0hnfSojH7/T+WmqM17xLIMxn4S5qqXClHVUCC GDucoyktLMXPnkTQqyoFnudTCzTwoeJVRhZo9BIcASkup8iyUux6yUVw7rSE2r9MLqfjd6 2cDQVVZKgxkZbbOm2uqVHc1ADaY7JyY= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1711214714; x=1742750714; h=date:from:to:cc:subject:message-id:mime-version; bh=hviwBbuUr8hjaMvZWjLfwOXvR7XIaZxob1bgRLPS9ig=; b=ipXL/M1BsKXazw+GbvWkcZzu0m9wyWHtuW8KnMGmjMswLFQ6k6q0S27Q /iQc9/Ejnq0icpGD8cj1liPCPBve9kJu54Vmy6h58DDzT6gnsjxzEXsPM Kt6NyzcI26a1+mo+NhlXGWyQ7ltXuq6ZisjX1yyuGSGBhSWCzjyFbwco7 1rC669sKGYt66UWnWTkKAb/fQiD6tmpTzDdUFoqhbiWK8cXPz5MFIJEms uUiHe+Z1qwf3xYVbLLpOZA1C2AYonmL/DTi2pqpwEdq3wJtdDiYnmGqya g/E6pUvzzr9QmTVjJ78/GzhmWFHNc874U+2abfD/krzKLqg52Yimy172s Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11022"; a="17395658" X-IronPort-AV: E=Sophos;i="6.07,149,1708416000"; d="scan'208";a="17395658" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Mar 2024 10:25:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,149,1708416000"; d="scan'208";a="52658717" Received: from lkp-server01.sh.intel.com (HELO b21307750695) ([10.239.97.150]) by orviesa001.jf.intel.com with ESMTP; 23 Mar 2024 10:25:09 -0700 Received: from kbuild by b21307750695 with local (Exim 4.96) (envelope-from ) id 1ro57C-000LMX-25; Sat, 23 Mar 2024 17:25:06 +0000 Date: Sun, 24 Mar 2024 01:24:25 +0800 From: kernel test robot To: Peter Xu Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev, Andrew Morton , Linux Memory Management List , Jason Gunthorpe Subject: [akpm-mm:mm-unstable 115/141] mm/gup.c:536:22: error: call to undeclared function 'pud_pfn'; ISO C99 and later do not support implicit function declarations Message-ID: <202403240112.kHKVSfCL-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Rspamd-Queue-Id: 0AB381C001B X-Rspam-User: X-Rspamd-Server: rspam02 X-Stat-Signature: 3nyfj58i4sqj9yafumigjjeogfddnryh X-HE-Tag: 1711214712-460083 X-HE-Meta: U2FsdGVkX18VKHI54fVydjcGUsAi4V5RjbJZ4ST5dH/PWzCnQtUoEWJlCoXYPJpODLXrOROVqRw3pvjKCyKO7Psu1tofhVAyZ6NuzftzbDFej13AGEZm2lLmaZHAJdG8kHX6CmanH+/VlMsnDZ24j3mFrfK8cw01AclWbpChqHH3Rx2mk7XzktTLjRTYcqsYGpw40wpUkhNdIGYdAQL6d6ScaLw3O7GkJN5fO+zBSeRwD7nnWI641impS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LUXN6Bne9SRFubAp6VwJeKM0M91/4yLQ9hj57RC7pw 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: List-Subscribe: List-Unsubscribe: tree: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-unstable head: af520f81c51001f7ccdf0579fc73df282b26292d commit: 529f3b89b7333564792458ca7be06f5bff258d23 [115/141] mm/gup: handle huge pud for follow_pud_mask() config: powerpc-tqm8xx_defconfig (https://download.01.org/0day-ci/archive/20240324/202403240112.kHKVSfCL-lkp@intel.com/config) compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 23de3862dce582ce91c1aa914467d982cb1a73b4) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240324/202403240112.kHKVSfCL-lkp@intel.com/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot | Closes: https://lore.kernel.org/oe-kbuild-all/202403240112.kHKVSfCL-lkp@intel.com/ All errors (new ones prefixed by >>): 209 | __do_insw | ^ arch/powerpc/include/asm/io.h:610:56: note: expanded from macro '__do_insw' 610 | #define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) | ~~~~~~~~~~~~~~~~~~~~~^ In file included from mm/gup.c:9: In file included from include/linux/pagemap.h:11: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:672: arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 47 | DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 48 | (p, b, c), pio, p) | ~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:669:3: note: expanded from macro 'DEF_PCI_AC_NORET' 669 | __do_##name al; \ | ^~~~~~~~~~~~~~ :211:1: note: expanded from here 211 | __do_insl | ^ arch/powerpc/include/asm/io.h:611:56: note: expanded from macro '__do_insl' 611 | #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) | ~~~~~~~~~~~~~~~~~~~~~^ In file included from mm/gup.c:9: In file included from include/linux/pagemap.h:11: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:672: arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 49 | DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 50 | (p, b, c), pio, p) | ~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:669:3: note: expanded from macro 'DEF_PCI_AC_NORET' 669 | __do_##name al; \ | ^~~~~~~~~~~~~~ :213:1: note: expanded from here 213 | __do_outsb | ^ arch/powerpc/include/asm/io.h:612:58: note: expanded from macro '__do_outsb' 612 | #define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) | ~~~~~~~~~~~~~~~~~~~~~^ In file included from mm/gup.c:9: In file included from include/linux/pagemap.h:11: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:672: arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 51 | DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 52 | (p, b, c), pio, p) | ~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:669:3: note: expanded from macro 'DEF_PCI_AC_NORET' 669 | __do_##name al; \ | ^~~~~~~~~~~~~~ :215:1: note: expanded from here 215 | __do_outsw | ^ arch/powerpc/include/asm/io.h:613:58: note: expanded from macro '__do_outsw' 613 | #define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) | ~~~~~~~~~~~~~~~~~~~~~^ In file included from mm/gup.c:9: In file included from include/linux/pagemap.h:11: In file included from include/linux/highmem.h:12: In file included from include/linux/hardirq.h:11: In file included from arch/powerpc/include/asm/hardirq.h:6: In file included from include/linux/irq.h:20: In file included from include/linux/io.h:13: In file included from arch/powerpc/include/asm/io.h:672: arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] 53 | DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c), | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 54 | (p, b, c), pio, p) | ~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:669:3: note: expanded from macro 'DEF_PCI_AC_NORET' 669 | __do_##name al; \ | ^~~~~~~~~~~~~~ :217:1: note: expanded from here 217 | __do_outsl | ^ arch/powerpc/include/asm/io.h:614:58: note: expanded from macro '__do_outsl' 614 | #define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) | ~~~~~~~~~~~~~~~~~~~~~^ In file included from mm/gup.c:19: include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 47 | __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~ ^ ~~~ include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 49 | NR_ZONE_LRU_BASE + lru, nr_pages); | ~~~~~~~~~~~~~~~~ ^ ~~~ >> mm/gup.c:536:22: error: call to undeclared function 'pud_pfn'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] 536 | unsigned long pfn = pud_pfn(pud); | ^ mm/gup.c:536:22: note: did you mean 'pte_pfn'? arch/powerpc/include/asm/pgtable.h:60:29: note: 'pte_pfn' declared here 60 | static inline unsigned long pte_pfn(pte_t pte) | ^ 9 warnings and 1 error generated. vim +/pud_pfn +536 mm/gup.c 527 528 #ifdef CONFIG_PGTABLE_HAS_HUGE_LEAVES 529 static struct page *follow_huge_pud(struct vm_area_struct *vma, 530 unsigned long addr, pud_t *pudp, 531 int flags, struct follow_page_context *ctx) 532 { 533 struct mm_struct *mm = vma->vm_mm; 534 struct page *page; 535 pud_t pud = *pudp; > 536 unsigned long pfn = pud_pfn(pud); 537 int ret; 538 539 assert_spin_locked(pud_lockptr(mm, pudp)); 540 541 if ((flags & FOLL_WRITE) && !pud_write(pud)) 542 return NULL; 543 544 if (!pud_present(pud)) 545 return NULL; 546 547 pfn += (addr & ~PUD_MASK) >> PAGE_SHIFT; 548 549 if (IS_ENABLED(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD) && 550 pud_devmap(pud)) { 551 /* 552 * device mapped pages can only be returned if the caller 553 * will manage the page reference count. 554 * 555 * At least one of FOLL_GET | FOLL_PIN must be set, so 556 * assert that here: 557 */ 558 if (!(flags & (FOLL_GET | FOLL_PIN))) 559 return ERR_PTR(-EEXIST); 560 561 if (flags & FOLL_TOUCH) 562 touch_pud(vma, addr, pudp, flags & FOLL_WRITE); 563 564 ctx->pgmap = get_dev_pagemap(pfn, ctx->pgmap); 565 if (!ctx->pgmap) 566 return ERR_PTR(-EFAULT); 567 } 568 569 page = pfn_to_page(pfn); 570 571 if (!pud_devmap(pud) && !pud_write(pud) && 572 gup_must_unshare(vma, flags, page)) 573 return ERR_PTR(-EMLINK); 574 575 ret = try_grab_page(page, flags); 576 if (ret) 577 page = ERR_PTR(ret); 578 else 579 ctx->page_mask = HPAGE_PUD_NR - 1; 580 581 return page; 582 } 583 #else /* CONFIG_PGTABLE_HAS_HUGE_LEAVES */ 584 static struct page *follow_huge_pud(struct vm_area_struct *vma, 585 unsigned long addr, pud_t *pudp, 586 int flags, struct follow_page_context *ctx) 587 { 588 return NULL; 589 } 590 #endif /* CONFIG_PGTABLE_HAS_HUGE_LEAVES */ 591 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki