X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libcfs%2Flibcfs%2Flibcfs_cpu.c;h=0934061ab4782fd2ff19d80f152f7702e7beffd2;hb=5628f0cb3fd2960f4a5effdf9b9d7b4bd9357713;hp=3cb16363dd1d946ac2929fffcc6db29999c66998;hpb=7903fbc92af96ff5d5780fb89911dc8557f13ac8;p=fs%2Flustre-release.git diff --git a/libcfs/libcfs/libcfs_cpu.c b/libcfs/libcfs/libcfs_cpu.c index 3cb1636..0934061 100644 --- a/libcfs/libcfs/libcfs_cpu.c +++ b/libcfs/libcfs/libcfs_cpu.c @@ -22,7 +22,7 @@ */ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012, Intel Corporation. + * Copyright (c) 2012, 2013, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -33,9 +33,6 @@ * Author: liang@whamcloud.com */ -#ifndef EXPORT_SYMTAB -# define EXPORT_SYMTAB -#endif #define DEBUG_SUBSYSTEM S_LNET #include @@ -61,6 +58,7 @@ cfs_cpt_table_alloc(unsigned int ncpt) LIBCFS_ALLOC(cptab, sizeof(*cptab)); if (cptab != NULL) { cptab->ctb_version = CFS_CPU_VERSION_MAGIC; + node_set(0, cptab->ctb_nodemask); cptab->ctb_nparts = ncpt; } @@ -78,6 +76,20 @@ cfs_cpt_table_free(struct cfs_cpt_table *cptab) EXPORT_SYMBOL(cfs_cpt_table_free); int +cfs_cpt_table_print(struct cfs_cpt_table *cptab, char *buf, int len) +{ + int rc = 0; + + rc = snprintf(buf, len, "%d\t: %d\n", 0, 0); + len -= rc; + if (len <= 0) + return -EFBIG; + + return rc; +} +EXPORT_SYMBOL(cfs_cpt_table_print); + +int cfs_cpt_number(struct cfs_cpt_table *cptab) { return 1; @@ -98,6 +110,13 @@ cfs_cpt_online(struct cfs_cpt_table *cptab, int cpt) } EXPORT_SYMBOL(cfs_cpt_online); +nodemask_t * +cfs_cpt_nodemask(struct cfs_cpt_table *cptab, int cpt) +{ + return &cptab->ctb_nodemask; +} +EXPORT_SYMBOL(cfs_cpt_cpumask); + int cfs_cpt_set_cpu(struct cfs_cpt_table *cptab, int cpt, int cpu) { @@ -164,6 +183,13 @@ cfs_cpt_spread_node(struct cfs_cpt_table *cptab, int cpt) EXPORT_SYMBOL(cfs_cpt_spread_node); int +cfs_cpu_ht_nsiblings(int cpu) +{ + return 1; +} +EXPORT_SYMBOL(cfs_cpu_ht_nsiblings); + +int cfs_cpt_current(struct cfs_cpt_table *cptab, int remap) { return 0;