Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1624540 > unrolled thread

Re: [PATCH] soc/tegra: pmc: Don't allocate struct tegra_powergate on stack

Started byViresh Kumar <viresh.kumar@linaro.org>
First post2017-04-17 08:00 +0200
Last post2017-04-24 13:00 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] soc/tegra: pmc: Don't allocate struct tegra_powergate on  stack Viresh Kumar <viresh.kumar@linaro.org> - 2017-04-17 08:00 +0200
    Re: [PATCH] soc/tegra: pmc: Don't allocate struct tegra_powergate on  stack Jon Hunter <jonathanh@nvidia.com> - 2017-04-24 13:00 +0200

#1624540 — Re: [PATCH] soc/tegra: pmc: Don't allocate struct tegra_powergate on stack

FromViresh Kumar <viresh.kumar@linaro.org>
Date2017-04-17 08:00 +0200
SubjectRe: [PATCH] soc/tegra: pmc: Don't allocate struct tegra_powergate on stack
Message-ID<tx7RD-5kx-1@gated-at.bofh.it>
On 21-03-17, 16:09, Viresh Kumar wrote:
> On 21-03-17, 10:37, Jon Hunter wrote:
> > 
> > On 21/03/17 05:24, Viresh Kumar wrote:
> > > The size of the struct tegra_powergate is quite big and if any more
> > > fields are added to the internal genpd structure, following warnings are
> > > thrown:
> > > 
> > > drivers/soc/tegra/pmc.c:577:1: warning: the frame size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=]
> > 
> > Hmmm ... AFAICT the size of the tegra_powergate struct is 312 bytes
> > (based upon next-20170321) and so it looks like something massive needs
> > to be added to the genpd struct to blow this up to over 1024 bytes. Are
> > there some genpd changes in-flight that are causing this?
> 
> https://marc.info/?l=linux-kernel&m=149000247329743&w=2
> 
> This is up for discussion right now though and we don't know if it
> will surely get merged or not.

@Jon: Regardless of the above series, do you want this patch to be merged as it
will still be better to avoid keeping large structures on stack.

Else I would be required to keep this in my above series from now on.

-- 
viresh

[toc] | [next] | [standalone]


#1629423

FromJon Hunter <jonathanh@nvidia.com>
Date2017-04-24 13:00 +0200
Message-ID<tzJSO-5YI-17@gated-at.bofh.it>
In reply to#1624540
On 17/04/17 06:50, Viresh Kumar wrote:
> On 21-03-17, 16:09, Viresh Kumar wrote:
>> On 21-03-17, 10:37, Jon Hunter wrote:
>>>
>>> On 21/03/17 05:24, Viresh Kumar wrote:
>>>> The size of the struct tegra_powergate is quite big and if any more
>>>> fields are added to the internal genpd structure, following warnings are
>>>> thrown:
>>>>
>>>> drivers/soc/tegra/pmc.c:577:1: warning: the frame size of 1176 bytes is larger than 1024 bytes [-Wframe-larger-than=]
>>>
>>> Hmmm ... AFAICT the size of the tegra_powergate struct is 312 bytes
>>> (based upon next-20170321) and so it looks like something massive needs
>>> to be added to the genpd struct to blow this up to over 1024 bytes. Are
>>> there some genpd changes in-flight that are causing this?
>>
>> https://marc.info/?l=linux-kernel&m=149000247329743&w=2
>>
>> This is up for discussion right now though and we don't know if it
>> will surely get merged or not.
> 
> @Jon: Regardless of the above series, do you want this patch to be merged as it
> will still be better to avoid keeping large structures on stack.

Given that it is currently much less than the default threshold, it
seems ok to me as-is. However, if it looks like you patch to add the
device struct to the gpd struct is going to be accepted, then it is fine
with me. Maybe we should wait for you patch to be accepted then this can
be applied as a fix.

Jon

-- 
nvpublic

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web