All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Alex Chiang <achiang@hp.com>
Cc: Don Brace <brace@beardog.cce.hp.com>,
	"Stephen M. Cameron" <scameron@beardog.cce.hp.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cciss: change Cmd_sg_list.sg_chain_dma type to dma_addr_t
Date: Mon, 23 Nov 2009 09:33:33 +0100	[thread overview]
Message-ID: <20091123083333.GU8742@kernel.dk> (raw)
In-Reply-To: <20091118032022.GA6648@ldl.fc.hp.com>

On Tue, Nov 17 2009, Alex Chiang wrote:
> A recent commit broke the ia64 build:
> 
> 	Author: Don Brace <brace@beardog.cce.hp.com>
> 	Date:   Thu Nov 12 12:50:01 2009 -0600
> 
> 	cciss: Add enhanced scatter-gather support.
> 
> because of this hunk:
> 
> 	--- a/drivers/block/cciss.h
> 	+++ b/drivers/block/cciss.h
> 	+struct Cmd_sg_list {
> 	+       SGDescriptor_struct     *sgchain;
> 	+       dma64_addr_t            sg_chain_dma;
> 	+       int                     chain_block_size;
> 	+};
> 
> The issue is that dma64_addr_t isn't #define'd on ia64.
> 
> The way that we're using Cmd_sg_list.sg_chain_dma is to hold an
> address returned from pci_map_single().
> 
> 	+               temp64.val = pci_map_single(h->pdev,
> 	+                                 h->cmd_sg_list[c->cmdindex]->sgchain,
> 	+                                 len, dir);
> 	+
> 	+               h->cmd_sg_list[c->cmdindex]->sg_chain_dma = temp64.val;
> 
> pci_map_single() returns a dma_addr_t too.
> 
> This code will still work even on a 32-bit x86 build, where
> dma_addr_t is defined to be a u32 because it will simply be
> promoted to the __u64 that temp64.val is defined as.
> 
> Thus, declaring Cmd_sg_list.sg_chain_dma as dma_addr_t is safe.

Applied for 2.6.32.

-- 
Jens Axboe


      reply	other threads:[~2009-11-23  8:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-18  3:20 [PATCH] cciss: change Cmd_sg_list.sg_chain_dma type to dma_addr_t Alex Chiang
2009-11-23  8:33 ` Jens Axboe [this message]

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=20091123083333.GU8742@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=achiang@hp.com \
    --cc=brace@beardog.cce.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=scameron@beardog.cce.hp.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.