aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc/kernel/time_32.c4
-rw-r--r--lib/cpumask.c21
2 files changed, 2 insertions, 23 deletions
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 2f80d23a0a44..73825f431b0c 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -198,7 +198,7 @@ static __init int setup_timer_cs(void)
198static void percpu_ce_setup(enum clock_event_mode mode, 198static void percpu_ce_setup(enum clock_event_mode mode,
199 struct clock_event_device *evt) 199 struct clock_event_device *evt)
200{ 200{
201 int cpu = __first_cpu(evt->cpumask); 201 int cpu = cpumask_first(evt->cpumask);
202 202
203 switch (mode) { 203 switch (mode) {
204 case CLOCK_EVT_MODE_PERIODIC: 204 case CLOCK_EVT_MODE_PERIODIC:
@@ -218,7 +218,7 @@ static void percpu_ce_setup(enum clock_event_mode mode,
218static int percpu_ce_set_next_event(unsigned long delta, 218static int percpu_ce_set_next_event(unsigned long delta,
219 struct clock_event_device *evt) 219 struct clock_event_device *evt)
220{ 220{
221 int cpu = __first_cpu(evt->cpumask); 221 int cpu = cpumask_first(evt->cpumask);
222 unsigned int next = (unsigned int)delta; 222 unsigned int next = (unsigned int)delta;
223 223
224 sparc_config.load_profile_irq(cpu, next); 224 sparc_config.load_profile_irq(cpu, next);
diff --git a/lib/cpumask.c b/lib/cpumask.c
index ba379d12bb57..75379b759d3f 100644
--- a/lib/cpumask.c
+++ b/lib/cpumask.c
@@ -5,27 +5,6 @@
5#include <linux/export.h> 5#include <linux/export.h>
6#include <linux/bootmem.h> 6#include <linux/bootmem.h>
7 7
8int __first_cpu(const cpumask_t *srcp)
9{
10 return min_t(int, NR_CPUS, find_first_bit(srcp->bits, NR_CPUS));
11}
12EXPORT_SYMBOL(__first_cpu);
13
14int __next_cpu(int n, const cpumask_t *srcp)
15{
16 return min_t(int, NR_CPUS, find_next_bit(srcp->bits, NR_CPUS, n+1));
17}
18EXPORT_SYMBOL(__next_cpu);
19
20#if NR_CPUS > 64
21int __next_cpu_nr(int n, const cpumask_t *srcp)
22{
23 return min_t(int, nr_cpu_ids,
24 find_next_bit(srcp->bits, nr_cpu_ids, n+1));
25}
26EXPORT_SYMBOL(__next_cpu_nr);
27#endif
28
29/** 8/**
30 * cpumask_next_and - get the next cpu in *src1p & *src2p 9 * cpumask_next_and - get the next cpu in *src1p & *src2p
31 * @n: the cpu prior to the place to search (ie. return will be > @n) 10 * @n: the cpu prior to the place to search (ie. return will be > @n)