[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a3hrOTvTP6fOBLM8RF4fH4XRTPV54enk1Gd4uTSQvW2wQ@mail.gmail.com>
Date: Fri, 29 May 2020 22:43:47 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Chris Wilson <chris@...is-wilson.co.uk>
Cc: Christian König <christian.koenig@....com>,
Daniel Vetter <daniel@...ll.ch>,
David Airlie <airlied@...ux.ie>,
Nirmoy Das <nirmoy.das@....com>,
kbuild test robot <lkp@...el.com>,
Tvrtko Ursulin <tvrtko.ursulin@...el.com>,
dri-devel <dri-devel@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/selftests/mm: reduce per-function stack usage
On Fri, May 29, 2020 at 10:26 PM Chris Wilson <chris@...is-wilson.co.uk> wrote:
> Quoting Arnd Bergmann (2020-05-29 21:15:26)
> >
> > diff --git a/drivers/gpu/drm/selftests/test-drm_mm.c b/drivers/gpu/drm/selftests/test-drm_mm.c
> > index 9aabe82dcd3a..30108c330db8 100644
> > --- a/drivers/gpu/drm/selftests/test-drm_mm.c
> > +++ b/drivers/gpu/drm/selftests/test-drm_mm.c
> > @@ -323,9 +323,8 @@ static bool expect_reserve_fail(struct drm_mm *mm, struct drm_mm_node *node)
> > return false;
> > }
> >
> > -static bool check_reserve_boundaries(struct drm_mm *mm,
> > - unsigned int count,
> > - u64 size)
> > +static noinline_for_stack bool
> > +check_reserve_boundaries(struct drm_mm *mm, unsigned int count, u64 size)
> > {
> > const struct boundary {
>
> It's this const [] right? Hmm, if we felt adventurous that could be a
> small set of multiplication factors (0, -1, 1, count, count+1, ...) and
> made static.
That was my first thought, but I couldn't figure out whether 'count'
could be replaced by any compile-time constant.
Arnd
Powered by blists - more mailing lists