Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1506569ybc; Tue, 12 Nov 2019 23:08:36 -0800 (PST) X-Google-Smtp-Source: APXvYqy3ozvtWppi/QuJ80rHxCLjUHSL3+FimDlZSekApsYgRUFyyILmMMlsYoqHdJPXbHC3tQCR X-Received: by 2002:a05:6402:104c:: with SMTP id e12mr1890206edu.199.1573628916471; Tue, 12 Nov 2019 23:08:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1573628916; cv=pass; d=google.com; s=arc-20160816; b=hM0qEjcfZIGC5Um3QgsBYBS33AwI0Y02Ua36QXnmUko63jdFZtQKb3N1wD+2bhDU+m Q+bYaxyqefvZzAJcuFJ/XqWpw74wQiXUr4XO1Wrsx407rE8w3jy21hdu+tqvfWWqj/BQ fVvPbvXQwLqAhH1j/o+6EnXFshh2qnsLnv2Z9W1gfXDn6KDgtCrGXG8vnFkeZvMklHMt HoB6OEYGuo2wbB5h3saQCGy4FtTP9XvEJRljij2zlwoe2ehFotHE/BliM/SUSQLemhbj MyN4GKYI/GeGZUdRnAFZKCo2L1p4SV5YqB1iU95VUeixmROa/7C1NLG06fYdboR3xGAn jHcA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=TV9vvHNp5YbuHFF3W4CDy7gmCFfmVxUaAMs8imZvdBQ=; b=Qx/5AwkcEd+atcw0pwCfQUqjg2f7wanpFm2/BsTJutNJJwqh4cw1velgEKwI3u4/uh svj7CbhYKPnndcj03mSyQFJjM2lAwz5d772VXfXL6Cg8r6+0JN2Oqj3Ua6lAi4Ap5Hk1 KEXCsoElKGQoRn6utFWvQo6DIaWeAuTOUbYKAuF3CjH1jVCiJv6R+X4LaCj1bAdyufLj 7afm6mNk2PaXm0IjiHgzZK20SrHis0tNTR1F5+rjHOqx6n2/ipQw3l5bFzDjrd5OUcKp FDW5nQ1r2uIe+ol6oT8JlzfEuZSHH7Gw+H/otlwQsJZk6atUq5q9lUnVFU6CDYaF3p5/ E/Tw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b="Jr/aWjMW"; arc=pass (i=1 spf=pass spfdomain=mellanox.com dkim=pass dkdomain=mellanox.com dmarc=pass fromdomain=mellanox.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r20si675142edm.17.2019.11.12.23.08.11; Tue, 12 Nov 2019 23:08:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@Mellanox.com header.s=selector1 header.b="Jr/aWjMW"; arc=pass (i=1 spf=pass spfdomain=mellanox.com dkim=pass dkdomain=mellanox.com dmarc=pass fromdomain=mellanox.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mellanox.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726263AbfKMHFS (ORCPT + 99 others); Wed, 13 Nov 2019 02:05:18 -0500 Received: from mail-eopbgr150040.outbound.protection.outlook.com ([40.107.15.40]:64078 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725858AbfKMHFR (ORCPT ); Wed, 13 Nov 2019 02:05:17 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PcGdRTUNLmtRrv4D5tqa6oq3fQ2BmG9xce4m1QN+9TB6iSbxhjiVJVkH15am+G0AaVUrJ2m6ECJ7VhhqKneWQPxXwHr6ZiVTo+7b0g6TLsgju3GxHM7HfppYl43CMzhagbY4hW1CjCDwSf737ZzLhbDcI5JPuzBEuafzP+ZuwSGdCE0QAfBIQ3F8MBGLxTODfDThwCtdKBvbc7OIaUXCdQofH12U1cZHpkIRYUIStGQL3rHlcoL5JB1IIjYNA+2O3hD6R3jrwpSGSlpv3mGKaYlhVC02R4/2xvGAd5vNZ2BUv3MXX1fDDFjNJhKomBFKESmq78UUVTPBR4qUmIWMCA== 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-SenderADCheck; bh=TV9vvHNp5YbuHFF3W4CDy7gmCFfmVxUaAMs8imZvdBQ=; b=KrdHR4WHb+GuoCvAMW4c2p4wDE/73wQsHL/++GIIdF1rsby7EQnRv9QaxBaZLb4iZ6T/tjL4KLgxb7MUaqImd/Tp/0mAit59iBuM+tjc1L6HNeLXM1f2f+7ejirvcjjddju3msBCBqvrsPsZ+7eWCkrgR4KLCHXB3kBCPTXto+KRS7rrLxtkSbLUYCGgu+CudKn/U0Y7YrcGRvKbpcyAzm/1thrWMkO7Wp49cGJSnhCHRLaJ/FgxhiZod/8hme1WF5bM8wDfmVLCLPN/tFD5JsWpxNNYmHOJZqOUIxE1C3ZTEEIf6CPnhXgMFtPSuid9jJ/SNLXXa/7heCkUQtutaA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=TV9vvHNp5YbuHFF3W4CDy7gmCFfmVxUaAMs8imZvdBQ=; b=Jr/aWjMW6ygJnqiO6DFD0+39hkvO+INmy+ta15ov3VDDrZ7fCeZXlEdjRBEFX5mybloasJbBt4zG5vYE4w3IXYM8ycgrKGgI/GIkGJEHc/7E8/R5l3vblkkI1nEOpp3y8GujBoy23jzIjsETnEfefgz6Gsss07SEKjwztjSgy0Q= Received: from AM6PR05MB5224.eurprd05.prod.outlook.com (20.177.196.210) by AM6PR05MB4997.eurprd05.prod.outlook.com (20.177.36.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2430.20; Wed, 13 Nov 2019 07:05:13 +0000 Received: from AM6PR05MB5224.eurprd05.prod.outlook.com ([fe80::59a9:b6c3:97d8:ff0f]) by AM6PR05MB5224.eurprd05.prod.outlook.com ([fe80::59a9:b6c3:97d8:ff0f%3]) with mapi id 15.20.2451.023; Wed, 13 Nov 2019 07:05:13 +0000 From: Vadim Pasternak To: Shravan Ramani , Andy Shevchenko , Darren Hart CC: Liming Sun , "platform-driver-x86@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH v1] platform/mellanox: Add Mellanox TRIO driver Thread-Topic: [PATCH v1] platform/mellanox: Add Mellanox TRIO driver Thread-Index: AQHVmJ1B8i6N8wQYJ0iG7pe+aDUVfKeHm2XwgAD9HICAAAutMA== Date: Wed, 13 Nov 2019 07:05:13 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=vadimp@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 8f30145e-01bd-4611-d1c2-08d76807d489 x-ms-traffictypediagnostic: AM6PR05MB4997:|AM6PR05MB4997: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0220D4B98D x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(4636009)(346002)(376002)(39860400002)(136003)(396003)(366004)(13464003)(189003)(199004)(14444005)(6436002)(256004)(9686003)(110136005)(66066001)(4326008)(8936002)(446003)(55016002)(52536014)(2906002)(81166006)(3846002)(25786009)(8676002)(71190400001)(316002)(6116002)(11346002)(54906003)(229853002)(99286004)(5660300002)(14454004)(81156014)(33656002)(486006)(476003)(71200400001)(7696005)(6506007)(76176011)(66946007)(86362001)(74316002)(186003)(305945005)(478600001)(26005)(6246003)(66446008)(102836004)(7736002)(66476007)(66556008)(64756008)(76116006)(53546011);DIR:OUT;SFP:1101;SCL:1;SRVR:AM6PR05MB4997;H:AM6PR05MB5224.eurprd05.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: sXEFgnHRUZe8j3M56v4G3jYGpOKwNncc6PuBXndw44DG1krMAhmibbHT/zgNiCxW+INsUJk877AgQVTj+/aPmn1hdTTy8p3mU6W45HU7XYZKsvw4pDTCJLMGhPQ75p52SiJOakuv2gK9wjPBpaYGZPsPxCEar+XKhPsOJoMzV/Y+QYFn01z8O0QujdxEFVH6ohZ6v+8HZAu3HjUDqTCd0NyTWTwdySuqo+Bb0V5ZLubNily8ahidIX4vFBtPwyBa5KnTZ40qF9gppIPNvhQI/+tiKvStDZQI74CGyiiSCdbY8KK8bxgI0ecE+pz+DpLXmIa/CrHeITkaClIO/3RwwaZNe3KUinGoIFJ+5S7bLTMZrht/WOENzfI9IreHg+hjvQZP8b+oN8fAuwSNxRdtVnmlDCq82yLtxF/gT6mGwdSpN13A7pvMYOB9vqRWqJrS Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8f30145e-01bd-4611-d1c2-08d76807d489 X-MS-Exchange-CrossTenant-originalarrivaltime: 13 Nov 2019 07:05:13.1059 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: enaiyKAR36SmQDm1AqRaI/osXSaW1JIdL2nSHq+juNrO7PQQxX2lysTDAGKwdOjlYxPdnd/7eytjUhOHJAPTkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4997 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Shravan Ramani > Sent: Wednesday, November 13, 2019 7:41 AM > To: Vadim Pasternak ; Andy Shevchenko > ; Darren Hart > Cc: Liming Sun ; platform-driver-x86@vger.kernel.org; > linux-kernel@vger.kernel.org > Subject: RE: [PATCH v1] platform/mellanox: Add Mellanox TRIO driver >=20 > Hi Vadim, > TRIO stands for TRansaction I/O and is an internal code name for our PCIe= to > CHI bus interface. > In Mellanox BlueField SoC, the configuration is as follows: there are 3 T= RIO > blocks where TRIO2 is connected to a Mellanox ConnectX-5 while TRIO0 and > TRIO1 can be configured to behave either as a PCIe Root Complex to > downstream ports (8 ports or 16 lanes each) connecting to storage devices= , or > as an end-point when plugged into an external x86 host (SmartNIC form fac= tor). > Each TRIO block has a separate ACPI table entry which invokes this driver > thereby creating a total of 3 instances. > The purpose of this driver is to be able to read/set the L3 cache profile= from a > list of available profiles for transactions coming in to each TRIO block = and is > meant to run on the ARM cores powering the BlueField SoC. OK. It was necessary to have such sort of explanation in the description. I am also not sure you choose correct location for this driver. Why it should be in drivers/platform/mellanox/ and not in for example drivers/acpi/? Regarding the patch content. (1) Please, follow naming convention which we have in folder: drivers/platform/mellanox/, like in module mlxbf-tmfifo.c mlxbf_trio MLXBF_TRIO for all routine names, defines, types. (2) Fix includes order ("io" before "irq"). (3) Don't use magic numbers like '3'. (4) Why in 'probe' routine failure of symlink creation treated as warning?=20 (5) Remove stuff like 'dev_warn(dev, "%s: failed to find reg resource 0\n", __func__);' 'dev_warn(dev, "Error probing trio\n");' (6) I suggest to make all the above comments and send the updated patch for internal review to myself cced to linux-internal@mellanox.com, before sending it to linux-internal@mellanox.com. Thanks, Vadim. >=20 > Regards, > Shravan >=20 > -----Original Message----- > From: Vadim Pasternak > Sent: Tuesday, November 12, 2019 8:15 PM > To: Shravan Ramani ; Andy Shevchenko > ; Darren Hart > Cc: Liming Sun ; Shravan Ramani > ; platform-driver-x86@vger.kernel.org; linux- > kernel@vger.kernel.org > Subject: RE: [PATCH v1] platform/mellanox: Add Mellanox TRIO driver >=20 >=20 >=20 > > -----Original Message----- > > From: Shravan Kumar Ramani > > Sent: Monday, November 11, 2019 4:35 PM > > To: Andy Shevchenko ; Darren Hart > > ; Vadim Pasternak > > Cc: Liming Sun ; Shravan Ramani > > ; platform-driver-x86@vger.kernel.org; linux- > > kernel@vger.kernel.org > > Subject: [PATCH v1] platform/mellanox: Add Mellanox TRIO driver > > > > This patch adds support for Mellanox BlueField TRIO PCIe host controlle= r. > > The driver supports multiple TRIO instances and provides a sysfs > > interface to allow the user to read/set the L3 cache profile for > > transactions going through the TRIO. It also provides an interrupt hand= ler for > the TRIO blocks. >=20 > Hi Shravan, >=20 > Could you, please, explain what TRIO PCIe host controller? > What is TRIO, is it some internal name or it's some standard terminology? > If it's internal, please, explain for what it stands for. >=20 > Same for TRIO instances. Are there some host side PCI instances? > What are the purpose of them? >=20 > Could you, please, also explain the system configuration? >=20 >=20 > > > > Shravan Kumar Ramani (1): > > platform/mellanox: Add Mellanox TRIO driver > > > > MAINTAINERS | 5 + > > drivers/platform/mellanox/Kconfig | 8 + > > drivers/platform/mellanox/Makefile | 1 + > > drivers/platform/mellanox/mlxbf-trio.c | 624 > > +++++++++++++++++++++++++++++++++ > > 4 files changed, 638 insertions(+) > > create mode 100644 drivers/platform/mellanox/mlxbf-trio.c > > > > -- > > 2.1.2