[Click] [PATCH] linux-2.6.16.13-patch
Mathias Jeschke
click at gmj.cjb.net
Sun Sep 10 18:56:45 EDT 2006
Hello click developers,
I created a patch file to successfully compile click-cvs (>=1.5) as
linuxmodule for the Netgear WGT634U (mips architecture):
-> First problem:
(*save_fp_context)(), (*restore_fp_context)() and the 32bit
variants will be redeclared, since your patch removes the "extern"
declarations!
-> Second:
A copy-n-paste error in 'ktime_to_timespec(' on machines,
like mips with:
!( (BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR) )
(x86 is not affected - so nobody seems to notice that bug yet?)
Please read the attached patch file and update your repository.
Regards,
Mathias
--
Mathias Jeschke
home: http://www.informatik.hu-berlin.de/~jeschke/
-------------- next part --------------
--- click-cvs.orig/etc/linux-2.6.16.13-patch 2006-08-10 16:20:13.000000000 +0200
+++ click-cvs/etc/linux-2.6.16.13-patch 2006-08-10 16:28:06.000000000 +0200
@@ -1571,25 +1571,6 @@
local_irq_restore(flags);
return(prev);
}
-diff -ru ../linux-2.6.16.13/include/asm-mips/fpu.h ./include/asm-mips/fpu.h
---- ../linux-2.6.16.13/include/asm-mips/fpu.h 2006-05-02 14:38:44.000000000 -0700
-+++ ./include/asm-mips/fpu.h 2006-05-02 22:59:19.000000000 -0700
-@@ -24,11 +24,11 @@
- struct sigcontext;
- struct sigcontext32;
-
--extern asmlinkage int (*save_fp_context)(struct sigcontext *sc);
--extern asmlinkage int (*restore_fp_context)(struct sigcontext *sc);
-+asmlinkage int (*save_fp_context)(struct sigcontext *sc);
-+asmlinkage int (*restore_fp_context)(struct sigcontext *sc);
-
--extern asmlinkage int (*save_fp_context32)(struct sigcontext32 *sc);
--extern asmlinkage int (*restore_fp_context32)(struct sigcontext32 *sc);
-+asmlinkage int (*save_fp_context32)(struct sigcontext32 *sc);
-+asmlinkage int (*restore_fp_context32)(struct sigcontext32 *sc);
-
- extern void fpu_emulator_init_fpu(void);
- extern void _init_fpu(void);
diff -ru ../linux-2.6.16.13/include/asm-mips/io.h ./include/asm-mips/io.h
--- ../linux-2.6.16.13/include/asm-mips/io.h 2006-05-02 14:38:44.000000000 -0700
+++ ./include/asm-mips/io.h 2006-05-23 08:40:44.000000000 -0700
@@ -2841,7 +2822,7 @@
/* convert a timespec to ktime_t format: */
static inline ktime_t timespec_to_ktime(struct timespec ts)
-@@ -136,13 +142,23 @@
+@@ -136,13 +142,24 @@
* tv.sec < 0 and 0 >= tv.nsec < NSEC_PER_SEC
*/
@@ -2852,6 +2833,7 @@
+#else
+# define KTIME_TV64(__s) ((ktime_t) { .tv64 = (__s) })
+# define KTIME_SEC_NSEC(__sec, __nsec) ((ktime_t) { .tv = { .sec = (__sec), .nsec = (__nsec) } })
++# define TIMESPEC_KTIME_SEC_NSEC(__kt) ((struct timespec) { .tv_sec = (time_t) kt.tv.sec, .tv_nsec = (long) kt.tv.nsec })
+# define TIMEVAL_SEC_USEC(__sec, __usec) ((struct timeval) { .tv_sec = (__sec), .tv_usec = (__usec) })
+#endif
+
@@ -2867,7 +2849,7 @@
}
/**
-@@ -210,8 +226,7 @@
+@@ -210,8 +227,7 @@
*/
static inline ktime_t timespec_to_ktime(const struct timespec ts)
{
@@ -2877,7 +2859,7 @@
}
/**
-@@ -223,8 +238,7 @@
+@@ -223,8 +239,7 @@
*/
static inline ktime_t timeval_to_ktime(const struct timeval tv)
{
@@ -2887,17 +2869,17 @@
}
/**
-@@ -236,8 +250,7 @@
+@@ -236,8 +251,7 @@
*/
static inline struct timespec ktime_to_timespec(const ktime_t kt)
{
- return (struct timespec) { .tv_sec = (time_t) kt.tv.sec,
- .tv_nsec = (long) kt.tv.nsec };
-+ return KTIME_SEC_NSEC((time_t) kt.tv.sec, (long) kt.tv.nsec);
++ return TIMESPEC_KTIME_SEC_NSEC(kt);
}
/**
-@@ -249,9 +262,8 @@
+@@ -249,9 +263,8 @@
*/
static inline struct timeval ktime_to_timeval(const ktime_t kt)
{
@@ -2909,7 +2891,7 @@
}
/**
-@@ -284,8 +296,8 @@
+@@ -284,8 +297,8 @@
* idea of the (in)accuracy of timers. Timer values are rounded up to
* this resolution values.
*/
More information about the click
mailing list