Received: by 2002:ab2:69cc:0:b0:1f4:be93:e15a with SMTP id n12csp1648804lqp; Mon, 15 Apr 2024 12:34:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVOjIUvIuuYXbC/vfbzROYY6roQONUhyVYhvcjVsaPlk5hwDWaPintxy+eXUvptR1xrHB8qHgF3jUDqhU/kPfYLBl7jwSmuKZMAuJPAQQ== X-Google-Smtp-Source: AGHT+IHYhs43r1fd1+dzEY+8csqDT6/7PnqIIeHH1MwwkFg3XOGD4Cl6VyUcAdbOlKdskUJQrAWY X-Received: by 2002:a17:906:134d:b0:a51:9606:a22e with SMTP id x13-20020a170906134d00b00a519606a22emr569140ejb.24.1713209684361; Mon, 15 Apr 2024 12:34:44 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id c20-20020a170906171400b00a5251ca7cb1si2551389eje.204.2024.04.15.12.34.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Apr 2024 12:34:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-145777-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=@nxp.com header.s=selector2 header.b=ep7txuhg; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-145777-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-145777-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 am.mirrors.kernel.org (Postfix) with ESMTPS id EA23A1F23D04 for ; Mon, 15 Apr 2024 19:34:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EB3F7156256; Mon, 15 Apr 2024 19:34:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="ep7txuhg" Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2084.outbound.protection.outlook.com [40.107.21.84]) (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 DC7ED156652; Mon, 15 Apr 2024 19:33:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.84 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209639; cv=fail; b=K7elFfHScbacj0YhmMfgYHPo1/MMAS+kKMoD1wdySnGkLSo/FRqU2IRxuShXJkxGTascJUDD2O4XmT5sE0cEJyXNA9Ba3q0chD7/OlvIAa/I37ezUh8wJ9PgSeNgIer5AK+SjfKfv/FFQyLhYc5kvtwfLJbn+MAiz/C1+B7hYao= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713209639; c=relaxed/simple; bh=K5BaRqeDAmZ2aPjZDryIUtVxy8PUv+B2mZWYcdlYqfk=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=b7BfOHc41qVOKUIXGaGDnoZAUacwvts5bnsSzsLVHJsmDkBXuI4Mz3CQleTo4O2jj7eK60OJJ5Mfzq4/RT5Oy6PaSsOz8nbFulmGDIdPXk9mzf0KWDesfiKxlVG4RmZQyz12mQVXVwOY8jFitGu305yxEV9584HZd5V9FdYDtoU= 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=ep7txuhg; arc=fail smtp.client-ip=40.107.21.84 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=YbbfJT/o+gA03BLiuGk6sr/Ff/BZGJYxmLoRCfnlt/Bg5KQgENHAHiJaiTObjNtw/G80ey5HVbXvm4cuCElYsibf6edCdz7uN4LkWmfYIdBFy6MPUxPop2SLo6tVitKq4zWh+M/vW5NF6xksidBZdP9iyTRlrYdOTGe23Sm0d8svuMdE1zH2cCUQ+NSMuyfekJDXvqEJD68c8QtSs0ja6R/TcKPBHGD9WgR40bR0Oa+HQakW0EO8VYOQ+t0Xsit3gijJajrgSLMxP/kWrzbrrbr57+/ZTObENpjdRiKtAB48Yn8XeyVcXc2uB4d43RraQcpfTLppcMrxtkIyvMeiYQ== 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=ecvzZcOpGwJ3HWp+XS5Bdt7sJRZa4qNZcOf5pYCrF7o=; b=KRjQ24LdzSqv4ZfHwcOJnnUCYM+LMxSpa4wgOHum+u8JloVhtAkS+SxOH6E1gYlfQRMlnUFO0PT/i5WBJI9anwXJ1JGJ6+OULR7cLsF5OdssUEA4ciMyY4l6Bq9mrm6awkraGomeFIXrIQDAfEzebLk8rexJOfDp3yWAUzC8+P84U1BxCxF86kHPwHXzGLHA84yFhB4hDUaKkuWGhzF057zD0dHWjHVvmwvxQ4BOBtiwPe+DJsqGV+XCn5UrqU+ISRQBjYySwSLAbFWmqtq9yX4kAOnn793ViCqVnqp8oXdRkmP3zY1VGGSOt/9Jz3jG8hnUuize+N7kVsyQaf2e1g== 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=ecvzZcOpGwJ3HWp+XS5Bdt7sJRZa4qNZcOf5pYCrF7o=; b=ep7txuhgXNOCWZs/6+ArU3vjRa8bFOeAnAmElIkijoI/lTab/izBg2TF3NFqty988EJpGZIJd1yBtSR0T5Gq02i0lsoqPZUwWPjFny33lYtGICz+rnO3FnNg7Wt1WWKfjQGdBNg07KD9YiIz4bXOIrR6meAXoH6TCUArHkNxizo= 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 PA2PR04MB10279.eurprd04.prod.outlook.com (2603:10a6:102:406::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.43; Mon, 15 Apr 2024 19:33:55 +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; Mon, 15 Apr 2024 19:33:55 +0000 From: Frank Li Date: Mon, 15 Apr 2024 15:33:25 -0400 Subject: [PATCH v6 1/5] PCI: Add INTx Mechanism Messages macros Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240415-pme_msg-v6-1-56dad968ad3a@nxp.com> References: <20240415-pme_msg-v6-0-56dad968ad3a@nxp.com> In-Reply-To: <20240415-pme_msg-v6-0-56dad968ad3a@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=1713209628; l=1631; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=AFhhy/CDUuf3GAzxVcI28t15j3n2X7gwgdDg1sEklSY=; b=MhKwiPE8w5aMx2pqfwDqzKzSVWpDcfvm1H8vKqlK7Xv66ZNJRBfbvlAgR/F/Rlzi5prUh0idz TJF5e8n6cAlC9OD4qINfi3nrQV2KXx1X97M4l8ast+YbmYSM6lij7An X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR13CA0102.namprd13.prod.outlook.com (2603:10b6:a03:2c5::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_|PA2PR04MB10279:EE_ X-MS-Office365-Filtering-Correlation-Id: 47acada7-4568-42f3-6ab7-08dc5d82fd69 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w9C0TRi7Qd342fpTzdsUKQtCjs+4BEy84Msthg3a1nAafwm3Qdnu9bLUdhJVKD65m4gn8RScgE3Ji8Esk0wtt/Ho3ZLuOUDdjIbJ8pxPnpjJxt+3Qdwq/mf/GjneQw77bcgL4BVdEaBzC5dwrttWAh3DO7d9PPaL7r0k1PAAA2VsvKVfwpHZfVgXMG5u8ux4KkXRVioLndgj3wi+D+dzDNNqMhCr3jSVzbxe1FE9gvikdOa2vPan1FQBAaaBB7xEk01ojWdwnmF8hqRrqwtVUTZQaoZ4H2vDOsxRSQ9jlvIgHnPojQjx0P7TS0iq5sqdSbpW8+899h06JllwI+JNZgaSKT92gnF/9oqfI/SpRTkdWXYbwYMjFgJ9c879WNuEMOAjWy3EP+XS4/dUpy3TombMt7QkBx1rBtxMkoHBcMW2Xh/wipcQX0/32Rs9PIcm2kNBIHWOIMWpH/vRPm2Iyfc7JXB5RvZyog4vPC6DZafjVpxcdYBm+uV4yLtIsweIvkMIw2x0wu+UwoSdIOS3jcykIqODGH4Z+hOx5anQcvtOYUYsGMxFk3GXjcpqkMSWF7WNcfIYryVXCpbxlq0MQhEVapCPYlzzV6GhUFhSVVF3aGjnM7hIkk0nQn5KmYGQzDW5lQ+aVK6tmbqlYgPf+t6WNyMgXIQjUTz11dFRKfFbOzzp8MHMV0Am9x2lFST8KPxCcdM6VnqON5V+Or52YqSgOWfi78DSanf+KqYZ9os= 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)(376005)(7416005)(52116005)(38350700005)(921011);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SlNDcEQwMUN2eXJ1Z29lcm03OGZMVVQ5SnFjOStOcFZNRHR1LzV2L1E4MDdX?= =?utf-8?B?QWpwR0QzUWg2U1hSNFlZdjhxbU1mbTVNWWlFNlkrWEFaQm9VQkk5c0NRdGR6?= =?utf-8?B?bXYrQ3pVQWp0YTJVclJwdll6bGVSUmRadnN6TXZCelRlZ0s0SVJNOFR1L1Qw?= =?utf-8?B?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dkt6M05iQTdv?= =?utf-8?B?NFNybXFFNjNsSERJcTBqQ0hxdGpjbzhzaTRyR3JqTjQ5NjBTVkt2a1BKb05m?= =?utf-8?B?QU4xV2xJSE1LNmFSci9kNnY5dmFGakdxNXNxc1BveEFBMzg3K1V6L0RWdlFi?= =?utf-8?Q?GyJ4=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 47acada7-4568-42f3-6ab7-08dc5d82fd69 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Apr 2024 19:33:55.9431 (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: bhEr+UuSwauny9eq6H2+zeC9nXH0x6yb/oSywKt9CLYM4T+gyhtOkNLj/GoUTjVKomOBCrdkT57yI4KRLRDxyA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR04MB10279 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..19b4227a8a7e8 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]) See: 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 See: 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