[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [RESEND][PATCH] Add 40-bit DMA support to LSI scsi
From: |
M. Warner Losh |
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) |
In message: <address@hidden>
Anthony Liguori <address@hidden> writes:
: Blue Swirl wrote:
: > On 11/17/08, Ryan Harper <address@hidden> 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