Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp764736lqb; Wed, 17 Apr 2024 10:00:29 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVnTTcMgL5Ctnj8SmSt2bU/wcGm+k+sw983naDIK5IJVTGaQ0ZT5sGR+dLksroiI2HzXnm/taYnCW4rzugsP53C5G1TOAeULsUYIh5iQ== X-Google-Smtp-Source: AGHT+IFzf9yP/DLTOhmaUvTl1wSg25AkO1K4Wyc3LX2tYXfgeZgyKHJkZAgAmazDCos+yBRQ8EVz X-Received: by 2002:a17:90b:46d8:b0:2a7:4e38:70e9 with SMTP id jx24-20020a17090b46d800b002a74e3870e9mr11110466pjb.13.1713373229274; Wed, 17 Apr 2024 10:00:29 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t21-20020a17090b019500b0029c7692a095si1532535pjs.120.2024.04.17.10.00.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 10:00:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148950-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=loQp+CCv; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-148950-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148950-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DDB58285AA2 for ; Wed, 17 Apr 2024 17:00:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9E7B3171088; Wed, 17 Apr 2024 17:00:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="loQp+CCv" Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2068.outbound.protection.outlook.com [40.107.241.68]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C540717107E; Wed, 17 Apr 2024 17:00:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.241.68 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713373211; cv=fail; b=YtboqV/my7dmFr8RkCyl0hTSCiL3c7nAiFckNccIr8EIkeM7OnSV7nvi0Jmz1Sc6+nZOzrkM3mk1iPWzfpUjxuYdVVTlromXNZME3njrRkhSnw0koMyep73c1v/lq4r9EZhYKYUW14b9ESzJacDyb8dpTd8XXRK9TfltBcFNw0Y= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713373211; c=relaxed/simple; bh=RGiIXYVRmfGJBV1HNXeAiH/lKJo/HvVSSGdFR93iLDE=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=J7REGQuQi6VP3dEQtnh+3ZtmSfTrNIh6ag0mNxMa8UrUCQag5PT6YjLKRdYrgEicLEHTjTuL6O4nTnotbD16OoKTqPtLjnPqPlDvxAUB6qY9hET2+sYRqwJDCw9QkqnzaIpsLvV8pNeE9sgcW//LRnUXcVAk+dXDuEWWMTmYOMI= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=loQp+CCv; arc=fail smtp.client-ip=40.107.241.68 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OjZ0sZ9FwD9R8C1XVgp4iYkdYejlcY464MTz24XLFqjcMCepvkLKSlQIY9XWXSS5R8kL1xZizgIxTva+jvNkWv/Suc+IG0pSMKF/bQH3Em2sEJnQ+vziurfk03xmkGFW75UPMdTuUf6kjf3nSza3CNMD8Eel5XWAClxA8XQRn3VWf4LNKHSLYMML9MvsWMoferopH1+Q9xOXHbkNIYCgI3oenWi8CSlg9SKl1oLVSgVxK/s2hehmCJAjr4vlwR2GZm/epV/013Rq7BmQuWKnUBn3k1BaVDzyiMUCzryl0gmdriOc8gU84I/0q+m+7/WGrbbwQblrwxoPCOz/Y8xD5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7XJormfUbxmrv0piWzu3dWXoF2ecnIxqtssuoVKEuJU=; b=oCt/apZU3OiHuvKJ3frKjzkbo5hcEPnzLfGImWVGtFdHoKTKbjsxWVeyEuV+zGJHafWDIsgA1P8pJ/eKYo4/d9Vs9p1oRj8/P4OIyWeEKjgQb0KyW/otudjlbFXj7ocwmgKL5cY6tU7DtgI1LYE8t7ch9nFAu0I4ipbY1E3wlp4O8GNZCwWtQlMbEs8ZDB1c6U1LCXIik1oUi9YUJfTTn70WCX1+ul51jCYTEeqeZN3/4KOCUftYMIxpVSkitAeA2sxDTwL1St6fonvqIRhdbDys/6mtr3u6o3k25W7jcz3Avq5pz0IhTOB5eR+eINrtE7QeZZpeU/k/YPZkPfB61g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7XJormfUbxmrv0piWzu3dWXoF2ecnIxqtssuoVKEuJU=; b=loQp+CCvA7SdleZkSz7wmSn1H7aeifIqB5noDu32oVsic+/LlL24+YwOydT68kpCYcfcaOzE7uuUUmRQDfnd9H5le8R37V/XVsXN7obESZL1sYm2jfPgK4fGzNd5H3Fa3UUv1A6OTrvAfaukEVqDznMymt4ApbJQAlhtjSpGrM8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by PAXPR04MB8080.eurprd04.prod.outlook.com (2603:10a6:102:1c9::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.51; Wed, 17 Apr 2024 17:00:08 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::1e67:dfc9:d0c1:fe58%7]) with mapi id 15.20.7452.049; Wed, 17 Apr 2024 17:00:08 +0000 From: Frank Li Date: Wed, 17 Apr 2024 12:59:39 -0400 Subject: [PATCH v7 1/5] PCI: Add INTx Mechanism Messages macros Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240417-pme_msg-v7-1-9c6208cda90f@nxp.com> References: <20240417-pme_msg-v7-0-9c6208cda90f@nxp.com> In-Reply-To: <20240417-pme_msg-v7-0-9c6208cda90f@nxp.com> To: Bjorn Helgaas , Jingoo Han , Gustavo Pimentel , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , imx@lists.linux.dev Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Frank Li , Yoshihiro Shimoda , Serge Semin X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1713373200; l=1623; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=T7axIIwEU0hBwz5dW25mb2R9FYDj6emglE2AhxS6gq8=; b=QsAkgdc0M94P4kLwp1lMZ5Dj/5NWRiCC9kKaGAafSTD/ZJDnn3GxySi9x2PDlhfrodraChulz NHakwLBTjO2Aghxvjv9fn9zl/9UEC3OpadvC1dherDF5smYhyJDZiG7 X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR05CA0012.namprd05.prod.outlook.com (2603:10b6:a03:33b::17) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|PAXPR04MB8080:EE_ X-MS-Office365-Filtering-Correlation-Id: fde0befc-5c02-4aee-fe14-08dc5effd5f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: bXWShc65dqa9BJ31BfhPcDTyFSCGTJkqZh8YKWgX1C4fyLwGhrpdaAd7BcMvd2o3sDJH03n++TbNkdRAfdNvC2XL1LPS082zr+IVFMDWAgTDBrgva2ALPrhSZjlj+2MKO3UJCceyLp9040dfx3JKZ7oNslajSpovQIq2kxlawRRfSGozNC9t1lzrw7VESmWvEetyfSB8DruyAB99oUpW1VcltstU3S3VP/MiUNI3eh4OcYZ8OADKps87BNx1jn5SrNeqKKGANuGkM0oQhvvVFBXZbRIDbAbLTITgYIsZSPORL99opAjtWNE4ZvfLZDGqhXVp99e2A2bO8QUOzREZKT9ncD8N5+h4pXVArfNkPGJlKBpATo5l6V0xuqfw590ssb1FbPsF4GeV0Axp87UdICLK2KeReDXy5NfIrM3yoMoTBZ19KX3P8l+MI8zKxc34R816HJzD0XbNi3O1HeyxLFiGZgHCb0QUuB4hPEN6Wo0s5pxeujownXw3Wn0qF9JduQ1CI17f8c4VTmcxDijW/57efkYXFDCtHZb86MMug1oQ2Ba+bEAvxAGwJqv3YJjESgsVA+/Th/tQ7uYG4WNv364uZtd/X74Z7jBuMpi/NDbiNCU0Pf5O5bWg8QL8zfeBIYfFHP8bQea9B6Ng8WPI1niDg4HYoGPXpiQUyX7DR1k9SIR09fTfOjQj4UhQ8nyHmLYr+i5TfZcrp73BwYW0y/6fVGWN3JDD7UoVYxzlNe4= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(7416005)(376005)(52116005)(921011)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TTVMd0o1cjdBVHgxTHlXdHVXVWdBNGJHalRIM2xtUjJnanZoWUNZTkVwL1pR?= =?utf-8?B?QS9adWwvZXJldmRVSTI5cUJHRWtldFA1dDgzQVpOYkIyRXNGdkwzaFdFK3l3?= =?utf-8?B?ZmZPNUhwenl1ajVscStXNnBENVBJVHZ4bHB6MmhOMkdkNnp3YVRPOEtzV3Nq?= =?utf-8?B?T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zdE5UT2tGbXljR2ZDRnNM?= =?utf-8?B?RW9Pc3BEQ25SdmFzdm1GcEJpK05haDd4T1hjcU51WlJmWnpZemJpN3EyWFFR?= =?utf-8?B?QkRZZWJaU1JueG82dERDMDVONzIvQW82dFRrcEdVMnZPcFNCeENsMlNodTNC?= =?utf-8?Q?mWw3nTMrDVlXgvFj4AdmqjJS7?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fde0befc-5c02-4aee-fe14-08dc5effd5f8 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Apr 2024 17:00:08.0033 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: rNJbzGNIlRDWecGH1vNipDhfG8DPt1SD2mZjnAivHJkK10g1F6ERGVduKkhwD2qsBwL1bU8Yxr5G0zvlWZL1kA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8080 From: Yoshihiro Shimoda Add "Message Routing" and "INTx Mechanism Messages" macros to enable a PCIe driver to send messages for INTx Interrupt Signaling. The "Message Routing" is in the section 2.2.8, and the "INTx Mechanism Messages" is in the section 2.2.8.1 on the PCI Express Base Specification, Rev 6.1. Signed-off-by: Yoshihiro Shimoda Reviewed-by: Serge Semin Reviewed-by: Manivannan Sadhasivam Acked-by: Bjorn Helgaas Signed-off-by: Frank Li --- drivers/pci/pci.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 17fed18468474..02f46875fe2d9 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -22,6 +22,24 @@ */ #define PCIE_PME_TO_L2_TIMEOUT_US 10000 +/* Message Routing (r[2:0]); PCIe r6.0, sec 2.2.8 */ +#define PCIE_MSG_TYPE_R_RC 0 +#define PCIE_MSG_TYPE_R_ADDR 1 +#define PCIE_MSG_TYPE_R_ID 2 +#define PCIE_MSG_TYPE_R_BC 3 +#define PCIE_MSG_TYPE_R_LOCAL 4 +#define PCIE_MSG_TYPE_R_GATHER 5 + +/* INTx Mechanism Messages; PCIe r6.0, sec 2.2.8.1 */ +#define PCIE_MSG_CODE_ASSERT_INTA 0x20 +#define PCIE_MSG_CODE_ASSERT_INTB 0x21 +#define PCIE_MSG_CODE_ASSERT_INTC 0x22 +#define PCIE_MSG_CODE_ASSERT_INTD 0x23 +#define PCIE_MSG_CODE_DEASSERT_INTA 0x24 +#define PCIE_MSG_CODE_DEASSERT_INTB 0x25 +#define PCIE_MSG_CODE_DEASSERT_INTC 0x26 +#define PCIE_MSG_CODE_DEASSERT_INTD 0x27 + extern const unsigned char pcie_link_speed[]; extern bool pci_early_dump; -- 2.34.1