First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 10576
Alias:
Product:
Component:
Status: RESOLVED
Resolution: NOTABUG
Assigned To: Default DRI bug account <dri-devel@lists.sourceforge.net>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Michał Sznajder <michalsznajder@gmail.com>
Add CC:
CC:
Remove selected CCs
QA Contact:
URL:
Summary:
Status Whiteboard:
Keywords:

Attachment Type Creator Created Size Flags Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 10576 depends on: Show dependency tree
Show dependency graph
Bug 10576 blocks:

Additional Comments:







View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:  [reply] Opened: 2007-04-09 10:18 PST
It looks like that latest (as of writing 2.6.21-rc6@kernel.org) kernel contains
function named vm_insert_pfn in /mm/memory.c and /mm/mm.h (see
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e0dc0d8f4a327d033bfb63d43f113d5f31d11b3c
 for specific check-in). Unfortunately vm_insert_pfn is also used in
drm_compat.c thus resulting in naming clash. At a first glance they both differ
in code very much. 

The result of make is 
/home/michal/nouveau/drm/linux-core/drm_compat.c:190: error: static declaration
of ‘vm_insert_pfn’ follows non-static declaration
include/linux/mm.h:1126: error: previous declaration of ‘vm_insert_pfn’ was
here 

The bug was found on Ubuntu Feisty with latest kernel packages installed (which
apparently is 2.6.20. uname -r gives 2.6.20-14-generic) 2.6.20 from gentoo does
not have this problem.

------- Comment #1 From Michał Sznajder 2007-04-09 11:09:36 PST [reply] -------
Links to drm and kernels git's  that have introduced incompatibility:

http://gitweb.freedesktop.org/?p=mesa/drm.git;a=commitdiff;h=f2db76e2f206d2017f710eaddc4b33add4498898

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e0dc0d8f4a327d033bfb63d43f113d5f31d11b3c

Someone has to change the name but who?

------- Comment #2 From Thomas Hellstr�m 2007-04-09 11:27:28 PST [reply] -------
(In reply to comment #1)
> Links to drm and kernels git's  that have introduced incompatibility:
> 
> http://gitweb.freedesktop.org/?p=mesa/drm.git;a=commitdiff;h=f2db76e2f206d2017f710eaddc4b33add4498898
> 
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=e0dc0d8f4a327d033bfb63d43f113d5f31d11b3c
> 
> Someone has to change the name but who?
> 

vm_insert_pfn first appears in the kernel in the 2.6.21-rc series.
In drm_compat.c it is not included if the kernel version >= 2.6.21, when the
symbol DRM_FULL_MM_COMPAT is defined. 

The semantics of the two functions, although they are looking very different
are the same. The one in the mainstream kernel should be used if there is a
clash.

I'm not sure why it appears in Ubuntu 2.6.20. I think you need to ask the
Ubuntu guys. 

/Thomas



------- Comment #3 From Chris Ball 2007-04-27 15:34:47 PST [reply] -------
(In reply to comment #2)
> I'm not sure why it appears in Ubuntu 2.6.20. I think you need to ask the
> Ubuntu guys. 

It's hardly uncommon for a distro to choose a kernel (2.6.20), and then pull
selectively from patches intended for a newer release without updating their
kernel version to describe itself as that newer release (which it isn't).

What would you have the Ubuntu maintainers do instead?

------- Comment #4 From Thomas Hellstr�m 2007-04-28 13:50:17 PST [reply] -------
(In reply to comment #3)
> (In reply to comment #2)
> > I'm not sure why it appears in Ubuntu 2.6.20. I think you need to ask the
> > Ubuntu guys. 
> It's hardly uncommon for a distro to choose a kernel (2.6.20), and then pull
> selectively from patches intended for a newer release without updating their
> kernel version to describe itself as that newer release (which it isn't).
> What would you have the Ubuntu maintainers do instead?

Actually I think that's fine. I cant really figure out why they would want to
pull vm_insert_pfn, since AFAICT it is only used by DRM and cell, but anyway
they are free to do what they want.

The more important question raised here is what are the DRM developers expected
to do about this? Should we maintain compatibility with all more or less
selectively patched kernels from all distros?

Thomas

------- Comment #5 From Dave Airlie 2007-04-28 18:00:13 PST [reply] -------
We used to do this, but it takes a fair bit of effort... and I really couldn't
be bothered, I run ubuntu here and I just ifdef around it rather than try to
figure out what they did to their kernel..

First Last Prev Next    No search results available      Search page      Enter new bug