From patchwork Sat Nov 26 13:34:42 2022 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: 26245 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4634266wrr; Sat, 26 Nov 2022 05:36:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf63k3DzN+wO7VvN5yXAk0yRFB8uda0PRsVQM08EorY7oX8LGTv2Ji80bAmGL2hmVDm58U/T X-Received: by 2002:aa7:9245:0:b0:571:3fb3:9b5f with SMTP id 5-20020aa79245000000b005713fb39b5fmr44335264pfp.86.1669469770095; Sat, 26 Nov 2022 05:36:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669469770; cv=none; d=google.com; s=arc-20160816; b=G3NeMGJ+ABAzTXMPJfcEqkvsMZbHGDe91lzvWXUU8udCitoHId/khZEEl6uTffGXUK esv5vIFHDRQ0l5+X9KYZoHRVF+A7F4Uf0QjkXxeT9AhiEweGuvlpyPgj1G0bx8R1097G Z3Ju8Co6iKCMZuUvVep0i9XlGFBwM2vVdg5gS6TxkPsfM9uODFSHykMyBJbaFqSAkAlO JPZOmpEkR2qLFkkZktCz45a0pNdvUYjhkleGfHbtxXFmHgp+GR4LX7UTIuzo3NBYiTi4 koU1kmllORbUBIS/4AYwCYCsxUvFH3t7Lk5wO3rQAbelY6r+2Ort5dS7vFEKw03xcnXY qbZw== 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=/dD4R099IYzwcb7CUAjZNrQTVv8HMF9XsuupDZOw5BQ=; b=mHFZH75/nhw0GJl3U0qQqc3XkdSGSnOvMOe7679nhrBPFNMl+6p4Nc542UnCl+kls9 NQivgHyhJ0YF/I5/0fmR9SI6fozETp/bb39Bal2RcHn03+ZMw2sc1Ru6UXGP3JS0FWQN 9tbvFaJTB8LfCx1p7k+9DLq+dd8r/lv0G0/MtnnE/V6E+Q6QqaMmqETGTlWPrM4tdkAC 66PRUJxOmb9qDdwru1FqhxtN3cUV91aVtZTbdEjNqwQMnegjO9qTrp0daWw+a/eSYx0V mlJ0mw+MNnWtan6HjdZoWB0s+p70ohGqumachL+EDL70aUdr4PBbUJDzp4RzYhVaFGSA UT1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="Kx/a2Cbg"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="OmQ/XiLe"; 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 v13-20020a63464d000000b004770fe95989si6470306pgk.496.2022.11.26.05.35.57; Sat, 26 Nov 2022 05:36:10 -0800 (PST) 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="Kx/a2Cbg"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b="OmQ/XiLe"; 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 S229791AbiKZNfe (ORCPT + 99 others); Sat, 26 Nov 2022 08:35:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbiKZNfJ (ORCPT ); Sat, 26 Nov 2022 08:35:09 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8785A20BE7 for ; Sat, 26 Nov 2022 05:34:45 -0800 (PST) Date: Sat, 26 Nov 2022 13:34:42 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669469684; 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=/dD4R099IYzwcb7CUAjZNrQTVv8HMF9XsuupDZOw5BQ=; b=Kx/a2CbgJH6pXM2+l+rKtCk2JYDMpMWMRveLUesWUUKVJos5RmKgJGEYGeknPhkoiloMV1 BPDuFDTi6lo3miYPi+YSAxb+fjYKWyLF4ktzK29QExb1QAWUus38xBvSD+lDIWSsIQMxvq jT8TJsTbf8ojyBCxAnRqgb+Ly2VHzrI9U0vnZvkrH7MD2+nSMW+yhejrGCLlubEBbZnGMw 82CE5EgbBJp4uycME+O3RdeYeRdxHbDfi6JfTd7jsHAwmR1s4tp8jG5b6UawGJG/gR7CCp WPpZ7QD5Z0s3aB1xR0JPbpR/jiqBqLwK5KQoIpEAQOX2XlxyVaOV6Ms1bIGLtg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669469684; 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=/dD4R099IYzwcb7CUAjZNrQTVv8HMF9XsuupDZOw5BQ=; b=OmQ/XiLeqO3q0YOWUDEZyJOsykknvk7YxmkeuEwKRHCmD5z+/v3D2SCNc2qx8lLAUsnnjb o+Vw8xKbkPzyUEAQ== 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: Support to set IRQ type for ACPI path Cc: Jianmin Lv , Huacai Chen , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20221022075955.11726-4-lvjianmin@loongson.cn> References: <20221022075955.11726-4-lvjianmin@loongson.cn> MIME-Version: 1.0 Message-ID: <166946968274.4906.12418462636499559107.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 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?1747379536776278378?= X-GMAIL-MSGID: =?utf-8?q?1750565933401150911?= The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 25f3514aab3748bfef4a279ed599f836ac83e62a Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/25f3514aab3748bfef4a279ed599f836ac83e62a Author: Jianmin Lv AuthorDate: Sat, 22 Oct 2022 15:59:54 +08:00 Committer: Marc Zyngier CommitterDate: Sat, 26 Nov 2022 13:05:48 irqchip/loongson-pch-pic: Support to set IRQ type for ACPI path For ACPI path, the translate callback used IRQ_TYPE_NONE and ignored the IRQ type in fwspec->param[1]. For supporting to set type for IRQs of the irqdomain, fwspec->param[1] should be used to get IRQ type. Signed-off-by: Jianmin Lv Reviewed-by: Huacai Chen Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20221022075955.11726-4-lvjianmin@loongson.cn --- drivers/irqchip/irq-loongson-pch-pic.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-loongson-pch-pic.c b/drivers/irqchip/irq-loongson-pch-pic.c index 03493cd..a26a3f5 100644 --- a/drivers/irqchip/irq-loongson-pch-pic.c +++ b/drivers/irqchip/irq-loongson-pch-pic.c @@ -155,9 +155,6 @@ static int pch_pic_domain_translate(struct irq_domain *d, struct pch_pic *priv = d->host_data; struct device_node *of_node = to_of_node(fwspec->fwnode); - if (fwspec->param_count < 1) - return -EINVAL; - if (of_node) { if (fwspec->param_count < 2) return -EINVAL; @@ -165,8 +162,14 @@ static int pch_pic_domain_translate(struct irq_domain *d, *hwirq = fwspec->param[0] + priv->ht_vec_base; *type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK; } else { + if (fwspec->param_count < 1) + return -EINVAL; + *hwirq = fwspec->param[0] - priv->gsi_base; - *type = IRQ_TYPE_NONE; + if (fwspec->param_count > 1) + *type = fwspec->param[1] & IRQ_TYPE_SENSE_MASK; + else + *type = IRQ_TYPE_NONE; } return 0;