linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] x86/fixup_irq: using the cpu_online_mask instead of cpu_all_mask
@ 2012-08-14  6:55 Liu, Chuansheng
  2012-08-20  5:25 ` Yanmin Zhang
  2012-08-22  9:03 ` [tip:x86/urgent] x86/fixup_irq: Use " tip-bot for Liu, Chuansheng
  0 siblings, 2 replies; 3+ messages in thread
From: Liu, Chuansheng @ 2012-08-14  6:55 UTC (permalink / raw)
  To: 'linux-kernel@vger.kernel.org' (linux-kernel@vger.kernel.org)
  Cc: tglx, mingo, hpa,
	Yanmin Zhang <yanmin_zhang@linux.intel.com>
	(yanmin_zhang@linux.intel.com)

From: liu chuansheng <chuansheng.liu@intel.com>
Subject: [PATCH] x86/fixup_irq: using the cpu_online_mask instead of cpu_all_mask

When one CPU is going down, and this CPU is the last one in irq affinity,
current code is setting cpu_all_mask as the new affinity for that irq.

But for some system the firmware maybe send the interrupt to each CPU
in irq affinity averagely, and cpu_all_mask include all CPUs.

Here replacing cpu_all_mask with cpu_online_mask, it is more reasonable
and fittable.

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
---
 arch/x86/kernel/irq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 7ad683d..d44f782 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -270,7 +270,7 @@ void fixup_irqs(void)
 
                if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
                        break_affinity = 1;
-                       affinity = cpu_all_mask;
+                       affinity = cpu_online_mask;
                }
 
                chip = irq_data_get_irq_chip(data);
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86/fixup_irq: using the cpu_online_mask instead of cpu_all_mask
  2012-08-14  6:55 [PATCH] x86/fixup_irq: using the cpu_online_mask instead of cpu_all_mask Liu, Chuansheng
@ 2012-08-20  5:25 ` Yanmin Zhang
  2012-08-22  9:03 ` [tip:x86/urgent] x86/fixup_irq: Use " tip-bot for Liu, Chuansheng
  1 sibling, 0 replies; 3+ messages in thread
From: Yanmin Zhang @ 2012-08-20  5:25 UTC (permalink / raw)
  To: Liu, Chuansheng, linux-kernel; +Cc: tglx, mingo, hpa

On Tue, 2012-08-14 at 06:55 +0000, Liu, Chuansheng wrote:
> From: liu chuansheng <chuansheng.liu@intel.com>
> Subject: [PATCH] x86/fixup_irq: using the cpu_online_mask instead of cpu_all_mask
> 
> When one CPU is going down, and this CPU is the last one in irq affinity,
> current code is setting cpu_all_mask as the new affinity for that irq.
> 
> But for some system the firmware maybe send the interrupt to each CPU
> in irq affinity averagely, and cpu_all_mask include all CPUs.
> 
> Here replacing cpu_all_mask with cpu_online_mask, it is more reasonable
> and fittable.
It's a good finding. The issue exists on Medfield Android mobile. 


> 
> Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
> ---
>  arch/x86/kernel/irq.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
> index 7ad683d..d44f782 100644
> --- a/arch/x86/kernel/irq.c
> +++ b/arch/x86/kernel/irq.c
> @@ -270,7 +270,7 @@ void fixup_irqs(void)
>  
>                 if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
>                         break_affinity = 1;
> -                       affinity = cpu_all_mask;
> +                       affinity = cpu_online_mask;
>                 }
>  
>                 chip = irq_data_get_irq_chip(data);



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [tip:x86/urgent] x86/fixup_irq: Use cpu_online_mask instead of cpu_all_mask
  2012-08-14  6:55 [PATCH] x86/fixup_irq: using the cpu_online_mask instead of cpu_all_mask Liu, Chuansheng
  2012-08-20  5:25 ` Yanmin Zhang
@ 2012-08-22  9:03 ` tip-bot for Liu, Chuansheng
  1 sibling, 0 replies; 3+ messages in thread
From: tip-bot for Liu, Chuansheng @ 2012-08-22  9:03 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: linux-kernel, hpa, mingo, yanmin_zhang, tglx, chuansheng.liu

Commit-ID:  2530cd4f448935c74eeb49f29559589928e4b2f0
Gitweb:     http://git.kernel.org/tip/2530cd4f448935c74eeb49f29559589928e4b2f0
Author:     Liu, Chuansheng <chuansheng.liu@intel.com>
AuthorDate: Tue, 14 Aug 2012 06:55:01 +0000
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 22 Aug 2012 10:36:08 +0200

x86/fixup_irq: Use cpu_online_mask instead of cpu_all_mask

When one CPU is going down and this CPU is the last one in irq
affinity, current code is setting cpu_all_mask as the new
affinity for that irq.

But for some systems (such as in Medfield Android mobile) the
firmware sends the interrupt to each CPU in the irq affinity
mask, averaged, and cpu_all_mask includes all potential CPUs,
i.e. offline ones as well.

So replace cpu_all_mask with cpu_online_mask.

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Acked-by: Yanmin Zhang <yanmin_zhang@linux.intel.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/27240C0AC20F114CBF8149A2696CBE4A137286@SHSMSX101.ccr.corp.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 arch/x86/kernel/irq.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 7ad683d..d44f782 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -270,7 +270,7 @@ void fixup_irqs(void)
 
 		if (cpumask_any_and(affinity, cpu_online_mask) >= nr_cpu_ids) {
 			break_affinity = 1;
-			affinity = cpu_all_mask;
+			affinity = cpu_online_mask;
 		}
 
 		chip = irq_data_get_irq_chip(data);

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-08-22  9:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-14  6:55 [PATCH] x86/fixup_irq: using the cpu_online_mask instead of cpu_all_mask Liu, Chuansheng
2012-08-20  5:25 ` Yanmin Zhang
2012-08-22  9:03 ` [tip:x86/urgent] x86/fixup_irq: Use " tip-bot for Liu, Chuansheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).