Re: [PATCH -mm 06/12] m68k: use asm-generic/scatterlist.h

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: FUJITA Tomonori
Date: Sunday, April 25, 2010 - 6:46 am

On Fri, 23 Apr 2010 10:29:04 +0200
Geert Uytterhoeven <geert@linux-m68k.org> wrote:


asm-generic/scatterlist.h can't define ISA_DMA_THRESHOLD because of
the way POWERPC uses ISA_DMA_THRESHOLD.



This patch needs to be applied against -mm; including some changes to
asm-generic/scatterlist.h.

I've attached asm-generic/scatterlist.h in -mm.

=
#ifndef __ASM_GENERIC_SCATTERLIST_H
#define __ASM_GENERIC_SCATTERLIST_H

#include <linux/types.h>

struct scatterlist {
#ifdef CONFIG_DEBUG_SG
	unsigned long	sg_magic;
#endif
	unsigned long	page_link;
	unsigned int	offset;
	unsigned int	length;
	dma_addr_t	dma_address;
#ifdef CONFIG_NEED_SG_DMA_LENGTH
	unsigned int	dma_length;
#endif
};

/*
 * These macros should be used after a dma_map_sg call has been done
 * to get bus addresses of each of the SG entries and their lengths.
 * You should only work with the number of sg entries pci_map_sg
 * returns, or alternatively stop on the first sg_dma_len(sg) which
 * is 0.
 */
#define sg_dma_address(sg)	((sg)->dma_address)

#ifdef CONFIG_NEED_SG_DMA_LENGTH
#define sg_dma_len(sg)		((sg)->dma_length)
#else
#define sg_dma_len(sg)		((sg)->length)
#endif

#endif /* __ASM_GENERIC_SCATTERLIST_H */
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -mm 02/12] avr32: use asm-generic/scatterlist.h, FUJITA Tomonori, (Mon Apr 5, 4:52 pm)
[PATCH -mm 03/12] cris: use asm-generic/scatterlist.h, FUJITA Tomonori, (Mon Apr 5, 4:52 pm)
[PATCH -mm 04/12] h8300: use asm-generic/scatterlist.h, FUJITA Tomonori, (Mon Apr 5, 4:52 pm)
[PATCH -mm 05/12] m32r: use use asm-generic/scatterlist.h, FUJITA Tomonori, (Mon Apr 5, 4:52 pm)
[PATCH -mm 06/12] m68k: use asm-generic/scatterlist.h, FUJITA Tomonori, (Mon Apr 5, 4:52 pm)
[PATCH -mm 07/12] mips: use use asm-generic/scatterlist.h, FUJITA Tomonori, (Mon Apr 5, 4:52 pm)
[PATCH -mm 10/12] frv: use asm-generic/scatterlist.h, FUJITA Tomonori, (Mon Apr 5, 4:52 pm)
[PATCH -mm 11/12] mn10300: use asm-generic/scatterlist.h, FUJITA Tomonori, (Mon Apr 5, 4:52 pm)
[PATCH -mm 12/12] parisc: use asm-generic/scatterlist.h, FUJITA Tomonori, (Mon Apr 5, 4:52 pm)
Re: [PATCH -mm 02/12] avr32: use asm-generic/scatterlist.h, Haavard Skinnemoen, (Tue Apr 6, 6:38 am)
Re: [PATCH -mm 02/12] avr32: use asm-generic/scatterlist.h, FUJITA Tomonori, (Tue Apr 6, 4:55 pm)
Re: [PATCH -mm 06/12] m68k: use asm-generic/scatterlist.h, Geert Uytterhoeven, (Fri Apr 23, 1:29 am)
Re: [PATCH -mm 06/12] m68k: use asm-generic/scatterlist.h, FUJITA Tomonori, (Sun Apr 25, 6:46 am)
Re: [PATCH -mm 06/12] m68k: use asm-generic/scatterlist.h, Geert Uytterhoeven, (Sun Apr 25, 11:17 am)