Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1670253
| From | Dou Liyang <douly.fnst@cn.fujitsu.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [patch 19/55] genirq: Provide irq_fixup_move_pending() |
| Date | 2017-06-20 06:30 +0200 |
| Message-ID | <tUiXD-3NM-5@gated-at.bofh.it> (permalink) |
| References | <tUeKl-Xe-5@gated-at.bofh.it> <tUf3H-1jp-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Thomas,
At 06/20/2017 07:37 AM, Thomas Gleixner wrote:
[...]
>
> +/**
> + * irq_fixup_move_pending - Cleanup irq move pending from a dying CPU
> + * @desc: Interrupt descpriptor to clean up
> + * @force_clear: If set clear the move pending bit unconditionally.
> + * If not set, clear it only when the dying CPU is the
> + * last one in the pending mask.
> + *
> + * Returns true if the pending bit was set and the pending mask contains an
> + * online CPU other than the dying CPU.
> + */
> +bool irq_fixup_move_pending(struct irq_desc *desc, bool force_clear)
> +{
> + struct irq_data *data = irq_desc_get_irq_data(desc);
> +
> + if (!irqd_is_setaffinity_pending(data))
> + return false;
> +
> + /*
> + * The outgoing CPU might be the last online target in a pending
> + * interrupt move. If that's the case clear the pending move bit.
> + */
> + if (cpumask_any_and(desc->pending_mask, cpu_online_mask) > nr_cpu_ids) {
Should we consider the case of "=nr_cpu_ids" here, like:
cpumask_any_and(desc->pending_mask, cpu_online_mask) >= nr_cpu_ids
Thanks.
Dou
> + irqd_clr_move_pending(data);
> + return false;
> + }
> + if (force_clear)
> + irqd_clr_move_pending(data);
> + return true;
> +}
> +
> void irq_move_masked_irq(struct irq_data *idata)
> {
> struct irq_desc *desc = irq_data_to_desc(idata);
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[patch 19/55] genirq: Provide irq_fixup_move_pending() Thomas Gleixner <tglx@linutronix.de> - 2017-06-20 02:20 +0200
Re: [patch 19/55] genirq: Provide irq_fixup_move_pending() Dou Liyang <douly.fnst@cn.fujitsu.com> - 2017-06-20 06:30 +0200
Re: [patch 19/55] genirq: Provide irq_fixup_move_pending() Thomas Gleixner <tglx@linutronix.de> - 2017-06-20 09:00 +0200
[tip:irq/core] genirq: Provide irq_fixup_move_pending() tip-bot for Thomas Gleixner <tipbot@zytor.com> - 2017-06-22 19:00 +0200
csiph-web