From 4c93e47939e3c0215c2d36e28756194983119f8d Mon Sep 17 00:00:00 2001 From: Michael Hunold Date: Fri, 12 Dec 2003 10:30:28 +0000 Subject: - use vmalloc_32() instead of vmalloc() in saa7146_vmalloc_build_pgtable(). this makes sure that the pagetable is in lowmem kernel memory, so we can DMA to it. this fixes the bug where budget-core.o oopsed on machines with highmem enabled. --- linux/drivers/media/common/saa7146_core.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'linux') diff --git a/linux/drivers/media/common/saa7146_core.c b/linux/drivers/media/common/saa7146_core.c index 206a942af..e581aafe2 100644 --- a/linux/drivers/media/common/saa7146_core.c +++ b/linux/drivers/media/common/saa7146_core.c @@ -101,7 +101,9 @@ int saa7146_wait_for_debi_done(struct saa7146_dev *dev) * general helper functions ****************************************************************************/ -/* this is videobuf_vmalloc_to_sg() from video-buf.c */ +/* this is videobuf_vmalloc_to_sg() from video-buf.c + make sure virt has been allocated with vmalloc_32(), otherwise the BUG() + may be triggered on highmem machines */ static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages) { struct scatterlist *sglist; @@ -137,7 +139,7 @@ char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa { struct scatterlist *slist = NULL; int pages = (length+PAGE_SIZE-1)/PAGE_SIZE; - char *mem = vmalloc(length); + char *mem = vmalloc_32(length); int slen = 0; if (NULL == mem) { -- cgit v1.2.3