All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Rutland <mark.rutland@arm.com>
To: kernel test robot <lkp@intel.com>
Cc: clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
	linux-kernel@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: [peterz-queue:locking/core 21/21] drivers/net/usb/r8152.c:7474:13: warning: stack frame size (9568) exceeds limit (8192) in function 'r8156b_hw_phy_cfg'
Date: Mon, 19 Jul 2021 11:07:19 +0100	[thread overview]
Message-ID: <20210719100719.GB12806@C02TD0UTHF1T.local> (raw)
In-Reply-To: <202107191712.2fNjndRF-lkp@intel.com>

On Mon, Jul 19, 2021 at 05:24:25PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
> head:   cf3ee3c8c29dc349b2cf52e5e72e8cb805ff5e57
> commit: cf3ee3c8c29dc349b2cf52e5e72e8cb805ff5e57 [21/21] locking/atomic: add generic arch_*() bitops
> config: riscv-randconfig-r002-20210719 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 5d5b08761f944d5b9822d582378333cc4b36a0a7)
> 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://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=cf3ee3c8c29dc349b2cf52e5e72e8cb805ff5e57
>         git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
>         git fetch --no-tags peterz-queue locking/core
>         git checkout cf3ee3c8c29dc349b2cf52e5e72e8cb805ff5e57
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
> >> drivers/net/usb/r8152.c:7474:13: warning: stack frame size (9568) exceeds limit (8192) in function 'r8156b_hw_phy_cfg' [-Wframe-larger-than]
>    static void r8156b_hw_phy_cfg(struct r8152 *tp)
>                ^
>    1 warning generated.
> 
> 
> vim +/r8156b_hw_phy_cfg +7474 drivers/net/usb/r8152.c

> 195aae321c829d Hayes Wang 2021-04-16  7866  	rtl_green_en(tp, test_bit(GREEN_ETHERNET, &tp->flags));

From local testing, it looks like this test_bit() really confuses the
compiler and forces it to spill much more than it should otherwise need
to.

The good news is that Marco's suggestion of avoiding
instrumened-non-atomic.h (when using plain accesses) sidesteps this, so
I reckon we should go with that.

Should I send that as a fixup, or should I send a new version of the
whole series?

Thanks,
Mark.

WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: kbuild-all@lists.01.org
Subject: Re: [peterz-queue:locking/core 21/21] drivers/net/usb/r8152.c:7474:13: warning: stack frame size (9568) exceeds limit (8192) in function 'r8156b_hw_phy_cfg'
Date: Mon, 19 Jul 2021 11:07:19 +0100	[thread overview]
Message-ID: <20210719100719.GB12806@C02TD0UTHF1T.local> (raw)
In-Reply-To: <202107191712.2fNjndRF-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 2297 bytes --]

On Mon, Jul 19, 2021 at 05:24:25PM +0800, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git locking/core
> head:   cf3ee3c8c29dc349b2cf52e5e72e8cb805ff5e57
> commit: cf3ee3c8c29dc349b2cf52e5e72e8cb805ff5e57 [21/21] locking/atomic: add generic arch_*() bitops
> config: riscv-randconfig-r002-20210719 (attached as .config)
> compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 5d5b08761f944d5b9822d582378333cc4b36a0a7)
> 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://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?id=cf3ee3c8c29dc349b2cf52e5e72e8cb805ff5e57
>         git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
>         git fetch --no-tags peterz-queue locking/core
>         git checkout cf3ee3c8c29dc349b2cf52e5e72e8cb805ff5e57
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All warnings (new ones prefixed by >>):
> 
> >> drivers/net/usb/r8152.c:7474:13: warning: stack frame size (9568) exceeds limit (8192) in function 'r8156b_hw_phy_cfg' [-Wframe-larger-than]
>    static void r8156b_hw_phy_cfg(struct r8152 *tp)
>                ^
>    1 warning generated.
> 
> 
> vim +/r8156b_hw_phy_cfg +7474 drivers/net/usb/r8152.c

> 195aae321c829d Hayes Wang 2021-04-16  7866  	rtl_green_en(tp, test_bit(GREEN_ETHERNET, &tp->flags));

>From local testing, it looks like this test_bit() really confuses the
compiler and forces it to spill much more than it should otherwise need
to.

The good news is that Marco's suggestion of avoiding
instrumened-non-atomic.h (when using plain accesses) sidesteps this, so
I reckon we should go with that.

Should I send that as a fixup, or should I send a new version of the
whole series?

Thanks,
Mark.

  reply	other threads:[~2021-07-19 10:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-19  9:24 [peterz-queue:locking/core 21/21] drivers/net/usb/r8152.c:7474:13: warning: stack frame size (9568) exceeds limit (8192) in function 'r8156b_hw_phy_cfg' kernel test robot
2021-07-19  9:24 ` kernel test robot
2021-07-19 10:07 ` Mark Rutland [this message]
2021-07-19 10:07   ` Mark Rutland

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=20210719100719.GB12806@C02TD0UTHF1T.local \
    --to=mark.rutland@arm.com \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=peterz@infradead.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.