Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp304649rdb; Thu, 18 Jan 2024 04:17:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IEtdiazkN3KglG5L2ZzEJdEGiJvFH1t3B2w42l5jWh/0hOd3Bc1YABrmge3rQ9h8M+Tk/9L X-Received: by 2002:a17:903:2289:b0:1d4:cb8c:fafe with SMTP id b9-20020a170903228900b001d4cb8cfafemr765680plh.74.1705580234259; Thu, 18 Jan 2024 04:17:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705580234; cv=pass; d=google.com; s=arc-20160816; b=hsCT/i90ci1c2WqdkdHtHG1ptQ9fowe4N42Gqxv7CAqKJiuKE7Y8R5yvmqRYA/cj5L kBOuLB1kCno+A/bxSenEaj3ICbmrny4S37Z1xyIAt8qKRMijKkaLEeeCAcyp40l2LAfe tqmProSy37Kad9NxaFslsrQktBxjfor5nTFo3qxW7+xTRYsM2zNAya321Kwt2MFH+JCp k5zQQNoAVVOHk3pbYwvi/Le5MzwA104GEdqyZVmTetvyqMEfCmx7sl26lWlvQOBdth8z tqKTxJ1o7ipdOeczjmA7sQC44MdY2uvTaJE0jKZDLx0oBSAWe4Pqk+GjYHH4PshV0snp fLKw== 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:references:in-reply-to:message-id :date:subject:cc:to:from; bh=D8wNxDQiyfN16v1xCalxQMjxgYDFm5zPJpcYDBQbLts=; fh=rbFYAv07PhikhFHWvkiHAr3yiNFaCDNIldWI9m9KKF0=; b=n5oGglUV4gFuxtCng0uZOlSW7E5toXBaJPtHTEonjyX68tsha2bBNOuCTsIJG0wWN6 VTkHYf+V2WXQ40rfkfW7rURk9fUsa3KN3dBslI81tk/nPXQsca+4ZeFKzI2UFR5Ym3ys PPzaMZuO4L9qzjDDuvSoBXPWwADEi/eMGz/dXsDtyq3AFlkHKrJnJQkNyC6esnpRVPl1 g1oPjUGiYYBPCnYB2RpRJwZmChvxHyJlrBGMIk8T2rLkKSeEb9t8m9mv6B/KsXSpCpAE 5laXNap/LaFNkZdzfzYbAFOwk+q2CnI+6ASm3rnwcGqJWpyfL/g1gbxXWo/ND7ZEPbqf cy0A== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=loongson.cn); spf=pass (google.com: domain of linux-kernel+bounces-30089-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30089-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id u12-20020a170903124c00b001d6f27a03b2si1402440plh.298.2024.01.18.04.17.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 04:17:14 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30089-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=loongson.cn); spf=pass (google.com: domain of linux-kernel+bounces-30089-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30089-linux.lists.archive=gmail.com@vger.kernel.org" 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 27538B24354 for ; Thu, 18 Jan 2024 12:16:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8BFB42554D; Thu, 18 Jan 2024 12:15:48 +0000 (UTC) Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B10D24218; Thu, 18 Jan 2024 12:15:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=114.242.206.163 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705580148; cv=none; b=l9tBIHtWyq457vabxIgIAHuBDi94djKCk6B6k7dWyXrwT1XsADIBqTArBUflXqNctg8HNBnAWIGdPvNMmxvCX5lkt7u0hno/2oJtjGUbE6hUXRdlCpNitkLHQsdI2mHWe04E1akOOnc46FUI5weNyNr0mCQbX9lB1Byn+MVuh2k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705580148; c=relaxed/simple; bh=BU6iPWP8JpzxupBczLgy0WHA3CXaFrjVEYn7VAu6/aI=; h=Received:Received:From:To:Cc:Subject:Date:Message-Id:X-Mailer: In-Reply-To:References:MIME-Version:Content-Transfer-Encoding: X-CM-TRANSID:X-CM-SenderInfo:X-Coremail-Antispam; b=Nu2vUFOa4jhD5kleYhkjWv6ntbV1whwM20M1/u+QzMkRr8BiEkTwQaH2tGxvd2MQSNdEcEOhtnT1fGX2caLReS2I96m2dFIbQBhXiI5MrF81RKZvZCwiKo2z3JsnNxRUDFOYQufrJ6cjGtHSZzrOzYdE0XkvWMcA9FUzRg6RfwA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=loongson.cn; spf=pass smtp.mailfrom=loongson.cn; arc=none smtp.client-ip=114.242.206.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [10.2.5.213]) by gateway (Coremail) with SMTP id _____8AxjutvFqlleqEBAA--.7733S3; Thu, 18 Jan 2024 20:15:43 +0800 (CST) Received: from localhost.localdomain (unknown [10.2.5.213]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxDc9vFqllhX0IAA--.43256S4; Thu, 18 Jan 2024 20:15:43 +0800 (CST) From: Bibo Mao To: Huacai Chen , Jiaxun Yang , Thomas Gleixner Cc: linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Sergey Shtylyov , lvjianmin@loongson.cn Subject: [PATCH v3 2/3] irqchip/loongson-eiointc: Refine irq affinity setting during resume Date: Thu, 18 Jan 2024 20:15:41 +0800 Message-Id: <20240118121542.748351-3-maobibo@loongson.cn> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240118121542.748351-1-maobibo@loongson.cn> References: <20240118121542.748351-1-maobibo@loongson.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID:AQAAf8DxDc9vFqllhX0IAA--.43256S4 X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBj93XoW7tFW8Aw4kKw4fCF1UXrWftFc_yoW8Xr1xpF W3A3ZFvr4UGFyUXr9Ykw1Ut34aya95Z3y7tFW3Wa97uFs8Ww4DKF4FyFykZFW0k342yF1q 9F45X34ruFn8C3XCm3ZEXasCq-sJn29KB7ZKAUJUUUU7529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUU9Yb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1a6r1DM28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVWxJr0_GcWln4kS14v26r1Y6r17M2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12 xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1q 6rW5McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64 vIr41l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAFwI0_ Jrv_JF1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1V AY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_Gr0_Xr1lIxAI cVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42 IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIev Ja73UjIFyTuYvjxUFc_-DUUUU During suspend and resume, CPUs except CPU0 are hot-unpluged and IRQs are migrated to CPU0. So it is not necessary to restore irq affinity for eiointc irq controller when system resumes. This patch removes the piece of code about irq affinity restoring in function eiointc_resume. Signed-off-by: Bibo Mao --- drivers/irqchip/irq-loongson-eiointc.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c index 6143adb1b73b..86f4faad0695 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -315,23 +315,7 @@ static int eiointc_suspend(void) static void eiointc_resume(void) { - int i, j; - struct irq_desc *desc; - struct irq_data *irq_data; - eiointc_router_init(0); - - for (i = 0; i < nr_pics; i++) { - for (j = 0; j < eiointc_priv[0]->vec_count; j++) { - desc = irq_resolve_mapping(eiointc_priv[i]->eiointc_domain, j); - if (desc && desc->handle_irq && desc->handle_irq != handle_bad_irq) { - raw_spin_lock(&desc->lock); - irq_data = irq_domain_get_irq_data(eiointc_priv[i]->eiointc_domain, irq_desc_get_irq(desc)); - eiointc_set_irq_affinity(irq_data, irq_data->common->affinity, 0); - raw_spin_unlock(&desc->lock); - } - } - } } static struct syscore_ops eiointc_syscore_ops = { -- 2.39.3