Whamcloud - gitweb
LU-3963 libcfs: remove last cfs wrappers for cpu node handling 29/11729/2
authorJames Simmons <uja.ornl@gmail.com>
Tue, 2 Sep 2014 14:14:05 +0000 (10:14 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Sat, 6 Sep 2014 02:52:17 +0000 (02:52 +0000)
Th last of the cfs wrapper cfs_for_each_possible_cpu is removed
with this patch.

Change-Id: I2c626e587343c3950599d1da6442cd25cb2d27a6
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Reviewed-on: http://review.whamcloud.com/11729
Tested-by: Jenkins
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
libcfs/include/libcfs/linux/linux-cpu.h
libcfs/libcfs/tracefile.c
lustre/include/linux/lustre_compat25.h

index 097a84b..41d54b8 100644 (file)
@@ -89,78 +89,5 @@ void cfs_node_to_cpumask(int node, cpumask_t *mask);
 int cfs_cpu_core_nsiblings(int cpu);
 int cfs_cpu_ht_nsiblings(int cpu);
 
 int cfs_cpu_core_nsiblings(int cpu);
 int cfs_cpu_ht_nsiblings(int cpu);
 
-/**
- * comment out definitions for compatible layer
- * #define CFS_CPU_NR                          NR_CPUS
- *
- * typedef cpumask_t                           cfs_cpumask_t;
- *
- * #define cfs_cpu_current()                   smp_processor_id()
- * #define cfs_cpu_online(i)                   cpu_online(i)
- * #define cfs_cpu_online_num()                num_online_cpus()
- * #define cfs_cpu_online_for_each(i)          for_each_online_cpu(i)
- * #define cfs_cpu_possible_num()              num_possible_cpus()
- * #define cfs_cpu_possible_for_each(i)        for_each_possible_cpu(i)
- *
- * #ifdef CONFIG_CPUMASK_SIZE
- * #define cfs_cpu_mask_size()                 cpumask_size()
- * #else
- * #define cfs_cpu_mask_size()                 sizeof(cfs_cpumask_t)
- * #endif
- *
- * #define cfs_cpu_mask_set(i, mask)           cpu_set(i, mask)
- * #define cfs_cpu_mask_unset(i, mask)         cpu_clear(i, mask)
- * #define cfs_cpu_mask_isset(i, mask)         cpu_isset(i, mask)
- * #define cfs_cpu_mask_clear(mask)            cpus_clear(mask)
- * #define cfs_cpu_mask_empty(mask)            cpus_empty(mask)
- * #define cfs_cpu_mask_weight(mask)           cpus_weight(mask)
- * #define cfs_cpu_mask_first(mask)            first_cpu(mask)
- * #define cfs_cpu_mask_any_online(mask)      (any_online_cpu(mask) != NR_CPUS)
- * #define cfs_cpu_mask_for_each(i, mask)      for_each_cpu_mask(i, mask)
- *
- * #define cfs_cpu_mask_copy(dst, src)         cpumask_copy(dst, src)
- *
- * static inline void
- * cfs_cpu_mask_of_online(cfs_cpumask_t *mask)
- * {
- * cfs_cpu_mask_copy(mask, &cpu_online_map);
- * }
- *
- * #ifdef CONFIG_NUMA
- *
- * #define CFS_NODE_NR                         MAX_NUMNODES
- *
- * typedef nodemask_t                          cfs_node_mask_t;
- *
- * #define cfs_node_of_cpu(cpu)                cpu_to_node(cpu)
- * #define cfs_node_online(i)                  node_online(i)
- * #define cfs_node_online_num()               num_online_nodes()
- * #define cfs_node_online_for_each(i)         for_each_online_node(i)
- * #define cfs_node_possible_num()             num_possible_nodes()
- * #define cfs_node_possible_for_each(i)       for_each_node(i)
- *
- * static inline void cfs_node_to_cpumask(int node, cfs_cpumask_t *mask)
- * {
- *      cfs_cpu_mask_copy(mask, cpumask_of_node(node));
- * }
- *
- * #define cfs_node_mask_set(i, mask)          node_set(i, mask)
- * #define cfs_node_mask_unset(i, mask)        node_clear(i, mask)
- * #define cfs_node_mask_isset(i, mask)        node_isset(i, mask)
- * #define cfs_node_mask_clear(mask)           nodes_reset(mask)
- * #define cfs_node_mask_empty(mask)           nodes_empty(mask)
- * #define cfs_node_mask_weight(mask)          nodes_weight(mask)
- * #define cfs_node_mask_for_each(i, mask)     for_each_node_mask(i, mask)
- * #define cfs_node_mask_copy(dst, src)        memcpy(dst, src, sizeof(*src))
- *
- * static inline void
- * cfs_node_mask_of_online(cfs_node_mask_t *mask)
- * {
- *       cfs_node_mask_copy(mask, &node_online_map);
- * }
- *
- * #endif
- */
-
 #endif /* CONFIG_SMP */
 #endif /* __LIBCFS_LINUX_CPU_H__ */
 #endif /* CONFIG_SMP */
 #endif /* __LIBCFS_LINUX_CPU_H__ */
index 53fa9d6..0c2e06a 100644 (file)
@@ -527,7 +527,7 @@ static void collect_pages_on_all_cpus(struct page_collection *pc)
        struct cfs_trace_cpu_data *tcd;
        int i, cpu;
 
        struct cfs_trace_cpu_data *tcd;
        int i, cpu;
 
-       cfs_for_each_possible_cpu(cpu) {
+       for_each_possible_cpu(cpu) {
                cfs_tcd_for_each_type_lock(tcd, i, cpu) {
                        list_splice_init(&tcd->tcd_pages, &pc->pc_pages);
                        tcd->tcd_cur_pages = 0;
                cfs_tcd_for_each_type_lock(tcd, i, cpu) {
                        list_splice_init(&tcd->tcd_pages, &pc->pc_pages);
                        tcd->tcd_cur_pages = 0;
@@ -558,7 +558,7 @@ static void put_pages_back_on_all_cpus(struct page_collection *pc)
         struct cfs_trace_page *tmp;
         int i, cpu;
 
         struct cfs_trace_page *tmp;
         int i, cpu;
 
-        cfs_for_each_possible_cpu(cpu) {
+       for_each_possible_cpu(cpu) {
                 cfs_tcd_for_each_type_lock(tcd, i, cpu) {
                         cur_head = tcd->tcd_pages.next;
 
                 cfs_tcd_for_each_type_lock(tcd, i, cpu) {
                         cur_head = tcd->tcd_pages.next;
 
@@ -622,7 +622,7 @@ static void put_pages_on_daemon_list(struct page_collection *pc)
         struct cfs_trace_cpu_data *tcd;
         int i, cpu;
 
         struct cfs_trace_cpu_data *tcd;
         int i, cpu;
 
-        cfs_for_each_possible_cpu(cpu) {
+       for_each_possible_cpu(cpu) {
                 cfs_tcd_for_each_type_lock(tcd, i, cpu)
                         put_pages_on_tcd_daemon_list(pc, tcd);
         }
                 cfs_tcd_for_each_type_lock(tcd, i, cpu)
                         put_pages_on_tcd_daemon_list(pc, tcd);
         }
@@ -1144,7 +1144,7 @@ static void trace_cleanup_on_all_cpus(void)
        struct cfs_trace_page *tmp;
        int i, cpu;
 
        struct cfs_trace_page *tmp;
        int i, cpu;
 
-       cfs_for_each_possible_cpu(cpu) {
+       for_each_possible_cpu(cpu) {
                cfs_tcd_for_each_type_lock(tcd, i, cpu) {
                        tcd->tcd_shutting_down = 1;
 
                cfs_tcd_for_each_type_lock(tcd, i, cpu) {
                        tcd->tcd_shutting_down = 1;
 
index 5bebf47..a611708 100644 (file)
@@ -162,12 +162,6 @@ unsigned int ll_crypto_tfm_alg_min_keysize(struct crypto_blkcipher *tfm)
         return crypto_blkcipher_tfm(tfm)->__crt_alg->cra_blkcipher.min_keysize;
 }
 
         return crypto_blkcipher_tfm(tfm)->__crt_alg->cra_blkcipher.min_keysize;
 }
 
-#ifdef for_each_possible_cpu
-#define cfs_for_each_possible_cpu(cpu) for_each_possible_cpu(cpu)
-#elif defined(for_each_cpu)
-#define cfs_for_each_possible_cpu(cpu) for_each_cpu(cpu)
-#endif
-
 #ifndef HAVE_SIMPLE_SETATTR
 #define simple_setattr(dentry, ops) inode_setattr((dentry)->d_inode, ops)
 #endif
 #ifndef HAVE_SIMPLE_SETATTR
 #define simple_setattr(dentry, ops) inode_setattr((dentry)->d_inode, ops)
 #endif