linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Viresh Kumar <viresh.kumar@linaro.org>
Cc: kbuild-all@lists.01.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	kbuild test robot <lkp@intel.com>,
	Linux PM list <linux-pm@vger.kernel.org>
Subject: Re: drivers/acpi/processor_thermal.c:66:1: warning: the frame size of 2160 bytes is larger than 2048 bytes
Date: Fri, 17 Jan 2020 16:51:21 +0100	[thread overview]
Message-ID: <CAMuHMdX6-jb1W8uC2_237m8ctCpsnGp=JCxqt8pCWVqNXHmkVg@mail.gmail.com> (raw)
In-Reply-To: <201911151357.A9MjGImg%lkp@intel.com>

Hi Rafael, Viresh,

On Fri, Nov 15, 2019 at 6:23 AM kbuild test robot <lkp@intel.com> wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   96b95eff4a591dbac582c2590d067e356a18aacb
> commit: 3000ce3c52f8b8db093e4dc649cd172390f71137 cpufreq: Use per-policy frequency QoS
> date:   4 weeks ago
> config: ia64-randconfig-a001-20191115 (attached as .config)
> compiler: ia64-linux-gcc (GCC) 7.4.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 3000ce3c52f8b8db093e4dc649cd172390f71137
>         # save the attached .config to linux build tree
>         GCC_VERSION=7.4.0 make.cross ARCH=ia64
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>

Seeing similar warnings on arm64, so this triggered my attention.

> --
>    drivers/cpufreq/cpufreq.c: In function 'refresh_frequency_limits.part.33':
> >> drivers/cpufreq/cpufreq.c:1116:1: warning: the frame size of 2160 bytes is larger than 2048 bytes [-Wframe-larger-than=]

|       struct cpufreq_policy new_policy;

That's a large struct on the stack...

|       if (!policy_is_inactive(policy)) {
|               new_policy = *policy;

Let's make a copy?
How well does this work, given struct cpufreq_policy contains a
work_struct, list_head, kobject, completion, semaphore, spinlock_t,
wait_queue_head_t, and two notifier_blocks, which are all objects you
cannot just copy and reuse?

|               pr_debug("updating policy for CPU %u\n", policy->cpu);
|
|               cpufreq_set_policy(policy, &new_policy);

If cpufreq_set_policy() uses only a few fields from new_policy, it might
be a good idea to extract those into its own structure.

>     }
>     ^
>    drivers/cpufreq/cpufreq.c: In function 'store_scaling_governor':
>    drivers/cpufreq/cpufreq.c:789:1: warning: the frame size of 2176 bytes is larger than 2048 bytes [-Wframe-larger-than=]

|       struct cpufreq_policy new_policy;
|
|       memcpy(&new_policy, policy, sizeof(*policy));

Likewise.

>     }
>     ^
>    drivers/cpufreq/cpufreq.c: In function 'cpufreq_init_policy':
>    drivers/cpufreq/cpufreq.c:1081:1: warning: the frame size of 2160 bytes is larger than 2048 bytes [-Wframe-larger-than=]

|       struct cpufreq_policy new_policy;
|
|       memcpy(&new_policy, policy, sizeof(*policy));

One more.

>     }
>     ^

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

       reply	other threads:[~2020-01-17 15:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <201911151357.A9MjGImg%lkp@intel.com>
2020-01-17 15:51 ` Geert Uytterhoeven [this message]
2020-01-20 10:16   ` drivers/acpi/processor_thermal.c:66:1: warning: the frame size of 2160 bytes is larger than 2048 bytes Rafael J. Wysocki
2020-01-21  0:40     ` Rafael J. Wysocki
2020-01-21  7:51       ` Geert Uytterhoeven

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='CAMuHMdX6-jb1W8uC2_237m8ctCpsnGp=JCxqt8pCWVqNXHmkVg@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=viresh.kumar@linaro.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).