linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v6 0/3] arm/arm64: fix a migrating irq bug when hotplug cpu
@ 2015-09-24  9:32 Yang Yingliang
  2015-09-24  9:32 ` [RFC PATCH v6 1/3] genirq: introduce CONFIG_GENERIC_IRQ_MIGRATION and kernel/irq/cpuhotplug.c Yang Yingliang
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Yang Yingliang @ 2015-09-24  9:32 UTC (permalink / raw)
  To: linux-arm-kernel

----
Changes in v6:
 - Don't touch the existing file kernel/irq/migration.c and add
   migrating interrupts code to a new file kernel/irq/cpuhotplug.c
   suggested by Thomas.
 - Change some comments in patch #2 and #3.

Changes in v5:
 - remove the macro that guard move_irqs()
 - use name irq_migrate_all_off_this_cpu instead of move_irqs

Changes in v4:
 - select GENERIC_IRQ_MIGRATION when config GENERIC_IRQ_MIGRATION is enabled
 - add move_irqs() into kerne/irq/migration.c for cpu hotplug
 - use move_irqs() to migrate interrupts on arm/arm64 when cpu is going to down
 - split bugfix patch into seperate patches for arm and arm64

Changes in v3:
 - introduce config GENERIC_IRQ_MIGRATION for compiling migration.c
 - rename migrate_irqs in arch/ia64/kernel/irq.c to avoid compiling error

Changes in v2:
 - use the exiting helper to set IRQD_MOVE_PCNTXT flag
 - use for_each_active_irq() instead of for_each_irq_desc()
 - add some warn messages when affinity is null or do set affinity failed
----

Hi All,

There is a bug:

When cpu is disabled, all irqs will be migratged to another cpu.
In some cases, a new affinity is different, it needed to be coppied
to irq's affinity. But if the type of irq is LPI, it's affinity will
not be coppied because of irq_set_affinity's return value.



As Marc and Will suggested, I refactor the arm/arm64 migrating interrupts
code and fix the migrating irq bug before cpu is offline.

I'm trying let the core code do the migrating interrupts matter. Add the migrating code
to a new file kernel/irq/cpuhotplug.c and make it depend on GENERIC_IRQ_MIGRATION. Fix
the bug by using irq_do_set_affinity. And use the new code to migrate interrupts before
cpu is offline on arm and arm64.


Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: Hanjun Guo <hanjun.guo@linaro.org>

Yang Yingliang (3):
  genirq: introduce CONFIG_GENERIC_IRQ_MIGRATION and
    kernel/irq/cpuhotplug.c
  arm64: fix a migrating irq bug when hotplug cpu
  arm: fix a migrating irq bug when hotplug cpu

 arch/arm/Kconfig             |  1 +
 arch/arm/include/asm/irq.h   |  1 -
 arch/arm/kernel/irq.c        | 62 ----------------------------------------
 arch/arm/kernel/smp.c        |  2 +-
 arch/arm64/Kconfig           |  1 +
 arch/arm64/include/asm/irq.h |  1 -
 arch/arm64/kernel/irq.c      | 62 ----------------------------------------
 arch/arm64/kernel/smp.c      |  2 +-
 include/linux/irq.h          |  2 ++
 kernel/irq/Kconfig           |  4 +++
 kernel/irq/Makefile          |  1 +
 kernel/irq/cpuhotplug.c      | 68 ++++++++++++++++++++++++++++++++++++++++++++
 12 files changed, 79 insertions(+), 128 deletions(-)
 create mode 100644 kernel/irq/cpuhotplug.c

-- 
2.5.0

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

end of thread, other threads:[~2015-12-15  6:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-24  9:32 [RFC PATCH v6 0/3] arm/arm64: fix a migrating irq bug when hotplug cpu Yang Yingliang
2015-09-24  9:32 ` [RFC PATCH v6 1/3] genirq: introduce CONFIG_GENERIC_IRQ_MIGRATION and kernel/irq/cpuhotplug.c Yang Yingliang
     [not found]   ` <tip-f1e0bb0ad473a32d1b7e6d285ae9f7e47710bb5e@git.kernel.org>
2015-10-01 14:24     ` [tip:irq/core] genirq: Introduce generic irq migration for cpu hotunplug Thomas Gleixner
2015-10-01 14:47       ` Catalin Marinas
2015-09-24  9:32 ` [RFC PATCH v6 2/3] arm64: fix a migrating irq bug when hotplug cpu Yang Yingliang
2015-10-09 16:55   ` Catalin Marinas
2015-09-24  9:32 ` [RFC PATCH v6 3/3] arm: " Yang Yingliang
2015-10-13 19:28   ` Russell King - ARM Linux
2015-10-21 11:47   ` Geert Uytterhoeven
2015-10-21 20:29     ` Russell King - ARM Linux
2015-10-22  9:26       ` Russell King - ARM Linux
2015-10-22  9:46         ` Geert Uytterhoeven
2015-10-22 10:56         ` Yang Yingliang
2015-10-22 11:13           ` Russell King - ARM Linux
2015-10-22 12:43             ` Thomas Gleixner
2015-10-22 16:34               ` Catalin Marinas
2015-12-15  6:59             ` Yang Yingliang

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).