* alsa-drivers1.0.0rc2 won't compile on stock 2.6.1rc2 kernel - fixed it
@ 2004-01-07 19:35 Alexander Maassen
2004-01-08 11:11 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Maassen @ 2004-01-07 19:35 UTC (permalink / raw)
To: alsa-devel
[-- Attachment #1: Type: text/plain, Size: 262 bytes --]
I had several issues getting alsa to compile and to load correctly,
after some debugging and lots of coffee I've been able to fix those.
Included is a unified diff so you all can enjoy the work in case you
have the same error.
Kind regards,
Alexander Maassen
[-- Attachment #2: alsa-driver-1.0.0rc2.diff --]
[-- Type: text/plain, Size: 2032 bytes --]
diff -burd alsa-driver-1.0.0rc2/acore/memory_wrapper.c alsa-driver-1.0.0rc2.new/acore/memory_wrapper.c
--- alsa-driver-1.0.0rc2/acore/memory_wrapper.c 2003-11-10 18:32:37.000000000 +0100
+++ alsa-driver-1.0.0rc2.new/acore/memory_wrapper.c 2004-01-07 20:00:10.000000000 +0100
@@ -21,6 +21,10 @@
#endif
#endif
+#ifndef VMALLOC_VMADDR
+#define VMALLOC_VMADDR(x) ((unsigned long)(x))
+#endif
+
/* vmalloc_to_page wrapper */
#ifndef CONFIG_HAVE_VMALLOC_TO_PAGE
#include <linux/highmem.h>
@@ -38,7 +42,11 @@
#endif
pgd = pgd_offset(&init_mm, lpage);
pmd = pmd_offset(pgd, lpage);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
+ pte = pte_offset_kernel(pmd, lpage);
+#else
pte = pte_offset(pmd, lpage);
+#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
page = virt_to_page(pte_page(*pte));
#else
diff -burd alsa-driver-1.0.0rc2/acore/sgbuf.c alsa-driver-1.0.0rc2.new/acore/sgbuf.c
--- alsa-driver-1.0.0rc2/acore/sgbuf.c 2003-11-10 18:32:37.000000000 +0100
+++ alsa-driver-1.0.0rc2.new/acore/sgbuf.c 2004-01-07 20:01:00.000000000 +0100
@@ -44,7 +44,11 @@
lpage = VMALLOC_VMADDR(pageptr);
pgd = pgd_offset_k(lpage);
pmd = pmd_offset(pgd, lpage);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
+ pte = pte_offset_kernel(pmd, lpage);
+#else
pte = pte_offset(pmd, lpage);
+#endif
return (void *)pte_page(*pte);
}
#endif
diff -burd alsa-driver-1.0.0rc2/include/adriver.h alsa-driver-1.0.0rc2.new/include/adriver.h
--- alsa-driver-1.0.0rc2/include/adriver.h 2003-11-20 14:23:27.000000000 +0100
+++ alsa-driver-1.0.0rc2.new/include/adriver.h 2004-01-07 19:04:43.000000000 +0100
@@ -128,6 +128,7 @@
#define need_resched() (current->need_resched)
#endif
#ifndef CONFIG_HAVE_PDE
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 1)
#include <linux/fs.h>
#include <linux/proc_fs.h>
static inline struct proc_dir_entry *PDE(const struct inode *inode)
@@ -135,6 +136,7 @@
return (struct proc_dir_entry *) inode->u.generic_ip;
}
#endif
+#endif
#ifndef cond_resched
#define cond_resched() \
do { \
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: alsa-drivers1.0.0rc2 won't compile on stock 2.6.1rc2 kernel - fixed it
2004-01-07 19:35 alsa-drivers1.0.0rc2 won't compile on stock 2.6.1rc2 kernel - fixed it Alexander Maassen
@ 2004-01-08 11:11 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2004-01-08 11:11 UTC (permalink / raw)
To: Alexander Maassen; +Cc: alsa-devel
At Wed, 07 Jan 2004 20:35:46 +0100,
Alexander Maassen wrote:
>
> [1 <text/plain; us-ascii (7bit)>]
> I had several issues getting alsa to compile and to load correctly,
> after some debugging and lots of coffee I've been able to fix those.
> Included is a unified diff so you all can enjoy the work in case you
> have the same error.
the patch seems invalid for me.
all of them are in the ifdef's which 2.6.x shouldn't pass.
i guess alsa-driver's configure script didn't check it correctly, or
you copied the wrong files into your kernel tree.
just run configure on the top of alsa-driver (with options if
necessary), or copy the files of alsa-kernel tree (not alsa-driver) to
linux source tree and make modules there.
ciao,
Takashi
>
> Kind regards,
> Alexander Maassen
> [2 alsa-driver-1.0.0rc2.diff <text/plain (7bit)>]
> diff -burd alsa-driver-1.0.0rc2/acore/memory_wrapper.c alsa-driver-1.0.0rc2.new/acore/memory_wrapper.c
> --- alsa-driver-1.0.0rc2/acore/memory_wrapper.c 2003-11-10 18:32:37.000000000 +0100
> +++ alsa-driver-1.0.0rc2.new/acore/memory_wrapper.c 2004-01-07 20:00:10.000000000 +0100
> @@ -21,6 +21,10 @@
> #endif
> #endif
>
> +#ifndef VMALLOC_VMADDR
> +#define VMALLOC_VMADDR(x) ((unsigned long)(x))
> +#endif
> +
> /* vmalloc_to_page wrapper */
> #ifndef CONFIG_HAVE_VMALLOC_TO_PAGE
> #include <linux/highmem.h>
> @@ -38,7 +42,11 @@
> #endif
> pgd = pgd_offset(&init_mm, lpage);
> pmd = pmd_offset(pgd, lpage);
> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
> + pte = pte_offset_kernel(pmd, lpage);
> +#else
> pte = pte_offset(pmd, lpage);
> +#endif
> #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
> page = virt_to_page(pte_page(*pte));
> #else
>
> diff -burd alsa-driver-1.0.0rc2/acore/sgbuf.c alsa-driver-1.0.0rc2.new/acore/sgbuf.c
> --- alsa-driver-1.0.0rc2/acore/sgbuf.c 2003-11-10 18:32:37.000000000 +0100
> +++ alsa-driver-1.0.0rc2.new/acore/sgbuf.c 2004-01-07 20:01:00.000000000 +0100
> @@ -44,7 +44,11 @@
> lpage = VMALLOC_VMADDR(pageptr);
> pgd = pgd_offset_k(lpage);
> pmd = pmd_offset(pgd, lpage);
> +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
> + pte = pte_offset_kernel(pmd, lpage);
> +#else
> pte = pte_offset(pmd, lpage);
> +#endif
> return (void *)pte_page(*pte);
> }
> #endif
>
> diff -burd alsa-driver-1.0.0rc2/include/adriver.h alsa-driver-1.0.0rc2.new/include/adriver.h
> --- alsa-driver-1.0.0rc2/include/adriver.h 2003-11-20 14:23:27.000000000 +0100
> +++ alsa-driver-1.0.0rc2.new/include/adriver.h 2004-01-07 19:04:43.000000000 +0100
> @@ -128,6 +128,7 @@
> #define need_resched() (current->need_resched)
> #endif
> #ifndef CONFIG_HAVE_PDE
> +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 1)
> #include <linux/fs.h>
> #include <linux/proc_fs.h>
> static inline struct proc_dir_entry *PDE(const struct inode *inode)
> @@ -135,6 +136,7 @@
> return (struct proc_dir_entry *) inode->u.generic_ip;
> }
> #endif
> +#endif
> #ifndef cond_resched
> #define cond_resched() \
> do { \
-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-01-08 11:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-07 19:35 alsa-drivers1.0.0rc2 won't compile on stock 2.6.1rc2 kernel - fixed it Alexander Maassen
2004-01-08 11:11 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.