X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=libcfs%2Finclude%2Flibcfs%2Flinux%2Fkp30.h;h=4e2efbae5029397affd628fb3e4560c8b7f511c6;hp=5ef75592497d9f12e83bf0f37c50d65cea38345f;hb=0aec97df129d2c6263c66454ee9039cd5dbfdf85;hpb=08aa217ce49aba1ded52e0f7adb8a607035123fd diff --git a/libcfs/include/libcfs/linux/kp30.h b/libcfs/include/libcfs/linux/kp30.h index 5ef7559..4e2efba 100644 --- a/libcfs/include/libcfs/linux/kp30.h +++ b/libcfs/include/libcfs/linux/kp30.h @@ -27,7 +27,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel Corporation. + * Copyright (c) 2011, 2013, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -73,26 +73,8 @@ #include -#ifdef HAVE_3ARGS_INIT_WORK - -#define prepare_work(wq,cb,cbdata) \ -do { \ - INIT_WORK((wq), (void *)(cb), (void *)(cbdata)); \ -} while (0) - -#define cfs_get_work_data(type,field,data) (data) - -#else - -#define prepare_work(wq,cb,cbdata) \ -do { \ - INIT_WORK((wq), (void *)(cb)); \ -} while (0) - #define cfs_get_work_data(type,field,data) container_of(data,type,field) -#endif - #define cfs_num_online_cpus() num_online_cpus() #define wait_on_page wait_on_page_locked #define our_recalc_sigpending(current) recalc_sigpending() @@ -110,12 +92,6 @@ do { \ #define LASSERT_SEM_LOCKED(sem) LASSERT(down_trylock(sem) != 0) #define LASSERT_MUTEX_LOCKED(x) LASSERT(mutex_is_locked(x)) -#ifdef HAVE_SEM_COUNT_ATOMIC -#define SEM_COUNT(sem) (atomic_read(&(sem)->count)) -#else -#define SEM_COUNT(sem) ((sem)->count) -#endif - #define LIBCFS_PANIC(msg) panic(msg) /* ------------------------------------------------------------------- */ @@ -216,7 +192,7 @@ extern lwt_cpu_t lwt_cpus[]; #define LWTSTR(n) #n #define LWTWHERE(f,l) f ":" LWTSTR(l) -#define LWT_EVENTS_PER_PAGE (CFS_PAGE_SIZE / sizeof (lwt_event_t)) +#define LWT_EVENTS_PER_PAGE (PAGE_CACHE_SIZE / sizeof(lwt_event_t)) #define LWT_EVENT(p1, p2, p3, p4) \ do { \ @@ -328,17 +304,6 @@ extern int lwt_snapshot (cfs_cycles_t *now, int *ncpu, int *total_size, #undef _LWORDSIZE -/* compat macroses */ -#ifndef HAVE_SCATTERLIST_SETPAGE -static inline void sg_set_page(struct scatterlist *sg, struct page *page, - unsigned int len, unsigned int offset) -{ - sg->page = page; - sg->offset = offset; - sg->length = len; -} -#endif - #define cfs_smp_processor_id() smp_processor_id() #ifndef get_cpu