From d33648efb3b41924dd0dd750650de9923bb5724e Mon Sep 17 00:00:00 2001 From: Yoshinori Sato Date: Sat, 25 Oct 2003 17:23:40 -0800 Subject: [PATCH] [PATCH] fix h8/300 support - add 'sched_clock' - delete smplock.h --- arch/h8300/kernel/time.c | 6 +++++ include/asm-h8300/smplock.h | 51 ------------------------------------- 2 files changed, 6 insertions(+), 51 deletions(-) delete mode 100644 include/asm-h8300/smplock.h diff --git a/arch/h8300/kernel/time.c b/arch/h8300/kernel/time.c index 3637f91fa7a6a..bd6dd08028166 100644 --- a/arch/h8300/kernel/time.c +++ b/arch/h8300/kernel/time.c @@ -143,3 +143,9 @@ int do_settimeofday(struct timespec *tv) } EXPORT_SYMBOL(do_settimeofday); + +unsigned long long sched_clock(void) +{ + return (unsigned long long)jiffies * (1000000000 / HZ); + +} diff --git a/include/asm-h8300/smplock.h b/include/asm-h8300/smplock.h deleted file mode 100644 index 96565069c9887..0000000000000 --- a/include/asm-h8300/smplock.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * - * Default SMP lock implementation - */ -#include -#include - -extern spinlock_t kernel_flag; - -#define kernel_locked() spin_is_locked(&kernel_flag) - -/* - * Release global kernel lock and global interrupt lock - */ -#define release_kernel_lock(task, cpu) \ -do { \ - if (task->lock_depth >= 0) \ - spin_unlock(&kernel_flag); \ - release_irqlock(cpu); \ - __sti(); \ -} while (0) - -/* - * Re-acquire the kernel lock - */ -#define reacquire_kernel_lock(task) \ -do { \ - if (task->lock_depth >= 0) \ - spin_lock(&kernel_flag); \ -} while (0) - - -/* - * Getting the big kernel lock. - * - * This cannot happen asynchronously, - * so we only need to worry about other - * CPU's. - */ -extern __inline__ void lock_kernel(void) -{ - if (!++current->lock_depth) - spin_lock(&kernel_flag); -} - -extern __inline__ void unlock_kernel(void) -{ - if (--current->lock_depth < 0) - spin_unlock(&kernel_flag); -} -- 2.53.0