Message ID | 20221020082205.20505-5-lvjianmin@loongson.cn |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp136831wrs; Thu, 20 Oct 2022 01:36:49 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6ufJnMHGT8bJGguH066wKPpcczR+TBEB4fKutKU9+hVqQafiXC0nVJ3wC7cI+PAglEwcS4 X-Received: by 2002:a17:907:7f25:b0:78d:e85e:fe12 with SMTP id qf37-20020a1709077f2500b0078de85efe12mr10036898ejc.553.1666255009562; Thu, 20 Oct 2022 01:36:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666255009; cv=none; d=google.com; s=arc-20160816; b=cDmdrzl29sHG/hmLRXcvE99UyJsgaw79a59uzRGbXYi5hZQCIYdPHrmPrOMRXi8kNz +JrtC0NygALEkrJQwBVIqKsEbmzkbI7zScvQxqsOTxvivbYiBn8OLwDEFuCF/gBKSmy0 sJK1j3GKDzSAQ2xVQuhNdLeYm0cu6A+JPVIcRpYLCaItutMBcmvaGy+Z/2Z8LIdbdfyt rO4uVceFCn7RQft/k5dAapcn0DbZGJ3v+EcG2G21OZLP6eCAIHFod/UuF3bug++L9EnQ Pk23GPZ0ZynBm9RcMJyKfAq+rwCHkLuWKDDuOWR0nALZ0O9JK1z/C9MoI+jdUoI4CC7F PYdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=NvBM4Q7lvcsq90N0nsp8WRhih8UGBEzZPYn3ZIequKE=; b=UVzYSE/Qog3LWpFdaOy4zaHq6Mkun0thPu5HJe7SyItsLkqyeJCV1LdXlNyXHq7geY GngIajegCIN7UC5Ojdzj4r/Y4b9nIYnwdz8zOXQr4Va5nKnYzcitFRqCjOeqXbjNXQVA RBnmJ29KbJZreP95inEfptE3JsmOo4XFAUyEOTCTfrnMncT0TznpU+3gPK7extaVBivL Ac6FZ72s3Gs/YIt0HBRzKHrY2D5cH0Jx3i+M/RwgrYARsIc3SywE7+ZNzOweyrS1bA0n GeqMEV5PMZJseVLXoaBKAXhabMqF/8E2j7kolGQza5s6bAYUdcVDkpGVyeLt/9SGprd8 5m0g== ARC-Authentication-Results: i=1; mx.google.com; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ho10-20020a1709070e8a00b0077f92be81adsi17479732ejc.212.2022.10.20.01.36.24; Thu, 20 Oct 2022 01:36:49 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231284AbiJTIW1 (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Thu, 20 Oct 2022 04:22:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230230AbiJTIWK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 20 Oct 2022 04:22:10 -0400 Received: from loongson.cn (mail.loongson.cn [114.242.206.163]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CA00115D097; Thu, 20 Oct 2022 01:22:07 -0700 (PDT) Received: from loongson.cn (unknown [10.20.42.32]) by gateway (Coremail) with SMTP id _____8Bx3NguBVFjOfwAAA--.4993S3; Thu, 20 Oct 2022 16:22:06 +0800 (CST) Received: from loongson-pc.loongson.cn (unknown [10.20.42.32]) by localhost.localdomain (Coremail) with SMTP id AQAAf8CxLuItBVFjxM4BAA--.7555S6; Thu, 20 Oct 2022 16:22:06 +0800 (CST) From: Jianmin Lv <lvjianmin@loongson.cn> To: Thomas Gleixner <tglx@linutronix.de>, Marc Zyngier <maz@kernel.org> Cc: linux-kernel@vger.kernel.org, loongarch@lists.linux.dev, Jiaxun Yang <jiaxun.yang@flygoat.com>, Huacai Chen <chenhuacai@loongson.cn>, Bjorn Helgaas <bhelgaas@google.com>, Len Brown <lenb@kernel.org>, rafael@kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org Subject: [PATCH V4 4/4] irqchip/loongson-liointc: Support to set IRQ type for ACPI path Date: Thu, 20 Oct 2022 16:22:05 +0800 Message-Id: <20221020082205.20505-5-lvjianmin@loongson.cn> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20221020082205.20505-1-lvjianmin@loongson.cn> References: <20221020082205.20505-1-lvjianmin@loongson.cn> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: AQAAf8CxLuItBVFjxM4BAA--.7555S6 X-CM-SenderInfo: 5oymxthqpl0qxorr0wxvrqhubq/ X-Coremail-Antispam: 1Uk129KBjvdXoW7XF4DXF15XrWxCF4Dtry5Arb_yoWfKwc_u3 yIgwnxGa4rZF1xJr97Ww1YvrWI9aykW3WqgF45uasIy3y8W343urW7AwnxJa93KrW0vFZ7 AF1F9rySya47tjkaLaAFLSUrUUUU0b8apTn2vfkv8UJUUUU8wcxFpf9Il3svdxBIdaVrn0 xqx4xG64xvF2IEw4CE5I8CrVC2j2Jv73VFW2AGmfu7bjvjm3AaLaJ3UjIYCTnIWjp_UUUY C7kC6x804xWl14x267AKxVWUJVW8JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0rVWrJVCq3w AFIxvE14AKwVWUXVWUAwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK021l84ACjcxK 6xIIjxv20xvE14v26ryj6F1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26F4j6r4UJwA2z4 x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v26F4UJVW0owAa w2AFwI0_JF0_Jw1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqjxCEc2xF0cIa020Ex4CE44 I27wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jw0_WrylYx0Ex4A2 jsIE14v26r4j6F4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwIxGrwCY1x0262 kKe7AKxVWUAVWUtwCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwCFI7km 07C267AKxVWUAVWUtwC20s026c02F40E14v26r1j6r18MI8I3I0E7480Y4vE14v26r106r 1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVW5 JVW7JwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k26cxKx2IYs7xG6r 1j6r1xMIIF0xvEx4A2jsIE14v26r4j6F4UMIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1U YxBIdaVFxhVjvjDU0xZFpf9x07jz5lbUUUUU= X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS, 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747195012728014574?= X-GMAIL-MSGID: =?utf-8?q?1747195012728014574?= |
Series |
irqchip: Support to set irq type for ACPI path
|
|
Commit Message
吕建民
Oct. 20, 2022, 8:22 a.m. UTC
For ACPI path, the xlate callback used IRQ_TYPE_NONE and ignored
the IRQ type in intspec[1]. For supporting to set type for
IRQs of the irqdomain, intspec[1] should be used to get IRQ
type.
Signed-off-by: Jianmin Lv <lvjianmin@loongson.cn>
---
drivers/irqchip/irq-loongson-liointc.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c index 0da8716f8f24..838c8fa2d868 100644 --- a/drivers/irqchip/irq-loongson-liointc.c +++ b/drivers/irqchip/irq-loongson-liointc.c @@ -167,7 +167,12 @@ static int liointc_domain_xlate(struct irq_domain *d, struct device_node *ctrlr, if (WARN_ON(intsize < 1)) return -EINVAL; *out_hwirq = intspec[0] - GSI_MIN_CPU_IRQ; - *out_type = IRQ_TYPE_NONE; + + if (intsize > 1) + *out_type = intspec[1] & IRQ_TYPE_SENSE_MASK; + else + *out_type = IRQ_TYPE_NONE; + return 0; }