From patchwork Fri Jun 16 12:03:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 109110 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1322041vqr; Fri, 16 Jun 2023 06:00:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ78+jStkMmXWvSFX67HQC0kt4GvotJlRLZf8cTvsqzW1V1b6iOj26wWW+Y3TKaj/e3t+6MI X-Received: by 2002:a17:90a:52:b0:25b:c53e:4697 with SMTP id 18-20020a17090a005200b0025bc53e4697mr1678570pjb.16.1686920430326; Fri, 16 Jun 2023 06:00:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686920430; cv=none; d=google.com; s=arc-20160816; b=VdvYd7Z4bUcHGBi5hEQp06yqENb0sajYl2vVRWiyViTu+jjAbrYQaNswhXFZRDzR3x Upv+iofvksUwdmOn68hLXeikYB32djqCMc4QJDqZCjvxBzrM98AYiW0Lhs7auG4wepwu 93g+4sO95Oyne91ru0WsuZaFYImUtvbZeOhq9pqZPkePxVgVDwEA0/xHI6jnVeKqIxfz ywtIROEPvSJg18vNF6WddoXSqXpcrCUduqc4PhE0fQ4UpJu0XTz7uORf9ko+jt+baIYD vlCcQZKRyii37Wpih7M1vrDUgkFuSV0QhWJeoWaGwa4D+bS4BfJ2tGE6FuCOvNKc4Kow mqvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=/pmNvkTQWeIB6THnRfnyvc2JzpUvZrwf6FOHVx4vhfE=; b=u9oA5JHPZlIj95GNqMPvxcKzMHRPVSrIp5dIx2f6ekTdQ5aZcgvrwAhlPy/LddtFs9 Gn3XpZX8q5rqK8FZsNWEZb6MhvSl9nlYXAlTFVX9zlnY0MOUIMc7hqINq8LPD0nNvNoi ELAg++Wgi2SzrZm3nHkkpqu4MZiw+i6EG77H4B8DmDrdrMwMRvYk6oUXy6aGEMUrP3nV mBM5CXfXyGhPdRYHiGkp6bGwkQCFJG2TPd3mIrrBrlknDObbsZfxtDIO973ViRUFOkpS tUhy/SQAGRJ08/1auiWyZ9g/kd83F1n2rzqRf9dAVNoGsjjwgxoq6sQ79PuDf4lCaNPA EHtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=PKAZC+bh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=kfYvBoKy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h15-20020a17090a130f00b0025bf45ac365si1550567pja.82.2023.06.16.06.00.14; Fri, 16 Jun 2023 06:00:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=PKAZC+bh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=kfYvBoKy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344589AbjFPMDZ (ORCPT + 99 others); Fri, 16 Jun 2023 08:03:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46052 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345040AbjFPMDO (ORCPT ); Fri, 16 Jun 2023 08:03:14 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC84EE4; Fri, 16 Jun 2023 05:03:12 -0700 (PDT) Date: Fri, 16 Jun 2023 12:03:10 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1686916991; h=from:from:sender:sender:reply-to: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=/pmNvkTQWeIB6THnRfnyvc2JzpUvZrwf6FOHVx4vhfE=; b=PKAZC+bhVu//75FcshxwdBAUcVj4D2ooO1qFUjyXxmVqD+Hy5VP2YuDvAtXILv9fIsvAfW wGBybbHyuS37eNflUS66TspDJotABJhB7iU0MwXlaqFRRvj5gZZWP6aZkIFfIT4tcYkMVB 1kyBksQaOLY0yPOokF0QyxLzsP3Js4in8wz+BSZ+zPSC8d6Bz5+z3Gk0JQxPwpMUOtU06M RaikrMp56PD+Q1+WX5QpJkA4cY9U8+pIgDSYzAlWd+QHTste7WSmqoUbBUhXk7NTHqHaIJ 5JFotXw+dR8t9+e0E3XfpzgqoeWeVm4Okuayv/jfqp7uEmvOYSe4vxsPTczO4w== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1686916991; h=from:from:sender:sender:reply-to: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=/pmNvkTQWeIB6THnRfnyvc2JzpUvZrwf6FOHVx4vhfE=; b=kfYvBoKycUpp7hQxxljkAMRJkqTDdshSt3VD3bjKEZ9C/BcqpIl77VfdPOaRkSErQobIzE SHMMCmXaltz6zxCA== From: "irqchip-bot for Jianmin Lv" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/loongson-pch-pic: Fix initialization of HT vector register Cc: stable@vger.kernel.org, Huacai Chen , liuyun , Jianmin Lv , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20230614115936.5950-2-lvjianmin@loongson.cn> References: <20230614115936.5950-2-lvjianmin@loongson.cn> MIME-Version: 1.0 Message-ID: <168691699075.404.770977987858659186.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768680094048589067?= X-GMAIL-MSGID: =?utf-8?q?1768864277246463936?= The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: f679616565f1cf1a4acb245dbc0032dafcd40637 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/f679616565f1cf1a4acb245dbc0032dafcd40637 Author: Jianmin Lv AuthorDate: Wed, 14 Jun 2023 19:59:32 +08:00 Committer: Marc Zyngier CommitterDate: Fri, 16 Jun 2023 12:59:28 +01:00 irqchip/loongson-pch-pic: Fix initialization of HT vector register In an ACPI-based dual-bridge system, IRQ of each bridge's PCH PIC sent to CPU is always a zero-based number, which means that the IRQ on PCH PIC of each bridge is mapped into vector range from 0 to 63 of upstream irqchip(e.g. EIOINTC). EIOINTC N: [0 ... 63 | 64 ... 255] -------- ---------- ^ ^ | | PCH PIC N | PCH MSI N For example, the IRQ vector number of sata controller on PCH PIC of each bridge is 16, which is sent to upstream irqchip of EIOINTC when an interrupt occurs, which will set bit 16 of EIOINTC. Since hwirq of 16 on EIOINTC has been mapped to a irq_desc for sata controller during hierarchy irq allocation, the related mapped IRQ will be found through irq_resolve_mapping() in the IRQ domain of EIOINTC. So, the IRQ number set in HT vector register should be fixed to be a zero-based number. Cc: stable@vger.kernel.org Reviewed-by: Huacai Chen Co-developed-by: liuyun Signed-off-by: liuyun Signed-off-by: Jianmin Lv Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230614115936.5950-2-lvjianmin@loongson.cn --- drivers/irqchip/irq-loongson-pch-pic.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-loongson-pch-pic.c b/drivers/irqchip/irq-loongson-pch-pic.c index e5fe4d5..921c5c0 100644 --- a/drivers/irqchip/irq-loongson-pch-pic.c +++ b/drivers/irqchip/irq-loongson-pch-pic.c @@ -401,14 +401,12 @@ static int __init acpi_cascade_irqdomain_init(void) int __init pch_pic_acpi_init(struct irq_domain *parent, struct acpi_madt_bio_pic *acpi_pchpic) { - int ret, vec_base; + int ret; struct fwnode_handle *domain_handle; if (find_pch_pic(acpi_pchpic->gsi_base) >= 0) return 0; - vec_base = acpi_pchpic->gsi_base - GSI_MIN_PCH_IRQ; - domain_handle = irq_domain_alloc_fwnode(&acpi_pchpic->address); if (!domain_handle) { pr_err("Unable to allocate domain handle\n"); @@ -416,7 +414,7 @@ int __init pch_pic_acpi_init(struct irq_domain *parent, } ret = pch_pic_init(acpi_pchpic->address, acpi_pchpic->size, - vec_base, parent, domain_handle, acpi_pchpic->gsi_base); + 0, parent, domain_handle, acpi_pchpic->gsi_base); if (ret < 0) { irq_domain_free_fwnode(domain_handle);