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 23AD2C43334 for ; Sat, 16 Jul 2022 00:39:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5E4758E000D; Fri, 15 Jul 2022 20:39:18 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 594CF8E0009; Fri, 15 Jul 2022 20:39:18 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 45D158E000D; Fri, 15 Jul 2022 20:39:18 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id 3815D8E0009 for ; Fri, 15 Jul 2022 20:39:18 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id EC1F86025C for ; Sat, 16 Jul 2022 00:39:17 +0000 (UTC) X-FDA: 79691103954.15.67CF127 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by imf22.hostedemail.com (Postfix) with ESMTP id 18EDCC0087 for ; Sat, 16 Jul 2022 00:39:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657931957; x=1689467957; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=kA0/QSLOElTCWHwqX1Noco5mDpydNCMPS39Y/xSReS4=; b=iuygSptUsqnwbwn9XUqTYDvei+96Jwv1Avn4ZQLp+aFmXj3JhwxVsz7M Xsy/SLENGIWmQtiZkuCiV7ztLE7kj2IEK7uRGWO+FE1/NbqlU4+YN9cls 3kY0NwhB4o1DiFFRet0U9ii5Jv/VAQXmVf/lxw3A2ALdLgcqmrytTNmIk Q2be7ssc7Ey7Jk5Mwh4XRTTcnoUw6MKHlrSlF6llzbKit+OhbwEEhLC9G MfJcH4YQdd0TqliD2Mxh1nsGPtQ2baNi2z5MMPbUhXjdV/WhFOhdTg/uM dBV+nj5m9RuLCTpHG+nXvvhyjK7GwtkGZqBIQnwcqXQcgRxHc9iJpEPct g==; X-IronPort-AV: E=McAfee;i="6400,9594,10409"; a="285954526" X-IronPort-AV: E=Sophos;i="5.92,275,1650956400"; d="scan'208";a="285954526" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2022 17:38:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,275,1650956400"; d="scan'208";a="923713805" Received: from lkp-server02.sh.intel.com (HELO ff137eb26ff1) ([10.239.97.151]) by fmsmga005.fm.intel.com with ESMTP; 15 Jul 2022 17:38:50 -0700 Received: from kbuild by ff137eb26ff1 with local (Exim 4.95) (envelope-from ) id 1oCVpZ-0000tw-Fv; Sat, 16 Jul 2022 00:38:49 +0000 Date: Sat, 16 Jul 2022 08:38:27 +0800 From: kernel test robot To: Li Chen , Catalin Marinas , Will Deacon , Rob Herring , Frank Rowand , Andrew Morton Cc: kbuild-all@lists.01.org, Linux Memory Management List , Li Chen , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: Re: [PATCH 1/4] of: add struct page support to rmem Message-ID: <202207160854.nSdKYSY8-lkp@intel.com> References: <20220711122459.13773-2-me@linux.beauty> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220711122459.13773-2-me@linux.beauty> ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1657931957; a=rsa-sha256; cv=none; b=RYlQaUnv8/T+nD0uLyO1Rkeelg1v+shGafBxWeJcMO+FQf7HZz9DTbcdvt3GDS3rG1GCnf jke30yDN3lUTFVfdOFQwykqdoPAL2PkljXCtZiRC4YqEue3OZvynOCDo/Rm0PBtwbsQohM UV3niQYnxpiKl1IjdRVVFDSa33ePFQU= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=iuygSptU; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf22.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.115) smtp.mailfrom=lkp@intel.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1657931957; 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:in-reply-to:references:references:dkim-signature; bh=6oAmcKl1u/E/S4lImtLb26HH4VcuM6pIGNF1uE/6U6A=; b=5Fv3PQmvGieEBlMkNjCBqtKWO5yUcwgvD26/8YP5dJzrkABYuh3l+78vIrzEI8qNJki7Wk qxjkD3CFzoVEtsUjgQNybuSo3Nz97Ulf5zy9XwZI8hGG047P8ybfFsWqwk8FQvyHI6HvY8 hHXo1RBpE9BjDtpYfr6gt6ut9XN4opc= X-Rspam-User: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=intel.com header.s=Intel header.b=iuygSptU; dmarc=pass (policy=none) header.from=intel.com; spf=none (imf22.hostedemail.com: domain of lkp@intel.com has no SPF policy when checking 192.55.52.115) smtp.mailfrom=lkp@intel.com X-Stat-Signature: ixj4cxrxsbiwjc1xmq88hh7mb9fpyobn X-Rspamd-Queue-Id: 18EDCC0087 X-Rspamd-Server: rspam08 X-HE-Tag: 1657931953-583610 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: Hi Li, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on robh/for-next] [also build test WARNING on arm64/for-next/core arm-perf/for-next/perf linus/master v5.19-rc6 next-20220715] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Li-Chen/add-struct-page-and-Direct-I-O-support-to-reserved-memory/20220711-202957 base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220716/202207160854.nSdKYSY8-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 12.1.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 # https://github.com/intel-lab-lkp/linux/commit/8b66b4b9614f1c7bb8b2d8fac17d5a2a73acf954 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Li-Chen/add-struct-page-and-Direct-I-O-support-to-reserved-memory/20220711-202957 git checkout 8b66b4b9614f1c7bb8b2d8fac17d5a2a73acf954 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/mailbox/ drivers/of/ If you fix the issue, kindly add following tag where applicable Reported-by: kernel test robot All warnings (new ones prefixed by >>): drivers/of/of_reserved_mem.c: In function 'reserved_mem_memremap_pages': drivers/of/of_reserved_mem.c:633:50: error: invalid application of 'sizeof' to incomplete type 'struct dev_pagemap' 633 | pgmap_rmem_dio = devm_kzalloc(dev, sizeof(*pgmap_rmem_dio), GFP_KERNEL); | ^ drivers/of/of_reserved_mem.c:635:23: error: invalid use of undefined type 'struct dev_pagemap' 635 | pgmap_rmem_dio->range.start = rmem->base; | ^~ drivers/of/of_reserved_mem.c:636:23: error: invalid use of undefined type 'struct dev_pagemap' 636 | pgmap_rmem_dio->range.end = rmem->base + rmem->size - 1; | ^~ drivers/of/of_reserved_mem.c:637:23: error: invalid use of undefined type 'struct dev_pagemap' 637 | pgmap_rmem_dio->nr_range = 1; | ^~ drivers/of/of_reserved_mem.c:638:23: error: invalid use of undefined type 'struct dev_pagemap' 638 | pgmap_rmem_dio->type = MEMORY_DEVICE_GENERIC; | ^~ drivers/of/of_reserved_mem.c:638:32: error: 'MEMORY_DEVICE_GENERIC' undeclared (first use in this function) 638 | pgmap_rmem_dio->type = MEMORY_DEVICE_GENERIC; | ^~~~~~~~~~~~~~~~~~~~~ drivers/of/of_reserved_mem.c:638:32: note: each undeclared identifier is reported only once for each function it appears in In file included from include/linux/printk.h:584, from include/linux/kernel.h:29, from include/linux/cpumask.h:10, from include/linux/smp.h:13, from include/linux/lockdep.h:14, from include/linux/mutex.h:17, from include/linux/kernfs.h:11, from include/linux/sysfs.h:16, from include/linux/kobject.h:20, from include/linux/of.h:17, from drivers/of/of_reserved_mem.c:15: drivers/of/of_reserved_mem.c:641:42: error: invalid use of undefined type 'struct dev_pagemap' 641 | __func__, pgmap_rmem_dio->range.start, pgmap_rmem_dio->range.end); | ^~ include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call' 134 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~ include/linux/dynamic_debug.h:162:9: note: in expansion of macro '_dynamic_func_call' 162 | _dynamic_func_call(fmt, __dynamic_pr_debug, \ | ^~~~~~~~~~~~~~~~~~ include/linux/printk.h:599:9: note: in expansion of macro 'dynamic_pr_debug' 599 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~ drivers/of/of_reserved_mem.c:640:9: note: in expansion of macro 'pr_debug' 640 | pr_debug("%s, will do devm_memremap_pages, start from %llx, to %llx\n", | ^~~~~~~~ drivers/of/of_reserved_mem.c:641:71: error: invalid use of undefined type 'struct dev_pagemap' 641 | __func__, pgmap_rmem_dio->range.start, pgmap_rmem_dio->range.end); | ^~ include/linux/dynamic_debug.h:134:29: note: in definition of macro '__dynamic_func_call' 134 | func(&id, ##__VA_ARGS__); \ | ^~~~~~~~~~~ include/linux/dynamic_debug.h:162:9: note: in expansion of macro '_dynamic_func_call' 162 | _dynamic_func_call(fmt, __dynamic_pr_debug, \ | ^~~~~~~~~~~~~~~~~~ include/linux/printk.h:599:9: note: in expansion of macro 'dynamic_pr_debug' 599 | dynamic_pr_debug(fmt, ##__VA_ARGS__) | ^~~~~~~~~~~~~~~~ drivers/of/of_reserved_mem.c:640:9: note: in expansion of macro 'pr_debug' 640 | pr_debug("%s, will do devm_memremap_pages, start from %llx, to %llx\n", | ^~~~~~~~ drivers/of/of_reserved_mem.c:643:17: error: implicit declaration of function 'devm_memremap_pages'; did you mean 'devm_free_pages'? [-Werror=implicit-function-declaration] 643 | vaddr = devm_memremap_pages(dev, pgmap_rmem_dio); | ^~~~~~~~~~~~~~~~~~~ | devm_free_pages >> drivers/of/of_reserved_mem.c:643:15: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion] 643 | vaddr = devm_memremap_pages(dev, pgmap_rmem_dio); | ^ cc1: some warnings being treated as errors vim +643 drivers/of/of_reserved_mem.c 610 611 /** 612 * reserved_mem_memremap_pages() - build struct pages for reserved mem 613 * @dev: device pointer 614 * @rmem: reserved memory region from dts, which can be get by 615 * get_reserved_mem_from_dev(dev) 616 * 617 * Returns: 0 on success or a negative error-code on failure. 618 */ 619 void *reserved_mem_memremap_pages(struct device *dev, struct reserved_mem *rmem) 620 { 621 struct dev_pagemap *pgmap_rmem_dio; 622 void *vaddr; 623 struct page **pages; 624 int i; 625 unsigned long offset = 0; 626 struct page *page; 627 628 rmem->nr_pages = DIV_ROUND_UP(rmem->size, PAGE_SIZE); 629 pages = kvmalloc_array(rmem->nr_pages, sizeof(*pages), GFP_KERNEL); 630 if (!pages) 631 return ERR_PTR(-ENOMEM); 632 633 pgmap_rmem_dio = devm_kzalloc(dev, sizeof(*pgmap_rmem_dio), GFP_KERNEL); 634 635 pgmap_rmem_dio->range.start = rmem->base; 636 pgmap_rmem_dio->range.end = rmem->base + rmem->size - 1; 637 pgmap_rmem_dio->nr_range = 1; 638 pgmap_rmem_dio->type = MEMORY_DEVICE_GENERIC; 639 640 pr_debug("%s, will do devm_memremap_pages, start from %llx, to %llx\n", 641 __func__, pgmap_rmem_dio->range.start, pgmap_rmem_dio->range.end); 642 > 643 vaddr = devm_memremap_pages(dev, pgmap_rmem_dio); -- 0-DAY CI Kernel Test Service https://01.org/lkp