From b07335c1a77c6eb2b208a604ea97d3a438c69ec1 Mon Sep 17 00:00:00 2001 From: behlendo Date: Tue, 4 Nov 2008 00:00:16 +0000 Subject: [PATCH] Ensure GPL-only symbols are re-exported as GPL-only Remove GPL-only symbol from __gethrtime() git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@166 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c --- modules/spl/spl-module.c | 4 ++-- modules/spl/spl-time.c | 14 +++++--------- 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/modules/spl/spl-module.c b/modules/spl/spl-module.c index 18f57fdf1..0dd4cfded 100644 --- a/modules/spl/spl-module.c +++ b/modules/spl/spl-module.c @@ -184,7 +184,7 @@ __ddi_create_minor_node(dev_info_t *di, char *name, int spec_type, RETURN(DDI_SUCCESS); } -EXPORT_SYMBOL(__ddi_create_minor_node); +EXPORT_SYMBOL_GPL(__ddi_create_minor_node); static void __ddi_remove_minor_node_locked(dev_info_t *di, char *name) @@ -216,7 +216,7 @@ __ddi_remove_minor_node(dev_info_t *di, char *name) mutex_exit(&di->di_lock); EXIT; } -EXPORT_SYMBOL(ddi_remove_minor_node); +EXPORT_SYMBOL_GPL(ddi_remove_minor_node); #if 0 static int diff --git a/modules/spl/spl-time.c b/modules/spl/spl-time.c index 93945ddbc..88722afe1 100644 --- a/modules/spl/spl-time.c +++ b/modules/spl/spl-time.c @@ -55,18 +55,14 @@ EXPORT_SYMBOL(__gethrestime); hrtime_t __gethrtime(void) { #ifdef HAVE_MONOTONIC_CLOCK - unsigned long long res = monotonic_clock(); + unsigned long long res = monotonic_clock(); - /* Deal with signed/unsigned mismatch */ - return (hrtime_t)(res & ~(1ULL << (BITS_PER_LONG - 1))); + /* Deal with signed/unsigned mismatch */ + return (hrtime_t)(res & ~(1ULL << 63)); #else - timespec_t tv; - hrtime_t rc; + int64_t j = get_jiffies_64(); - do_posix_clock_monotonic_gettime(&tv); - rc = (NSEC_PER_SEC * (hrtime_t)tv.tv_sec) + (hrtime_t)tv.tv_nsec; - - return rc; + return j * NSEC_PER_SEC / HZ; #endif } EXPORT_SYMBOL(__gethrtime);