Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 118620
b: refs/heads/master
c: cd83e42
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell authored and Ingo Molnar committed Nov 7, 2008
1 parent b1354cf commit eb5bcb4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2d3854a37e8b767a51aba38ed6d22817b0631e33
refs/heads/master: cd83e42c6b0413dcbb548c2ead799111ff7e6a13
11 changes: 11 additions & 0 deletions trunk/include/linux/cpumask.h
Original file line number Diff line number Diff line change
Expand Up @@ -893,6 +893,12 @@ static inline void cpumask_copy(struct cpumask *dstp,
*/
#define cpumask_any_and(mask1, mask2) cpumask_first_and((mask1), (mask2))

/**
* cpumask_of - the cpumask containing just a given cpu
* @cpu: the cpu (<= nr_cpu_ids)
*/
#define cpumask_of(cpu) (get_cpu_mask(cpu))

/**
* to_cpumask - convert an NR_CPUS bitmap to a struct cpumask *
* @bitmap: the bitmap
Expand Down Expand Up @@ -946,6 +952,7 @@ typedef struct cpumask *cpumask_var_t;
bool alloc_cpumask_var(cpumask_var_t *mask, gfp_t flags);
void alloc_bootmem_cpumask_var(cpumask_var_t *mask);
void free_cpumask_var(cpumask_var_t mask);
void free_bootmem_cpumask_var(cpumask_var_t mask);

#else
typedef struct cpumask cpumask_var_t[1];
Expand All @@ -962,6 +969,10 @@ static inline void alloc_bootmem_cpumask_var(cpumask_var_t *mask)
static inline void free_cpumask_var(cpumask_var_t mask)
{
}

static inline void free_bootmem_cpumask_var(cpumask_var_t mask)
{
}
#endif /* CONFIG_CPUMASK_OFFSTACK */

/* The pointer versions of the maps, these will become the primary versions. */
Expand Down
5 changes: 5 additions & 0 deletions trunk/lib/cpumask.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,9 @@ void free_cpumask_var(cpumask_var_t mask)
kfree(mask);
}
EXPORT_SYMBOL(free_cpumask_var);

void free_bootmem_cpumask_var(cpumask_var_t mask)
{
free_bootmem((unsigned long)mask, cpumask_size());
}
#endif

0 comments on commit eb5bcb4

Please sign in to comment.