linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Subrata Modak <subrata@linux.vnet.ibm.com>
Cc: Sachin P Sant <sachinp@linux.vnet.ibm.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>, Greg KH <greg@kroah.com>,
	Linux-Kernel <linux-kernel@vger.kernel.org>,
	Linuxppc-dev <Linuxppc-dev@ozlabs.org>,
	Linux-Next <linux-next@vger.kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [BUILD FAILURE 01/04] Next June 04:PPC64 randconfig [drivers/staging/comedi/drivers.o]
Date: Sat, 06 Jun 2009 09:32:29 +1000	[thread overview]
Message-ID: <1244244749.31984.16.camel@pasglop> (raw)
In-Reply-To: <20090605182625.24093.7808.sendpatchset@elm3a191.beaverton.ibm.com>


> I tried this. But, with some catch. ‘PAGE_KERNEL_NOCACHE’ seems to be the
> choice for majority of architectures like frv, m32r, sh, x86, etc, as Geert
> mentions below. However, i believe POWERPC defines it as ‘PAGE_KERNEL_NC‘
> found at arch/powerpc/include/asm/pte-common.h.
> 
> Paul/Banjamin,
> Can you please confirm this ?

Read my reply to Greg. Why the heck are you trying to map memory
non-cacheable in the first place ?

Cheers
Ben.

> The below patch fixes the build error.
> 
> Signed-off-by: Subrata Modak <subrata@linux.vnet.ibm.com>
> ---
> 
> --- linux-2.6.30-rc8/drivers/staging/comedi/drivers.c.orig	2009-06-05 12:46:35.000000000 -0500
> +++ linux-2.6.30-rc8/drivers/staging/comedi/drivers.c	2009-06-05 13:03:31.000000000 -0500
> @@ -43,9 +43,13 @@
>  #include <linux/vmalloc.h>
>  #include <linux/cdev.h>
>  #include <linux/dma-mapping.h>
> -
>  #include <asm/io.h>
>  #include <asm/system.h>
> +#ifdef __powerpc64__
> +#include <asm/pte-common.h>
> +#else
> +#include <asm/pgtable.h>
> +#endif
>  
>  static int postconfig(struct comedi_device *dev);
>  static int insn_rw_emulate_bits(struct comedi_device *dev, struct comedi_subdevice *s,
> @@ -492,8 +496,13 @@ int comedi_buf_alloc(struct comedi_devic
>  		}
>  		if (i == n_pages) {
>  			async->prealloc_buf =
> +#ifdef __powerpc64__
> +				vmap(pages, n_pages, VM_MAP,
> +				PAGE_KERNEL_NC);
> +#else
>  				vmap(pages, n_pages, VM_MAP,
>  				PAGE_KERNEL_NOCACHE);
> +#endif
>  		}
>  		if (pages) {
>  			vfree(pages);
> 
> ---
> Regards--
> Subrata
> 
> > PAGE_KERNEL_NOCACHE is defined on a few architectures only, namely
> > frv, m32r, mn10300, sh, and x86[*]. On all others, it will fail.
> > 
> > [*] Interestingly, sparc refers to it in one of its include files,
> > without providing a
> >     definition, Probably that code is unused.
> > 
> > Gr{oetje,eeting}s,
> > 
> > 						Geert
> > 
> > --
> > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> > 

  parent reply	other threads:[~2009-06-05 23:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-05 18:26 [BUILD FAILURE 01/04] Next June 04:PPC64 randconfig [drivers/staging/comedi/drivers.o] Subrata Modak
2009-06-05 18:26 ` Greg KH
2009-06-05 23:31   ` Benjamin Herrenschmidt
2009-06-05 23:32 ` Benjamin Herrenschmidt [this message]
2009-06-06  0:56   ` David Miller
2009-06-06  4:16     ` Benjamin Herrenschmidt
2009-06-06  5:51       ` Greg KH
2009-06-06 13:36         ` Frank Mori Hess
2009-06-07 14:36           ` Subrata Modak
2009-06-09  3:50             ` Benjamin Herrenschmidt
2009-06-09 18:34               ` Subrata Modak
2009-06-09 18:54                 ` Geert Uytterhoeven
2009-06-09 22:34                 ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2009-06-04 13:31 Subrata Modak
2009-06-04 18:07 ` Greg KH
2009-06-04 20:40   ` Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1244244749.31984.16.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=Geert.Uytterhoeven@sonycom.com \
    --cc=Linuxppc-dev@ozlabs.org \
    --cc=geert@linux-m68k.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=paulus@samba.org \
    --cc=sachinp@linux.vnet.ibm.com \
    --cc=sfr@canb.auug.org.au \
    --cc=subrata@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).