From: Daniel Vetter <daniel@ffwll.ch>
To: Ben Widawsky <ben@bwidawsk.net>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: rc6 residency (fix the fix)
Date: Mon, 23 Apr 2012 09:38:33 +0200 [thread overview]
Message-ID: <20120423073833.GA4935@phenom.ffwll.local> (raw)
In-Reply-To: <20120422195733.0d4970e5@bwidawsk.net>
On Sun, Apr 22, 2012 at 07:57:33PM -0700, Ben Widawsky wrote:
> On Sun, 22 Apr 2012 18:39:23 +0100
> Chris Wilson <chris@chris-wilson.co.uk> wrote:
>
> > On Sun, 22 Apr 2012 10:35:29 -0700, Ben Widawsky <ben@bwidawsk.net>
> > wrote:
> > > On Sun, 22 Apr 2012 16:49:53 +0100
> > > Chris Wilson <chris@chris-wilson.co.uk> wrote:
> > >
> > > > On Fri, 20 Apr 2012 11:50:01 -0700, Ben Widawsky
> > > > <ben@bwidawsk.net> wrote:
> > > > > Chris' fix for my 32b breakage was incorrect. do_div returns a
> > > > > remainder. Go back to a divide macro which is more 32b friendly.
> > > > >
> > > > > Tested on x86-64.
> > > > >
> > > > > This has only been compile tested on 32b systems.
> > > > Doesn't compile on my 32-bit systems.
> > > >
> > > > Still does a 64-bit divide.
> > >
> > > This is weird. I don't understand what's broken exactly. It should
> > > be dividing an unsigned long long, which the 32b compiler should
> > > have no issue with. The macro itself expands to do_div which was
> > > your original fix.
> > >
> > > What is the error message you get?
> > Undefined reference to __udivid3.
> >
> > The reason is that the result of DIV_ROUND_UP_ULL is a 64-bit value,
> > which we then proceed to divide by 100.
> > -Chris
> >
>
> For the sake of picking nits, this is a linker fail, not a compiler one.
> The only reason I make note of it is I was only compiling the .ko when
> I did my testing.
>
> So lesson learned, can't we just:
Done.
-Daniel
--
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48
next prev parent reply other threads:[~2012-04-23 7:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-20 18:50 [PATCH] drm/i915: rc6 residency (fix the fix) Ben Widawsky
2012-04-20 19:24 ` Chris Wilson
2012-04-20 19:27 ` Daniel Vetter
2012-04-22 15:49 ` Chris Wilson
2012-04-22 17:35 ` Ben Widawsky
2012-04-22 17:39 ` Chris Wilson
2012-04-22 18:02 ` Ben Widawsky
2012-04-22 18:11 ` Chris Wilson
2012-04-23 2:57 ` Ben Widawsky
2012-04-23 7:38 ` Daniel Vetter [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-04-22 18:27 Ben Widawsky
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=20120423073833.GA4935@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=ben@bwidawsk.net \
--cc=intel-gfx@lists.freedesktop.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