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

From: Geert Uytterhoeven
Date: Sun Apr 25 2010 - 14:17:40 EST


On Sun, Apr 25, 2010 at 15:46, FUJITA Tomonori
<fujita.tomonori@xxxxxxxxxxxxx> wrote:
> On Fri, 23 Apr 2010 10:29:04 +0200
> Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:
>
>> > +#include <asm-generic/scatterlist.h>
>>
>> This include should be ...
>>
>> > /* This is bogus and should go away. */
>> > #define ISA_DMA_THRESHOLD (0x00ffffff)
>
> asm-generic/scatterlist.h can't define ISA_DMA_THRESHOLD because of
> the way POWERPC uses ISA_DMA_THRESHOLD.
>
>
>> ... below this definition, else you get duplicate definition errors
>> (and the wrong definition).
>>
>> > -#define sg_dma_address(sg) ((sg)->dma_address)
>> > -#define sg_dma_len(sg) ((sg)->length)
>
> This patch needs to be applied against -mm; including some changes to
> asm-generic/scatterlist.h.

Ah, sorry, I thought it was against mainline.

> 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 */

OK, I won't touch it.

Please consider it acked-by, so it can go in through Andrew, together with
the other patches.

Sorry for the confusion.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/