Commit 9fe55b95 authored by David Mosberger's avatar David Mosberger

ia64: Fix IDE block-layer BUG_ON() reported by Darren Williams.

The problem was that IDE-disks on machines with IDE harddisks,
memory above 4GB and no hardware I/O TLB would go BUG_ON() in
blk_queue_bounce_limit() because the IDE-controller could only
address 4GB of memory and that was much less than BLK_BOUNCE_ISA
(which is equal to ISA_DMA_THRESHOLD).  Note that the problem does
NOT trigger with CD-ROMs, which always uses the software I/O TLB
(and hence bounce-buffers) on such machines.

The best fix seems to be to simply lower ISA_DMA_THRESHOLD to 4GB-1 since
that will ensure that the IDE block layer allocates memory with GFP_DMA,
which will minimize bounce buffering.
parent 727dd157
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
#define _ASM_IA64_SCATTERLIST_H #define _ASM_IA64_SCATTERLIST_H
/* /*
* Modified 1998-1999, 2001-2002 * Modified 1998-1999, 2001-2002, 2004
* David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co
*/ */
...@@ -15,6 +15,14 @@ struct scatterlist { ...@@ -15,6 +15,14 @@ struct scatterlist {
unsigned int dma_length; unsigned int dma_length;
}; };
#define ISA_DMA_THRESHOLD (~0UL) /*
* It used to be that ISA_DMA_THRESHOLD had something to do with the
* DMA-limits of ISA-devices. Nowadays, its only remaining use (apart
* from the aha1542.c driver, which isn't 64-bit clean anyhow) is to
* tell the block-layer (via BLK_BOUNCE_ISA) what the max. physical
* address of a page is that is allocated with GFP_DMA. On IA-64,
* that's 4GB - 1.
*/
#define ISA_DMA_THRESHOLD 0xffffffff
#endif /* _ASM_IA64_SCATTERLIST_H */ #endif /* _ASM_IA64_SCATTERLIST_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment