All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Huacai Chen <chenhuacai@kernel.org>
Cc: Bibo Mao <maobibo@loongson.cn>,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sergey Shtylyov <s.shtylyov@omp.ru>,
	lvjianmin@loongson.cn
Subject: Re: [PATCH v5 3/3] irqchip/loongson-eiointc: Refine irq affinity setting during resume
Date: Wed, 13 Mar 2024 13:39:28 +0100	[thread overview]
Message-ID: <87plvynw5b.ffs@tglx> (raw)
In-Reply-To: <CAAhV-H6Qqz54yQ8uehjx+jEhwCzNzeFfN=gHttLaq_xYQJZchg@mail.gmail.com>

On Wed, Mar 13 2024 at 14:20, Huacai Chen wrote:
> On Tue, Feb 13, 2024 at 5:49 PM Thomas Gleixner <tglx@linutronix.de> wrote:
>>
>> On Tue, Jan 30 2024 at 16:27, Bibo Mao wrote:
>> > During suspend and resume, CPUs except CPU0 can be hot-unpluged and IRQs
>> > will be migrated to CPU0. So it is not necessary to restore irq affinity
>> > for eiointc irq controller when system resumes.
>>
>> That's not the reason. The point is that eiointc_router_init() which is
>> invoked in the resume path affines all interrupts to CPU0, so the
>> restore operation is redundant, no?
> I'm sorry for the late response but I think this is a little wrong.
> When irq_migrate_all_off_this_cpu() is called at hot-unplug, if an
> irqdesc is irqd_affinity_is_managed() then its affinity is untouched
> (doesn't change to CPU0). Then after resume we should not keep its
> affinity on CPU0 set by eiointc_router_init() , but need to restore
> its old affinity.

Affinity is restored when the interrupt is started up again, so yes the
affinity setting should not be changed.

  reply	other threads:[~2024-03-13 12:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30  8:27 [PATCH v5 0/3] irqchip/loongson-eiointc: Refine irq affinity setting during resume Bibo Mao
2024-01-30  8:27 ` [PATCH v5 1/3] irqchip/loongson-eiointc: Typo fix in function eiointc_domain_alloc Bibo Mao
2024-02-13  8:46   ` Thomas Gleixner
2024-02-13  9:31   ` [tip: irq/urgent] irqchip/loongson-eiointc: Use correct struct type in eiointc_domain_alloc() tip-bot2 for Bibo Mao
2024-01-30  8:27 ` [PATCH v5 2/3] irqchip/loongson-eiointc: Skip handling if there is no pending irq Bibo Mao
2024-02-13  9:57   ` [tip: irq/core] irqchip/loongson-eiointc: Skip handling if there is no pending interrupt tip-bot2 for Bibo Mao
2024-01-30  8:27 ` [PATCH v5 3/3] irqchip/loongson-eiointc: Refine irq affinity setting during resume Bibo Mao
2024-02-13  9:49   ` Thomas Gleixner
2024-02-17  3:32     ` maobibo
2024-03-13  6:20     ` Huacai Chen
2024-03-13 12:39       ` Thomas Gleixner [this message]
2024-03-14 14:34         ` Huacai Chen
2024-02-13  9:56   ` [tip: irq/core] irqchip/loongson-eiointc: Remove explicit interrupt affinity restore on resume tip-bot2 for Bibo Mao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87plvynw5b.ffs@tglx \
    --to=tglx@linutronix.de \
    --cc=chenhuacai@kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=lvjianmin@loongson.cn \
    --cc=maobibo@loongson.cn \
    --cc=s.shtylyov@omp.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.