From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8996199836621936980==" MIME-Version: 1.0 From: Baoquan He To: kbuild-all@lists.01.org Subject: Re: [RFC PATCH] mm: Add a new page type to mark unavailable pages Date: Wed, 03 Jun 2020 09:28:39 +0800 Message-ID: <20200603012839.GA27566@MiWiFi-R3L-srv> In-Reply-To: <202006020300.l49UutdW%lkp@intel.com> List-Id: --===============8996199836621936980== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 06/02/20 at 03:07am, kbuild test robot wrote: > Hi Baoquan, > = > [FYI, it's a private test report for your RFC patch.] > [auto build test ERROR on tip/x86/core] > [also build test ERROR on linus/master v5.7 next-20200529] > [cannot apply to mmotm/master linux/master] > [if your patch is applied to the wrong git tree, please drop us a note to= help > improve the system. BTW, we also suggest to use '--base' option to specif= y the > base tree in git format-patch, please see https://stackoverflow.com/a/374= 06982] > = > url: https://github.com/0day-ci/linux/commits/Baoquan-He/mm-Add-a-new-= page-type-to-mark-unavailable-pages/20200601-213615 > base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 9cb1f= d0efd195590b828b9b865421ad345a4a145 > config: sparc-allyesconfig (attached as .config) > compiler: sparc64-linux-gcc (GCC) 9.3.0 > reproduce (this is a W=3D1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbi= n/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-9.3.0 make.cros= s ARCH=3Dsparc = > = > If you fix the issue, kindly add following tag as appropriate > Reported-by: kbuild test robot > = > All error/warnings (new ones prefixed by >>, old ones prefixed by <<): > = > In file included from include/linux/gfp.h:6, > from include/linux/umh.h:4, > from include/linux/kmod.h:9, > from include/linux/module.h:16, > from drivers/media/usb/msi2500/msi2500.c:14: > include/linux/mmzone.h: In function 'early_pfn_valid': > >> include/linux/mmzone.h:1322:45: error: expected ';' before '}' token > 1322 | return valid_section(__pfn_to_section(pfn)) > | ^ > | ; > 1323 | } > | ~ > include/linux/mmzone.h: In function 'pfn_valid': > >> include/linux/mmzone.h:1333:24: error: 'ms' undeclared (first use in t= his function); did you mean 'mb'? > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~ > | mb > include/linux/mmzone.h:1333:24: note: each undeclared identifier is repor= ted only once for each function it appears in > In file included from arch/sparc/include/asm/page_64.h:130, > from arch/sparc/include/asm/page.h:8, > from arch/sparc/include/asm/thread_info_64.h:27, > from arch/sparc/include/asm/thread_info.h:5, > from include/linux/thread_info.h:38, > from include/asm-generic/preempt.h:5, > from ./arch/sparc/include/generated/asm/preempt.h:1, > from include/linux/preempt.h:78, > from include/linux/spinlock.h:51, > from include/linux/seqlock.h:36, > from include/linux/time.h:6, > from include/linux/stat.h:19, > from include/linux/module.h:13, > from drivers/media/usb/msi2500/msi2500.c:14: > >> include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared = (first use in this function); did you mean 'mem_map'? > 54 | #define __pfn_to_page(pfn) (vmemmap + (pfn)) > | ^~~~~~~ > >> include/asm-generic/memory_model.h:82:21: note: in expansion of macro = '__pfn_to_page' > 82 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > >> include/linux/mmzone.h:1333:43: note: in expansion of macro 'pfn_to_pa= ge' > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~~~~~~~~~~ > -- > In file included from include/linux/gfp.h:6, > from include/linux/umh.h:4, > from include/linux/kmod.h:9, > from include/linux/module.h:16, > from drivers/phy/phy-xgene.c:41: > include/linux/mmzone.h: In function 'early_pfn_valid': > >> include/linux/mmzone.h:1322:45: error: expected ';' before '}' token > 1322 | return valid_section(__pfn_to_section(pfn)) > | ^ > | ; > 1323 | } > | ~ > include/linux/mmzone.h: In function 'pfn_valid': > >> include/linux/mmzone.h:1333:24: error: 'ms' undeclared (first use in t= his function); did you mean 'mb'? > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~ > | mb > include/linux/mmzone.h:1333:24: note: each undeclared identifier is repor= ted only once for each function it appears in > In file included from arch/sparc/include/asm/page_64.h:130, > from arch/sparc/include/asm/page.h:8, > from arch/sparc/include/asm/thread_info_64.h:27, > from arch/sparc/include/asm/thread_info.h:5, > from include/linux/thread_info.h:38, > from include/asm-generic/preempt.h:5, > from ./arch/sparc/include/generated/asm/preempt.h:1, > from include/linux/preempt.h:78, > from include/linux/spinlock.h:51, > from include/linux/seqlock.h:36, > from include/linux/time.h:6, > from include/linux/stat.h:19, > from include/linux/module.h:13, > from drivers/phy/phy-xgene.c:41: > >> include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared = (first use in this function); did you mean 'mem_map'? > 54 | #define __pfn_to_page(pfn) (vmemmap + (pfn)) > | ^~~~~~~ > >> include/asm-generic/memory_model.h:82:21: note: in expansion of macro = '__pfn_to_page' > 82 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > >> include/linux/mmzone.h:1333:43: note: in expansion of macro 'pfn_to_pa= ge' > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~~~~~~~~~~ > drivers/phy/phy-xgene.c: In function 'xgene_phy_xlate': > drivers/phy/phy-xgene.c:1618:20: warning: comparison of unsigned expressi= on < 0 is always false [-Wtype-limits] > 1618 | if (args->args[0] < MODE_SATA || args->args[0] >=3D MODE_MAX) > | ^ > -- > In file included from include/linux/gfp.h:6, > from include/linux/umh.h:4, > from include/linux/kmod.h:9, > from include/linux/module.h:16, > from drivers/pinctrl/pinctrl-amd.c:16: > include/linux/mmzone.h: In function 'early_pfn_valid': > >> include/linux/mmzone.h:1322:45: error: expected ';' before '}' token > 1322 | return valid_section(__pfn_to_section(pfn)) > | ^ > | ; > 1323 | } > | ~ > include/linux/mmzone.h: In function 'pfn_valid': > >> include/linux/mmzone.h:1333:24: error: 'ms' undeclared (first use in t= his function); did you mean 'mb'? > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~ > | mb > include/linux/mmzone.h:1333:24: note: each undeclared identifier is repor= ted only once for each function it appears in > In file included from arch/sparc/include/asm/page_64.h:130, > from arch/sparc/include/asm/page.h:8, > from arch/sparc/include/asm/thread_info_64.h:27, > from arch/sparc/include/asm/thread_info.h:5, > from include/linux/thread_info.h:38, > from include/asm-generic/preempt.h:5, > from ./arch/sparc/include/generated/asm/preempt.h:1, > from include/linux/preempt.h:78, > from include/linux/spinlock.h:51, > from include/linux/seqlock.h:36, > from include/linux/time.h:6, > from include/linux/stat.h:19, > from include/linux/module.h:13, > from drivers/pinctrl/pinctrl-amd.c:16: > >> include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared = (first use in this function); did you mean 'mem_map'? > 54 | #define __pfn_to_page(pfn) (vmemmap + (pfn)) > | ^~~~~~~ > >> include/asm-generic/memory_model.h:82:21: note: in expansion of macro = '__pfn_to_page' > 82 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > >> include/linux/mmzone.h:1333:43: note: in expansion of macro 'pfn_to_pa= ge' > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~~~~~~~~~~ > At top level: > drivers/pinctrl/pinctrl-amd.c:968:36: warning: 'amd_gpio_acpi_match' defi= ned but not used [-Wunused-const-variable=3D] > 968 | static const struct acpi_device_id amd_gpio_acpi_match[] =3D { > | ^~~~~~~~~~~~~~~~~~~ > -- > In file included from include/linux/gfp.h:6, > from include/linux/xarray.h:14, > from include/linux/radix-tree.h:18, > from include/linux/idr.h:15, > from include/linux/kernfs.h:13, > from include/linux/sysfs.h:16, > from include/linux/kobject.h:20, > from include/linux/of.h:17, > from drivers/pinctrl/pinctrl-bm1880.c:10: > include/linux/mmzone.h: In function 'early_pfn_valid': > >> include/linux/mmzone.h:1322:45: error: expected ';' before '}' token > 1322 | return valid_section(__pfn_to_section(pfn)) > | ^ > | ; > 1323 | } > | ~ > include/linux/mmzone.h: In function 'pfn_valid': > >> include/linux/mmzone.h:1333:24: error: 'ms' undeclared (first use in t= his function); did you mean 'mb'? > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~ > | mb > include/linux/mmzone.h:1333:24: note: each undeclared identifier is repor= ted only once for each function it appears in > In file included from arch/sparc/include/asm/page_64.h:130, > from arch/sparc/include/asm/page.h:8, > from arch/sparc/include/asm/io_64.h:9, > from arch/sparc/include/asm/io.h:5, > from include/linux/io.h:13, > from drivers/pinctrl/pinctrl-bm1880.c:9: > >> include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared = (first use in this function); did you mean 'mem_map'? > 54 | #define __pfn_to_page(pfn) (vmemmap + (pfn)) > | ^~~~~~~ > >> include/asm-generic/memory_model.h:82:21: note: in expansion of macro = '__pfn_to_page' > 82 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > >> include/linux/mmzone.h:1333:43: note: in expansion of macro 'pfn_to_pa= ge' > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~~~~~~~~~~ > At top level: > drivers/pinctrl/pinctrl-bm1880.c:263:27: warning: 'pwm37_pins' defined bu= t not used [-Wunused-const-variable=3D] > 263 | static const unsigned int pwm37_pins[] =3D { 110 }; > | ^~~~~~~~~~ > -- > In file included from include/linux/gfp.h:6, > from include/linux/xarray.h:14, > from include/linux/radix-tree.h:18, > from include/linux/idr.h:15, > from include/linux/kernfs.h:13, > from include/linux/sysfs.h:16, > from include/linux/kobject.h:20, > from include/linux/device.h:17, > from include/linux/gpio/driver.h:5, > from drivers/pinctrl/pinctrl-rza1.c:17: > include/linux/mmzone.h: In function 'early_pfn_valid': > >> include/linux/mmzone.h:1322:45: error: expected ';' before '}' token > 1322 | return valid_section(__pfn_to_section(pfn)) > | ^ > | ; > 1323 | } > | ~ > include/linux/mmzone.h: In function 'pfn_valid': > >> include/linux/mmzone.h:1333:24: error: 'ms' undeclared (first use in t= his function); did you mean 'mb'? > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~ > | mb > include/linux/mmzone.h:1333:24: note: each undeclared identifier is repor= ted only once for each function it appears in > In file included from arch/sparc/include/asm/page_64.h:130, > from arch/sparc/include/asm/page.h:8, > from arch/sparc/include/asm/thread_info_64.h:27, > from arch/sparc/include/asm/thread_info.h:5, > from include/linux/thread_info.h:38, > from arch/sparc/include/asm/current.h:15, > from include/linux/sched.h:12, > from include/linux/ratelimit.h:6, > from include/linux/dev_printk.h:16, > from include/linux/device.h:15, > from include/linux/gpio/driver.h:5, > from drivers/pinctrl/pinctrl-rza1.c:17: > >> include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared = (first use in this function); did you mean 'mem_map'? > 54 | #define __pfn_to_page(pfn) (vmemmap + (pfn)) > | ^~~~~~~ > >> include/asm-generic/memory_model.h:82:21: note: in expansion of macro = '__pfn_to_page' > 82 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > >> include/linux/mmzone.h:1333:43: note: in expansion of macro 'pfn_to_pa= ge' > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~~~~~~~~~~ > At top level: > drivers/pinctrl/pinctrl-rza1.c:401:35: warning: 'rza1l_swio_pins' defined= but not used [-Wunused-const-variable=3D] > 401 | static const struct rza1_swio_pin rza1l_swio_pins[] =3D { > | ^~~~~~~~~~~~~~~ > -- > In file included from include/linux/gfp.h:6, > from include/linux/xarray.h:14, > from include/linux/radix-tree.h:18, > from include/linux/idr.h:15, > from include/linux/kernfs.h:13, > from include/linux/sysfs.h:16, > from include/linux/kobject.h:20, > from include/linux/device.h:17, > from drivers/platform/mellanox/mlxreg-hotplug.c:35: > include/linux/mmzone.h: In function 'early_pfn_valid': > >> include/linux/mmzone.h:1322:45: error: expected ';' before '}' token > 1322 | return valid_section(__pfn_to_section(pfn)) > | ^ > | ; > 1323 | } > | ~ > include/linux/mmzone.h: In function 'pfn_valid': > >> include/linux/mmzone.h:1333:24: error: 'ms' undeclared (first use in t= his function); did you mean 'mb'? > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~ > | mb > include/linux/mmzone.h:1333:24: note: each undeclared identifier is repor= ted only once for each function it appears in > In file included from arch/sparc/include/asm/page_64.h:130, > from arch/sparc/include/asm/page.h:8, > from arch/sparc/include/asm/thread_info_64.h:27, > from arch/sparc/include/asm/thread_info.h:5, > from include/linux/thread_info.h:38, > from arch/sparc/include/asm/current.h:15, > from include/linux/sched.h:12, > from include/linux/ratelimit.h:6, > from include/linux/dev_printk.h:16, > from include/linux/device.h:15, > from drivers/platform/mellanox/mlxreg-hotplug.c:35: > >> include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared = (first use in this function); did you mean 'mem_map'? > 54 | #define __pfn_to_page(pfn) (vmemmap + (pfn)) > | ^~~~~~~ > >> include/asm-generic/memory_model.h:82:21: note: in expansion of macro = '__pfn_to_page' > 82 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > >> include/linux/mmzone.h:1333:43: note: in expansion of macro 'pfn_to_pa= ge' > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~~~~~~~~~~ > In file included from include/linux/bits.h:23, > from include/linux/bitops.h:5, > from drivers/platform/mellanox/mlxreg-hotplug.c:34: > drivers/platform/mellanox/mlxreg-hotplug.c: In function 'mlxreg_hotplug_s= et_irq': > include/linux/bits.h:26:28: warning: comparison of unsigned expression < = 0 is always false [-Wtype-limits] > 26 | __builtin_constant_p((l) > (h)), (l) > (h), 0))) > | ^ > include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_= ON_ZERO' > 16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })= )) > | ^ > include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHE= CK' > 39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l)) > | ^~~~~~~~~~~~~~~~~~~ > drivers/platform/mellanox/mlxreg-hotplug.c:518:17: note: in expansion of = macro 'GENMASK' > 518 | item->mask =3D GENMASK((regval & item->mask) - 1, 0); > | ^~~~~~~ > include/linux/bits.h:26:40: warning: comparison of unsigned expression < = 0 is always false [-Wtype-limits] > 26 | __builtin_constant_p((l) > (h)), (l) > (h), 0))) > | ^ > include/linux/build_bug.h:16:62: note: in definition of macro 'BUILD_BUG_= ON_ZERO' > 16 | #define BUILD_BUG_ON_ZERO(e) ((int)(sizeof(struct { int:(-!!(e)); })= )) > | ^ > include/linux/bits.h:39:3: note: in expansion of macro 'GENMASK_INPUT_CHE= CK' > 39 | (GENMASK_INPUT_CHECK(h, l) + __GENMASK(h, l)) > | ^~~~~~~~~~~~~~~~~~~ > drivers/platform/mellanox/mlxreg-hotplug.c:518:17: note: in expansion of = macro 'GENMASK' > 518 | item->mask =3D GENMASK((regval & item->mask) - 1, 0); > | ^~~~~~~ > -- > In file included from include/linux/gfp.h:6, > from include/linux/xarray.h:14, > from include/linux/radix-tree.h:18, > from include/linux/idr.h:15, > from include/linux/kernfs.h:13, > from include/linux/sysfs.h:16, > from include/linux/kobject.h:20, > from include/linux/device.h:17, > from include/linux/input.h:19, > from drivers/platform/olpc/olpc-xo175-ec.c:16: > include/linux/mmzone.h: In function 'early_pfn_valid': > >> include/linux/mmzone.h:1322:45: error: expected ';' before '}' token > 1322 | return valid_section(__pfn_to_section(pfn)) > | ^ > | ; > 1323 | } > | ~ > include/linux/mmzone.h: In function 'pfn_valid': > >> include/linux/mmzone.h:1333:24: error: 'ms' undeclared (first use in t= his function); did you mean 'mb'? > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~ > | mb > include/linux/mmzone.h:1333:24: note: each undeclared identifier is repor= ted only once for each function it appears in > In file included from arch/sparc/include/asm/page_64.h:130, > from arch/sparc/include/asm/page.h:8, > from arch/sparc/include/asm/thread_info_64.h:27, > from arch/sparc/include/asm/thread_info.h:5, > from include/linux/thread_info.h:38, > from include/asm-generic/preempt.h:5, > from ./arch/sparc/include/generated/asm/preempt.h:1, > from include/linux/preempt.h:78, > from include/linux/spinlock.h:51, > from include/linux/swait.h:7, > from include/linux/completion.h:12, > from drivers/platform/olpc/olpc-xo175-ec.c:12: > >> include/asm-generic/memory_model.h:54:29: error: 'vmemmap' undeclared = (first use in this function); did you mean 'mem_map'? > 54 | #define __pfn_to_page(pfn) (vmemmap + (pfn)) > | ^~~~~~~ > >> include/asm-generic/memory_model.h:82:21: note: in expansion of macro = '__pfn_to_page' > 82 | #define pfn_to_page __pfn_to_page > | ^~~~~~~~~~~~~ > >> include/linux/mmzone.h:1333:43: note: in expansion of macro 'pfn_to_pa= ge' > 1333 | return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > | ^~~~~~~~~~~ > At top level: > drivers/platform/olpc/olpc-xo175-ec.c:739:35: warning: 'olpc_xo175_ec_id_= table' defined but not used [-Wunused-const-variable=3D] > 739 | static const struct spi_device_id olpc_xo175_ec_id_table[] =3D { > | ^~~~~~~~~~~~~~~~~~~~~~ > .. > = > vim +1322 include/linux/mmzone.h > = > 1316 = > 1317 #ifndef CONFIG_HAVE_ARCH_PFN_VALID > 1318 static inline int early_pfn_valid(unsigned long pfn) > 1319 { > 1320 if (pfn_to_section_nr(pfn) >=3D NR_MEM_SECTIONS) > 1321 return 0; > > 1322 return valid_section(__pfn_to_section(pfn)) return valid_section(__pfn_to_section(pfn)); Thanks for noticing. It should be here a semicolon is missing. The patch is a draft RFC patch, not so formal. I am still waiting for people to give some suggestions on whether the solution is a good way to go. Thanks Baoquan > 1323 } > 1324 = > 1325 static inline int pfn_valid(unsigned long pfn) > 1326 { > 1327 if (!early_pfn_valid(pfn)) > 1328 return 0; > 1329 /* > 1330 * Traditionally early sections always returned pfn_valid() for > 1331 * the entire section-sized span. > 1332 */ > > 1333 return (early_section(ms) && PageUnavail(pfn_to_page(pfn))) || > 1334 pfn_section_valid(ms, pfn); > > 1335 } > 1336 #endif > 1337 = > = > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============8996199836621936980==--