Bug 143421

Summary: declaration of pfn_to_page/page_to_pfn missing on x86_64-smp
Product: [openSUSE] SUSE Linux 10.1 Reporter: Stefan Dirsch <sndirsch>
Component: KernelAssignee: E-mail List <kernel-maintainers>
Status: RESOLVED WONTFIX QA Contact: E-mail List <qa-bugs>
Severity: Critical    
Priority: P5 - None CC: aritger, tiwai
Version: Beta 1   
Target Milestone: ---   
Hardware: x86-64   
OS: SUSE Other   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Stefan Dirsch 2006-01-16 22:16:21 UTC
This bugreport is against the current kernel of STABLE. Latest changelog entry:
* Mo Jan 16 2006 - agruen@suse.de
- rpm/kernel-source.spec.in: fix computing the KERNELRELEASE.
- Disable CONFIG_XFS_DMAPI: it is still incomplete.

The nvidia kernel module (package nvidia-gfx) cannnot be compiled any longer:

/usr/src/packages/BUILD/obj/smp/1.0-8178/nv.c: In function ‘nv_kern_vma_nopage’:
/usr/src/packages/BUILD/obj/smp/1.0-8178/nv.c:1637: error: ‘mem_map’ undeclared (first use in this function)
/usr/src/packages/BUILD/obj/smp/1.0-8178/nv.c:1637: error: (Each undeclared identifier is reported only once
/usr/src/packages/BUILD/obj/smp/1.0-8178/nv.c:1637: error: for each function it appears in.)
/usr/src/packages/BUILD/obj/smp/1.0-8178/nv.c: In function ‘nv_alloc_kernel_mapping’:
/usr/src/packages/BUILD/obj/smp/1.0-8178/nv.c:2971: error: ‘mem_map’ undeclared (first use in this function)

It's declared (as fallback) in nv-linux.h (NVIDIA sources):

#if !defined(page_to_pfn)
#define page_to_pfn(page)  ((page) - mem_map)
#endif

#if !defined(pfn_to_page)
#define pfn_to_page(pfn) (mem_map + (pfn))
#endif

On i386 (default/smp) and x86_64 this does not happen, because pfn_to_page
seems to be declared by the kernel. Including <asm/mmzone.h> in nv-linux.h didn't help. :-(
Comment 1 Stefan Dirsch 2006-01-16 22:18:14 UTC
> On i386 (default/smp) and x86_64 this does not happen
s/x86_64/x86_64(default)
Comment 2 Greg Kroah-Hartman 2006-01-16 22:22:44 UTC
The kernel group doesn't maintain the nvidia driver, try asking for an 
upstream fix :)
Comment 3 Stefan Dirsch 2006-01-16 22:29:12 UTC
IMHO this looks like a kernel bug. Or why does it build fine on i386-smp?
Comment 4 andy ritger 2006-01-16 22:40:33 UTC
Stefan: we've already noticed this and will include a fix for this in our next driver release.  Christian Zander has posted a patch to nvnews.net:

http://www.nvnews.net/vbulletin/showthread.php?t=62889

Thanks.
Comment 5 Greg Kroah-Hartman 2006-01-16 22:54:40 UTC
Ok, closing as this is fixed by upstream.
Comment 6 Stefan Dirsch 2006-01-16 23:17:18 UTC
Thanks a lot, Andy!