diff options
author | Peng Tao <bergwolf@gmail.com> | 2013-07-15 14:27:10 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-23 19:24:01 (GMT) |
commit | 3867ea5a4bc4d428f8d93557fb0fbc2cac2f2cdf (patch) | |
tree | a214ea6b71db23ba8f3c8359925eb89b6223bab7 /drivers/staging/lustre/include/linux | |
parent | 5e8f6920eb2af88e101a1b1fc0f5fb829fe2d799 (diff) | |
download | linux-fsl-qoriq-3867ea5a4bc4d428f8d93557fb0fbc2cac2f2cdf.tar.xz |
staging/lustre: fix build error when !CONFIG_SMP
Three functions cfs_cpu_ht_nsiblings, cfs_cpt_cpumask and
cfs_cpt_table_print are missing if !CONFIG_SMP.
cpumask_t/nodemask_t/__read_mostly/____cacheline_aligned
are redefined.
Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/include/linux')
-rw-r--r-- | drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h | 46 | ||||
-rw-r--r-- | drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h | 6 |
2 files changed, 23 insertions, 29 deletions
diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h index 6ae7415..c87efb4 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_cpu.h @@ -75,11 +75,19 @@ #ifndef __LIBCFS_CPU_H__ #define __LIBCFS_CPU_H__ -#ifndef HAVE_LIBCFS_CPT - -typedef unsigned long cpumask_t; -typedef unsigned long nodemask_t; +/* any CPU partition */ +#define CFS_CPT_ANY (-1) +#ifdef CONFIG_SMP +/** + * return cpumask of CPU partition \a cpt + */ +cpumask_t *cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt); +/** + * print string information of cpt-table + */ +int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len); +#else /* !CONFIG_SMP */ struct cfs_cpt_table { /* # of CPU partitions */ int ctb_nparts; @@ -91,10 +99,18 @@ struct cfs_cpt_table { __u64 ctb_version; }; -#endif /* !HAVE_LIBCFS_CPT */ +static inline cpumask_t * +cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt) +{ + return NULL; +} -/* any CPU partition */ -#define CFS_CPT_ANY (-1) +static inline int +cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) +{ + return 0; +} +#endif /* CONFIG_SMP */ extern struct cfs_cpt_table *cfs_cpt_table; @@ -107,10 +123,6 @@ void cfs_cpt_table_free(struct cfs_cpt_table *cptab); */ struct cfs_cpt_table *cfs_cpt_table_alloc(unsigned int ncpt); /** - * print string information of cpt-table - */ -int cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len); -/** * return total number of CPU partitions in \a cptab */ int @@ -124,10 +136,6 @@ int cfs_cpt_weight(struct cfs_cpt_table *cptab, int cpt); */ int cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt); /** - * return cpumask of CPU partition \a cpt - */ -cpumask_t *cfs_cpt_cpumask(struct cfs_cpt_table *cptab, int cpt); -/** * return nodemask of CPU partition \a cpt */ nodemask_t *cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt); @@ -200,14 +208,6 @@ int cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt); #define cfs_cpt_for_each(i, cptab) \ for (i = 0; i < cfs_cpt_number(cptab); i++) -#ifndef __read_mostly -# define __read_mostly -#endif - -#ifndef ____cacheline_aligned -#define ____cacheline_aligned -#endif - int cfs_cpu_init(void); void cfs_cpu_fini(void); diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h index 224371c..5f793f2 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-cpu.h @@ -81,12 +81,6 @@ struct cfs_cpt_table { nodemask_t *ctb_nodemask; }; -void cfs_cpu_core_siblings(int cpu, cpumask_t *mask); -void cfs_cpu_ht_siblings(int cpu, cpumask_t *mask); -void cfs_node_to_cpumask(int node, cpumask_t *mask); -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 |