diff options
author | Julia Lawall <julia@diku.dk> | 2010-03-26 18:03:07 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-05-21 16:31:14 -0400 |
commit | ed1bbdefc39477a1301fb466139ffb0c00f0d006 (patch) | |
tree | 14315e6a0428bb1ef3e1c7f71b4623f2dbdc5dde /arch/mips/kernel | |
parent | 8b108c609adefd98577c35f0a41497a610041a6c (diff) |
MIPS: Use set_cpus_allowed_ptr
From: Julia Lawall <julia@diku.dk>
Use set_cpus_allowed_ptr rather than set_cpus_allowed.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression E1,E2;
@@
- set_cpus_allowed(E1, cpumask_of_cpu(E2))
+ set_cpus_allowed_ptr(E1, cpumask_of(E2))
@@
expression E;
identifier I;
@@
- set_cpus_allowed(E, I)
+ set_cpus_allowed_ptr(E, &I)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
To: peterz@infradead.org
To: mingo@elte.hu
To: tglx@linutronix.de
To: oleg@redhat.com
To: linux-mips@linux-mips.org
To: linux-kernel@vger.kernel.org
To: kernel-janitors@vger.kernel.org
Patchwork: http://patchwork.linux-mips.org/patch/1087/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/cpufreq/loongson2_cpufreq.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/mips-mt-fpaff.c | 4 | ||||
-rw-r--r-- | arch/mips/kernel/traps.c | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/arch/mips/kernel/cpufreq/loongson2_cpufreq.c b/arch/mips/kernel/cpufreq/loongson2_cpufreq.c index 2f6a0b147ab8..ae5db206347c 100644 --- a/arch/mips/kernel/cpufreq/loongson2_cpufreq.c +++ b/arch/mips/kernel/cpufreq/loongson2_cpufreq.c | |||
@@ -65,7 +65,7 @@ static int loongson2_cpufreq_target(struct cpufreq_policy *policy, | |||
65 | return -ENODEV; | 65 | return -ENODEV; |
66 | 66 | ||
67 | cpus_allowed = current->cpus_allowed; | 67 | cpus_allowed = current->cpus_allowed; |
68 | set_cpus_allowed(current, cpumask_of_cpu(cpu)); | 68 | set_cpus_allowed_ptr(current, cpumask_of(cpu)); |
69 | 69 | ||
70 | if (cpufreq_frequency_table_target | 70 | if (cpufreq_frequency_table_target |
71 | (policy, &loongson2_clockmod_table[0], target_freq, relation, | 71 | (policy, &loongson2_clockmod_table[0], target_freq, relation, |
@@ -91,7 +91,7 @@ static int loongson2_cpufreq_target(struct cpufreq_policy *policy, | |||
91 | /* notifiers */ | 91 | /* notifiers */ |
92 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 92 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |
93 | 93 | ||
94 | set_cpus_allowed(current, cpus_allowed); | 94 | set_cpus_allowed_ptr(current, &cpus_allowed); |
95 | 95 | ||
96 | /* setting the cpu frequency */ | 96 | /* setting the cpu frequency */ |
97 | clk_set_rate(cpuclk, freq); | 97 | clk_set_rate(cpuclk, freq); |
diff --git a/arch/mips/kernel/mips-mt-fpaff.c b/arch/mips/kernel/mips-mt-fpaff.c index cbc6182b0065..f5981c499109 100644 --- a/arch/mips/kernel/mips-mt-fpaff.c +++ b/arch/mips/kernel/mips-mt-fpaff.c | |||
@@ -100,10 +100,10 @@ asmlinkage long mipsmt_sys_sched_setaffinity(pid_t pid, unsigned int len, | |||
100 | if (test_ti_thread_flag(ti, TIF_FPUBOUND) && | 100 | if (test_ti_thread_flag(ti, TIF_FPUBOUND) && |
101 | cpus_intersects(new_mask, mt_fpu_cpumask)) { | 101 | cpus_intersects(new_mask, mt_fpu_cpumask)) { |
102 | cpus_and(effective_mask, new_mask, mt_fpu_cpumask); | 102 | cpus_and(effective_mask, new_mask, mt_fpu_cpumask); |
103 | retval = set_cpus_allowed(p, effective_mask); | 103 | retval = set_cpus_allowed_ptr(p, &effective_mask); |
104 | } else { | 104 | } else { |
105 | clear_ti_thread_flag(ti, TIF_FPUBOUND); | 105 | clear_ti_thread_flag(ti, TIF_FPUBOUND); |
106 | retval = set_cpus_allowed(p, new_mask); | 106 | retval = set_cpus_allowed_ptr(p, &new_mask); |
107 | } | 107 | } |
108 | 108 | ||
109 | out_unlock: | 109 | out_unlock: |
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index d612c6dcb746..7e5e38c24cdc 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c | |||
@@ -854,7 +854,7 @@ static void mt_ase_fp_affinity(void) | |||
854 | = current->cpus_allowed; | 854 | = current->cpus_allowed; |
855 | cpus_and(tmask, current->cpus_allowed, | 855 | cpus_and(tmask, current->cpus_allowed, |
856 | mt_fpu_cpumask); | 856 | mt_fpu_cpumask); |
857 | set_cpus_allowed(current, tmask); | 857 | set_cpus_allowed_ptr(current, &tmask); |
858 | set_thread_flag(TIF_FPUBOUND); | 858 | set_thread_flag(TIF_FPUBOUND); |
859 | } | 859 | } |
860 | } | 860 | } |