Message ID | 20221121140048.849246242@linutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1646921wrr; Mon, 21 Nov 2022 07:12:39 -0800 (PST) X-Google-Smtp-Source: AA0mqf5zl0v4+AbLdqbpk8sAy97NvRZ0dQV5z+IUEGcBaNEgENW8jGJp0rxq7kKsdm8tB6SxXi1f X-Received: by 2002:a17:902:b20c:b0:189:1318:714 with SMTP id t12-20020a170902b20c00b0018913180714mr9581879plr.122.1669043559190; Mon, 21 Nov 2022 07:12:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669043559; cv=none; d=google.com; s=arc-20160816; b=f4WMpoyuXmqJv+OEQT9CPEq0lgwtOz57RSWXBqISnEirLtqX/Ow2hlBViEz5dNt1dN 5dJSZ4xSJ7jbEaRNZeegjz2Ikw0qA6MPGQRMf/E3mjpXKoRTN54Fb/911uAVzDyIUMFh Bgz2br9oMpZ+EI/zKy0Uqfcs4LiWsl01iyLiEkNbnYB7k2GqGZDkSn+Bd6ez8M4YQhNb 1sDt+itB/2ski/1AfB8ECwBlV23rmyIh1nKp5Ljai5qw9QQFrJ5QAKSkuAy7gF0esI5i mU4Zb2J1j9FyO5qeonFlmmFQXkek8uterMt3IIW+zLPgPw/PgTQb0lbskPUcevhYzYUO 4Igw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:date:mime-version:references:subject:cc:to:from :dkim-signature:dkim-signature:message-id; bh=UZS11zTOR4JGS38C/7fpGOXRWJz4E7s7evBEbCg06U4=; b=gUDUl60hedCsj9wucIhq3L0PS66uQCJ5lNKGnQIuIla2j9n/FTVJkOnb0w5FOPJc/5 0aRlgx6gId1pleqD6D/LVqQU99fhMgou4CqnMJFeKcNY/P2lpDN42ob/p3q601j24udS nTjs0IrGTsnVvP8ocXuol3N0N+n3jEiaHKfIC+zdhTz5yXrOlZvhZBoXi6usgUgBIfWH jS9OwMFLMFr6hhy/VKGh/5yAZi2eN85M+m0DybaLUBb/vg+GH9ENVgS0/4pQb8treXh2 EAefkUsufkNLx+a6LnH9vnoEqbRxfrvKqeILLzKvkbKZU8CXb7gJ82Ca3LrQMASu8MWx D9Zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=IWtyqOfa; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 n36-20020a635924000000b0046f72960500si11193013pgb.379.2022.11.21.07.12.20; Mon, 21 Nov 2022 07:12:39 -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=IWtyqOfa; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S231266AbiKUOzt (ORCPT <rfc822;cjcooper78@gmail.com> + 99 others); Mon, 21 Nov 2022 09:55:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbiKUOze (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 21 Nov 2022 09:55:34 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52873CFBB1; Mon, 21 Nov 2022 06:45:16 -0800 (PST) Message-ID: <20221121140048.849246242@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669041580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=UZS11zTOR4JGS38C/7fpGOXRWJz4E7s7evBEbCg06U4=; b=IWtyqOfanQvxMKLKPN7fGmW0o2xzn3gxDdqo42IMVg9Go9jVble5nrAW32WLYffMsexzIe 6xZqA8JwqEwxsd5s+n34HYkK4IQE/I7b5mubvR1xwecgbiLsWt+LqUXg+Nm6hAA2gZEW9l eYaVC9A321U0BFH4+X+7frVNI8v+mymmOD2j6yvTyjiMo/N9GSjfxTg2nkBR8tdcplOKXY V/FnCfBUHON7jcCpS0UpPjeSSog9cxOizd4H2nuU2F58W6IaOHoCccVypBg+JbuXx/Jbon c1qX/CWJeig/KNzt2AtIBaVjFMwfnCknfMtszTsI8iJeJCuRmA0fc3MdXtiEoQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669041580; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=UZS11zTOR4JGS38C/7fpGOXRWJz4E7s7evBEbCg06U4=; b=OrC9JZmx1rLqXQ93KbSuzak2wSNsDqJQEtHxMHymOfW7NHPiReiyEOeokmJ7IE84OTcH94 HsxU9DQJTVOibgDg== From: Thomas Gleixner <tglx@linutronix.de> To: LKML <linux-kernel@vger.kernel.org> Cc: Will Deacon <will@kernel.org>, linux-pci@vger.kernel.org, Bjorn Helgaas <bhelgaas@google.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Marc Zyngier <maz@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Jason Gunthorpe <jgg@mellanox.com>, Andrew Lunn <andrew@lunn.ch>, Gregory Clement <gregory.clement@bootlin.com>, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>, Ammar Faizi <ammarfaizi2@gnuweeb.org>, Robin Murphy <robin.murphy@arm.com>, Lorenzo Pieralisi <lpieralisi@kernel.org>, Nishanth Menon <nm@ti.com>, Tero Kristo <kristo@kernel.org>, Santosh Shilimkar <ssantosh@kernel.org>, linux-arm-kernel@lists.infradead.org, Vinod Koul <vkoul@kernel.org>, Sinan Kaya <okaya@kernel.org>, Andy Gross <agross@kernel.org>, Bjorn Andersson <andersson@kernel.org>, Mark Rutland <mark.rutland@arm.com>, Shameerali Kolothum Thodi <shameerali.kolothum.thodi@huawei.com>, Zenghui Yu <yuzenghui@huawei.com>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Fabio Estevam <festevam@gmail.com> Subject: [patch V2 09/40] genirq/msi: Extend msi_parent_ops References: <20221121135653.208611233@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Mon, 21 Nov 2022 15:39:39 +0100 (CET) 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: <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?1750119018989078402?= X-GMAIL-MSGID: =?utf-8?q?1750119018989078402?= |
Series |
genirq, irqchip: Convert ARM MSI handling to per device MSI domains
|
|
Commit Message
Thomas Gleixner
Nov. 21, 2022, 2:39 p.m. UTC
Supporting per device MSI domains on ARM64 and the zoo of interrupt
mechanisms needs a bit more information than what the initial x86
implementation provides.
Add the following fields:
- required_flags: The flags which a parent domain requires to be set
- bus_select_token: The bus token of the parent domain for select()
- bus_select_mask: A bitmask of supported child domain bus types
This allows to provide library functions which can be shared between
various interrupt chip implementations and avoids replicating mostly
similar code all over the place.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
include/linux/msi.h | 11 +++++++++++
1 file changed, 11 insertions(+)
--- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -556,6 +556,14 @@ enum { * struct msi_parent_ops - MSI parent domain callbacks and configuration info * * @supported_flags: Required: The supported MSI flags of the parent domain + * @required_flags: Optional: The required MSI flags of the parent MSI domain + * Mandatory for ARM_GIC_MSI_LIB users + * @bus_select_token: Optional: The bus token of the real parent domain for + * irq_domain::select() + * Mandatory for ARM_GIC_MSI_LIB users + * @bus_select_mask: Optional: A mask of supported BUS_DOMAINs for + * irq_domain::select() + * Mandatory for ARM_GIC_MSI_LIB users * @prefix: Optional: Prefix for the domain and chip name * @init_dev_msi_info: Required: Callback for MSI parent domains to setup parent * domain specific domain flags, domain ops and interrupt chip @@ -563,6 +571,9 @@ enum { */ struct msi_parent_ops { u32 supported_flags; + u32 required_flags; + u32 bus_select_token; + u32 bus_select_mask; const char *prefix; bool (*init_dev_msi_info)(struct device *dev, struct irq_domain *domain, struct irq_domain *msi_parent_domain,