linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH v5 0/4] arm/arm64: fix a migrating irq bug when hotplug cpu
@ 2015-09-19  3:05 Yang Yingliang
  2015-09-19  3:05 ` [RFC PATCH v5 1/4] genirq: introduce CONFIG_GENERIC_IRQ_MIGRATION Yang Yingliang
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Yang Yingliang @ 2015-09-19  3:05 UTC (permalink / raw)
  To: linux-arm-kernel

----
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 while cpu is offline.

I'm trying let the core code do the migrating interrupts matter. kernel/irq/migration.c
depends on CONFIG_GENERIC_PENDING_IRQ, so I introduce config GENERIC_IRQ_MIGRATION for
compiling migration.c. Then add a generic function for migrating interrupts in migration.c.
And then use the function when cpu is going to down 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 (4):
  genirq: introduce CONFIG_GENERIC_IRQ_MIGRATION
  genirq: add irq_migrate_all_off_this_cpu() for cpu hotplug
  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           |  5 ++++
 kernel/irq/Makefile          |  2 +-
 kernel/irq/migration.c       | 66 ++++++++++++++++++++++++++++++++++++++++++++
 12 files changed, 78 insertions(+), 129 deletions(-)

-- 
2.5.0

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

end of thread, other threads:[~2015-09-23  8:02 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-19  3:05 [RFC PATCH v5 0/4] arm/arm64: fix a migrating irq bug when hotplug cpu Yang Yingliang
2015-09-19  3:05 ` [RFC PATCH v5 1/4] genirq: introduce CONFIG_GENERIC_IRQ_MIGRATION Yang Yingliang
2015-09-22 18:49   ` Marc Zyngier
2015-09-19  3:05 ` [RFC PATCH v5 2/4] genirq: add irq_migrate_all_off_this_cpu() for cpu hotplug Yang Yingliang
2015-09-22 18:48   ` Marc Zyngier
2015-09-22 18:54   ` Thomas Gleixner
2015-09-23  4:16     ` Yang Yingliang
2015-09-23  8:02       ` Thomas Gleixner
2015-09-19  3:05 ` [RFC PATCH v5 3/4] arm64: fix a migrating irq bug when hotplug cpu Yang Yingliang
2015-09-22 18:44   ` Marc Zyngier
2015-09-19  3:05 ` [RFC PATCH v5 4/4] arm: " Yang Yingliang
2015-09-22 18:50   ` Marc Zyngier
2015-09-22 18:34 ` [RFC PATCH v5 0/4] arm/arm64: " Will Deacon

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