Bug 1662 - Unknown symbol: remap_page_range
Summary: Unknown symbol: remap_page_range
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/other (show other bugs)
Version: DRI git
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Default DRI bug account
QA Contact:
URL: http://www.ussg.iu.edu/hypermail/linu...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-18 04:47 UTC by James Le Cuirot
Modified: 2005-06-26 23:31 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description James Le Cuirot 2004-10-18 04:47:38 UTC
Hi. I'm using the 2.6.9-rc4-love1 kernel (based on the mm kernel) and while the 
Radeon driver compiles okay, it failes to load because of an unknown symbol 
called remap_page_range. I did a search for this and apparently Andrew Morton 
has changed the name of the function and the arguments it takes. This page only 
mentions the name change but I tried simply changing the name in the source and 
that didn't work.

http://www.ussg.iu.edu/hypermail/linux/kernel/0409.3/1106.html

This is fairly bleeding edge stuff so maybe you don't want to address the issue 
yet but I thought I'd make you aware of it in case this change makes it back to 
the mainstream kernel.
Comment 1 Rajsekar Manokaran 2004-11-09 02:29:05 UTC
(In reply to comment #0)
> Hi. I'm using the 2.6.9-rc4-love1 kernel (based on the mm kernel) and while the 
> Radeon driver compiles okay, it failes to load because of an unknown symbol 
> called remap_page_range. I did a search for this and apparently Andrew Morton 
> has changed the name of the function and the arguments it takes. This page only 
> mentions the name change but I tried simply changing the name in the source and 
> that didn't work.
> 
> http://www.ussg.iu.edu/hypermail/linux/kernel/0409.3/1106.html
> 
> This is fairly bleeding edge stuff so maybe you don't want to address the issue 
> yet but I thought I'd make you aware of it in case this change makes it back to 
> the mainstream kernel.

Yeah changing the name alone wont work
The problem is that the two functions remap_page_range and remap_pfn_range count
sizes in different units.

As a work around try this.

In drm_vm.h (or someother header file add this function definition)
 
---------------8<----------------8<-------------------------------------------
static inline __deprecated /* since 25 Sept 2004 -- wli */
int remap_page_range(struct vm_area_struct *vma, unsigned long uvaddr,
                     unsigned long paddr, unsigned long size, pgprot_t prot)
{
  return remap_pfn_range(vma, uvaddr, paddr >> PAGE_SHIFT, size, prot);
}
---------------8<-----------------8<------------------------------------------

This is only a temporary work around and might not compile in older kernels that
already have the definition of remap_page_range.  I am putting it here because
it worked for me (savage on linux 2.6.10-rc1-mm2)

A cleaner solution would be to eliminate usage of remap_page_range but I am not
sure of backward compat.

Best of luck

--
Rajsekar
IIT Madras
raj--cutme--sekar@cse.iDELTHISitm.ernet.in
Comment 2 James Le Cuirot 2004-11-09 03:41:49 UTC
I'm using the Gentoo kernel now which isn't effected by the problem but thanks 
anyway. It may help someone else out.
Comment 3 Eric Anholt 2005-06-27 16:31:36 UTC
This is fixed in DRM CVS.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.