[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202406282354.0hGuOKo0-lkp@intel.com>
Date: Sat, 29 Jun 2024 00:07:14 +0800
From: kernel test robot <lkp@...el.com>
To: Shiji Yang <yangshiji66@...look.com>, linux-mips@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Arnd Bergmann <arnd@...db.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Javier Martinez Canillas <javierm@...hat.com>,
Khalid Aziz <khalid@...ehiking.org>, Baoquan He <bhe@...hat.com>,
Jiaxun Yang <jiaxun.yang@...goat.com>,
Serge Semin <fancer.lancer@...il.com>, linux-kernel@...r.kernel.org,
Shiji Yang <yangshiji66@...look.com>,
Mieczyslaw Nalewaj <namiltd@...oo.com>
Subject: Re: [PATCH V2] mips: kernel: fix detect_memory_region() function
Hi Shiji,
kernel test robot noticed the following build warnings:
[auto build test WARNING on soc/for-next]
[also build test WARNING on linus/master v6.10-rc5 next-20240627]
[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/Shiji-Yang/mips-kernel-fix-detect_memory_region-function/20240626-070033
base: https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git for-next
patch link: https://lore.kernel.org/r/TYCP286MB089598ABD1E2F66003D71EB8BCD52%40TYCP286MB0895.JPNP286.PROD.OUTLOOK.COM
patch subject: [PATCH V2] mips: kernel: fix detect_memory_region() function
config: mips-randconfig-r113-20240628 (https://download.01.org/0day-ci/archive/20240628/202406282354.0hGuOKo0-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20240628/202406282354.0hGuOKo0-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 <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406282354.0hGuOKo0-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> arch/mips/kernel/setup.c:104:53: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *dm @@
arch/mips/kernel/setup.c:104:53: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/kernel/setup.c:104:53: sparse: got void *dm
>> arch/mips/kernel/setup.c:105:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *dm @@
arch/mips/kernel/setup.c:105:33: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/kernel/setup.c:105:33: sparse: got void *dm
>> arch/mips/kernel/setup.c:105:55: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/kernel/setup.c:105:55: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/kernel/setup.c:105:55: sparse: got void *
arch/mips/kernel/setup.c:106:62: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void volatile [noderef] __iomem *mem @@ got void *dm @@
arch/mips/kernel/setup.c:106:62: sparse: expected void volatile [noderef] __iomem *mem
arch/mips/kernel/setup.c:106:62: sparse: got void *dm
arch/mips/kernel/setup.c:107:41: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void *dm @@
arch/mips/kernel/setup.c:107:41: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/kernel/setup.c:107:41: sparse: got void *dm
arch/mips/kernel/setup.c:107:63: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __iomem *mem @@ got void * @@
arch/mips/kernel/setup.c:107:63: sparse: expected void const volatile [noderef] __iomem *mem
arch/mips/kernel/setup.c:107:63: sparse: got void *
arch/mips/kernel/setup.c: note: in included file (through include/linux/mmzone.h, include/linux/gfp.h, include/linux/xarray.h, ...):
include/linux/page-flags.h:240:46: sparse: sparse: self-comparison always evaluates to false
include/linux/page-flags.h:240:46: sparse: sparse: self-comparison always evaluates to false
vim +104 arch/mips/kernel/setup.c
97
98 void __init detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_addr_t sz_max)
99 {
100 void *dm = (void *)KSEG1ADDR(&detect_magic);
101 phys_addr_t size;
102
103 for (size = sz_min; size < sz_max; size <<= 1) {
> 104 __raw_writel(MIPS_MEM_TEST_PATTERN, dm);
> 105 if (__raw_readl(dm) == __raw_readl(dm + size)) {
106 __raw_writel(~MIPS_MEM_TEST_PATTERN, dm);
107 if (__raw_readl(dm) == __raw_readl(dm + size))
108 break;
109 }
110 }
111
112 pr_debug("Memory: %lluMB of RAM detected at 0x%llx (min: %lluMB, max: %lluMB)\n",
113 ((unsigned long long) size) / SZ_1M,
114 (unsigned long long) start,
115 ((unsigned long long) sz_min) / SZ_1M,
116 ((unsigned long long) sz_max) / SZ_1M);
117
118 memblock_add(start, size);
119 }
120 #endif /* CONFIG_64BIT */
121
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists