fs/f2fs/gc.c:622:12: warning: stack frame size of 3328 bytes in function 'get_victim_by_default'
by kernel test robot
Hi Chao,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9cdbf6467424045617cd6e79dcaad06bb8efa31c
commit: 093749e296e29a4b0162eb925a6701a01e8c9a98 f2fs: support age threshold based garbage collection
date: 7 months ago
config: powerpc-randconfig-r011-20210417 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f549176ad976caa3e19edd036df9a7e12770af7c)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 093749e296e29a4b0162eb925a6701a01e8c9a98
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:221:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/f2fs/gc.c:10:
In file included from include/linux/backing-dev.h:15:
In file included from include/linux/blkdev.h:13:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
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:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:223:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/f2fs/gc.c:10:
In file included from include/linux/backing-dev.h:15:
In file included from include/linux/blkdev.h:13:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
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:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:225:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/f2fs/gc.c:10:
In file included from include/linux/backing-dev.h:15:
In file included from include/linux/blkdev.h:13:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
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:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:227:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/f2fs/gc.c:10:
In file included from include/linux/backing-dev.h:15:
In file included from include/linux/blkdev.h:13:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
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:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:229:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
fs/f2fs/gc.c:1358:12: warning: stack frame size of 2160 bytes in function 'gc_data_segment' [-Wframe-larger-than=]
static int gc_data_segment(struct f2fs_sb_info *sbi, struct f2fs_summary *sum,
^
>> fs/f2fs/gc.c:622:12: warning: stack frame size of 3328 bytes in function 'get_victim_by_default' [-Wframe-larger-than=]
static int get_victim_by_default(struct f2fs_sb_info *sbi,
^
14 warnings generated.
vim +/get_victim_by_default +622 fs/f2fs/gc.c
093749e296e29a Chao Yu 2020-08-04 613
0a8165d7c2cf13 Jaegeuk Kim 2012-11-29 614 /*
111d2495a8a8fb Masanari Iida 2013-03-19 615 * This function is called from two paths.
7bc0900347e069 Jaegeuk Kim 2012-11-02 616 * One is garbage collection and the other is SSR segment selection.
7bc0900347e069 Jaegeuk Kim 2012-11-02 617 * When it is called during GC, it just gets a victim segment
7bc0900347e069 Jaegeuk Kim 2012-11-02 618 * and it does not remove it from dirty seglist.
7bc0900347e069 Jaegeuk Kim 2012-11-02 619 * When it is called from SSR segment selection, it finds a segment
7bc0900347e069 Jaegeuk Kim 2012-11-02 620 * which has minimum valid blocks and removes it from dirty seglist.
7bc0900347e069 Jaegeuk Kim 2012-11-02 621 */
7bc0900347e069 Jaegeuk Kim 2012-11-02 @622 static int get_victim_by_default(struct f2fs_sb_info *sbi,
093749e296e29a Chao Yu 2020-08-04 623 unsigned int *result, int gc_type, int type,
093749e296e29a Chao Yu 2020-08-04 624 char alloc_mode, unsigned long long age)
7bc0900347e069 Jaegeuk Kim 2012-11-02 625 {
7bc0900347e069 Jaegeuk Kim 2012-11-02 626 struct dirty_seglist_info *dirty_i = DIRTY_I(sbi);
e066b83c9b40f3 Jaegeuk Kim 2017-04-13 627 struct sit_info *sm = SIT_I(sbi);
7bc0900347e069 Jaegeuk Kim 2012-11-02 628 struct victim_sel_policy p;
3fa565039e3338 Sheng Yong 2016-09-29 629 unsigned int secno, last_victim;
04f0b2eaa3b3ee Qiuyang Sun 2019-06-05 630 unsigned int last_segment;
093749e296e29a Chao Yu 2020-08-04 631 unsigned int nsearched;
093749e296e29a Chao Yu 2020-08-04 632 bool is_atgc;
97767500781fae Qilong Zhang 2020-06-28 633 int ret = 0;
7bc0900347e069 Jaegeuk Kim 2012-11-02 634
210f41bc048263 Chao Yu 2014-09-15 635 mutex_lock(&dirty_i->seglist_lock);
04f0b2eaa3b3ee Qiuyang Sun 2019-06-05 636 last_segment = MAIN_SECS(sbi) * sbi->segs_per_sec;
210f41bc048263 Chao Yu 2014-09-15 637
7bc0900347e069 Jaegeuk Kim 2012-11-02 638 p.alloc_mode = alloc_mode;
093749e296e29a Chao Yu 2020-08-04 639 p.age = age;
093749e296e29a Chao Yu 2020-08-04 640 p.age_threshold = sbi->am.age_threshold;
7bc0900347e069 Jaegeuk Kim 2012-11-02 641
093749e296e29a Chao Yu 2020-08-04 642 retry:
093749e296e29a Chao Yu 2020-08-04 643 select_policy(sbi, gc_type, type, &p);
7bc0900347e069 Jaegeuk Kim 2012-11-02 644 p.min_segno = NULL_SEGNO;
093749e296e29a Chao Yu 2020-08-04 645 p.oldest_age = 0;
3fa565039e3338 Sheng Yong 2016-09-29 646 p.min_cost = get_max_cost(sbi, &p);
7bc0900347e069 Jaegeuk Kim 2012-11-02 647
093749e296e29a Chao Yu 2020-08-04 648 is_atgc = (p.gc_mode == GC_AT || p.alloc_mode == AT_SSR);
093749e296e29a Chao Yu 2020-08-04 649 nsearched = 0;
093749e296e29a Chao Yu 2020-08-04 650
093749e296e29a Chao Yu 2020-08-04 651 if (is_atgc)
093749e296e29a Chao Yu 2020-08-04 652 SIT_I(sbi)->dirty_min_mtime = ULLONG_MAX;
093749e296e29a Chao Yu 2020-08-04 653
e066b83c9b40f3 Jaegeuk Kim 2017-04-13 654 if (*result != NULL_SEGNO) {
97767500781fae Qilong Zhang 2020-06-28 655 if (!get_valid_blocks(sbi, *result, false)) {
97767500781fae Qilong Zhang 2020-06-28 656 ret = -ENODATA;
97767500781fae Qilong Zhang 2020-06-28 657 goto out;
97767500781fae Qilong Zhang 2020-06-28 658 }
97767500781fae Qilong Zhang 2020-06-28 659
97767500781fae Qilong Zhang 2020-06-28 660 if (sec_usage_check(sbi, GET_SEC_FROM_SEG(sbi, *result)))
97767500781fae Qilong Zhang 2020-06-28 661 ret = -EBUSY;
97767500781fae Qilong Zhang 2020-06-28 662 else
e066b83c9b40f3 Jaegeuk Kim 2017-04-13 663 p.min_segno = *result;
e066b83c9b40f3 Jaegeuk Kim 2017-04-13 664 goto out;
e066b83c9b40f3 Jaegeuk Kim 2017-04-13 665 }
e066b83c9b40f3 Jaegeuk Kim 2017-04-13 666
97767500781fae Qilong Zhang 2020-06-28 667 ret = -ENODATA;
3342bb303bf48d Chao Yu 2015-10-05 668 if (p.max_search == 0)
3342bb303bf48d Chao Yu 2015-10-05 669 goto out;
3342bb303bf48d Chao Yu 2015-10-05 670
e3080b0120a15e Chao Yu 2018-10-24 671 if (__is_large_section(sbi) && p.alloc_mode == LFS) {
e3080b0120a15e Chao Yu 2018-10-24 672 if (sbi->next_victim_seg[BG_GC] != NULL_SEGNO) {
e3080b0120a15e Chao Yu 2018-10-24 673 p.min_segno = sbi->next_victim_seg[BG_GC];
e3080b0120a15e Chao Yu 2018-10-24 674 *result = p.min_segno;
e3080b0120a15e Chao Yu 2018-10-24 675 sbi->next_victim_seg[BG_GC] = NULL_SEGNO;
e3080b0120a15e Chao Yu 2018-10-24 676 goto got_result;
e3080b0120a15e Chao Yu 2018-10-24 677 }
e3080b0120a15e Chao Yu 2018-10-24 678 if (gc_type == FG_GC &&
e3080b0120a15e Chao Yu 2018-10-24 679 sbi->next_victim_seg[FG_GC] != NULL_SEGNO) {
e3080b0120a15e Chao Yu 2018-10-24 680 p.min_segno = sbi->next_victim_seg[FG_GC];
e3080b0120a15e Chao Yu 2018-10-24 681 *result = p.min_segno;
e3080b0120a15e Chao Yu 2018-10-24 682 sbi->next_victim_seg[FG_GC] = NULL_SEGNO;
e3080b0120a15e Chao Yu 2018-10-24 683 goto got_result;
e3080b0120a15e Chao Yu 2018-10-24 684 }
e3080b0120a15e Chao Yu 2018-10-24 685 }
e3080b0120a15e Chao Yu 2018-10-24 686
e066b83c9b40f3 Jaegeuk Kim 2017-04-13 687 last_victim = sm->last_victim[p.gc_mode];
7bc0900347e069 Jaegeuk Kim 2012-11-02 688 if (p.alloc_mode == LFS && gc_type == FG_GC) {
7bc0900347e069 Jaegeuk Kim 2012-11-02 689 p.min_segno = check_bg_victims(sbi);
7bc0900347e069 Jaegeuk Kim 2012-11-02 690 if (p.min_segno != NULL_SEGNO)
7bc0900347e069 Jaegeuk Kim 2012-11-02 691 goto got_it;
7bc0900347e069 Jaegeuk Kim 2012-11-02 692 }
7bc0900347e069 Jaegeuk Kim 2012-11-02 693
7bc0900347e069 Jaegeuk Kim 2012-11-02 694 while (1) {
da52f8ade40b03 Jack Qiu 2020-06-18 695 unsigned long cost, *dirty_bitmap;
da52f8ade40b03 Jack Qiu 2020-06-18 696 unsigned int unit_no, segno;
da52f8ade40b03 Jack Qiu 2020-06-18 697
da52f8ade40b03 Jack Qiu 2020-06-18 698 dirty_bitmap = p.dirty_bitmap;
da52f8ade40b03 Jack Qiu 2020-06-18 699 unit_no = find_next_bit(dirty_bitmap,
da52f8ade40b03 Jack Qiu 2020-06-18 700 last_segment / p.ofs_unit,
da52f8ade40b03 Jack Qiu 2020-06-18 701 p.offset / p.ofs_unit);
da52f8ade40b03 Jack Qiu 2020-06-18 702 segno = unit_no * p.ofs_unit;
a43f7ec327b0d8 Chao Yu 2015-10-05 703 if (segno >= last_segment) {
e066b83c9b40f3 Jaegeuk Kim 2017-04-13 704 if (sm->last_victim[p.gc_mode]) {
e066b83c9b40f3 Jaegeuk Kim 2017-04-13 705 last_segment =
e066b83c9b40f3 Jaegeuk Kim 2017-04-13 706 sm->last_victim[p.gc_mode];
e066b83c9b40f3 Jaegeuk Kim 2017-04-13 707 sm->last_victim[p.gc_mode] = 0;
7bc0900347e069 Jaegeuk Kim 2012-11-02 708 p.offset = 0;
7bc0900347e069 Jaegeuk Kim 2012-11-02 709 continue;
7bc0900347e069 Jaegeuk Kim 2012-11-02 710 }
7bc0900347e069 Jaegeuk Kim 2012-11-02 711 break;
7bc0900347e069 Jaegeuk Kim 2012-11-02 712 }
a57e564d14d9d1 Jin Xu 2013-09-13 713
a57e564d14d9d1 Jin Xu 2013-09-13 714 p.offset = segno + p.ofs_unit;
688159b6db47a9 Fan Li 2016-02-03 715 nsearched++;
688159b6db47a9 Fan Li 2016-02-03 716
:::::: The code at line 622 was first introduced by commit
:::::: 7bc0900347e069a1676d28ad6f98cafaf8cfd6e9 f2fs: add garbage collection functions
:::::: TO: Jaegeuk Kim <jaegeuk.kim(a)samsung.com>
:::::: CC: Jaegeuk Kim <jaegeuk.kim(a)samsung.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [Patch v2 6/7] crypto: qce: common: Add support for AEAD algorithms
by kernel test robot
Hi Thara,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on cryptodev/master]
[also build test WARNING on next-20210416]
[cannot apply to crypto/master sparc-next/master v5.12-rc7]
[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]
url: https://github.com/0day-ci/linux/commits/Thara-Gopinath/Add-support-for-A...
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: riscv-randconfig-r014-20210417 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f549176ad976caa3e19edd036df9a7e12770af7c)
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
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/0day-ci/linux/commit/a623bcea70ec36a4169fc0c3e7c6e9541...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thara-Gopinath/Add-support-for-AEAD-algorithms-in-Qualcomm-Crypto-Engine-driver/20210417-212646
git checkout a623bcea70ec36a4169fc0c3e7c6e95412f81218
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/crypto/qce/common.c:20:18: warning: unused variable 'std_iv_sha1' [-Wunused-const-variable]
static const u32 std_iv_sha1[SHA256_DIGEST_SIZE / sizeof(u32)] = {
^
>> drivers/crypto/qce/common.c:24:18: warning: unused variable 'std_iv_sha256' [-Wunused-const-variable]
static const u32 std_iv_sha256[SHA256_DIGEST_SIZE / sizeof(u32)] = {
^
drivers/crypto/qce/common.c:49:1: warning: unused function 'qce_clear_array' [-Wunused-function]
qce_clear_array(struct qce_device *qce, u32 offset, unsigned int len)
^
drivers/crypto/qce/common.c:89:21: warning: unused function 'qce_be32_to_cpu_array' [-Wunused-function]
static unsigned int qce_be32_to_cpu_array(u32 *dst, const u8 *src, unsigned int len)
^
4 warnings generated.
vim +/std_iv_sha1 +20 drivers/crypto/qce/common.c
19
> 20 static const u32 std_iv_sha1[SHA256_DIGEST_SIZE / sizeof(u32)] = {
21 SHA1_H0, SHA1_H1, SHA1_H2, SHA1_H3, SHA1_H4, 0, 0, 0
22 };
23
> 24 static const u32 std_iv_sha256[SHA256_DIGEST_SIZE / sizeof(u32)] = {
25 SHA256_H0, SHA256_H1, SHA256_H2, SHA256_H3,
26 SHA256_H4, SHA256_H5, SHA256_H6, SHA256_H7
27 };
28
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[linux-next:master 12102/13394] arch/powerpc/mm/mem.c:53:12: warning: no previous prototype for function 'create_section_mapping'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 18250b538735142307082e4e99e3ae5c12d44013
commit: b26e8f27253a47bff90972b987112fd8396e9b8d [12102/13394] powerpc/mem: Move cache flushing functions into mm/cacheflush.c
config: powerpc64-randconfig-r012-20210417 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f549176ad976caa3e19edd036df9a7e12770af7c)
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
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout b26e8f27253a47bff90972b987112fd8396e9b8d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> arch/powerpc/mm/mem.c:53:12: warning: no previous prototype for function 'create_section_mapping' [-Wmissing-prototypes]
int __weak create_section_mapping(unsigned long start, unsigned long end,
^
arch/powerpc/mm/mem.c:53:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int __weak create_section_mapping(unsigned long start, unsigned long end,
^
static
1 warning generated.
vim +/create_section_mapping +53 arch/powerpc/mm/mem.c
bc02af93dd2bbd Yasunori Goto 2006-06-27 52
4e00c5affdd4b0 Logan Gunthorpe 2020-04-10 @53 int __weak create_section_mapping(unsigned long start, unsigned long end,
4e00c5affdd4b0 Logan Gunthorpe 2020-04-10 54 int nid, pgprot_t prot)
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 55 {
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 56 return -ENODEV;
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 57 }
fecbfabe1dc940 Benjamin Herrenschmidt 2016-07-05 58
:::::: The code at line 53 was first introduced by commit
:::::: 4e00c5affdd4b04e6392001716333971932f3d0c powerpc/mm: thread pgprot_t through create_section_mapping()
:::::: TO: Logan Gunthorpe <logang(a)deltatee.com>
:::::: CC: Linus Torvalds <torvalds(a)linux-foundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
fs/f2fs/super.c:3266:12: warning: stack frame size of 2192 bytes in function 'f2fs_scan_devices'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9cdbf6467424045617cd6e79dcaad06bb8efa31c
commit: de881df97768d07b342cbd1f8359b832afccace9 f2fs: support zone capacity less than zone size
date: 7 months ago
config: powerpc-randconfig-r011-20210417 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f549176ad976caa3e19edd036df9a7e12770af7c)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout de881df97768d07b342cbd1f8359b832afccace9
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:193:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/f2fs/super.c:12:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
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:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:195:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/f2fs/super.c:12:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
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:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:197:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/f2fs/super.c:12:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
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:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:199:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from fs/f2fs/super.c:12:
In file included from include/linux/buffer_head.h:14:
In file included from include/linux/pagemap.h:11:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:10:
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:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:201:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
fs/f2fs/super.c:3419:12: warning: stack frame size of 2704 bytes in function 'f2fs_fill_super' [-Wframe-larger-than=]
static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
^
>> fs/f2fs/super.c:3266:12: warning: stack frame size of 2192 bytes in function 'f2fs_scan_devices' [-Wframe-larger-than=]
static int f2fs_scan_devices(struct f2fs_sb_info *sbi)
^
14 warnings generated.
vim +/f2fs_scan_devices +3266 fs/f2fs/super.c
26d815ad75156a Jaegeuk Kim 2015-04-20 3265
3c62be17d4f562 Jaegeuk Kim 2016-10-06 @3266 static int f2fs_scan_devices(struct f2fs_sb_info *sbi)
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3267 {
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3268 struct f2fs_super_block *raw_super = F2FS_RAW_SUPER(sbi);
7bb3a371d19915 Masato Suzuki 2017-02-27 3269 unsigned int max_devices = MAX_DEVICES;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3270 int i;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3271
7bb3a371d19915 Masato Suzuki 2017-02-27 3272 /* Initialize single device information */
7bb3a371d19915 Masato Suzuki 2017-02-27 3273 if (!RDEV(0).path[0]) {
7bb3a371d19915 Masato Suzuki 2017-02-27 3274 if (!bdev_is_zoned(sbi->sb->s_bdev))
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3275 return 0;
7bb3a371d19915 Masato Suzuki 2017-02-27 3276 max_devices = 1;
7bb3a371d19915 Masato Suzuki 2017-02-27 3277 }
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3278
7bb3a371d19915 Masato Suzuki 2017-02-27 3279 /*
7bb3a371d19915 Masato Suzuki 2017-02-27 3280 * Initialize multiple devices information, or single
7bb3a371d19915 Masato Suzuki 2017-02-27 3281 * zoned block device information.
7bb3a371d19915 Masato Suzuki 2017-02-27 3282 */
026f05079b00a5 Kees Cook 2018-06-12 3283 sbi->devs = f2fs_kzalloc(sbi,
026f05079b00a5 Kees Cook 2018-06-12 3284 array_size(max_devices,
026f05079b00a5 Kees Cook 2018-06-12 3285 sizeof(struct f2fs_dev_info)),
026f05079b00a5 Kees Cook 2018-06-12 3286 GFP_KERNEL);
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3287 if (!sbi->devs)
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3288 return -ENOMEM;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3289
7bb3a371d19915 Masato Suzuki 2017-02-27 3290 for (i = 0; i < max_devices; i++) {
7bb3a371d19915 Masato Suzuki 2017-02-27 3291
7bb3a371d19915 Masato Suzuki 2017-02-27 3292 if (i > 0 && !RDEV(i).path[0])
7bb3a371d19915 Masato Suzuki 2017-02-27 3293 break;
7bb3a371d19915 Masato Suzuki 2017-02-27 3294
7bb3a371d19915 Masato Suzuki 2017-02-27 3295 if (max_devices == 1) {
7bb3a371d19915 Masato Suzuki 2017-02-27 3296 /* Single zoned block device mount */
7bb3a371d19915 Masato Suzuki 2017-02-27 3297 FDEV(0).bdev =
7bb3a371d19915 Masato Suzuki 2017-02-27 3298 blkdev_get_by_dev(sbi->sb->s_bdev->bd_dev,
7bb3a371d19915 Masato Suzuki 2017-02-27 3299 sbi->sb->s_mode, sbi->sb->s_type);
7bb3a371d19915 Masato Suzuki 2017-02-27 3300 } else {
7bb3a371d19915 Masato Suzuki 2017-02-27 3301 /* Multi-device mount */
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3302 memcpy(FDEV(i).path, RDEV(i).path, MAX_PATH_LEN);
7bb3a371d19915 Masato Suzuki 2017-02-27 3303 FDEV(i).total_segments =
7bb3a371d19915 Masato Suzuki 2017-02-27 3304 le32_to_cpu(RDEV(i).total_segments);
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3305 if (i == 0) {
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3306 FDEV(i).start_blk = 0;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3307 FDEV(i).end_blk = FDEV(i).start_blk +
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3308 (FDEV(i).total_segments <<
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3309 sbi->log_blocks_per_seg) - 1 +
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3310 le32_to_cpu(raw_super->segment0_blkaddr);
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3311 } else {
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3312 FDEV(i).start_blk = FDEV(i - 1).end_blk + 1;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3313 FDEV(i).end_blk = FDEV(i).start_blk +
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3314 (FDEV(i).total_segments <<
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3315 sbi->log_blocks_per_seg) - 1;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3316 }
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3317 FDEV(i).bdev = blkdev_get_by_path(FDEV(i).path,
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3318 sbi->sb->s_mode, sbi->sb->s_type);
7bb3a371d19915 Masato Suzuki 2017-02-27 3319 }
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3320 if (IS_ERR(FDEV(i).bdev))
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3321 return PTR_ERR(FDEV(i).bdev);
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3322
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3323 /* to release errored devices */
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3324 sbi->s_ndevs = i + 1;
3c62be17d4f562 Jaegeuk Kim 2016-10-06 3325
:::::: The code at line 3266 was first introduced by commit
:::::: 3c62be17d4f562f43fe1d03b48194399caa35aa5 f2fs: support multiple devices
:::::: TO: Jaegeuk Kim <jaegeuk(a)kernel.org>
:::::: CC: Jaegeuk Kim <jaegeuk(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
drivers/media/test-drivers/vidtv/vidtv_mux.c:379:13: warning: stack frame size of 2848 bytes in function 'vidtv_mux_tick'
by kernel test robot
Hi Daniel,
FYI, the error/warning still remains.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 9cdbf6467424045617cd6e79dcaad06bb8efa31c
commit: f90cf6079bf67988f8b1ad1ade70fc89d0080905 media: vidtv: add a bridge driver
date: 7 months ago
config: powerpc-randconfig-r011-20210417 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project f549176ad976caa3e19edd036df9a7e12770af7c)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout f90cf6079bf67988f8b1ad1ade70fc89d0080905
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/test-drivers/vidtv/vidtv_mux.c:379:13: warning: stack frame size of 2848 bytes in function 'vidtv_mux_tick' [-Wframe-larger-than=]
static void vidtv_mux_tick(struct work_struct *work)
^
1 warning generated.
vim +/vidtv_mux_tick +379 drivers/media/test-drivers/vidtv/vidtv_mux.c
378
> 379 static void vidtv_mux_tick(struct work_struct *work)
380 {
381 struct vidtv_mux *m = container_of(work,
382 struct vidtv_mux,
383 mpeg_thread);
384 u32 nbytes;
385 u32 npkts;
386
387 while (m->streaming) {
388 nbytes = 0;
389
390 vidtv_mux_update_clk(m);
391
392 if (vidtv_mux_should_push_pcr(m))
393 nbytes += vidtv_mux_push_pcr(m);
394
395 if (vidtv_mux_should_push_si(m))
396 nbytes += vidtv_mux_push_si(m);
397
398 nbytes += vidtv_mux_poll_encoders(m);
399 nbytes += vidtv_mux_check_mux_rate(m);
400
401 npkts = nbytes / TS_PACKET_LEN;
402
403 /* if the buffer is not aligned there is a bug somewhere */
404 if (nbytes % TS_PACKET_LEN)
405 pr_err_ratelimited("Misaligned buffer\n");
406
407 if (m->on_new_packets_available_cb)
408 m->on_new_packets_available_cb(m->priv,
409 m->mux_buf,
410 npkts);
411
412 vidtv_mux_clear(m);
413
414 usleep_range(VIDTV_SLEEP_USECS, VIDTV_MAX_SLEEP_USECS);
415 }
416 }
417
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v7 02/28] mm: Introduce struct folio
by kernel test robot
Hi "Matthew,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20210409]
[also build test ERROR on v5.12-rc6]
[cannot apply to linux/master linus/master hnaz-linux-mm/master v5.12-rc6 v5.12-rc5 v5.12-rc4]
[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]
url: https://github.com/0day-ci/linux/commits/Matthew-Wilcox-Oracle/Memory-Fol...
base: e99d8a8495175df8cb8b739f8cf9b0fc9d0cd3b5
config: powerpc-randconfig-r032-20210409 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/0day-ci/linux/commit/5658a201516d2ed74a34c328e3b55f552...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Matthew-Wilcox-Oracle/Memory-Folios/20210410-031353
git checkout 5658a201516d2ed74a34c328e3b55f552d4861d8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:274:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, lru) == __builtin_offsetof(struct folio, lru)' "offsetof(struct page, lru) == offsetof(struct folio, lru)"
FOLIO_MATCH(lru, lru);
^~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:275:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, compound_head) == __builtin_offsetof(struct folio, lru)' "offsetof(struct page, compound_head) == offsetof(struct folio, lru)"
FOLIO_MATCH(compound_head, lru);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:276:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, index) == __builtin_offsetof(struct folio, index)' "offsetof(struct page, index) == offsetof(struct folio, index)"
FOLIO_MATCH(index, index);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:277:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, private) == __builtin_offsetof(struct folio, private)' "offsetof(struct page, private) == offsetof(struct folio, private)"
FOLIO_MATCH(private, private);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:278:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, _mapcount) == __builtin_offsetof(struct folio, _mapcount)' "offsetof(struct page, _mapcount) == offsetof(struct folio, _mapcount)"
FOLIO_MATCH(_mapcount, _mapcount);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:279:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, _refcount) == __builtin_offsetof(struct folio, _refcount)' "offsetof(struct page, _refcount) == offsetof(struct folio, _refcount)"
FOLIO_MATCH(_refcount, _refcount);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:281:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, memcg_data) == __builtin_offsetof(struct folio, memcg_data)' "offsetof(struct page, memcg_data) == offsetof(struct folio, memcg_data)"
FOLIO_MATCH(memcg_data, memcg_data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:21:
include/linux/mman.h:155:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ) |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:133:21: note: expanded from macro '_calc_vm_trans'
: ((x) & (bit1)) / ((bit1) / (bit2))))
^ ~~~~~~~~~~~~~~~~~
include/linux/mman.h:156:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:133:21: note: expanded from macro '_calc_vm_trans'
: ((x) & (bit1)) / ((bit1) / (bit2))))
^ ~~~~~~~~~~~~~~~~~
2 warnings and 7 errors generated.
--
error: no override and no default toolchain set
init/Kconfig:70:warning: 'RUSTC_VERSION': number is invalid
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:274:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, lru) == __builtin_offsetof(struct folio, lru)' "offsetof(struct page, lru) == offsetof(struct folio, lru)"
FOLIO_MATCH(lru, lru);
^~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:275:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, compound_head) == __builtin_offsetof(struct folio, lru)' "offsetof(struct page, compound_head) == offsetof(struct folio, lru)"
FOLIO_MATCH(compound_head, lru);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:276:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, index) == __builtin_offsetof(struct folio, index)' "offsetof(struct page, index) == offsetof(struct folio, index)"
FOLIO_MATCH(index, index);
^~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:277:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, private) == __builtin_offsetof(struct folio, private)' "offsetof(struct page, private) == offsetof(struct folio, private)"
FOLIO_MATCH(private, private);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:278:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, _mapcount) == __builtin_offsetof(struct folio, _mapcount)' "offsetof(struct page, _mapcount) == offsetof(struct folio, _mapcount)"
FOLIO_MATCH(_mapcount, _mapcount);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:279:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, _refcount) == __builtin_offsetof(struct folio, _refcount)' "offsetof(struct page, _refcount) == offsetof(struct folio, _refcount)"
FOLIO_MATCH(_refcount, _refcount);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:14:
In file included from include/linux/compat.h:17:
In file included from include/linux/fs.h:15:
In file included from include/linux/radix-tree.h:19:
In file included from include/linux/xarray.h:14:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:21:
>> include/linux/mm_types.h:281:1: error: static_assert failed due to requirement '__builtin_offsetof(struct page, memcg_data) == __builtin_offsetof(struct folio, memcg_data)' "offsetof(struct page, memcg_data) == offsetof(struct folio, memcg_data)"
FOLIO_MATCH(memcg_data, memcg_data);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mm_types.h:272:2: note: expanded from macro 'FOLIO_MATCH'
static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:77:34: note: expanded from macro 'static_assert'
#define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:78:41: note: expanded from macro '__static_assert'
#define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
^ ~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:21:
include/linux/mman.h:155:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ) |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:133:21: note: expanded from macro '_calc_vm_trans'
: ((x) & (bit1)) / ((bit1) / (bit2))))
^ ~~~~~~~~~~~~~~~~~
include/linux/mman.h:156:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_SYNC, VM_SYNC ) |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:133:21: note: expanded from macro '_calc_vm_trans'
: ((x) & (bit1)) / ((bit1) / (bit2))))
^ ~~~~~~~~~~~~~~~~~
2 warnings and 7 errors generated.
make[2]: *** [scripts/Makefile.build:118: arch/powerpc/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1304: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:222: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +274 include/linux/mm_types.h
269
270 static_assert(sizeof(struct page) == sizeof(struct folio));
271 #define FOLIO_MATCH(pg, fl) \
272 static_assert(offsetof(struct page, pg) == offsetof(struct folio, fl))
273 FOLIO_MATCH(flags, flags);
> 274 FOLIO_MATCH(lru, lru);
> 275 FOLIO_MATCH(compound_head, lru);
> 276 FOLIO_MATCH(index, index);
> 277 FOLIO_MATCH(private, private);
> 278 FOLIO_MATCH(_mapcount, _mapcount);
> 279 FOLIO_MATCH(_refcount, _refcount);
280 #ifdef CONFIG_MEMCG
> 281 FOLIO_MATCH(memcg_data, memcg_data);
282 #endif
283 #undef FOLIO_MATCH
284
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[PATCH v3] serial: stm32: optimize spin lock usage
by dillon.minfei@gmail.com
From: dillon min <dillon.minfei(a)gmail.com>
This patch aims to fix two potential bug:
- no lock to protect uart register in this case
stm32_usart_threaded_interrupt()
spin_lock(&port->lock);
...
stm32_usart_receive_chars()
uart_handle_sysrq_char();
sysrq_function();
printk();
stm32_usart_console_write();
locked = 0; //since port->sysrq is not zero,
no lock to protect forward register
access.
- if add spin_trylock_irqsave() to protect uart register for sysrq = 1 case,
that might got recursive locking under UP.
So, use uart_prepare_sysrq_char(), uart_unlock_and_check_sysrq()
move sysrq handler position to irq/thread_d handler, just record
sysrq_ch in stm32_usart_receive_chars() by uart_prepare_sysrq_char()
delay the sysrq process to next interrupt handler.
new flow:
stm32_usart_threaded_interrupt()/stm32_usart_interrupt()
spin_lock_irqsave(&port->lock);
...
uart_unlock_and_check_sysrq();
spin_unlock_irqrestore();
handle_sysrq(sysrq_ch);
stm32_usart_threaded_interrupt()//stm32_usart_interrupt() return
Cc: Johan Hovold <johan(a)kernel.org>
Cc: Alexandre Torgue <alexandre.torgue(a)foss.st.com>
Cc: Maxime Coquelin <mcoquelin.stm32(a)gmail.com>
Cc: Gerald Baeza <gerald.baeza(a)foss.st.com>
Cc: Erwan Le Ray <erwan.leray(a)foss.st.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: dillon min <dillon.minfei(a)gmail.com>
---
v3: add uart_prepare_sysrq_char(), uart_unlock_and_check_sysrq() to move
sysrq handler inside interrupt routinei to avoid recursive locking,
according to Johan Hovold suggestion, thanks.
drivers/tty/serial/stm32-usart.c | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/drivers/tty/serial/stm32-usart.c b/drivers/tty/serial/stm32-usart.c
index b3675cf25a69..981f50ec784e 100644
--- a/drivers/tty/serial/stm32-usart.c
+++ b/drivers/tty/serial/stm32-usart.c
@@ -271,7 +271,7 @@ static void stm32_usart_receive_chars(struct uart_port *port, bool threaded)
}
}
- if (uart_handle_sysrq_char(port, c))
+ if (uart_prepare_sysrq_char(port, c))
continue;
uart_insert_char(port, sr, USART_SR_ORE, c, flag);
}
@@ -457,9 +457,10 @@ static irqreturn_t stm32_usart_interrupt(int irq, void *ptr)
struct uart_port *port = ptr;
struct stm32_port *stm32_port = to_stm32_port(port);
const struct stm32_usart_offsets *ofs = &stm32_port->info->ofs;
+ unsigned long flags;
u32 sr;
- spin_lock(&port->lock);
+ spin_lock_irqsave(&port->lock, flags);
sr = readl_relaxed(port->membase + ofs->isr);
@@ -477,7 +478,7 @@ static irqreturn_t stm32_usart_interrupt(int irq, void *ptr)
if ((sr & USART_SR_TXE) && !(stm32_port->tx_ch))
stm32_usart_transmit_chars(port);
- spin_unlock(&port->lock);
+ uart_unlock_and_check_sysrq(port, flags);
if (stm32_port->rx_ch)
return IRQ_WAKE_THREAD;
@@ -489,13 +490,14 @@ static irqreturn_t stm32_usart_threaded_interrupt(int irq, void *ptr)
{
struct uart_port *port = ptr;
struct stm32_port *stm32_port = to_stm32_port(port);
+ unsigned long flags;
- spin_lock(&port->lock);
+ spin_lock_irqsave(&port->lock, flags);
if (stm32_port->rx_ch)
stm32_usart_receive_chars(port, true);
- spin_unlock(&port->lock);
+ uart_unlock_and_check_sysrq(port, flags);
return IRQ_HANDLED;
}
@@ -1354,13 +1356,10 @@ static void stm32_usart_console_write(struct console *co, const char *s,
u32 old_cr1, new_cr1;
int locked = 1;
- local_irq_save(flags);
- if (port->sysrq)
- locked = 0;
- else if (oops_in_progress)
- locked = spin_trylock(&port->lock);
+ if (oops_in_progress)
+ locked = spin_trylock_irqsave(&port->lock, flags);
else
- spin_lock(&port->lock);
+ spin_lock_irqsave(&port->lock, flags);
/* Save and disable interrupts, enable the transmitter */
old_cr1 = readl_relaxed(port->membase + ofs->cr1);
@@ -1374,8 +1373,7 @@ static void stm32_usart_console_write(struct console *co, const char *s,
writel_relaxed(old_cr1, port->membase + ofs->cr1);
if (locked)
- spin_unlock(&port->lock);
- local_irq_restore(flags);
+ spin_unlock_irqrestore(&port->lock, flags);
}
static int stm32_usart_console_setup(struct console *co, char *options)
--
2.7.4
1 year, 5 months
Re: [PATCH 3/3] staging: rtl8712: Use existing arc4 implementation
by kernel test robot
Hi Christophe,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Christophe-JAILLET/staging-rtl81...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 32abcac8037da5dc570c22abf266cbb92eee9fc9
config: x86_64-randconfig-s021-20210416 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://github.com/0day-ci/linux/commit/ea2709e5f53370e588967f79d2eb84755...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Christophe-JAILLET/staging-rtl8188eu-Use-existing-arc4-implementation/20210410-213656
git checkout ea2709e5f53370e588967f79d2eb847555ea9d3b
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: drivers/staging/rtl8712/rtl871x_security.o: in function `r8712_wep_encrypt':
>> drivers/staging/rtl8712/rtl871x_security.c:126: undefined reference to `arc4_setkey'
>> ld: drivers/staging/rtl8712/rtl871x_security.c:127: undefined reference to `arc4_crypt'
ld: drivers/staging/rtl8712/rtl871x_security.c:129: undefined reference to `arc4_crypt'
>> ld: drivers/staging/rtl8712/rtl871x_security.c:137: undefined reference to `arc4_setkey'
ld: drivers/staging/rtl8712/rtl871x_security.c:138: undefined reference to `arc4_crypt'
ld: drivers/staging/rtl8712/rtl871x_security.c:140: undefined reference to `arc4_crypt'
ld: drivers/staging/rtl8712/rtl871x_security.o: in function `r8712_wep_decrypt':
drivers/staging/rtl8712/rtl871x_security.c:177: undefined reference to `arc4_setkey'
ld: drivers/staging/rtl8712/rtl871x_security.c:178: undefined reference to `arc4_crypt'
ld: drivers/staging/rtl8712/rtl871x_security.o: in function `r8712_tkip_encrypt':
drivers/staging/rtl8712/rtl871x_security.c:550: undefined reference to `arc4_setkey'
ld: drivers/staging/rtl8712/rtl871x_security.c:551: undefined reference to `arc4_crypt'
ld: drivers/staging/rtl8712/rtl871x_security.c:553: undefined reference to `arc4_crypt'
ld: drivers/staging/rtl8712/rtl871x_security.c:562: undefined reference to `arc4_setkey'
ld: drivers/staging/rtl8712/rtl871x_security.c:563: undefined reference to `arc4_crypt'
ld: drivers/staging/rtl8712/rtl871x_security.c:565: undefined reference to `arc4_crypt'
ld: drivers/staging/rtl8712/rtl871x_security.o: in function `r8712_tkip_decrypt':
drivers/staging/rtl8712/rtl871x_security.c:625: undefined reference to `arc4_setkey'
ld: drivers/staging/rtl8712/rtl871x_security.c:626: undefined reference to `arc4_crypt'
vim +126 drivers/staging/rtl8712/rtl871x_security.c
88
89 /*
90 * Need to consider the fragment situation
91 */
92 void r8712_wep_encrypt(struct _adapter *padapter, u8 *pxmitframe)
93 { /* exclude ICV */
94 unsigned char crc[4];
95 struct arc4_ctx mycontext;
96 u32 curfragnum, length, keylength, pki;
97 u8 *pframe, *payload, *iv; /*,*wepkey*/
98 u8 wepkey[16];
99 struct pkt_attrib *pattrib = &((struct xmit_frame *)
100 pxmitframe)->attrib;
101 struct security_priv *psecuritypriv = &padapter->securitypriv;
102 struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
103
104 if (((struct xmit_frame *)pxmitframe)->buf_addr == NULL)
105 return;
106 pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + TXDESC_OFFSET;
107 /*start to encrypt each fragment*/
108 if ((pattrib->encrypt == _WEP40_) || (pattrib->encrypt == _WEP104_)) {
109 pki = psecuritypriv->PrivacyKeyIndex;
110 keylength = psecuritypriv->DefKeylen[pki];
111 for (curfragnum = 0; curfragnum < pattrib->nr_frags;
112 curfragnum++) {
113 iv = pframe + pattrib->hdrlen;
114 memcpy(&wepkey[0], iv, 3);
115 memcpy(&wepkey[3], &psecuritypriv->DefKey[
116 psecuritypriv->PrivacyKeyIndex].skey[0],
117 keylength);
118 payload = pframe + pattrib->iv_len + pattrib->hdrlen;
119 if ((curfragnum + 1) == pattrib->nr_frags) {
120 length = pattrib->last_txcmdsz -
121 pattrib->hdrlen -
122 pattrib->iv_len -
123 pattrib->icv_len;
124 *((__le32 *)crc) = cpu_to_le32(getcrc32(
125 payload, length));
> 126 arc4_setkey(&mycontext, wepkey, 3 + keylength);
> 127 arc4_crypt(&mycontext, payload, payload,
128 length);
129 arc4_crypt(&mycontext, payload + length,
130 crc, 4);
131 } else {
132 length = pxmitpriv->frag_len -
133 pattrib->hdrlen - pattrib->iv_len -
134 pattrib->icv_len;
135 *((__le32 *)crc) = cpu_to_le32(getcrc32(
136 payload, length));
> 137 arc4_setkey(&mycontext, wepkey, 3 + keylength);
138 arc4_crypt(&mycontext, payload, payload,
139 length);
140 arc4_crypt(&mycontext, payload + length,
141 crc, 4);
142 pframe += pxmitpriv->frag_len;
143 pframe = (u8 *)RND4((addr_t)(pframe));
144 }
145 }
146 }
147 }
148
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[trace:ftrace/fgraph-multi 38/40] kernel/trace/trace.h:856:2: error: redeclaration of enumerator 'TRACE_GRAPH_NOTRACE_BIT'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git ftrace/fgraph-multi
head: 978dc256bd4d08df876d58b4fa01ba4cb3926242
commit: af135865534e79074152c9939d2083fce5931fe1 [38/40] function_graph: Move graph notrace bit to shadow stack global var
config: i386-randconfig-r035-20210416 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git/c...
git remote add trace https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git
git fetch --no-tags trace ftrace/fgraph-multi
git checkout af135865534e79074152c9939d2083fce5931fe1
# save the attached .config to linux build tree
make W=1 W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from kernel/trace/trace_output.h:6,
from kernel/trace/ftrace.c:45:
>> kernel/trace/trace.h:856:2: error: redeclaration of enumerator 'TRACE_GRAPH_NOTRACE_BIT'
856 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/ftrace.h:10,
from kernel/trace/ftrace.c:29:
include/linux/trace_recursion.h:65:2: note: previous definition of 'TRACE_GRAPH_NOTRACE_BIT' was here
65 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:300:5: warning: no previous prototype for '__register_ftrace_function' [-Wmissing-prototypes]
300 | int __register_ftrace_function(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:343:5: warning: no previous prototype for '__unregister_ftrace_function' [-Wmissing-prototypes]
343 | int __unregister_ftrace_function(struct ftrace_ops *ops)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:3872:15: warning: no previous prototype for 'arch_ftrace_match_adjust' [-Wmissing-prototypes]
3872 | char * __weak arch_ftrace_match_adjust(char *str, const char *search)
| ^~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from kernel/trace/trace.c:52:
>> kernel/trace/trace.h:856:2: error: redeclaration of enumerator 'TRACE_GRAPH_NOTRACE_BIT'
856 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/ftrace.h:10,
from kernel/trace/trace.c:31:
include/linux/trace_recursion.h:65:2: note: previous definition of 'TRACE_GRAPH_NOTRACE_BIT' was here
65 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace.c: In function 'trace_check_vprintf':
kernel/trace/trace.c:3718:3: warning: function 'trace_check_vprintf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
3718 | trace_seq_vprintf(&iter->seq, iter->fmt, ap);
| ^~~~~~~~~~~~~~~~~
kernel/trace/trace.c:3757:3: warning: function 'trace_check_vprintf' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
3757 | trace_seq_vprintf(&iter->seq, p, ap);
| ^~~~~~~~~~~~~~~~~
--
In file included from kernel/trace/trace_output.h:6,
from kernel/trace/trace_output.c:14:
>> kernel/trace/trace.h:856:2: error: redeclaration of enumerator 'TRACE_GRAPH_NOTRACE_BIT'
856 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/ftrace.h:10,
from kernel/trace/trace_output.c:10:
include/linux/trace_recursion.h:65:2: note: previous definition of 'TRACE_GRAPH_NOTRACE_BIT' was here
65 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace_output.c: In function 'trace_output_raw':
kernel/trace/trace_output.c:331:2: warning: function 'trace_output_raw' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
331 | trace_seq_vprintf(s, trace_event_format(iter, fmt), ap);
| ^~~~~~~~~~~~~~~~~
--
In file included from kernel/trace/trace_stat.c:18:
>> kernel/trace/trace.h:856:2: error: redeclaration of enumerator 'TRACE_GRAPH_NOTRACE_BIT'
856 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/ftrace.h:10,
from kernel/trace/trace.h:13,
from kernel/trace/trace_stat.c:18:
include/linux/trace_recursion.h:65:2: note: previous definition of 'TRACE_GRAPH_NOTRACE_BIT' was here
65 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
--
In file included from kernel/trace/trace_functions.c:20:
>> kernel/trace/trace.h:856:2: error: redeclaration of enumerator 'TRACE_GRAPH_NOTRACE_BIT'
856 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/ftrace.h:10,
from kernel/trace/trace_functions.c:16:
include/linux/trace_recursion.h:65:2: note: previous definition of 'TRACE_GRAPH_NOTRACE_BIT' was here
65 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace_functions.c: In function 'ftrace_create_function_files':
kernel/trace/trace_functions.c:78:2: error: 'ret' undeclared (first use in this function); did you mean 'net'?
78 | ret = allocate_fgraph_ops(tr, tr->ops);
| ^~~
| net
kernel/trace/trace_functions.c:78:2: note: each undeclared identifier is reported only once for each function it appears in
--
In file included from kernel/trace/trace_preemptirq.c:13:
>> kernel/trace/trace.h:856:2: error: redeclaration of enumerator 'TRACE_GRAPH_NOTRACE_BIT'
856 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/ftrace.h:10,
from kernel/trace/trace_preemptirq.c:11:
include/linux/trace_recursion.h:65:2: note: previous definition of 'TRACE_GRAPH_NOTRACE_BIT' was here
65 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace_preemptirq.c:88:16: warning: no previous prototype for 'trace_hardirqs_on_caller' [-Wmissing-prototypes]
88 | __visible void trace_hardirqs_on_caller(unsigned long caller_addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace_preemptirq.c:103:16: warning: no previous prototype for 'trace_hardirqs_off_caller' [-Wmissing-prototypes]
103 | __visible void trace_hardirqs_off_caller(unsigned long caller_addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from kernel/trace/trace_dynevent.h:14,
from kernel/trace/trace_synth.h:5,
from kernel/trace/trace_events_hist.c:22:
>> kernel/trace/trace.h:856:2: error: redeclaration of enumerator 'TRACE_GRAPH_NOTRACE_BIT'
856 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/linux/ftrace.h:10,
from include/linux/perf_event.h:49,
from include/linux/trace_events.h:10,
from kernel/trace/trace_events_hist.c:18:
include/linux/trace_recursion.h:65:2: note: previous definition of 'TRACE_GRAPH_NOTRACE_BIT' was here
65 | TRACE_GRAPH_NOTRACE_BIT,
| ^~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace_events_hist.c: In function 'unregister_field_var_hists':
kernel/trace/trace_events_hist.c:5228:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
5228 | int ret;
| ^~~
vim +/TRACE_GRAPH_NOTRACE_BIT +856 kernel/trace/trace.h
828
829 enum {
830 TRACE_GRAPH_FL = 1,
831
832 /*
833 * In the very unlikely case that an interrupt came in
834 * at a start of graph tracing, and we want to trace
835 * the function in that interrupt, the depth can be greater
836 * than zero, because of the preempted start of a previous
837 * trace. In an even more unlikely case, depth could be 2
838 * if a softirq interrupted the start of graph tracing,
839 * followed by an interrupt preempting a start of graph
840 * tracing in the softirq, and depth can even be 3
841 * if an NMI came in at the start of an interrupt function
842 * that preempted a softirq start of a function that
843 * preempted normal context!!!! Luckily, it can't be
844 * greater than 3, so the next two bits are a mask
845 * of what the depth is when we set TRACE_GRAPH_FL
846 */
847
848 TRACE_GRAPH_DEPTH_START_BIT,
849 TRACE_GRAPH_DEPTH_END_BIT,
850
851 /*
852 * To implement set_graph_notrace, if this bit is set, we ignore
853 * function graph tracing of called functions, until the return
854 * function is called to clear it.
855 */
> 856 TRACE_GRAPH_NOTRACE_BIT,
857 };
858
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months