[Pkg-mol-devel] Bug#392709: mol-modules-source: kmod/_fault.c does
not compile for powerpc64 (G5)
Tor Slettnes
tor at slett.net
Thu Oct 12 21:39:35 UTC 2006
Package: mol-modules-source
Version: 0.9.71.dfsg-1
Severity: grave
Justification: renders package unusable
In the "mol-modules-source" package, the file
"modules/mol/kmod/_fault.c" fails to build for at least 2 reasons:
- Linux v2.6.18 contains a conflicting declaration of "flush_hash_page":
In file included from /usr/src/modules/mol/kmod/_fault.c:17:
/usr/src/modules/mol/kmod/archinclude.h:45: error: conflicting types for 'flush_hash_page'
include/asm/tlbflush.h:51: error: previous declaration of 'flush_hash_page' was here
This is easily fixed by removing line 45 in archinclude.h:
extern int flush_hash_page( unsigned context, unsigned long va, pte_t *ptep ); /* 2.5 */
It is never used when building against a 2.6 kernel, as the following
lines show:
#ifdef LINUX_26
#define compat_flush_hash_pages flush_hash_pages
#define compat_hash_table_lock mmu_hash_lock
#else
#define compat_flush_hash_pages flush_hash_page
#define compat_hash_table_lock hash_table_lock
#endif
- More seriously, the build breaks on 64-bit kernels (i.e. G5), for
the following reason:
/usr/src/modules/mol/kmod/_fault.c: In function 'get_phys_page':
/usr/src/modules/mol/kmod/_fault.c:75: error: 'struct thread_struct' has no member named 'pgdir'
/usr/src/modules/mol/kmod/_fault.c:80: warning: cast from pointer to integer of different size
/usr/src/modules/mol/kmod/_fault.c: In function 'dbg_get_linux_page':
/usr/src/modules/mol/kmod/_fault.c:136: error: 'struct thread_struct' has no member named 'pgdir'
/usr/src/modules/mol/kmod/_fault.c:141: warning: cast from pointer to integer of different size
make[5]: *** [/usr/src/modules/mol/kmod/_fault.o] Error 1
If you look in the definition of "thread_struct" in
<kernelroot>/include/asm-powerpc/processor.h, you see why:
struct thread_struct {
unsigned long ksp; /* Kernel stack pointer */
#ifdef CONFIG_PPC64
unsigned long ksp_vsid;
#endif
struct pt_regs *regs; /* Pointer to saved register state */
mm_segment_t fs; /* for get_fs() validation */
#ifdef CONFIG_PPC32
void *pgdir; /* root of page-table tree */
signed long last_syscall;
#endif
In other words - "pgdir" is only defined on 32-bit PPCs.
I WANT A WORKAROUND!!
NOW!!
:-)
Thanks,
-tor
By the way - thanks for an otherwise great package!
-- System Information:
Debian Release: testing/unstable
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: powerpc (ppc64)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-1-powerpc64
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages mol-modules-source depends on:
ii gcc 4:4.1.1-11 The GNU C compiler
ii libc6-dev 2.3.6.ds1-6 GNU C Library: Development Librari
ii make 3.81-3 The GNU version of the "make" util
Versions of packages mol-modules-source recommends:
ii debhelper 5.0.40 helper programs for debian/rules
ii kernel-package 10.062 A utility for building Linux kerne
ii m4 1.4.7-1 a macro processing language
-- no debconf information
More information about the Pkg-mol-devel
mailing list