remarkable-linux/kernel
Hidetoshi Seto 6e2ac66470 [PATCH] CPEI gets warning at kernel/irq/migration.c:27/move_masked_irq()
While running my MCA test (hardware error injection) on 2.6.19,
I got some warning like following:

> BUG: warning at kernel/irq/migration.c:27/move_masked_irq()
>
> Call Trace:
>  [<a000000100013d20>] show_stack+0x40/0xa0
>                                 sp=e00000006b2578d0 bsp=e00000006b2510b0
>  [<a000000100013db0>] dump_stack+0x30/0x60
>                                 sp=e00000006b257aa0 bsp=e00000006b251098
>  [<a0000001000de430>] move_masked_irq+0xb0/0x240
>                                 sp=e00000006b257aa0 bsp=e00000006b251070
>  [<a0000001000de6a0>] move_native_irq+0xe0/0x180
>                                 sp=e00000006b257aa0 bsp=e00000006b251040
>  [<a00000010004ff50>] iosapic_end_level_irq+0x30/0xe0
>                                 sp=e00000006b257aa0 bsp=e00000006b251020
>  [<a0000001000d94d0>] __do_IRQ+0x170/0x400
>                                 sp=e00000006b257aa0 bsp=e00000006b250fd8
>  [<a0000001000116f0>] ia64_handle_irq+0x1b0/0x260
>                                 sp=e00000006b257aa0 bsp=e00000006b250fa8
>  [<a00000010000c3a0>] ia64_leave_kernel+0x0/0x280
>                                 sp=e00000006b257aa0 bsp=e00000006b250fa8
>  [<a000000100690cf0>] _spin_unlock_irqrestore+0x30/0x60
>                                 sp=e00000006b257c70 bsp=e00000006b250f90

It comes from:

[kernel/irq/migration.c]
  26         if (CHECK_IRQ_PER_CPU(desc->status)) {
  27                 WARN_ON(1);
  28                 return;
  29         }

By putting some printk in kernel, I found that irqbalance is trying to
move CPEI which is handled as PER_CPU irq. That's why.

CPEI(Corrected Platform Error Interrupt) is ia64 specific irq, is
allowed to pin to particular processor which selected by the platform, and
even it is PER_CPU but it has set_affinity handler (=iosapic_set_affinity)
as same as other IO-SAPIC-level interrupts. (I don't know why, but
I guess that there would be typical situation where the handler for
migration is needed, such as hotplug - the processor going to be
offline/hot-removed.)

To shut up this warning, there are 2 way at least:
 a) fix CPEI stuff
 b) prohibit setting affinity to PER_CPU irq

I'm not sure what stuff of CPEI need to be fixed, but I think that
returning error to attempting move PER_CPU irq is useful for all
applications since it will never work.

Following small patch takes b) style.
It works, the warning disappeared and irqbalance still runs well.

Signed-off-by: Hidetoshi Seto <seto.hidetoshi@jp.fujitsu.com>
Cc: Arjan van de Ven <arjan@infradead.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-08 08:28:37 -08:00
..
irq [PATCH] CPEI gets warning at kernel/irq/migration.c:27/move_masked_irq() 2006-12-08 08:28:37 -08:00
power [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00
time [PATCH] time_adjust cleared before use 2006-10-28 11:30:55 -07:00
.gitignore
acct.c [PATCH] lockdep: name some old style locks 2006-12-07 08:39:36 -08:00
audit.c [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
audit.h
auditfilter.c [PATCH] kernel core: replace kmalloc+memset with kzalloc 2006-12-07 08:39:41 -08:00
auditsc.c audit: Add auditing to ipsec 2006-12-06 20:14:22 -08:00
capability.c
compat.c [PATCH] Create compat_sys_migrate_pages 2006-11-03 12:27:59 -08:00
configs.c [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00
cpu.c [PATCH] suspend: don't change cpus_allowed for task initiating the suspend 2006-12-07 08:39:28 -08:00
cpuset.c [PATCH] cpuset: allow a larger buffer for writes to cpuset files 2006-12-07 08:39:48 -08:00
delayacct.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
dma.c [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00
exec_domain.c
exit.c [PATCH] taskstats: cleanup do_exit() path 2006-12-07 08:39:34 -08:00
extable.c
fork.c Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6 2006-12-07 08:59:11 -08:00
futex.c [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00
futex_compat.c
hrtimer.c
itimer.c
kallsyms.c [PATCH] move kallsyms data to .rodata 2006-12-08 08:28:37 -08:00
Kconfig.hz [PATCH] HZ: 300Hz support 2006-12-07 08:39:36 -08:00
Kconfig.preempt
kexec.c Merge branch 'release' of master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6 2006-12-07 15:39:22 -08:00
kfifo.c
kmod.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 2006-12-05 14:37:56 +00:00
kprobes.c [PATCH] kprobes: enable booster on the preemptible kernel 2006-12-07 08:39:38 -08:00
ksysfs.c
kthread.c WorkStruct: Pass the work_struct pointer instead of context data 2006-11-22 14:55:48 +00:00
latency.c [PATCH] severing module.h->sched.h 2006-12-04 02:00:22 -05:00
lockdep.c Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6 2006-12-07 08:59:11 -08:00
lockdep_internals.h [PATCH] lockdep: more chains 2006-12-07 08:39:43 -08:00
lockdep_proc.c [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00
Makefile
module.c [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00
mutex-debug.c [PATCH] lockdep: show more details about self-test failures 2006-12-07 08:39:43 -08:00
mutex-debug.h
mutex.c
mutex.h
nsproxy.c
panic.c
params.c
pid.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
posix-cpu-timers.c
posix-timers.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
printk.c [PATCH] add ignore_loglevel boot option 2006-12-07 08:39:47 -08:00
profile.c [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00
ptrace.c
rcupdate.c [PATCH] rcu: add a prefetch() in rcu_do_batch() 2006-12-07 08:39:40 -08:00
rcutorture.c [PATCH] Add Sparse annotations to SRCU wrapper functions in rcutorture 2006-12-07 08:39:44 -08:00
relay.c [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00
resource.c [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00
rtmutex-debug.c
rtmutex-debug.h
rtmutex-tester.c [PATCH] Add include/linux/freezer.h and move definitions from sched.h 2006-12-07 08:39:27 -08:00
rtmutex.c
rtmutex.h
rtmutex_common.h
rwsem.c
sched.c [PATCH] struct seq_operations and struct file_operations constification 2006-12-07 08:39:46 -08:00
seccomp.c
signal.c [PATCH] make kernel/signal.c:kill_proc_info() static 2006-12-07 08:39:39 -08:00
softirq.c [PATCH] softirq: remove BUG_ONs which can incorrectly trigger 2006-12-07 08:39:43 -08:00
softlockup.c
spinlock.c [PATCH] lockdep: spin_lock_irqsave_nested() 2006-11-25 13:28:34 -08:00
srcu.c
stacktrace.c
stop_machine.c
sys.c [PATCH] sys: remove unused variable 2006-12-07 08:39:44 -08:00
sys_ni.c [PATCH] Create compat_sys_migrate_pages 2006-11-03 12:27:59 -08:00
sysctl.c Merge branch 'for-linus' of git://one.firstfloor.org/home/andi/git/linux-2.6 2006-12-07 08:59:11 -08:00
taskstats.c [PATCH] taskstats: cleanup reply assembling 2006-12-07 08:39:34 -08:00
time.c
timer.c
tsacct.c [PATCH] xacct_add_tsk: fix pure theoretical ->mm use-after-free 2006-10-30 12:08:41 -08:00
uid16.c
unwind.c [PATCH] unwinder: move .eh_frame to RODATA 2006-12-07 02:14:19 +01:00
user.c [PATCH] slab: remove kmem_cache_t 2006-12-07 08:39:25 -08:00
utsname.c
wait.c
workqueue.c Add "run_scheduled_work()" workqueue function 2006-12-07 09:28:19 -08:00