Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1684906lql; Wed, 13 Mar 2024 05:39:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVN0p/4CWTCao0xlga1kOkRjCPdZx4sJ0XuRvHCkeR71yhkHl+Bo2EysWyNEUoqd+1SQq4/Lg6uIcBWzewYRAz+L1s1h3mGwZMO2f/4Pw== X-Google-Smtp-Source: AGHT+IEnOMSuyE+JbyK40vySBJY87pyKUj2BNvIaXvBstcQ94scjSD3/vdQNn970i7lZqZ7JiMD6 X-Received: by 2002:a50:a6d1:0:b0:566:e3c7:921f with SMTP id f17-20020a50a6d1000000b00566e3c7921fmr9360093edc.22.1710333582576; Wed, 13 Mar 2024 05:39:42 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710333582; cv=pass; d=google.com; s=arc-20160816; b=QiZ+yIjeNL129nix6ABG5N7uT9tF0uxNNByOZXZSGQGTUnWE07CMA51rlJw8VHgJdI 62brZoi9hg5MK3pym/p1cydVY5XL9pb+HQhlkWcAKSsQztePoTL66vJ/+HmpkMlXP+i8 UnNPt+69Z4sHidtB3UBU3dfkki2146TPzT8QLzG2IJ/ONjZgAyCZjntiIML2FRwN8cu1 mrR1T42iri8ZMbjRw9tiIt6qdJSOAd81UnYAUPLSiLPeX6f/NFLAII4U1kkfgmgkLaHn cujxCBZQgA6PAwABVmpeAG2PZsNXOEN+tbPzZ5NjSOG4V7o6S3M/MOLjlmELUnUqxPD/ idGw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=NFM9gcOH0xSx5epNsLrj556RESBc3LI2P165z8F1sQw=; fh=Plz56UNeUjwyaSnFi2oTdVRfX9Z0g9WR5kRCMT4Nlrk=; b=gIPe2GsEiY5dZwhoKQOD6O/PRVtIsqzLpt/87AJ9DpvykAu2oycck0u3D4avAawgB5 WcqaoG8UweZU5cP7ZetuRF821EY3um+oJ130attcUS78ZHOeSZ69LHMisnN9/Gx4c2fa uzC3xM3o4CO/Ouky+6J5O9mVvNcQI4lRSx6SD+5Xk8iyRVMjSyAP/fmujTZ43dg6ccvE WtlnWZiE6BsKImt2g+Qh/QlsffCVZacA+1uDLX67g3vNP2tMbJPATK3rA2kHUWd17Uz1 R9TMxOMQTKseToVRnzYHm5r0kiifacKA00DW8kLjPXq2Q9myi8J0ur8gFsrsPU11ZY3z 8ylw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="mEVM4V/R"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=nUP9+ZOx; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-101483-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101483-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id g15-20020a056402428f00b005688683b878si555161edc.404.2024.03.13.05.39.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 05:39:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-101483-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="mEVM4V/R"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=nUP9+ZOx; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-101483-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-101483-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4C4701F242E4 for ; Wed, 13 Mar 2024 12:39:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8F2421EB3F; Wed, 13 Mar 2024 12:39:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="mEVM4V/R"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="nUP9+ZOx" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 46E394416; Wed, 13 Mar 2024 12:39:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710333572; cv=none; b=Ql/FfkpRT9iciuErEG0fwnNuvGvtCCmsr87Mq0wwtDB0VXo3Yt7LeCYUWRcs/6cA5n4fe9jqKLpSXf80b4WmVZGxaZigJilK8uNqXaWRVGH7gxkZ0XiDZhp6WOGNi7KMoPD1jy6lGlunhNIfMkWwUfXCH6ibQx55jJV+IPEvQwA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710333572; c=relaxed/simple; bh=NFM9gcOH0xSx5epNsLrj556RESBc3LI2P165z8F1sQw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=uwfrSwliVHXWQWR1+whob8uHxHcHwfKLtefVTZTlgf7cKBCp+p6WnrMkTtZwMdfTyC1fCZeBanTNxdO+Tn5y3hOwgWTPXZHB+kpub2zzOgUeqws7WJaosDeh59UsbH92A0Tlc4PomzCT5+uCx/xFooieot67rrPOl1EYe8WmFUk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=mEVM4V/R; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=nUP9+ZOx; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1710333569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NFM9gcOH0xSx5epNsLrj556RESBc3LI2P165z8F1sQw=; b=mEVM4V/RscEpbePLHNjcRF2vhiHSlwRBWiNAVRD6+1LY8CF9P4bahY/q5cwl5HaM71XAPN sHs7t53//FVLxWHI5hU/iOdzywAsnZ2u0SG0+bqqL+T1dRv+EyJQM9AcNgNHJW0YwVW0R1 wurNXkEN0RgT/5rPiFf9pnGzSFWy7DlI0e7nLS8CW4sX6Fx4YrC4hIZNFTdPPgJRqqpIfg QRKiBJzIUYq0hIxD1Qgw5qRSnVKBR4TcQS9MX3jAR40/zVkD70ozAPMJnxrfi65oaANM6c WXkeXDoyKndVo0+jnYNkeFo9vMdVBjFCTMlhdROlV9B8ApyrOAVR/7XOxa9fNA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1710333569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NFM9gcOH0xSx5epNsLrj556RESBc3LI2P165z8F1sQw=; b=nUP9+ZOxwaDNLyrRw1e2GJAc6Eq1xLjh18gtQVTa6Y0ohAVO8icHSH9XvgMgqcNzKJRvrw PNpeFEu+cogSMZDw== To: Huacai Chen Cc: Bibo Mao , Jiaxun Yang , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey Shtylyov , lvjianmin@loongson.cn Subject: Re: [PATCH v5 3/3] irqchip/loongson-eiointc: Refine irq affinity setting during resume In-Reply-To: References: <20240130082722.2912576-1-maobibo@loongson.cn> <20240130082722.2912576-4-maobibo@loongson.cn> <87a5o4iti4.ffs@tglx> Date: Wed, 13 Mar 2024 13:39:28 +0100 Message-ID: <87plvynw5b.ffs@tglx> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Wed, Mar 13 2024 at 14:20, Huacai Chen wrote: > On Tue, Feb 13, 2024 at 5:49=E2=80=AFPM Thomas Gleixner wrote: >> >> On Tue, Jan 30 2024 at 16:27, Bibo Mao wrote: >> > During suspend and resume, CPUs except CPU0 can be hot-unpluged and IR= Qs >> > will be migrated to CPU0. So it is not necessary to restore irq affini= ty >> > 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.