All of lore.kernel.org
 help / color / mirror / Atom feed
From: "M. Warner Losh" <imp@bsdimp.com>
To: qemu-devel@nongnu.org, anthony@codemonkey.ws
Cc: ryanh@us.ibm.com, paul@codesourcery.com
Subject: Re: [Qemu-devel] Re: [RESEND][PATCH] Add 40-bit DMA support to LSI scsi emulation
Date: Mon, 17 Nov 2008 13:47:48 -0700 (MST)	[thread overview]
Message-ID: <20081117.134748.132268808.imp@bsdimp.com> (raw)
In-Reply-To: <4921CDCD.1060100@codemonkey.ws>

In message: <4921CDCD.1060100@codemonkey.ws>
            Anthony Liguori <anthony@codemonkey.ws> writes:
: Blue Swirl wrote:
: > On 11/17/08, Ryan Harper <ryanh@us.ibm.com> wrote:
: >   
: >>  Looking for some feedback on this patch, MAINTAINERS points to Paul for
: >>  scsi stuff, and I saw Blue Swirl commit a scsi patch recently.
: >>
: >>  This patch fixes Linux machines configured with > 4G of ram and using a
: >>  SCSI device.  I'm working on 64-bit DMA support as well which should
: >>  hopefully fix 64-bit Windows using SCSI devices as well.
: >>     
: >
: >     addr = s->dnad;
: > +    if (lsi_dma_40bit(s))
: > +        addr |= ((uint64_t)s->dnad64 << 32UL);
: > +    else if (s->sbms)
: > +        addr |= ((uint64_t)s->sbms << 32UL);
: >
: > Maybe the address could be calculated at script parsing phase for
: > small performance gain.
: >
: > I would use ULL instead of UL, because on 32 bit host long is still 32 bits.
: >   
: 
: But both ULL and UL are wrong for a shift operation.  It always takes an 
: integer.

Yes, the real issue is for something like
	1UL << 63
vs
	1ULL << 63

Warner

  reply	other threads:[~2008-11-17 21:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-17 17:34 [Qemu-devel] [RESEND][PATCH] Add 40-bit DMA support to LSI scsi emulation Ryan Harper
2008-11-17 19:25 ` [Qemu-devel] " Blue Swirl
2008-11-17 20:02   ` Anthony Liguori
2008-11-17 20:47     ` M. Warner Losh [this message]
2008-11-17 20:56   ` Ryan Harper
2008-11-18 22:01     ` Anthony Liguori

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=20081117.134748.132268808.imp@bsdimp.com \
    --to=imp@bsdimp.com \
    --cc=anthony@codemonkey.ws \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.org \
    --cc=ryanh@us.ibm.com \
    /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.