From patchwork Thu Jan 18 12:15:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: maobibo X-Patchwork-Id: 189178 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp297596dyb; Thu, 18 Jan 2024 04:17:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IF71+LT7fWVHlZBxgfbkb/tmP/fS35n4PZ8tBedV5310Ot7VTNHfu6uoomoR/vPsGqHglIL X-Received: by 2002:a17:90a:474f:b0:28e:3189:f78e with SMTP id y15-20020a17090a474f00b0028e3189f78emr1072691pjg.42.1705580230534; Thu, 18 Jan 2024 04:17:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705580230; cv=pass; d=google.com; s=arc-20160816; b=J6VQIXWlTWdzd0FBQr5HRtMwDNHYYPoQvDtIIo6Vw6E/6Tk2ur+/hA47Owb8BZ9w99 o81x1fjDfpud2KfQo4De1j+90xR7pa70aroRmunULx4AYsS74EywmC93BSNvmRhV4Wom 9/Gw9Wvwr3kYe2yUPyzhCORUIN/QfRWOm3u4/OAqfyII3+iGvtJ9Bped8ANqGOw0G1xH pBWOXG1JnCIkwy2MZg6ICBNSYzHvYco94uFQk2xeElx4BLmsr5mOxeQrS7DxzF4wMKIW aJhKKu0uVctTIOfIagcKWkeIUaBVHs7hEQlyO9FEXgEE5AIw+9knnfD8lQ8ljKoywwZK g5nw== 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=P1YbznHY99J5nYCmyoaHqOC5XdHWz4ebJWX8w7JpGBc=; fh=rbFYAv07PhikhFHWvkiHAr3yiNFaCDNIldWI9m9KKF0=; b=RNK6USdnxqiM/CdzaTLbwB51IMudj+itlqiN1oIc5+Spy07xQcw7tutS9WsN8gE54D a6topU+yotWVSlwXDGB2rUDbEhXgK09SM9I3Xx+y4rU1ni442RY8IO7zkCihO9ax25UZ VuJrARjWxdRMqTTUp2CiTOv35LW+3XyD3dgzkMS6ZAwW6DFty2SuvV5+Vy1yk5XLbQEp TMdjCJroEVk5iCo3gx5XlK6eKlNvvHMd2az52HYdbK6Sn1o8WULGog7/PQ/ruzcya1sW QEf52BO1zxXb63Li250hYqfeHWlzz/qOF+9nkihmOGxxUuV5Y6CC8W8CRwT/onX+/0pw L0+Q== 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-30090-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30090-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id o2-20020a17090a168200b0028ce622923esi1346004pja.103.2024.01.18.04.17.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 04:17:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30090-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=loongson.cn); spf=pass (google.com: domain of linux-kernel+bounces-30090-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30090-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 00C97281C78 for ; Thu, 18 Jan 2024 12:17:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EF3FE26AF2; Thu, 18 Jan 2024 12:15:49 +0000 (UTC) Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0E0B124217; 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=qLHeUaU7edoCD6vYj3XyvwNbarDmAcFWEWU7ZsQ9hjy0rKlpKjiu0U3l4JhXoVo9cQK22xCAAqVFYx8QRPMsvq/BCmYr6YiwjCRAn71wuR8IqJKrRvvsl1TBhwMLYKRleyDzLhZz8Q57dVOA66fOxWrmmtOiLylx7iLxij9hDjw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705580148; c=relaxed/simple; bh=CwoOixwB0+Md0QqJN1aOruXZCUE84hJzfBNpRthpE0U=; 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=Ie/hD2XmVuwBxEAS8eDlF7buVLEdNFMP8YxRokBaRo7d6emTpe+EKQ8HMRnxaqM2H3kqG1PFvfq5QDSUgUb6kPi1YLo+JSkBvMYDQFUWa4m8GQzfjoU1JQDf9xZeOKmIb4otz59VzfAcr60X2ikl1f9Ey4ncRFmlNKymu34MpGU= 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 _____8DxfetvFqllcaEBAA--.7716S3; 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--.43256S3; 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 1/3] irqchip/loongson-eiointc: Skip handling if there is no pending irq Date: Thu, 18 Jan 2024 20:15:40 +0800 Message-Id: <20240118121542.748351-2-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 X-CM-TRANSID: AQAAf8DxDc9vFqllhX0IAA--.43256S3 X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBj93XoW7uw45Kw1kAF4xCFWUZrWftFc_yoW8Xr4Upa y5CF90krW5J34jy343KFWDXF1Yv3ZYgFZFkFZ3Way3Zr98Jas0kF4FkF1qvrs2kr4fJa12 9F45WF45Ca15C3XCm3ZEXasCq-sJn29KB7ZKAUJUUUU7529EdanIXcx71UUUUU7KY7ZEXa sCq-sGcSsGvfJ3Ic02F40EFcxC0VAKzVAqx4xG6I80ebIjqfuFe4nvWSU5nxnvy29KBjDU 0xBIdaVrnRJUUU9Yb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I20VC2zVCF04k26cxKx2 IYs7xG6rWj6s0DM7CIcVAFz4kK6r126r13M28lY4IEw2IIxxk0rwA2F7IY1VAKz4vEj48v e4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Gr0_Xr1l84ACjcxK6xIIjxv20xvEc7CjxVAFwI 0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVW8Jr0_Cr1UM28EF7xvwVC2z280aVCY1x0267AK xVWxJr0_GcWln4kS14v26r1Y6r17M2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12 xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r12 6r1DMcIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64 vIr41l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_Jr0_Gr1l4IxYO2xFxVAFwI0_ Jrv_JF1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8GjcxK67AKxVWUGVWUWwC2zVAF1V AY17CE14v26r126r1DMIIYrxkI7VAKI48JMIIF0xvE2Ix0cI8IcVAFwI0_JFI_Gr1lIxAI cVC0I7IYx2IY6xkF7I0E14v26r1j6r4UMIIF0xvE42xK8VAvwI8IcIk0rVWUJVWUCwCI42 IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWIev Ja73UjIFyTuYvjxU2-txDUUUU X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788430495680633354 X-GMAIL-MSGID: 1788430495680633354 There is one simple optimization in the interrupt dispatch function eiointc_irq_dispatch. There are 256 IRQs supported for eiointc, eiointc irq handler reads the bitmap and find pending irqs when irq happens. So there are four times of consecutive iocsr_read64 operations for the total 256 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 --- drivers/irqchip/irq-loongson-eiointc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c index 1623cd779175..6143adb1b73b 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -198,6 +198,17 @@ 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)); + + /* + * Get pending eiointc irq from bitmap status, there are 4 times + * consecutive iocsr_read64 operations for 256 IRQs. + * + * 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 Thu Jan 18 12:15:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: maobibo X-Patchwork-Id: 189177 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp297501dyb; Thu, 18 Jan 2024 04:17:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdgrVo41yv385DlhbDxLsTCc/IZl+07Zm90tsnv5XeH10yKUobw7h2ENuR5UzK9ONaAQuT X-Received: by 2002:a17:906:ae4e:b0:a28:fc03:f199 with SMTP id lf14-20020a170906ae4e00b00a28fc03f199mr435658ejb.107.1705580220205; Thu, 18 Jan 2024 04:17:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705580220; cv=pass; d=google.com; s=arc-20160816; b=I6/Q6GgqC+XMb4/dbS9KQq16l41M8A5C+EIguriLROiBWbbC6M3jf4H0SFxFjYKOe2 QWbBLKvd9tdpswXWa6nWugg492aQTA0T0IPaR265T0gfv3aGCZ5S0uGGX2/do2s/5rDA +sVXP3B5KHmS9RUdCG7wiuDVuhFo4aPl/7zHebrGt8DkrAl+Qi7HbasW9ag0g+4XZ+ot +QpJHg4rw51e6zYGK06GNztNmQqcCE+tGp3fPNRGskG7UcXKZm4gAuc4ea3HIRO7DCI6 zlq66ZV4AAdKJyfzq5t5iJhSm5Y+NtvAR5UxsEmgOcwzDk8NhpqgBnfkpYQElqB8VYvm MfOg== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30089-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g25-20020a1709061c9900b00a2cb992e9f9si5580094ejh.1025.2024.01.18.04.17.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 04:17:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30089-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=loongson.cn); spf=pass (google.com: domain of linux-kernel+bounces-30089-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30089-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 am.mirrors.kernel.org (Postfix) with ESMTPS id CDBF01F27A23 for ; Thu, 18 Jan 2024 12:16:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ADA5325777; Thu, 18 Jan 2024 12:15:49 +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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788430450708285311 X-GMAIL-MSGID: 1788430484810553656 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 = { From patchwork Thu Jan 18 12:15:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: maobibo X-Patchwork-Id: 189179 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2bc4:b0:101:a8e8:374 with SMTP id hx4csp297670dyb; Thu, 18 Jan 2024 04:17:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3tBKRgjjYFubprii274rZ1NEx5NvPT5EZ0pkskQvDUXoxuojcgh6GSZqDUz/d9Ov+6VSs X-Received: by 2002:a05:6a00:2e9e:b0:6d9:ac14:9fb4 with SMTP id fd30-20020a056a002e9e00b006d9ac149fb4mr626988pfb.43.1705580240183; Thu, 18 Jan 2024 04:17:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705580240; cv=pass; d=google.com; s=arc-20160816; b=yt4wNxEVwaW3qKxnvnPz6PfP3eRgCwb/bc/tjv/wPz9o+PKdCenq2NIwYvbzWIYKCI Fm/s3nZysn+BfEfc6WrMWhMFNFcv0N5oJPpFtQvLrR7ErxXkULg6iAvQyLgIoXE0o0HC wmSZebyYWUJhHKxg+SXmUWnQ9bcvFwXCIoddL0DUTA8UADJ7V8B639VofBinm0bLpUP0 udnH7971VEbhskOCA+BN6hpqORMuUmcsT0tzq0iUGq9M55xw8varVvG3oG68CQ2lGLIz 4PYK0ahGngSTlj215PRcDV02ddgzl1JpqAjuAkBR3SB+hKhFj1N/Uki9PLWtZJUZ89Hl Ev6w== 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=2E2P4t1zAi31FdqV6MU0scVStRbRd5LgyKHYHqokdHQ=; fh=rbFYAv07PhikhFHWvkiHAr3yiNFaCDNIldWI9m9KKF0=; b=YYUXjE4kp7ZmizohqVOF4vGcWvgNG6uKKn4lPdcxyCtLh3n9ukKJ4Yp/vSQZfkxKU2 Hppn5e135X10gqcZfuITAbVVgKp1pee3Lr2u3NYlc7FVeO7glOUI0Js2H+rR1Xlygjem ny+7lax1iv7FNXQkIZtyIZv9wYAloOL9WCreMyDRhB4l/dycAbOFsFOgz04m9D9ftwpd jGta2/weKq5CEaO6rfXSiy0eIx/nkI0bcTkItjQiXJll7kvHadMwap2G9h+1p76pgHIP Rc9TqMJikh+LZDz+Ae5wCttnbQME54H88u0VB1lbzacrd3pqLHfdYeqVTUbnVsGc3v5+ 5Axw== 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-30088-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30088-ouuuleilei=gmail.com@vger.kernel.org" Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id d34-20020a631d62000000b005cdf48b01f4si1291069pgm.717.2024.01.18.04.17.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 04:17:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-30088-ouuuleilei=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-30088-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-30088-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 15F34B24630 for ; Thu, 18 Jan 2024 12:16:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C0D2A25603; 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 3B13E2421B; 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=1705580147; cv=none; b=GbZRwxzrlCdkZo7zMo15lVNoyGxdBADTZQ5SlsAivLRVUJj8TFtL+c6j2YcRgE4fuTE6My6m/MJ0exICCJoTAtmjPDPsXebEe3iIETvHqtbBjXTwc2U/DaeIDGxmeuaBzLDlYRGl0V28jUAJKRyhOS8kUf+ZDTaMGN84PUhGYWE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705580147; c=relaxed/simple; bh=xz7VFVSXmHsJL25MZP1wXpZaPyCu/LG5PboNLXh64Uw=; 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=TbZKhNcwE11QNFodEmVdWQnRAaqawJWobILIEMPVN2Wc6LRduOWfFRVyM8Us0omUYeUA7CIeEqDJ18o8Qhn6t5P3f6Vlj9XMI2wPDOVSRCIzU5OCzWD/WiK8MDpbQEGW2f3algJCcJGSROsmYGllsBRvzjpoyaavOgAJsHnyIsg= 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 _____8DxdfFwFqllfKEBAA--.8164S3; Thu, 18 Jan 2024 20:15:44 +0800 (CST) Received: from localhost.localdomain (unknown [10.2.5.213]) by localhost.localdomain (Coremail) with SMTP id AQAAf8DxDc9vFqllhX0IAA--.43256S5; 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 3/3] irqchip/loongson-eiointc: Typo fix in function eiointc_domain_alloc Date: Thu, 18 Jan 2024 20:15:42 +0800 Message-Id: <20240118121542.748351-4-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 X-CM-TRANSID: AQAAf8DxDc9vFqllhX0IAA--.43256S5 X-CM-SenderInfo: xpdruxter6z05rqj20fqof0/ X-Coremail-Antispam: 1Uk129KBj9xXoWrKF47tr1DWFWfGFWUurW5CFX_yoWDWrb_ur y2ywnxGryYvr1IqFn7Gr1avF9Fg3s8WFnY9F4q9F9xC34Utw18CrW2vwnrJFs7KF4rAFn3 CrZ8JrySyryIvosvyTuYvTs0mTUanT9S1TB71UUUUjUqnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUb3kYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_JF0_JFyl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVW5JVW7JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6F4UJVW0owAaw2AFwI0_Jrv_JF1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0c Ia020Ex4CE44I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jw0_ WrylYx0Ex4A2jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwI xGrwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km07C267AKxVWU XVWUAwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67 kF1VAFwI0_JF0_Jw1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVW8JVW5JwCI42IY 6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r1j6r1xMIIF0x vEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVj vjDU0xZFpf9x07jrPEfUUUUU= X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788430506134821673 X-GMAIL-MSGID: 1788430506134821673 There is small typo in function eiointc_domain_alloc, and there is no definition about struct eiointc, instead it should be struct eiointc_priv. It is strange that there is no warning with gcc compiler. This patch fixes the 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 86f4faad0695..1a25e0613d50 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -252,7 +252,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)