All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: "Zhou, David(ChunMing)" <David1.Zhou@amd.com>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: drm/amdgpu: implement cgs gpu memory callbacks
Date: Tue, 25 Aug 2015 08:50:32 +0300	[thread overview]
Message-ID: <20150825055032.GU5610@mwanda> (raw)
In-Reply-To: <D36C73F882E55E4099382C5DF018E8252FCAD6C5@SCYBEXDAG01.amd.com>

On Tue, Aug 25, 2015 at 02:07:21AM +0000, Zhou, David(ChunMing) wrote:
> >and can the shift actually
> > wrap? 
> [DZ] of course, adding shift wrap is better. fpfn/lpfn is page number, so <<PAGE_SHIFT is to convert to memory size.

By "Shift wrap" I meant how you shift beyond the end of a 32bit number
and it truncates, or if it's signed then it can wrap around (it's
undefined actually, I probably should use a different word?).

int main(void)
{
	unsigned long long a = 0xf0000000U << 12;
	unsigned long long b = 0xf0000000ULL << 12;

	printf("%llx %llx\n", a, b);

	return 0;
}

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-08-25  5:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-21 16:23 drm/amdgpu: implement cgs gpu memory callbacks Dan Carpenter
2015-08-24  7:09 ` Zhou, David(ChunMing)
2015-08-24 19:51   ` Dan Carpenter
2015-08-25  2:07     ` Zhou, David(ChunMing)
2015-08-25  5:50       ` Dan Carpenter [this message]
2015-08-25  6:00         ` Zhou, David(ChunMing)

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=20150825055032.GU5610@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=David1.Zhou@amd.com \
    --cc=dri-devel@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 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.