Received: by 2002:ab2:6c55:0:b0:1fd:c486:4f03 with SMTP id v21csp258478lqp; Wed, 12 Jun 2024 00:01:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVIS3HPFRxjuTLJk31AjN7Zs3BgvTmpTsGohtodP1OLqskEVacdqTfMjj0PfVeaM9kQUX2CoBg2q6HFWiqChNGuL3jA/j062E7WA2rSSA== X-Google-Smtp-Source: AGHT+IHqezsgAf8oSbHsV8nAIADZ/Fj+32ZTbX9aTqWFco4XjPdA8fAzPCYqPhTJduZAfnDz52Ls X-Received: by 2002:a05:6a20:f392:b0:1b7:d050:93e6 with SMTP id adf61e73a8af0-1b8a9b85a1cmr879290637.22.1718175692681; Wed, 12 Jun 2024 00:01:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718175692; cv=pass; d=google.com; s=arc-20160816; b=foXy00kG/nwD4mJPq8SWAO+RtVPOdKQ/4mZfgxtTkAwYJwAKsg59dMfeAcQu7bl4p2 Byq6oR9KjbMP61FFX5x4Pp4JUo08FrI/ZHzeRdQ6E2V7qCMLHo/HJHwFb6k2Wkbfxv5x rMcfOHPlQHxn4ZERbTk93nVzzpOWOhvW3ibYKYplZ/phza7v1573aTebtwka5s556wkZ s6Su9L1qlwNdf3EjHEzejlq0crDmpLgmoXZ9lNApnT/TnsOP4PC/oakwJlVPfSaeJK1n L4FlYBaKOzSdKVhPOk6/hRqqH8AbZwKJ90XdwccrGYZu4DKMbe4jQ6lg2smrgEl04k5t xyaw== 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:subject:cc:to :from; bh=X+sXLeyn03wYArKwY0XdTWXu83cckHIIQbZ8wNLcMx8=; fh=lZhhiKQef/7qwQh5b00TxlEkIPcWLk/zbR1N3OBhAus=; b=FFt5zoFOI5ym3l8S1OIxZ+MkfG0haaK+rX2Bad+16sOuksU/i9d1/45e6Kwj3Djv2S wDovdY3BS6O2C+aLxbzHXJfesiOBj53jp9i8fcSGtXzS1+L+MdA+mZXQTT6Tz+U/BZgL i9sFo1gJ/Uc7SEEI+Hn2MowvyCrjtSZQrxcVFBnJKaCdzxZmrLB8FF/er41XVSS8ojVH iawCfyroIhSRHv0+2lMPfIFGjNfthLLWkQaeIw9nX7LSpilfLsELHIy0DpptteJbUHei UxPuPiPyzQMuzDpuUuMbZ28LMSQrufAzq6n2C6T4AEIaxKWrjDYmWIHthX3W8dM3VeZP fdIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel+bounces-211024-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211024-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id d2e1a72fcca58-705bf465138si602621b3a.143.2024.06.12.00.01.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Jun 2024 00:01:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-211024-linux.lists.archive=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 (google.com: domain of linux-kernel+bounces-211024-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-211024-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 55182281CA1 for ; Wed, 12 Jun 2024 07:01:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 462EA16ABC8; Wed, 12 Jun 2024 07:01:24 +0000 (UTC) Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 BAD181369BF; Wed, 12 Jun 2024 07:01:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718175683; cv=none; b=M//QqlU3NvU4RnS7gZiVYrPIhdAjjNVUYj38dTyfS6uXi+ImIahzdhP6JbO2rWv/PS1zy3fXTG0FpwlA9ELY7p2JgLLLePv1DSdhLfyQEtx95rag+HJyxrec5UX6aPR4malz8J90YAEGpHpyBjwbV/oqXx/tEBcrwSaxika/YFU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718175683; c=relaxed/simple; bh=byg081w8LScES6hyDS+Ae58c0/R6FGaUJ4LIR59/D+U=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=dxgDeNHi9JKztiGi43I9xX8IxWlT0z/QFYpn0UqJTKgvZ+t7t7FHkHSLTYUrKEZGofmT+c2x1K5jtBm2lnOXCJlBH6D5awGlINLhHcMDI+6vcgcKZnOtCma0BgCQWh3sqdYBLUnSfrvfuvqExgTHvDnYFwPJgOUIZwDnZct3m5g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC5E1C3277B; Wed, 12 Jun 2024 07:01:21 +0000 (UTC) From: Huacai Chen To: Thomas Gleixner Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org, Xuefeng Li , Huacai Chen , Jiaxun Yang , Huacai Chen , stable@vger.kernel.org, Tianli Xiong Subject: [PATCH] irqchip/loongson-liointc: Set different ISRs for different cores Date: Wed, 12 Jun 2024 15:01:06 +0800 Message-ID: <20240612070106.2060334-1-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit In the liointc hardware, there are different ISRs for different cores. We always use core#0's ISR before but has no problem, it is because the interrupts are routed to core#0 by default. If we change the routing, we should set correct ISRs for different cores. Cc: Signed-off-by: Tianli Xiong Signed-off-by: Huacai Chen --- drivers/irqchip/irq-loongson-liointc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c index e4b33aed1c97..7c4fe7ab4b83 100644 --- a/drivers/irqchip/irq-loongson-liointc.c +++ b/drivers/irqchip/irq-loongson-liointc.c @@ -28,7 +28,7 @@ #define LIOINTC_INTC_CHIP_START 0x20 -#define LIOINTC_REG_INTC_STATUS (LIOINTC_INTC_CHIP_START + 0x20) +#define LIOINTC_REG_INTC_STATUS(core) (LIOINTC_INTC_CHIP_START + 0x20 + (core) * 8) #define LIOINTC_REG_INTC_EN_STATUS (LIOINTC_INTC_CHIP_START + 0x04) #define LIOINTC_REG_INTC_ENABLE (LIOINTC_INTC_CHIP_START + 0x08) #define LIOINTC_REG_INTC_DISABLE (LIOINTC_INTC_CHIP_START + 0x0c) @@ -217,7 +217,7 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision, goto out_free_priv; for (i = 0; i < LIOINTC_NUM_CORES; i++) - priv->core_isr[i] = base + LIOINTC_REG_INTC_STATUS; + priv->core_isr[i] = base + LIOINTC_REG_INTC_STATUS(i); for (i = 0; i < LIOINTC_NUM_PARENT; i++) priv->handler[i].parent_int_map = parent_int_map[i]; -- 2.43.0