* [PATCH 1/3] arm,tegra: replace cpu_set() with modern api @ 2011-06-23 8:28 KOSAKI Motohiro 2011-06-23 8:30 ` [PATCH 2/3] arm,integrator: replace old cpumask functions with new one KOSAKI Motohiro 0 siblings, 1 reply; 3+ messages in thread From: KOSAKI Motohiro @ 2011-06-23 8:28 UTC (permalink / raw) To: ccross, konkers, olof, linux, linux-tegra, linux-arm-kernel, linux-kernel Cc: kosaki.motohiro cpu_set() is marked as obsolete cpumask function and we plan to remove it in future. This patch replace it with modern cpumask function. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Colin Cross <ccross@android.com> Cc: Erik Gilling <konkers@android.com> Cc: Olof Johansson <olof@lixom.net> Cc: Russell King <linux@arm.linux.org.uk> Cc: linux-tegra@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/mach-tegra/platsmp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c index b8ae3c9..468523c 100644 --- a/arch/arm/mach-tegra/platsmp.c +++ b/arch/arm/mach-tegra/platsmp.c @@ -122,7 +122,7 @@ void __init smp_init_cpus(void) } for (i = 0; i < ncores; i++) - cpu_set(i, cpu_possible_map); + set_cpu_possible(i, true); set_smp_cross_call(gic_raise_softirq); } -- 1.7.3.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/3] arm,integrator: replace old cpumask functions with new one. 2011-06-23 8:28 [PATCH 1/3] arm,tegra: replace cpu_set() with modern api KOSAKI Motohiro @ 2011-06-23 8:30 ` KOSAKI Motohiro 2011-06-23 8:31 ` [PATCH 3/3] arm: " KOSAKI Motohiro 0 siblings, 1 reply; 3+ messages in thread From: KOSAKI Motohiro @ 2011-06-23 8:30 UTC (permalink / raw) To: kosaki.motohiro; +Cc: catalin.marinas, linux, linux-arm-kernel, linux-kernel We plant to change task->cpus_allowed implementation in future. Therefore this patch replace it with tsk_cpus_allowed() helper macro. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: Catalin Marinas <catalin.marinas@arm.com> Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/mach-integrator/cpu.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-integrator/cpu.c b/arch/arm/mach-integrator/cpu.c index fbb4577..de7c0ea 100644 --- a/arch/arm/mach-integrator/cpu.c +++ b/arch/arm/mach-integrator/cpu.c @@ -92,13 +92,13 @@ static int integrator_set_target(struct cpufreq_policy *policy, /* * Save this threads cpus_allowed mask. */ - cpus_allowed = current->cpus_allowed; + cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current)); /* * Bind to the specified CPU. When this call returns, * we should be running on the right CPU. */ - set_cpus_allowed(current, cpumask_of_cpu(cpu)); + set_cpus_allowed_ptr(current, cpumask_of(cpu)); BUG_ON(cpu != smp_processor_id()); /* get current setting */ @@ -126,7 +126,7 @@ static int integrator_set_target(struct cpufreq_policy *policy, freqs.cpu = policy->cpu; if (freqs.old == freqs.new) { - set_cpus_allowed(current, cpus_allowed); + set_cpus_allowed_ptr(current, &cpus_allowed); return 0; } @@ -149,7 +149,7 @@ static int integrator_set_target(struct cpufreq_policy *policy, /* * Restore the CPUs allowed mask. */ - set_cpus_allowed(current, cpus_allowed); + set_cpus_allowed_ptr(current, &cpus_allowed); cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE); @@ -163,9 +163,9 @@ static unsigned int integrator_get(unsigned int cpu) u_int cm_osc; struct icst_vco vco; - cpus_allowed = current->cpus_allowed; + cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current)); - set_cpus_allowed(current, cpumask_of_cpu(cpu)); + set_cpus_allowed_ptr(current, cpumask_of(cpu)); BUG_ON(cpu != smp_processor_id()); /* detect memory etc. */ @@ -181,7 +181,7 @@ static unsigned int integrator_get(unsigned int cpu) current_freq = icst_hz(&cclk_params, vco) / 1000; /* current freq */ - set_cpus_allowed(current, cpus_allowed); + set_cpus_allowed_ptr(current, &cpus_allowed); return current_freq; } -- 1.7.3.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 3/3] arm: replace old cpumask functions with new one. 2011-06-23 8:30 ` [PATCH 2/3] arm,integrator: replace old cpumask functions with new one KOSAKI Motohiro @ 2011-06-23 8:31 ` KOSAKI Motohiro 0 siblings, 0 replies; 3+ messages in thread From: KOSAKI Motohiro @ 2011-06-23 8:31 UTC (permalink / raw) To: kosaki.motohiro; +Cc: catalin.marinas, linux, linux-arm-kernel, linux-kernel Now cpus_xx() cpumask functions are marked as deprecated. This patch replace them with modern one. Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Russell King <linux@arm.linux.org.uk> Cc: linux-arm-kernel@lists.infradead.org --- arch/arm/common/gic.c | 2 +- arch/arm/kernel/kprobes.c | 2 +- arch/arm/kernel/smp.c | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/arm/common/gic.c b/arch/arm/common/gic.c index 4ddd0a6..ebd6b3b 100644 --- a/arch/arm/common/gic.c +++ b/arch/arm/common/gic.c @@ -389,7 +389,7 @@ void __cpuinit gic_enable_ppi(unsigned int irq) #ifdef CONFIG_SMP void gic_raise_softirq(const struct cpumask *mask, unsigned int irq) { - unsigned long map = *cpus_addr(*mask); + unsigned long map = *cpumask_bits(mask); /* * Ensure that stores to Normal memory are visible to the diff --git a/arch/arm/kernel/kprobes.c b/arch/arm/kernel/kprobes.c index 1656c87..4ecc5ce 100644 --- a/arch/arm/kernel/kprobes.c +++ b/arch/arm/kernel/kprobes.c @@ -102,7 +102,7 @@ int __kprobes __arch_disarm_kprobe(void *p) void __kprobes arch_disarm_kprobe(struct kprobe *p) { - stop_machine(__arch_disarm_kprobe, p, &cpu_online_map); + stop_machine(__arch_disarm_kprobe, p, cpu_online_mask); } void __kprobes arch_remove_kprobe(struct kprobe *p) diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c index 344e52b..98a48ab 100644 --- a/arch/arm/kernel/smp.c +++ b/arch/arm/kernel/smp.c @@ -601,8 +601,9 @@ void smp_send_stop(void) unsigned long timeout; if (num_online_cpus() > 1) { - cpumask_t mask = cpu_online_map; - cpu_clear(smp_processor_id(), mask); + cpumask_t mask; + cpumask_copy(&mask, cpu_online_mask); + cpumask_clear_cpu(smp_processor_id(), &mask); smp_cross_call(&mask, IPI_CPU_STOP); } -- 1.7.3.1 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-06-23 8:31 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-06-23 8:28 [PATCH 1/3] arm,tegra: replace cpu_set() with modern api KOSAKI Motohiro 2011-06-23 8:30 ` [PATCH 2/3] arm,integrator: replace old cpumask functions with new one KOSAKI Motohiro 2011-06-23 8:31 ` [PATCH 3/3] arm: " KOSAKI Motohiro
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox