Exports to enable clock driver modules

From: Christoph Lameter
Date: Mon Mar 14 2005 - 23:42:32 EST


The following exports are necessary to allow loadable modules to define
new clocks. Without these the mmtimer driver cannot be build
correctly as a module (there is another mmtimer specific fix necessary to
get it to build properly but that will be a separate patch):

Signed-off-by: Christoph Lameter <clameter@xxxxxxx>

Index: linux-2.6.11/kernel/time.c
===================================================================
--- linux-2.6.11.orig/kernel/time.c 2005-03-01 23:37:50.000000000 -0800
+++ linux-2.6.11/kernel/time.c 2005-03-14 20:24:02.000000000 -0800
@@ -34,6 +34,7 @@
#include <linux/syscalls.h>
#include <linux/security.h>
#include <linux/fs.h>
+#include <linux/module.h>

#include <asm/uaccess.h>
#include <asm/unistd.h>
@@ -495,6 +496,8 @@ void getnstimeofday (struct timespec *tv
tv->tv_nsec = nsec;
}

+EXPORT_SYMBOL(getnstimeofday);
+
int do_settimeofday (struct timespec *tv)
{
time_t wtm_sec, sec = tv->tv_sec;
Index: linux-2.6.11/kernel/posix-timers.c
===================================================================
--- linux-2.6.11.orig/kernel/posix-timers.c 2005-03-01 23:38:09.000000000 -0800
+++ linux-2.6.11/kernel/posix-timers.c 2005-03-14 20:24:02.000000000 -0800
@@ -46,6 +46,7 @@
#include <linux/syscalls.h>
#include <linux/wait.h>
#include <linux/workqueue.h>
+#include <linux/module.h>

#ifndef div_long_long_rem
#include <asm/div64.h>
@@ -397,6 +398,8 @@ int posix_timer_event(struct k_itimer *t
}
}

+EXPORT_SYMBOL(posix_timer_event);
+
/*
* This function gets called when a POSIX.1b interval timer expires. It
* is used as a callback from the kernel internal timer. The
@@ -491,6 +494,8 @@ void register_posix_clock(int clock_id,
posix_clocks[clock_id] = *new_clock;
}

+EXPORT_SYMBOL(register_posix_clock);
+
static struct k_itimer * alloc_posix_timer(void)
{
struct k_itimer *tmr;
@@ -1198,11 +1203,15 @@ int do_posix_clock_nosettime(struct time
return -EINVAL;
}

+EXPORT_SYMBOL(do_posix_clock_nosettime);
+
int do_posix_clock_notimer_create(struct k_itimer *timer)
{
return -EINVAL;
}

+EXPORT_SYMBOL(do_posix_clock_notimer_create);
+
int do_posix_clock_nonanosleep(int which_clock, int flags, struct timespec *t)
{
#ifndef ENOTSUP
@@ -1212,6 +1221,8 @@ int do_posix_clock_nonanosleep(int which
#endif
}

+EXPORT_SYMBOL(do_posix_clock_nonanosleep);
+
asmlinkage long
sys_clock_settime(clockid_t which_clock, const struct timespec __user *tp)
{
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/