Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1215831

Re: [PATCH] arm64: fix a migrating irq bug when hotplug cpu

From Marc Zyngier <marc.zyngier@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] arm64: fix a migrating irq bug when hotplug cpu
Date 2015-08-29 20:20 +0200
Message-ID <q2STn-1bx-3@gated-at.bofh.it> (permalink)
References <q2O3o-2Gr-7@gated-at.bofh.it> <q2Q5d-5Ao-31@gated-at.bofh.it>
Organization ARM Ltd

Show all headers | View raw


On 2015-08-29 16:12, Jiang Liu wrote:
> On 2015/8/29 21:00, Yang Yingliang wrote:
>> From: Yang Yingliang <yangyingliang@huawei.com>
>>
>> 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.
>> So copy the affinity, when the return value is IRQ_SET_MASK_OK_DONE.
> Hi Yingliang,
> 	If irq_set_affinity callback returns IRQ_SET_MASK_OK_DONE,
> it means that irq_set_affinity has copied the new CPU mask to irq
> affinity mask. It would be better to change irq_set_affinity for LPI
> to follow this rule.

The main issue here seems to be that we do not call irq_set_affinity, 
but
that we directly call into the top-level irqchip method, which relies 
on
the core code to do the copy (see irq_do_set_affinity). Too bad.

It feels like the arm/arm64 code would probably be better consolidated 
into
kernel/irq/migration.c, which already deals with some of this for x86
and ia64. It would save us the duplication and will make sure we don't
miss things next time we add a new return code, as irq_do_set_affinity
would handle this properly.

Thoughts?

          M.
-- 
Fast, cheap, reliable. Pick two.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] arm64: fix a migrating irq bug when hotplug cpu Yang Yingliang <yangyingliang@huawei.com> - 2015-08-29 15:10 +0200
  Re: [PATCH] arm64: fix a migrating irq bug when hotplug cpu Jiang Liu <jiang.liu@linux.intel.com> - 2015-08-29 17:20 +0200
    Re: [PATCH] arm64: fix a migrating irq bug when hotplug cpu Marc Zyngier <marc.zyngier@arm.com> - 2015-08-29 20:20 +0200
      Re: [PATCH] arm64: fix a migrating irq bug when hotplug cpu Hanjun Guo <hanjun.guo@linaro.org> - 2015-08-30 15:20 +0200
        Re: [PATCH] arm64: fix a migrating irq bug when hotplug cpu Marc Zyngier <marc.zyngier@arm.com> - 2015-08-31 14:30 +0200
          Re: [PATCH] arm64: fix a migrating irq bug when hotplug cpu Will Deacon <will.deacon@arm.com> - 2015-09-01 10:50 +0200
          Re: [PATCH] arm64: fix a migrating irq bug when hotplug cpu Yang Yingliang <yangyingliang@huawei.com> - 2015-09-01 12:10 +0200

csiph-web