From patchwork Tue Jan 30 08:27:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: maobibo X-Patchwork-Id: 193879 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1075159dyb; Tue, 30 Jan 2024 00:29:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFkb3tE7sdPyic07mEJ0vgvUae6rRCXHvHLUyjavGYnCx61K9g4lZhTHK70B8QDeRfqh/Pc X-Received: by 2002:a05:622a:50f:b0:42a:8092:1066 with SMTP id l15-20020a05622a050f00b0042a80921066mr8537843qtx.69.1706603339952; Tue, 30 Jan 2024 00:28:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706603339; cv=pass; d=google.com; s=arc-20160816; b=EKG/F70+oNPoQ+PGVRTPZdt3Lxcczzg3Yn0bZ6rIyJ5g/7D+fnHi8fqdZIxCGp4O3P 5o4gXAqbjiV35keNJoydPJge15iThJIjddZGVsOiu2P+zfYMz10U7AH//07GQWmwRC+x IT+j7x+EjEEOT2KR4PcujFLBMQXLFVdsoQ6/+CIWIVrwH1aIycYV8ea4poCQ7zNnG7AJ Up3pLhknEkfUcc3O9uE7hBI7GpSIwhkQFZHmcPfUlANv0sBppSG4BH2AGeHFxPniwl23 lN0eTOJNh+aM204BAHaKOPoLLs0X6i5JibwaZzseGUG0t0v2112sWI0Umw9OcGPhv68+ C3EQ== 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=OjX+vJp5LCoK+i84OylVRAtiAsPmI0O+NoGwRw+eyxc=; fh=o7Gfiql/MweqUti2Y09w/Grk73onhuvKr73ezM6Lw4o=; b=c36QYPAhBZfq5FlTLINfo/yBUfli1jsmh9TxgPC1tWxSZgwxohVmcTB7McD5WFCmcr ysBEoQZwNKB5LTkwkSpdn06jd5QmatIdKloXymBP9waAcaFmI0sX+Gp+73ujPGIz5okk C5UsMvHteiXwQjM4uyXEhAHOleZnxahIW7G25BVcZo7fs3FpZJbpviQsUzso1lL3NiCp tmXoCqD+7RhUgBU2z51VQWJi/oN3MDVvJytcUhaG/nVdn6n12+ztWepCo5MBkh51fMBX 322DlBUSkReGrkTBQPcY4WK0J82IaC4K44l1TupwO+4pAMqeBcUu2x8PEUJV+koMVjSk Q6cQ== 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-44133-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44133-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id 5-20020ac85745000000b0042a8b541a6bsi7689343qtx.604.2024.01.30.00.28.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 00:28:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44133-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=loongson.cn); spf=pass (google.com: domain of linux-kernel+bounces-44133-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44133-ouuuleilei=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B5EFC1C22282 for ; Tue, 30 Jan 2024 08:28:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 37EC359155; Tue, 30 Jan 2024 08:27:32 +0000 (UTC) Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC3A557866; Tue, 30 Jan 2024 08:27:28 +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=1706603250; cv=none; b=gDAKxIGz4/uqmZJB9crJPlr81VCzdauw4eq9079B4+FCz7kO+Z/y+o7aU1Bzp+3G3cCtezaddDMYPl4vKdHU+Mx2nWeQBPjxjawIuUx0vPQ2zbRUGjZmlfK9/WTI8mG2N90nlYDoRHAh9UFY3z/IA/9hVY97pmQY6C7s2ra9qm8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706603250; c=relaxed/simple; bh=j98IsQ8A2Z7MQ4f9OXygCnkweqIQTfvcNd9hW2MDvYs=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=kyP1pPKg9Vz6QOF6+7xagF+/+swKhe3Ux7c+BsZ1nj2QY1kUIrYuEEv8DZU1bh0tWFXDHwZVoIWYBOy8KwRYiB+F8QNmp+HdQMDwwjG10qjyZrvVNKHVZtzwijNF80ghnMA7Z/CnoHCHm+ytQbJ4syofAxVMdlqwElTxiJnLyqo= 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 _____8DxbOnusrhlZ0EIAA--.15199S3; Tue, 30 Jan 2024 16:27:26 +0800 (CST) Received: from localhost.localdomain (unknown [10.2.5.213]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxHs_qsrhl4KcnAA--.23872S3; Tue, 30 Jan 2024 16:27:25 +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, Huacai Chen Subject: [PATCH v5 1/3] irqchip/loongson-eiointc: Typo fix in function eiointc_domain_alloc Date: Tue, 30 Jan 2024 16:27:20 +0800 Message-Id: <20240130082722.2912576-2-maobibo@loongson.cn> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240130082722.2912576-1-maobibo@loongson.cn> References: <20240130082722.2912576-1-maobibo@loongson.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: AQAAf8AxHs_qsrhl4KcnAA--.23872S3 X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBj9xXoWrKF47tr4UArWDZw1xCryxCrX_yoWDtFc_uF 12ywnrGryaqr12q3Z7Wr1aqF9Fg3s8WFnY93Wq9F9xC34Utw18CrWaywnrJan7Kr4rAFn3 CrZ8JryfAryIyosvyTuYvTs0mTUanT9S1TB71UUUUjUqnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUb3AYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_Jrv_JF1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW8JVW5JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4UJVWxJr1ln4kS14v26r1Y6r17M2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12 xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1q 6rW5McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64 vIr41l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAFwI0_ Jrv_JF1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1V AY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_JFI_Gr1lIxAI cVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42 IY6I8E87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIev Ja73UjIFyTuYvjxU4AhLUUUUU X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789503303710774032 X-GMAIL-MSGID: 1789503303710774032 There is small typo in function eiointc_domain_alloc(), and there is no definition about eiointc struct, instead its name should be eiointc_priv struct. It is strange that there is no warning with gcc compiler. This patch fixes the small typo issue. Signed-off-by: Bibo Mao Acked-by: Huacai Chen --- drivers/irqchip/irq-loongson-eiointc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c index 1623cd779175..b3736bdd4b9f 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -241,7 +241,7 @@ static int eiointc_domain_alloc(struct irq_domain *domain, unsigned int virq, int ret; unsigned int i, type; unsigned long hwirq = 0; - struct eiointc *priv = domain->host_data; + struct eiointc_priv *priv = domain->host_data; ret = irq_domain_translate_onecell(domain, arg, &hwirq, &type); if (ret) From patchwork Tue Jan 30 08:27:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: maobibo X-Patchwork-Id: 193894 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1084853dyb; Tue, 30 Jan 2024 00:57:32 -0800 (PST) X-Google-Smtp-Source: AGHT+IEWsb0VKrSZINLcjuuny1IRLgO8z89bL+XqP7ORgDs5bCHiZM4eyUomrMQEQa0rqrnrvsrt X-Received: by 2002:a05:6a20:b89f:b0:19c:951d:91e1 with SMTP id fj31-20020a056a20b89f00b0019c951d91e1mr879691pzb.52.1706605052316; Tue, 30 Jan 2024 00:57:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706605052; cv=pass; d=google.com; s=arc-20160816; b=R/KYjWuJfsEV/O++we5vArqvo/GxczQxRigi/GALjfcYroXBBZQmNMJxAE8ibV/BWz IogUVO5MXhZNQAk9J708ooVWd/iO03ivcMIUCnmUep1H5K8uTADvM87YDB7quzAr6zhP Tk3zBfyuQ7WygBw3UHV+w3/iX1gTb5pn514I+hT799JttSBJUAvkK0L7sEOO3VuzZQu0 xg3Lgp4PKXbhyC/G+94fcpLFD/e5FExEqfbp/YFKBvgD5Q+A44UyFsdzQdzZ+NLmsl18 t1eHSNVaqIWsS5wsFgEodchlKc9AMg41S5rs5uA8D5JhLKIIsgpWwL4rB5xZAvpiyyCc mHjw== 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=DyLHRLsFOAuYJbqJshCejZHmNx8WUnkGo9ZWH3ygurA=; fh=o7Gfiql/MweqUti2Y09w/Grk73onhuvKr73ezM6Lw4o=; b=ZZBd2E/RbpKhB803xuaoUgEiwAlr4PkErHpd7Cd0jD8WzfJn/vPdzxf8c7JPpH3GVN UfY/vHhf8mVmIwNzTGYkrfvyBIo7zlon5KCL8YfBJ/b9nwFf9i71G3bT045VWvRv3CGX tZxSX/VBbAZ4Ymd7KK1W2W+cJKSDvNQw6nRqBv6vlW3+J+yvBLjOwrrrjHThGavut/Yp FhztOHiIr2wckofJo7qciO+mtILo51Uk715e2dM1eQXX7EgiTo55ZTX3TXoDBe3GxymC T65HWvU4Xx6C4Vw4+Rv7wi+TKO8BBcdiOffsCaJ9i0YdFijWoMdpJb5MwutCwws84jOy 81nQ== 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-44135-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44135-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id z29-20020a63191d000000b005d475e3306csi7053050pgl.244.2024.01.30.00.57.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 00:57:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44135-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=loongson.cn); spf=pass (google.com: domain of linux-kernel+bounces-44135-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44135-ouuuleilei=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 DEECDB2930A for ; Tue, 30 Jan 2024 08:28:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9AD28604C5; Tue, 30 Jan 2024 08:27:33 +0000 (UTC) Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 666B357886; Tue, 30 Jan 2024 08:27:29 +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=1706603252; cv=none; b=cwwV7uKZu3TOxVr9vt5t3xb+G344Kcpz5pQ45bci3d6OWn8jxBPjBweQL7Iye4v6eGobsbaWMppinqPyGezyHi7vmLZB4T4/WQlWTujjQUYHtlvCfZTL7lDgQbQJ5pyHt1Kw07b4UuyAc1DygAmACGMFS0+TFQmJQwZloKPJ5qc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706603252; c=relaxed/simple; bh=rUFMw1iMjrV6a0T0yOC1gMUOEPZTRRkGB2tBNWmbmNc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=GAz4i0olqnPuS3+C7jHgsS7+lT6nfNRXBfYBWN6SPyeO24FJVYSMPO/TvFKRF1zmGDaz0OF/Yr3NzdHUK7e2Ex1S0fEJQVG6np2UoxYQ83rzHAWuOO/QYEP64VlvkMSlKW6/TEy3VRaAUZdn+xHzxyC/UYlqcAwLavTWqBRYS3E= 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 _____8Bx3+vusrhlbUEIAA--.25295S3; Tue, 30 Jan 2024 16:27:26 +0800 (CST) Received: from localhost.localdomain (unknown [10.2.5.213]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxHs_qsrhl4KcnAA--.23872S4; Tue, 30 Jan 2024 16:27:25 +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, Huacai Chen Subject: [PATCH v5 2/3] irqchip/loongson-eiointc: Skip handling if there is no pending irq Date: Tue, 30 Jan 2024 16:27:21 +0800 Message-Id: <20240130082722.2912576-3-maobibo@loongson.cn> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240130082722.2912576-1-maobibo@loongson.cn> References: <20240130082722.2912576-1-maobibo@loongson.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: AQAAf8AxHs_qsrhl4KcnAA--.23872S4 X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBj93XoW7tr13Cr4DWr18try8uw47WrX_yoW8Xr1Dp3 y5C3Wqkr45GFWjkF9xKrW8JF1YvwnYgFZFka95G3y3Zrn8Jwn0kF4rA3WqvrsrCr4fG3W2 9F45WF48Ca15CwbCm3ZEXasCq-sJn29KB7ZKAUJUUUU7529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUU92b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2kKe7AKxVWUXVWUAwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07 AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWU tVWrXwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7V AKI48JMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMxCIbckI1I0E14v2 6r1Y6r17MI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17 CEb7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r4j6ryUMIIF 0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIx AIcVC2z280aVAFwI0_Cr0_Gr1UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVF xhVjvjDU0xZFpf9x07jz2NtUUUUU= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789505099228851260 X-GMAIL-MSGID: 1789505099228851260 It is one simple optimization in the interrupt dispatch function eiointc_irq_dispatch(). There are 256 IRQs supported for eiointc on Loongson-3A5000 and Loongson-2K2000 platform, 128 IRQs on Loongson-2K0500 platform, eiointc irq handler reads the bitmap and find pending irqs when irq happens. So there are several consecutive iocsr_read64 operations for the all bits to find all pending irqs. If the pending bitmap is zero, it means that there is no pending irq for the this irq bitmap range, we can skip handling to avoid some useless operations such as clearing hw ISR. Signed-off-by: Bibo Mao Acked-by: Huacai Chen --- drivers/irqchip/irq-loongson-eiointc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c index b3736bdd4b9f..6a71a8c29ac7 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -198,6 +198,12 @@ static void eiointc_irq_dispatch(struct irq_desc *desc) for (i = 0; i < eiointc_priv[0]->vec_count / VEC_COUNT_PER_REG; i++) { pending = iocsr_read64(EIOINTC_REG_ISR + (i << 3)); + + /* Skip handling if pending bitmap is zero */ + if (!pending) + continue; + + /* Clear the IRQs */ iocsr_write64(pending, EIOINTC_REG_ISR + (i << 3)); while (pending) { int bit = __ffs(pending); From patchwork Tue Jan 30 08:27:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: maobibo X-Patchwork-Id: 193883 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp1077433dyb; Tue, 30 Jan 2024 00:35:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IGnqqnO8A8ovEQWVDp4maVhG4xxZd9xXKgNYLCNLYwt2G8mXNAPHyhUsn5At+ODLM+uHhF1 X-Received: by 2002:a05:6870:610a:b0:214:294d:7835 with SMTP id s10-20020a056870610a00b00214294d7835mr5049376oae.28.1706603709830; Tue, 30 Jan 2024 00:35:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706603709; cv=pass; d=google.com; s=arc-20160816; b=PXe4m59umksLGCrs9CyjuzKTKZrUEJ5uIgebBU1dK6gjeU7xaq0XPMbllC7Mvj5X40 6vtyh4MtXMfJP5bFrL1i/nQFWtIiZuPQXUPLbMyc8SOM78QKUyu8rPUb5FCom7zbYCzl qySRA2fDr2wRARMjrITLH4UKu1WIwcSxMX3p8+WlR5uESy/RschXXGIPtakdoj5Osn46 iCuTZzn52yMuAaY8nrtpCVzDOk6ewjvQ65W3kaUn5O645e2z2I32H2aXIiPONwtyO3mm gR1hpEE0Q2qaqH6H2eTRZ5ioIeJ7mPfY9PizkwOd7QDahJHa4fiWNz8pk2jBDVTC54y3 TmMw== 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=AADuSBbry/YUdacFmYZeE8H0QsOg7xAD4GyPlItaOqQ=; fh=rbFYAv07PhikhFHWvkiHAr3yiNFaCDNIldWI9m9KKF0=; b=vH+UfGe4iFNyo4eY/pAuWWbMuBe2oS6+C7ipowAG+n+v4VmS6tarFlgWfksAYRmTfz Q/ySOnsT6/9Uu0Wjdq4zMndBGfXx7GRmF7C8UWRz+/ZWUA27+SnVtMMZ1bT4KC9K5MBP onyeyYXSLy19+8bX0W46DYiwijwumjgzTdeShd9TVfOKgXOYDt6206Tk4iDpdMdarzSj /cG/mEh1thN9ELuzWjbfO7VXPsrjNwVMjBPYjGfn77xQPCXCOHvQKShUvdR6qMRWIQJx 9OtLqvpA+Ua+ZZGCI9jj5DGpgMScY5u67igBxHKqxe3InCPb39lzHSzGBH0MVtzicXbM 9GFg== 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-44134-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44134-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y73-20020a638a4c000000b005cf588780c7si6953809pgd.242.2024.01.30.00.35.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jan 2024 00:35:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-44134-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=loongson.cn); spf=pass (google.com: domain of linux-kernel+bounces-44134-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-44134-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 893F528CFBE for ; Tue, 30 Jan 2024 08:28:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DA6835B1F6; Tue, 30 Jan 2024 08:27:32 +0000 (UTC) Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 666F457888; Tue, 30 Jan 2024 08:27:29 +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=1706603251; cv=none; b=c9jyHQi+FO6okyNzfjnjcmPMaH2Twf7ZUM2pHfj18DsqRaNqMjxm86Vz8lDfc5sn98o9DC2xzaXy65/ZfVsiL4y+yEScjisZd8nDq3bR/3iKWmNZVYo2mRVimNkU4hEkJRWctRjci2vId2A3NJx0tC+jyjceXZCQUmhCwB4iwt8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706603251; c=relaxed/simple; bh=OgP6r3a1KKrgPdfFzExpHkDCOOW2lLyqkMn9g951K7g=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=LB9FyRMKNVFIjX1pL6ilQK1HzdskmRam3yRxZFboN9eRsCNHesndFWWya5YxUG0sio26K+CgtMPKv7VPA5YbJYxT5bDeH5AcxbDRMa5CMDwHVvwGRRjuMs0juKNZNSd4ZVQC8c2Xoozl6J+DJIl53WnsFNoZKyJ10SNLQWkzUG4= 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 _____8AxjuvwsrhlckEIAA--.25147S3; Tue, 30 Jan 2024 16:27:28 +0800 (CST) Received: from localhost.localdomain (unknown [10.2.5.213]) by localhost.localdomain (Coremail) with SMTP id AQAAf8AxHs_qsrhl4KcnAA--.23872S5; Tue, 30 Jan 2024 16:27:26 +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 v5 3/3] irqchip/loongson-eiointc: Refine irq affinity setting during resume Date: Tue, 30 Jan 2024 16:27:22 +0800 Message-Id: <20240130082722.2912576-4-maobibo@loongson.cn> X-Mailer: git-send-email 2.39.3 In-Reply-To: <20240130082722.2912576-1-maobibo@loongson.cn> References: <20240130082722.2912576-1-maobibo@loongson.cn> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-CM-TRANSID: AQAAf8AxHs_qsrhl4KcnAA--.23872S5 X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBj93XoW7tFW8Ar1rZr4DWry3Ar1rZrc_yoW8Xr4rpF W3A3ZFvr15GFyUXr9Yk3Wjq34ay39Y93y2qay3Wa93ZFs8Wa1DKF4FyFykZFW0k342yF1q 9F4Yq34ru3W5C3XCm3ZEXasCq-sJn29KB7ZKAUJUUUU7529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUU92b4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r1Y6r17M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Xr0_Ar1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVW8Jr0_Cr1UM2kKe7AKxVWUXVWUAwAS0I0E0xvYzxvE52x082IY62kv0487Mc804VCY07 AIYIkI8VC2zVCFFI0UMc02F40EFcxC0VAKzVAqx4xG6I80ewAv7VC0I7IYx2IY67AKxVWU tVWrXwAv7VC2z280aVAFwI0_Gr0_Cr1lOx8S6xCaFVCjc4AY6r1j6r4UM4x0Y48IcxkI7V AKI48JMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMxCIbckI1I0E14v2 6r1Y6r17MI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17 CEb7AF67AKxVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r4j6ryUMIIF 0xvE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF4lIx AIcVC2z280aVAFwI0_Cr0_Gr1UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVF xhVjvjDU0xZFpf9x07jz2NtUUUUU= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789503328628786453 X-GMAIL-MSGID: 1789503691703310965 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. This patch removes this 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 6a71a8c29ac7..b64cbe3052e8 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -310,23 +310,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 = {