From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: arch/sparc/mm/srmmu.c:300:9: error: variable 'pud' set but not used
Date: Wed, 20 May 2020 08:57:33 +0800 [thread overview]
Message-ID: <20200520005733.GB3101@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6544 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 642b151f45dd54809ea00ecd3976a56c1ec9b53d
commit: 7235db268a2777bc380b99b7db49ff7b19c8fb76 sparc32: use pgtable-nopud instead of 4level-fixup
config: sparc-defconfig (attached as .config)
compiler: sparc-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 7235db268a2777bc380b99b7db49ff7b19c8fb76
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
arch/sparc/mm/srmmu.c: In function 'srmmu_nocache_init':
>> arch/sparc/mm/srmmu.c:300:9: error: variable 'pud' set but not used [-Werror=unused-but-set-variable]
300 | pud_t *pud;
| ^~~
arch/sparc/mm/srmmu.c: In function 'poke_hypersparc':
arch/sparc/mm/srmmu.c:1128:25: error: variable 'clear' set but not used [-Werror=unused-but-set-variable]
1128 | volatile unsigned long clear;
| ^~~~~
cc1: all warnings being treated as errors
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7235db268a2777bc380b99b7db49ff7b19c8fb76
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 7235db268a2777bc380b99b7db49ff7b19c8fb76
vim +/pud +300 arch/sparc/mm/srmmu.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 293
50215d6511265d Adrian Bunk 2008-06-05 294 static void __init srmmu_nocache_init(void)
^1da177e4c3f41 Linus Torvalds 2005-04-16 295 {
e8c29c839b5c9f Sam Ravnborg 2014-04-21 296 void *srmmu_nocache_bitmap;
^1da177e4c3f41 Linus Torvalds 2005-04-16 297 unsigned int bitmap_bits;
^1da177e4c3f41 Linus Torvalds 2005-04-16 298 pgd_t *pgd;
7235db268a2777 Mike Rapoport 2019-12-04 299 p4d_t *p4d;
7235db268a2777 Mike Rapoport 2019-12-04 @300 pud_t *pud;
^1da177e4c3f41 Linus Torvalds 2005-04-16 301 pmd_t *pmd;
^1da177e4c3f41 Linus Torvalds 2005-04-16 302 pte_t *pte;
^1da177e4c3f41 Linus Torvalds 2005-04-16 303 unsigned long paddr, vaddr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 304 unsigned long pteval;
^1da177e4c3f41 Linus Torvalds 2005-04-16 305
^1da177e4c3f41 Linus Torvalds 2005-04-16 306 bitmap_bits = srmmu_nocache_size >> SRMMU_NOCACHE_BITMAP_SHIFT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 307
9415673e3e19f7 Mike Rapoport 2019-03-11 308 srmmu_nocache_pool = memblock_alloc(srmmu_nocache_size,
9415673e3e19f7 Mike Rapoport 2019-03-11 309 SRMMU_NOCACHE_ALIGN_MAX);
b1e1c869ffd1d8 Mike Rapoport 2019-03-11 310 if (!srmmu_nocache_pool)
b1e1c869ffd1d8 Mike Rapoport 2019-03-11 311 panic("%s: Failed to allocate %lu bytes align=0x%x\n",
b1e1c869ffd1d8 Mike Rapoport 2019-03-11 312 __func__, srmmu_nocache_size, SRMMU_NOCACHE_ALIGN_MAX);
^1da177e4c3f41 Linus Torvalds 2005-04-16 313 memset(srmmu_nocache_pool, 0, srmmu_nocache_size);
^1da177e4c3f41 Linus Torvalds 2005-04-16 314
54df2db36c93bb Akinobu Mita 2013-03-29 315 srmmu_nocache_bitmap =
9415673e3e19f7 Mike Rapoport 2019-03-11 316 memblock_alloc(BITS_TO_LONGS(bitmap_bits) * sizeof(long),
9415673e3e19f7 Mike Rapoport 2019-03-11 317 SMP_CACHE_BYTES);
b1e1c869ffd1d8 Mike Rapoport 2019-03-11 318 if (!srmmu_nocache_bitmap)
b1e1c869ffd1d8 Mike Rapoport 2019-03-11 319 panic("%s: Failed to allocate %zu bytes\n", __func__,
b1e1c869ffd1d8 Mike Rapoport 2019-03-11 320 BITS_TO_LONGS(bitmap_bits) * sizeof(long));
^1da177e4c3f41 Linus Torvalds 2005-04-16 321 bit_map_init(&srmmu_nocache_map, srmmu_nocache_bitmap, bitmap_bits);
^1da177e4c3f41 Linus Torvalds 2005-04-16 322
f71a2aacc63e31 Sam Ravnborg 2012-07-26 323 srmmu_swapper_pg_dir = __srmmu_get_nocache(SRMMU_PGD_TABLE_SIZE, SRMMU_PGD_TABLE_SIZE);
^1da177e4c3f41 Linus Torvalds 2005-04-16 324 memset(__nocache_fix(srmmu_swapper_pg_dir), 0, SRMMU_PGD_TABLE_SIZE);
^1da177e4c3f41 Linus Torvalds 2005-04-16 325 init_mm.pgd = srmmu_swapper_pg_dir;
^1da177e4c3f41 Linus Torvalds 2005-04-16 326
^1da177e4c3f41 Linus Torvalds 2005-04-16 327 srmmu_early_allocate_ptable_skeleton(SRMMU_NOCACHE_VADDR, srmmu_nocache_end);
^1da177e4c3f41 Linus Torvalds 2005-04-16 328
^1da177e4c3f41 Linus Torvalds 2005-04-16 329 paddr = __pa((unsigned long)srmmu_nocache_pool);
^1da177e4c3f41 Linus Torvalds 2005-04-16 330 vaddr = SRMMU_NOCACHE_VADDR;
^1da177e4c3f41 Linus Torvalds 2005-04-16 331
^1da177e4c3f41 Linus Torvalds 2005-04-16 332 while (vaddr < srmmu_nocache_end) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 333 pgd = pgd_offset_k(vaddr);
7235db268a2777 Mike Rapoport 2019-12-04 334 p4d = p4d_offset(__nocache_fix(pgd), vaddr);
7235db268a2777 Mike Rapoport 2019-12-04 335 pud = pud_offset(__nocache_fix(p4d), vaddr);
9701b264d3267b Sam Ravnborg 2012-05-13 336 pmd = pmd_offset(__nocache_fix(pgd), vaddr);
9701b264d3267b Sam Ravnborg 2012-05-13 337 pte = pte_offset_kernel(__nocache_fix(pmd), vaddr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 338
^1da177e4c3f41 Linus Torvalds 2005-04-16 339 pteval = ((paddr >> 4) | SRMMU_ET_PTE | SRMMU_PRIV);
^1da177e4c3f41 Linus Torvalds 2005-04-16 340
^1da177e4c3f41 Linus Torvalds 2005-04-16 341 if (srmmu_cache_pagetables)
^1da177e4c3f41 Linus Torvalds 2005-04-16 342 pteval |= SRMMU_CACHE;
^1da177e4c3f41 Linus Torvalds 2005-04-16 343
62875cff73fbb7 David S. Miller 2012-05-12 344 set_pte(__nocache_fix(pte), __pte(pteval));
^1da177e4c3f41 Linus Torvalds 2005-04-16 345
^1da177e4c3f41 Linus Torvalds 2005-04-16 346 vaddr += PAGE_SIZE;
^1da177e4c3f41 Linus Torvalds 2005-04-16 347 paddr += PAGE_SIZE;
^1da177e4c3f41 Linus Torvalds 2005-04-16 348 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 349
^1da177e4c3f41 Linus Torvalds 2005-04-16 350 flush_cache_all();
^1da177e4c3f41 Linus Torvalds 2005-04-16 351 flush_tlb_all();
^1da177e4c3f41 Linus Torvalds 2005-04-16 352 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 353
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 12853 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: Mike Rapoport <rppt@linux.ibm.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>
Subject: arch/sparc/mm/srmmu.c:300:9: error: variable 'pud' set but not used
Date: Wed, 20 May 2020 08:57:33 +0800 [thread overview]
Message-ID: <20200520005733.GB3101@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6444 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 642b151f45dd54809ea00ecd3976a56c1ec9b53d
commit: 7235db268a2777bc380b99b7db49ff7b19c8fb76 sparc32: use pgtable-nopud instead of 4level-fixup
config: sparc-defconfig (attached as .config)
compiler: sparc-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 7235db268a2777bc380b99b7db49ff7b19c8fb76
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sparc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>, old ones prefixed by <<):
arch/sparc/mm/srmmu.c: In function 'srmmu_nocache_init':
>> arch/sparc/mm/srmmu.c:300:9: error: variable 'pud' set but not used [-Werror=unused-but-set-variable]
300 | pud_t *pud;
| ^~~
arch/sparc/mm/srmmu.c: In function 'poke_hypersparc':
arch/sparc/mm/srmmu.c:1128:25: error: variable 'clear' set but not used [-Werror=unused-but-set-variable]
1128 | volatile unsigned long clear;
| ^~~~~
cc1: all warnings being treated as errors
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7235db268a2777bc380b99b7db49ff7b19c8fb76
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 7235db268a2777bc380b99b7db49ff7b19c8fb76
vim +/pud +300 arch/sparc/mm/srmmu.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 293
50215d6511265d Adrian Bunk 2008-06-05 294 static void __init srmmu_nocache_init(void)
^1da177e4c3f41 Linus Torvalds 2005-04-16 295 {
e8c29c839b5c9f Sam Ravnborg 2014-04-21 296 void *srmmu_nocache_bitmap;
^1da177e4c3f41 Linus Torvalds 2005-04-16 297 unsigned int bitmap_bits;
^1da177e4c3f41 Linus Torvalds 2005-04-16 298 pgd_t *pgd;
7235db268a2777 Mike Rapoport 2019-12-04 299 p4d_t *p4d;
7235db268a2777 Mike Rapoport 2019-12-04 @300 pud_t *pud;
^1da177e4c3f41 Linus Torvalds 2005-04-16 301 pmd_t *pmd;
^1da177e4c3f41 Linus Torvalds 2005-04-16 302 pte_t *pte;
^1da177e4c3f41 Linus Torvalds 2005-04-16 303 unsigned long paddr, vaddr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 304 unsigned long pteval;
^1da177e4c3f41 Linus Torvalds 2005-04-16 305
^1da177e4c3f41 Linus Torvalds 2005-04-16 306 bitmap_bits = srmmu_nocache_size >> SRMMU_NOCACHE_BITMAP_SHIFT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 307
9415673e3e19f7 Mike Rapoport 2019-03-11 308 srmmu_nocache_pool = memblock_alloc(srmmu_nocache_size,
9415673e3e19f7 Mike Rapoport 2019-03-11 309 SRMMU_NOCACHE_ALIGN_MAX);
b1e1c869ffd1d8 Mike Rapoport 2019-03-11 310 if (!srmmu_nocache_pool)
b1e1c869ffd1d8 Mike Rapoport 2019-03-11 311 panic("%s: Failed to allocate %lu bytes align=0x%x\n",
b1e1c869ffd1d8 Mike Rapoport 2019-03-11 312 __func__, srmmu_nocache_size, SRMMU_NOCACHE_ALIGN_MAX);
^1da177e4c3f41 Linus Torvalds 2005-04-16 313 memset(srmmu_nocache_pool, 0, srmmu_nocache_size);
^1da177e4c3f41 Linus Torvalds 2005-04-16 314
54df2db36c93bb Akinobu Mita 2013-03-29 315 srmmu_nocache_bitmap =
9415673e3e19f7 Mike Rapoport 2019-03-11 316 memblock_alloc(BITS_TO_LONGS(bitmap_bits) * sizeof(long),
9415673e3e19f7 Mike Rapoport 2019-03-11 317 SMP_CACHE_BYTES);
b1e1c869ffd1d8 Mike Rapoport 2019-03-11 318 if (!srmmu_nocache_bitmap)
b1e1c869ffd1d8 Mike Rapoport 2019-03-11 319 panic("%s: Failed to allocate %zu bytes\n", __func__,
b1e1c869ffd1d8 Mike Rapoport 2019-03-11 320 BITS_TO_LONGS(bitmap_bits) * sizeof(long));
^1da177e4c3f41 Linus Torvalds 2005-04-16 321 bit_map_init(&srmmu_nocache_map, srmmu_nocache_bitmap, bitmap_bits);
^1da177e4c3f41 Linus Torvalds 2005-04-16 322
f71a2aacc63e31 Sam Ravnborg 2012-07-26 323 srmmu_swapper_pg_dir = __srmmu_get_nocache(SRMMU_PGD_TABLE_SIZE, SRMMU_PGD_TABLE_SIZE);
^1da177e4c3f41 Linus Torvalds 2005-04-16 324 memset(__nocache_fix(srmmu_swapper_pg_dir), 0, SRMMU_PGD_TABLE_SIZE);
^1da177e4c3f41 Linus Torvalds 2005-04-16 325 init_mm.pgd = srmmu_swapper_pg_dir;
^1da177e4c3f41 Linus Torvalds 2005-04-16 326
^1da177e4c3f41 Linus Torvalds 2005-04-16 327 srmmu_early_allocate_ptable_skeleton(SRMMU_NOCACHE_VADDR, srmmu_nocache_end);
^1da177e4c3f41 Linus Torvalds 2005-04-16 328
^1da177e4c3f41 Linus Torvalds 2005-04-16 329 paddr = __pa((unsigned long)srmmu_nocache_pool);
^1da177e4c3f41 Linus Torvalds 2005-04-16 330 vaddr = SRMMU_NOCACHE_VADDR;
^1da177e4c3f41 Linus Torvalds 2005-04-16 331
^1da177e4c3f41 Linus Torvalds 2005-04-16 332 while (vaddr < srmmu_nocache_end) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 333 pgd = pgd_offset_k(vaddr);
7235db268a2777 Mike Rapoport 2019-12-04 334 p4d = p4d_offset(__nocache_fix(pgd), vaddr);
7235db268a2777 Mike Rapoport 2019-12-04 335 pud = pud_offset(__nocache_fix(p4d), vaddr);
9701b264d3267b Sam Ravnborg 2012-05-13 336 pmd = pmd_offset(__nocache_fix(pgd), vaddr);
9701b264d3267b Sam Ravnborg 2012-05-13 337 pte = pte_offset_kernel(__nocache_fix(pmd), vaddr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 338
^1da177e4c3f41 Linus Torvalds 2005-04-16 339 pteval = ((paddr >> 4) | SRMMU_ET_PTE | SRMMU_PRIV);
^1da177e4c3f41 Linus Torvalds 2005-04-16 340
^1da177e4c3f41 Linus Torvalds 2005-04-16 341 if (srmmu_cache_pagetables)
^1da177e4c3f41 Linus Torvalds 2005-04-16 342 pteval |= SRMMU_CACHE;
^1da177e4c3f41 Linus Torvalds 2005-04-16 343
62875cff73fbb7 David S. Miller 2012-05-12 344 set_pte(__nocache_fix(pte), __pte(pteval));
^1da177e4c3f41 Linus Torvalds 2005-04-16 345
^1da177e4c3f41 Linus Torvalds 2005-04-16 346 vaddr += PAGE_SIZE;
^1da177e4c3f41 Linus Torvalds 2005-04-16 347 paddr += PAGE_SIZE;
^1da177e4c3f41 Linus Torvalds 2005-04-16 348 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 349
^1da177e4c3f41 Linus Torvalds 2005-04-16 350 flush_cache_all();
^1da177e4c3f41 Linus Torvalds 2005-04-16 351 flush_tlb_all();
^1da177e4c3f41 Linus Torvalds 2005-04-16 352 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 353
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 12853 bytes --]
next reply other threads:[~2020-05-20 0:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 0:57 kbuild test robot [this message]
2020-05-20 0:57 ` arch/sparc/mm/srmmu.c:300:9: error: variable 'pud' set but not used kbuild test robot
2020-05-20 13:20 ` Mike Rapoport
2020-05-20 23:46 ` Andrew Morton
2020-05-20 23:46 ` Andrew Morton
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200520005733.GB3101@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.