Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp1735730rdb; Wed, 31 Jan 2024 07:38:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXZebcl2WzymnPDW4J9+QF+HNYgAenLCdpCtKpTjSYrlVHRQ+Bl8Uyrs6+70SOpVfpzuQw X-Received: by 2002:a05:6512:1394:b0:510:ee2d:46fd with SMTP id fc20-20020a056512139400b00510ee2d46fdmr1903534lfb.51.1706715483746; Wed, 31 Jan 2024 07:38:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706715483; cv=pass; d=google.com; s=arc-20160816; b=PjOm4bVdklBRJ86e6zG3Tj2sCspeRAnN16ab+hHKC8lfh5vhzDwlBBFNRpjD2UlDBr 3rI6AZqOu7FsZpBiDI+POVYIsR5mgNALWy9gXhy7ytimttttlMDKZhB5sJDjvLPL+sbK Ga2Zij6q5nQA/YOYQ5KGAqO6rqnVKHe8yiArUf8fIg6GITRUCF6Vg/rhBq7ohY3oioEG Kvvt6YC3IXZkG7ttF9nI6ti9FxlxX0TWr+mTXo8qQOFf+tR889gpdSZ38Z3JL0DeMOeH SQpEr/ytY2sxbY43qX8zzsRA2nTWpDQrHe6QZK6mGPh/SDzjIZG53Cl6DbnRu4Nl+DeN FASg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:subject:cc:to:from :date:dkim-signature; bh=Gj9cT5vORze/RrGT48stukVrawd08E8R0SudL+h3s2Y=; fh=kuEuhoGy5etfthLkELuSz+mDcV+U57blE2oI9ebmN8M=; b=V7a31QWmBaCfqhrvNGdJfDKwouRAQbBUkY9igqOLbWCcYxtX/2nhf77MwioZdINJRU TsVlZ7pCGyoB/0qUM7yT264eBS4Acw/PYPW1YFIh26hLaX7kUkyoudSuneP2CBcZvN+y tCpOLyXf1z2BAd9f6C8HNyDTsOZBnmC4l9d4+3ZOgPDk84p4ne6tCDOIAx0R07dicfQi SlzcCgH2mc75tQT7W8hzBB++VZZb5Q1MyUlnnHzCWmosce1YOY7TPPs956abp2Lqjfl+ qtJQdL7K8so08GuukiWIWoXfmSLyPDtOr6wy0LzhOmkqJ+M4kApBcme6+MluzFl0MhjB kfvw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QRxtWjsQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-46725-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46725-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCVYMxNINw0FdDeCU2HsG5mkzrAstItSY4/1YVUtb0uGprROLmGridfvMGs2mKXLlOkYaQ9xw2SbF3GeP7PrevMHVWczz97zZAyAgTsnOw== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id s25-20020a170906455900b00a3590fb1918si3537522ejq.461.2024.01.31.07.38.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 07:38:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-46725-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=QRxtWjsQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-46725-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-46725-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=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 530501F25B37 for ; Wed, 31 Jan 2024 15:38:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 33A8C1292FD; Wed, 31 Jan 2024 15:37:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="QRxtWjsQ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4D9B06EB6E; Wed, 31 Jan 2024 15:37:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706715471; cv=none; b=NwrX/Jy4M6QcHJUFF0eZBTjTrAlsxGoW0HedOn4/PztX9m/jax40HhZxVhP+3j7CjhkxnqPiyCvWq4or4tFjsJ+GWc04XAC2ZW29rwpAPyWFBFYC+u3JBXdR+OCS4A7np6mBEpM29K3zSR1c/MaNZpBNsTGX3dwmCdBdQTfMTRA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706715471; c=relaxed/simple; bh=NLu5RhQDHjuoWdQ7ATBAXWr7+B9giVQ1tClFHkObJS0=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; b=LnehuG5u2ODZPEcbN5Cjf0R8qCaeM8qD8C0vHlaQCMnWOqvICwo4zLmLppH0uj5x1oa+T5lj/ON97Ks4gxLZK7cFTRTZREYok9ij+BGkcG0Xi5wMimunOdBlL9VTiNZnZ1kjAVFHcSjiyH9x5G06ly9MSe1T5T+3Ym+YuZOLbDU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=QRxtWjsQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88C4CC43390; Wed, 31 Jan 2024 15:37:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706715470; bh=NLu5RhQDHjuoWdQ7ATBAXWr7+B9giVQ1tClFHkObJS0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=QRxtWjsQrKxV8wn5tiT+hyR8fxLyWD56t7JdxX0F25qs+QkwbsbymnPS2kODrM8K5 WSbdltD1Uif8EYPgP30Jjni+6Q2o2NqrGKVusaatjPdUKkP7xTp8OoEjWNclp3yrHZ d3gCwHPJ2YLqrdqnoSpF7xj+jG/jhTbxW+HHsUP+f/rwBFXHIUnAoU9Y+Pd7o/ili/ JFGJ6aquyLJqn0G+hKtF5puvFv3G+yxsGedrslEyMpmUiC4DJA870gZZ9X5zLJP5ce jEu894erBsFm4lpoQCci0m0O7CXt1DVx+qkDuyGHiF4L/QCEaB925IhgLkgDKAHUuN ikQZD5arf86cw== Date: Wed, 31 Jan 2024 09:37:48 -0600 From: Bjorn Helgaas To: Frank Li Cc: Bjorn Helgaas , Jingoo Han , Gustavo Pimentel , Manivannan Sadhasivam , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , imx@lists.linux.dev, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Yoshihiro Shimoda , Serge Semin Subject: Re: [PATCH 1/6] PCI: Add INTx Mechanism Messages macros Message-ID: <20240131153748.GA586693@bhelgaas> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240130-pme_msg-v1-1-d52b0add5c7c@nxp.com> On Tue, Jan 30, 2024 at 07:45:26PM -0500, Frank Li wrote: > 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 from Table 2-17, and the "INTx Mechanism > Messages" is from Table 2-18 on the PCI Express Base Specification, > Rev. 4.0 Version 1.0. Please cite a newer spec revision, e.g., PCIe r6.0 or r6.1. Also, please cite section numbers instead of table numbers because the table numbers are hard to find (you can't navigate to them from "Contents") and they change a lot between spec revisions. "INTx Mechanism Messages" is Table 2-21 in r6.0, but it's in sec 2.2.8.1 in both r4.0 and r6.0. > Signed-off-by: Yoshihiro Shimoda > Reviewed-by: Serge Semin > Reviewed-by: Manivannan Sadhasivam > Signed-off-by: Frank Li With these updates: Acked-by: Bjorn Helgaas > --- > drivers/pci/pci.h | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h > index 2336a8d1edab2..fe42f5d10b010 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]) */ Add citation to the comment: "PCIe r6.0, sec 2.2.8" > +#define PCI_MSG_TYPE_R_RC 0 I think I would prefix all these with "PCIE" instead of "PCI", since they are specific to PCIe and we already use "PCIE" for some of the PCIe-specific timeouts. > +#define PCI_MSG_TYPE_R_ADDR 1 > +#define PCI_MSG_TYPE_R_ID 2 > +#define PCI_MSG_TYPE_R_BC 3 > +#define PCI_MSG_TYPE_R_LOCAL 4 > +#define PCI_MSG_TYPE_R_GATHER 5 > + > +/* INTx Mechanism Messages */ Add "PCIe r6.0, sec 2.2.8.1" > +#define PCI_MSG_CODE_ASSERT_INTA 0x20 > +#define PCI_MSG_CODE_ASSERT_INTB 0x21 > +#define PCI_MSG_CODE_ASSERT_INTC 0x22 > +#define PCI_MSG_CODE_ASSERT_INTD 0x23 > +#define PCI_MSG_CODE_DEASSERT_INTA 0x24 > +#define PCI_MSG_CODE_DEASSERT_INTB 0x25 > +#define PCI_MSG_CODE_DEASSERT_INTC 0x26 > +#define PCI_MSG_CODE_DEASSERT_INTD 0x27 > + > extern const unsigned char pcie_link_speed[]; > extern bool pci_early_dump; > > > -- > 2.34.1 >