- Subject: Re: [BUILD FAILURE 01/04] Next June 04:PPC64 randconfig [drivers/staging/comedi/drivers.o]
- From: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 10 Jun 2009 08:34:39 +1000
- Cc: Greg KH <greg@xxxxxxxxx>, fmhess@xxxxxxxxxxxxxxxxxxxxx, Ian Abbott <abbotti@xxxxxxxxx>, David Miller <davem@xxxxxxxxxxxxx>, sachinp@xxxxxxxxxxxxxxxxxx, sfr@xxxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Linuxppc-dev@xxxxxxxxxx, linux-next@xxxxxxxxxxxxxxx, paulus@xxxxxxxxx, Geert.Uytterhoeven@xxxxxxxxxxx, geert@xxxxxxxxxxxxxx
- In-reply-to: <1244572446.5497.32.camel@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- References: <20090605182625.24093.7808.sendpatchset@xxxxxxxxxxxxxxxxxxxxxxxxxx> <1244261806.31984.36.camel@pasglop> <20090606055103.GA9446@xxxxxxxxx> <200906060936.22322.fmhess@xxxxxxxxxxxxx> <1244385405.5265.7.camel@xxxxxxxxxxxxxxxxxxxxxxxxxx> <1244519418.5235.2.camel@pasglop> <1244572446.5497.32.camel@xxxxxxxxxxxxxxxxxxxxxxxxxx>
> > In any case, doing PAGE_KERNEL_NOCACHE for DMA memory is incorrect on
> > many architectures. So at this stage, there's no much option but ifdef I
> > suspect for now until this is fixed properly.
>
> Ok. But, i am not sure whether Greg will agree to this. If, Ok, is the
> following patch i sent earlier Ok ?
>
> http://lkml.org/lkml/2009/6/5/462,
Not really.
You probably want to use a constant (call it MY_DMA_MAP_PGPROT), and
in a header, you have a bunch of ifdef's that set it to PAGE_KERNEL,
PAGE_KERNEL_NOCACHE or PAGE_KERNEL_NC depending on what's needed.
Today, you can pretty much assume that
- x86*, sparc*, ia64*, alpha, ... needs PAGE_KERNEL
- powerpc needs PAGE_KERNEL if !CONFIG_NOT_COHERENT_CACHE
- powerpc needs PAGE_KERNEL_NC if CONFIG_NOT_COHERENT_CACHE
- ARM and MIPS, I think, needs PAGE_KERNEL_NOCACHE
- ... others I don't know.
Cheers,
Ben.
> Regards--
> Subrata
>
> >
> > It does make sense to want to have some memory like that shared between
> > user space and DMA, though I don't know what the right approach that
> > works on all archs is at this stage. Worth asking the Alsa guys, I think
> > they have similar issues :-)
> >
> > But doing double buffering might do the trick fine for now.
> >
> > Cheers,
> > Ben.
> >
> >
> >
> >
--
To unsubscribe from this list: send the line "unsubscribe linux-next" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]