[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <adak5n8x9x0.fsf@cisco.com>
Date: Fri, 21 Dec 2007 08:57:47 -0800
From: Roland Dreier <rdreier@...co.com>
To: Alan Cox <alan@...rguk.ukuu.org.uk>
Cc: Benjamin Herrenschmidt <benh@...nel.crashing.org>,
<linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
<linux-scsi@...r.kernel.org>, <rmk@....linux.org.uk>,
<davem@...emloft.net>, <james.bottomley@...eleye.com>,
<ralf@...ux-mips.org>
Subject: Re: [PATCH 2/2] scsi: Use new __dma_buffer to align sense buffer in scsi_cmnd
> It's also incomplete as a fix because I don't see what guarantees the
> buffer size will always exceed cache line size
There's a macro trick that adds a pad member after the buffer too, so
that it gets rounded up to the cacheline size:
> +#define __dma_aligned __attribute__((aligned(ARCH_MIN_DMA_ALIGNMENT)))
> +#define __dma_buffer __dma_buffer_line(__LINE__)
> +#define __dma_buffer_line(line) __dma_aligned;\
> + char __dma_pad_##line[0] __dma_aligned
So that part is OK at least.
- R.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists