All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
To: Stefan Lippers-Hollmann <s.L-H@gmx.de>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>,
	"Siddha, Suresh B" <suresh.b.siddha@intel.com>,
	Dave Airlie <airlied@redhat.com>,
	Jesse Barnes <jbarnes@virtuousgeek.org>,
	Eric Anholt <eric@anholt.net>, Keith Packard <keithp@keithp.com>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: gpu/drm, x86, PAT: io_mapping_create_wc and resource_size_t
Date: Sun, 1 Mar 2009 08:53:27 -0800	[thread overview]
Message-ID: <20090301165327.GA12970@linux-os.sc.intel.com> (raw)
In-Reply-To: <200903011454.55865.s.L-H@gmx.de>

On Sun, Mar 01, 2009 at 05:54:53AM -0800, Stefan Lippers-Hollmann wrote:
> Hi
> 
> On Samstag, 28. Februar 2009, Linux Kernel Mailing List wrote:
> > Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4ab0d47d0ab311eb181532c1ecb6d02905685071
> > Commit:     4ab0d47d0ab311eb181532c1ecb6d02905685071
> > Parent:     6644107d57a8fa82b47e4c55da4d9d91a612f29c
> > Author:     Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> > AuthorDate: Tue Feb 24 17:35:12 2009 -0800
> > Committer:  Ingo Molnar <mingo@elte.hu>
> > CommitDate: Wed Feb 25 13:09:51 2009 +0100
> >
> >     gpu/drm, x86, PAT: io_mapping_create_wc and resource_size_t
> >
> >     io_mapping_create_wc should take a resource_size_t parameter in place of
> >     unsigned long. With unsigned long, there will be no way to map greater than 4GB
> >     address in i386/32 bit.
> >
> >     On x86, greater than 4GB addresses cannot be mapped on i386 without PAE. Return
> >     error for such a case.
> >
> >     Patch also adds a structure for io_mapping, that saves the base, size and
> >     type on HAVE_ATOMIC_IOMAP archs, that can be used to verify the offset on
> >     io_mapping_map calls.
> >
> >     Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
> >     Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
> >     Cc: Dave Airlie <airlied@redhat.com>
> >     Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
> >     Cc: Eric Anholt <eric@anholt.net>
> >     Cc: Keith Packard <keithp@keithp.com>
> >     Signed-off-by: Ingo Molnar <mingo@elte.hu>
> 
> This patch, as part of 2.6.29-rc6-git5, fails to build for me on i386 (it
> builds on amd64) with the attached (slimmed down) config (CONFIG_X86_PAT=y)
> and buildlog:
> 
>   Building modules, stage 2.
>   MODPOST 809 modules
> ERROR: "pgprot_writecombine" [drivers/gpu/drm/i915/i915.ko] undefined!
> ERROR: "is_io_mapping_possible" [drivers/gpu/drm/i915/i915.ko] undefined!
> make[1]: *** [__modpost] Error 1
> make: *** [modules] Error 2
> 
> This is a build regression in comparison to 2.6.29-rc6.
> 

My bad. I had missed drm as module compilation. Below patch should fix it.
Can you please verify.

Thanks,
Venki


Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>

---
 arch/x86/mm/iomap_32.c     |    1 +
 arch/x86/mm/pat.c          |    2 ++
 include/linux/io-mapping.h |    3 ++-
 3 files changed, 5 insertions(+), 1 deletion(-)

Index: linux-2.6/arch/x86/mm/iomap_32.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/iomap_32.c	2009-03-01 08:31:12.000000000 -0800
+++ linux-2.6/arch/x86/mm/iomap_32.c	2009-03-01 08:47:20.000000000 -0800
@@ -37,6 +37,7 @@ is_io_mapping_possible(resource_size_t b
 	return 1;
 }
 #endif
+EXPORT_SYMBOL_GPL(is_io_mapping_possible);
 
 /* Map 'pfn' using fixed map 'type' and protections 'prot'
  */
Index: linux-2.6/arch/x86/mm/pat.c
===================================================================
--- linux-2.6.orig/arch/x86/mm/pat.c	2009-03-01 08:31:00.000000000 -0800
+++ linux-2.6/arch/x86/mm/pat.c	2009-03-01 08:45:48.000000000 -0800
@@ -11,6 +11,7 @@
 #include <linux/bootmem.h>
 #include <linux/debugfs.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/gfp.h>
 #include <linux/mm.h>
 #include <linux/fs.h>
@@ -868,6 +869,7 @@ pgprot_t pgprot_writecombine(pgprot_t pr
 	else
 		return pgprot_noncached(prot);
 }
+EXPORT_SYMBOL(pgprot_writecombine);
 
 #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_X86_PAT)
 
Index: linux-2.6/include/linux/io-mapping.h
===================================================================
--- linux-2.6.orig/include/linux/io-mapping.h	2009-03-01 08:31:12.000000000 -0800
+++ linux-2.6/include/linux/io-mapping.h	2009-03-01 08:49:53.000000000 -0800
@@ -91,8 +91,9 @@ io_mapping_unmap_atomic(void *vaddr)
 static inline void *
 io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
 {
+	resource_size_t phys_addr;
 	BUG_ON(offset >= mapping->size);
-	resource_size_t phys_addr = mapping->base + offset;
+	phys_addr = mapping->base + offset;
 	return ioremap_wc(phys_addr, PAGE_SIZE);
 }
 

  reply	other threads:[~2009-03-01 16:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200902280201.n1S217FR011162@hera.kernel.org>
2009-03-01 13:54 ` gpu/drm, x86, PAT: io_mapping_create_wc and resource_size_t Stefan Lippers-Hollmann
2009-03-01 16:53   ` Pallipadi, Venkatesh [this message]
2009-03-01 20:54     ` Stefan Lippers-Hollmann

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=20090301165327.GA12970@linux-os.sc.intel.com \
    --to=venkatesh.pallipadi@intel.com \
    --cc=airlied@redhat.com \
    --cc=eric@anholt.net \
    --cc=jbarnes@virtuousgeek.org \
    --cc=keithp@keithp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=s.L-H@gmx.de \
    --cc=suresh.b.siddha@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.