From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> To: kosaki.motohiro@jp.fujitsu.com Cc: catalin.marinas@arm.com, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] arm,integrator: replace old cpumask functions with new one. Date: Thu, 23 Jun 2011 17:30:26 +0900 [thread overview] Message-ID: <4E02F9A2.4040204@jp.fujitsu.com> (raw) In-Reply-To: <4E02F92C.7070203@jp.fujitsu.com> 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
WARNING: multiple messages have this Message-ID (diff)
From: kosaki.motohiro@jp.fujitsu.com (KOSAKI Motohiro) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] arm,integrator: replace old cpumask functions with new one. Date: Thu, 23 Jun 2011 17:30:26 +0900 [thread overview] Message-ID: <4E02F9A2.4040204@jp.fujitsu.com> (raw) In-Reply-To: <4E02F92C.7070203@jp.fujitsu.com> 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 at 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
next prev parent reply other threads:[~2011-06-23 8:31 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-06-23 8:28 [PATCH 1/3] arm,tegra: replace cpu_set() with modern api KOSAKI Motohiro 2011-06-23 8:28 ` KOSAKI Motohiro 2011-06-23 8:28 ` KOSAKI Motohiro 2011-06-23 8:30 ` KOSAKI Motohiro [this message] 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 2011-06-23 8:31 ` KOSAKI Motohiro
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=4E02F9A2.4040204@jp.fujitsu.com \ --to=kosaki.motohiro@jp.fujitsu.com \ --cc=catalin.marinas@arm.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux@arm.linux.org.uk \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.