Received: by 2002:a05:7412:9c07:b0:fa:6e18:a558 with SMTP id lr7csp333654rdb; Sat, 27 Jan 2024 08:19:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IGt7ApSZ+bfEaS0JBXWpgtUSPfVtemmJBu0id1F8OWOq47AgRa68qjNsRiFHF9mSuI1/Wqr X-Received: by 2002:ac2:43c8:0:b0:50e:76ac:180b with SMTP id u8-20020ac243c8000000b0050e76ac180bmr1651385lfl.53.1706372385749; Sat, 27 Jan 2024 08:19:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706372385; cv=pass; d=google.com; s=arc-20160816; b=vTzntIQfdwRHTPREZrbBUDU5WZ2EucSo+ILqSAm2xfPmWMXcyYnu2sM5xc9385q6xi Gwm88lRPxMD3pBxEpJkD2458OU+E9Y3Zy6B9APiiFEYCYJE7NHliNjUb8DZLpC9CTrgM QKgkXVMGBn+4Y54PNLt8QPoXmcSnj1pi4EoqJjew7Gpdeb/MOBZLN4pH7dTQ6IZoM5Oh WcZEaa8mSItnLIdt9vgkw2MrOT1fR/2+1Uaw5Nh0sBg6GGnCEBabaiczZ6+FbWFHiXN9 Xbb/nMjzTcknQz4MT5Z7E8jT4b5eIJItwSaVv5l6sxb33yARMin3A1JxYGVV+ml8KAHe rziA== 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:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=xhYUMfVc19qKu3HnThUsAONLPR7ur4VXlw7AfNK85R4=; fh=706cnY5t7hpwBXQypCTGH3HYLPe+/lcVAB5kbpxvl24=; b=uJ57nZVO4KrJb6OdjEIlNXsCOCHOWtfS87VeWQIdNK97JOXF57Qb64A9NdS80t0gp4 Ognys9L6VRqC9PNLyKYbHBDYD3bpvA735k2QuEIpE2xSZyJqgYJ/MaZ1BHUG0jQqkt+M 7ojMYZ7sHZiSPpDEHo4/F1/2+iINXqEiifv/rDDdCUzPzp9RGDO+vhFWuEar1QdR54nq Ioq3BzVhwzmh1pYALVd+72RE147nLwxFY2laCKMbgDpL2+Gd86vVxWx1dmdfaETDIya9 AJlZoKh/TxUWzccFk9x1taTVOCwdCXpDmVe8rRQB0kEHJz6TLLkYlRq0xYhXKE2XYcMR ovug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=ToMaSUKt; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-41277-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41277-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v9-20020a1709063bc900b00a34af2104acsi1799100ejf.573.2024.01.27.08.19.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 08:19:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-41277-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=ToMaSUKt; arc=pass (i=1 spf=pass spfdomain=ventanamicro.com dkim=pass dkdomain=ventanamicro.com); spf=pass (google.com: domain of linux-kernel+bounces-41277-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-41277-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 52B0A1F23119 for ; Sat, 27 Jan 2024 16:19:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7CBAB2E414; Sat, 27 Jan 2024 16:18:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b="ToMaSUKt" Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5DADE2D052 for ; Sat, 27 Jan 2024 16:18:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706372316; cv=none; b=UYRc/EV1arUpJpgwXjsfbGwTczWCeeT9WPWOl095dfzzdstb22p1YinkAzyvFgTTVFYwbgXd2qwGwA+WuX4bgB8bNdk5Yq0g2HETgMThJW4FQc2gJMF/JXsIT70rwrO+FCWmlao0A+UuRIs7EaSzzl2TZOEHJOrMT7YjHDY+LE8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706372316; c=relaxed/simple; bh=lErh7pLIs8JPN6EgGGGGO8yVQ1jQjwDvsxftt0cROB8=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mOWVY2dxXmEnNQYWXfs3qe+pAy+a3bg4Uc1jNPGm/gcH2KZaOlsIqNd/avCYAt/o/Zx2AMEO4XVUnKb6GuJJDJrbnVEtNM7a+Jt25Afy0iZTPaJBVdvqSVOpsI4+mNoVqkFyczGd4S1xwy6rPW/MlTHP028bx4Gt6AzpuJALYOQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com; spf=pass smtp.mailfrom=ventanamicro.com; dkim=pass (2048-bit key) header.d=ventanamicro.com header.i=@ventanamicro.com header.b=ToMaSUKt; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ventanamicro.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ventanamicro.com Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-1d75ea3a9b6so12716715ad.2 for ; Sat, 27 Jan 2024 08:18:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1706372314; x=1706977114; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=xhYUMfVc19qKu3HnThUsAONLPR7ur4VXlw7AfNK85R4=; b=ToMaSUKtLffxBTZort5crYfZxbT4CKkzIOLzJO+yZ34eVGxUaZpm2o9TuYOks8K2HN fVVEoH8oX6dhumhpSR2tmcKzgAficmfkoGxsr+u6Pk4a4CHlPBEjun+d7Q8FMDuZAeg0 /VbHWDOiGWtCWQbJASq4RNL8fI2DfGBHt7MEU3kEEM0+dUWSwfzFQ46tkCuMzaWpQl1H H/dEWxZuieuTmLyLJXv4Wc3nKGcJTjP7ROIovPaBb2ArQln/suE1GyvAd4efxVC5yYuT p+1eTflAIVTqhRYwbzjFWnfsapiQ7cgXvPkG/AX9MM2kizY5AX7eeIW7rQYzQSP4HDeF 7/yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706372314; x=1706977114; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xhYUMfVc19qKu3HnThUsAONLPR7ur4VXlw7AfNK85R4=; b=wk2yY7cJDRa9dBz7pjsjHZC1H3vnzzDezNbXcTUpRzmcBEEdreoDgT7AkA5WJOFY9M dz1CR7ygBt2fjNZA+PltwQjxCZ6MeDyYuiscSxzsDh7kUMaIcS02yyZtgoyywiy0g3Ox 5p6akEQrFZ0NJisbSb8tW/s+6KsBs0RMCqM/SgVXRcEEWOcfJuxokO99PKKlR+f1b7e8 cz0UZpNhSuiMlFOzDvOMKbNoDVD8iX8qAlnmidblJ8LQwWsQ1dUKsNFfEf3N+BVfAYrd 04FL14wGn3xvsL5lZ+cr8m3fsFwxv71oQGddtFA2ZKU4Zhd/BD9HgYB4uZa3EoHDmDNW qW2Q== X-Gm-Message-State: AOJu0YxwGEBGEvBpqPt0n8MLkU70UZyB2IUxe2kk8O498+hL2TI/vZv8 PN5850RUgNA7+AoHby33BaZay6+Z3kk1RAGyb28+Z3fGFs9tUs4IRshT6ie1v3k= X-Received: by 2002:a17:902:d4cf:b0:1d7:8237:f770 with SMTP id o15-20020a170902d4cf00b001d78237f770mr2153923plg.17.1706372314502; Sat, 27 Jan 2024 08:18:34 -0800 (PST) Received: from anup-ubuntu-vm.localdomain ([171.76.86.17]) by smtp.gmail.com with ESMTPSA id d11-20020a17090ac24b00b00290f8c708d0sm5091620pjx.57.2024.01.27.08.18.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jan 2024 08:18:34 -0800 (PST) From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Rob Herring , Krzysztof Kozlowski , Frank Rowand , Conor Dooley Cc: Marc Zyngier , =?UTF-8?q?Bj=C3=B6rn=20T=C3=B6pel?= , Atish Patra , Andrew Jones , Sunil V L , Saravana Kannan , Anup Patel , linux-riscv@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Anup Patel Subject: [PATCH v12 03/25] genirq/msi: Extend msi_parent_ops Date: Sat, 27 Jan 2024 21:47:31 +0530 Message-Id: <20240127161753.114685-4-apatel@ventanamicro.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240127161753.114685-1-apatel@ventanamicro.com> References: <20240127161753.114685-1-apatel@ventanamicro.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Thomas Gleixner Supporting per device MSI domains on ARM64, RISC-V 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 Signed-off-by: Anup Patel --- include/linux/msi.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/linux/msi.h b/include/linux/msi.h index ddace8c34dcf..d5d1513ef4d6 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h @@ -572,6 +572,11 @@ 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 + * @bus_select_token: Optional: The bus token of the real parent domain for + * irq_domain::select() + * @bus_select_mask: Optional: A mask of supported BUS_DOMAINs for + * irq_domain::select() * @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 @@ -579,6 +584,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, -- 2.34.1