linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -mm 1/2] scsi: remove dma_is_consistent usage in 53c700
@ 2010-06-27 10:10 FUJITA Tomonori
  2010-06-27 10:10 ` [PATCH -mm 2/2] remove dma_is_consistent() API FUJITA Tomonori
  2010-06-27 15:08 ` [PATCH -mm 1/2] scsi: remove dma_is_consistent usage in 53c700 James Bottomley
  0 siblings, 2 replies; 9+ messages in thread
From: FUJITA Tomonori @ 2010-06-27 10:10 UTC (permalink / raw)
  To: akpm
  Cc: grundler, lethal, JBottomley, linux-kernel, linux-arch, fujita.tomonori

53c700 is the only user of dma_is_consistent():

BUG_ON(!dma_is_consistent(hostdata->dev, pScript) && L1_CACHE_BYTES < dma_get_cache_alignment());

The above code tries to see if the system can allocate coherent memory
or not. It's for some old systems that can't allocate coherent memory
at all (e.g some parisc systems).

I think that we can safely remove the above usage:

- such old systems haven't triger the above checking for long.

- the above condition is important for systems that can't allocate
  coherent memory if these systems do DMA. So probably it would be
  better to have such checking in arch's DMA initialization code
  instead of a driver.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 drivers/scsi/53c700.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index 80dc3ac..89fc1c8 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -309,9 +309,6 @@ NCR_700_detect(struct scsi_host_template *tpnt,
 	hostdata->msgin = memory + MSGIN_OFFSET;
 	hostdata->msgout = memory + MSGOUT_OFFSET;
 	hostdata->status = memory + STATUS_OFFSET;
-	/* all of these offsets are L1_CACHE_BYTES separated.  It is fatal
-	 * if this isn't sufficient separation to avoid dma flushing issues */
-	BUG_ON(!dma_is_consistent(hostdata->dev, pScript) && L1_CACHE_BYTES < dma_get_cache_alignment());
 	hostdata->slots = (struct NCR_700_command_slot *)(memory + SLOTS_OFFSET);
 	hostdata->dev = dev;
 
-- 
1.6.5


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-06-30  2:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-27 10:10 [PATCH -mm 1/2] scsi: remove dma_is_consistent usage in 53c700 FUJITA Tomonori
2010-06-27 10:10 ` [PATCH -mm 2/2] remove dma_is_consistent() API FUJITA Tomonori
2010-06-27 15:08 ` [PATCH -mm 1/2] scsi: remove dma_is_consistent usage in 53c700 James Bottomley
2010-06-28  3:37   ` FUJITA Tomonori
2010-06-28 14:55     ` James Bottomley
2010-06-28 21:27       ` Paul Mundt
2010-06-29  6:04       ` FUJITA Tomonori
2010-06-29 13:37         ` James Bottomley
2010-06-30  2:39           ` FUJITA Tomonori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).