Skip to contentSkip to conversation

i915 needs pgprot_writecombine() and is_io_mapping_posible()

DISCUSSION Theodore Ts'o 2 participants 2 messages Feb 28, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

A recent (probably within the last week) commit seems to have caused the i915 driver to need to use two unexported symbols:

ERROR: "pgprot_writecombine" [drivers/gpu/drm/i915/i915.ko] undefined!
ERROR: "is_io_mapping_possible" [drivers/gpu/drm/i915/i915.ko] undefined!

Is the right fix just to export them?

Thanks,

- Ted

#1 lore raw

[git pull] x86 fix

Quoted 7 lines · Theodore Ts'o

A recent (probably within the last week) commit seems to have caused the i915 driver to need to use two unexported symbols:

ERROR: "pgprot_writecombine" [drivers/gpu/drm/i915/i915.ko] undefined!
ERROR: "is_io_mapping_possible" [drivers/gpu/drm/i915/i915.ko] undefined!

Is the right fix just to export them?

Yeah. This module build bug got masked by two other PAT patches which needed different exports:

13093cb: gpu/drm, x86, PAT: PAT support for io_mapping_*, export symbols for modules

Linus,

Please pull the latest x86-fixes-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-fixes-for-linus

Thanks,

Ingo

------------------>
Ingo Molnar (1):
x86: i915 needs pgprot_writecombine() and is_io_mapping_possible()

 arch/x86/mm/iomap_32.c |   15 ++++-----------
 arch/x86/mm/pat.c      |    2 ++
 2 files changed, 6 insertions(+), 11 deletions(-)
arch/x86/mm/iomap_32.c +4 -11
index 6c2b1af..04102d4 100644
@@ -20,23 +20,16 @@
 #include <asm/pat.h>
 #include <linux/module.h>
 
-#ifdef CONFIG_X86_PAE
-int
-is_io_mapping_possible(resource_size_t base, unsigned long size)
-{
-	return 1;
-}
-#else
-int
-is_io_mapping_possible(resource_size_t base, unsigned long size)
+int is_io_mapping_possible(resource_size_t base, unsigned long size)
 {
+#ifndef CONFIG_X86_PAE
 	/* There is no way to map greater than 1 << 32 address without PAE */
 	if (base + size > 0x100000000ULL)
 		return 0;
-
+#endif
 	return 1;
 }
-#endif
+EXPORT_SYMBOL_GPL(is_io_mapping_possible);
 
 /* Map 'pfn' using fixed map 'type' and protections 'prot'
  */
arch/x86/mm/pat.c +2 -0
index aebbf67..e0ab173 100644
@@ -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 prot)
 	else
 		return pgprot_noncached(prot);
 }
+EXPORT_SYMBOL_GPL(pgprot_writecombine);
 
 #if defined(CONFIG_DEBUG_FS) && defined(CONFIG_X86_PAT)