Received: by 2002:ab2:6a05:0:b0:1f8:1780:a4ed with SMTP id w5csp1585623lqo; Sun, 12 May 2024 08:55:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXHj2cjMBiv5nWptDB1HApR+NEiV7dvxK8JKkIH7DdxMLGf3tmhuZJ6b/5vI33SD0615WB/VAA+xGRxribbEJDm6lW4hHA7GSmDnT6+uQ== X-Google-Smtp-Source: AGHT+IFbyj9Pi302WoaWTdyeSDdLJimaRirBUDTX1mTFAkXW/7OmwKX7/JU/7lqsECImtbtTiTb8 X-Received: by 2002:a05:6a00:4fcb:b0:6ea:c2a2:5648 with SMTP id d2e1a72fcca58-6f4e0299d2cmr9711453b3a.3.1715529320271; Sun, 12 May 2024 08:55:20 -0700 (PDT) Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f4d2b1e710si7554554b3a.277.2024.05.12.08.55.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 May 2024 08:55:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-176927-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=rDRoY4Id; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-176927-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-176927-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 4BF4DB20D4B for ; Sun, 12 May 2024 15:55:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E5E045022; Sun, 12 May 2024 15:55:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b="rDRoY4Id" Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2064.outbound.protection.outlook.com [40.107.220.64]) (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 45C7A134A9; Sun, 12 May 2024 15:55:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.64 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715529305; cv=fail; b=A0j9cE3Bln97Pcj3EsFsd0TtnDol9fSwxwRWWr/bZdYPp/Xpiomr8ChNCZph7lzJ5fyK+UcnJJHfT1TqtWDDaIKSRM429c/3/yvGqq1Sta9Uh+H6SsTMmq2Vz/DelgwkoxE+5x8Q00MQylMlYe2bxZtXDElNvZgaDSnaiRfPx4c= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715529305; c=relaxed/simple; bh=hGek5JPwID0Q8uvUFSSvGUWjtoieDbN15D8DeYJWM2k=; h=Date:From:To:Cc:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=LLSYL/ZYBQWL4JxldXpmCdHPIp9GCfisOzHJFQ2Du8p2gmXHIJaikjOx1kqB0cKuPSUSRnspqAoJyhQTjHo6YzWrORlpZQ7VPIae61/6QdjIOHYGrTER7yaRQqjx7sk0RvM6egoI0qKNqi+EocJcW/AUrmzmbPeckzQ8c8RQonk= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com; spf=fail smtp.mailfrom=nvidia.com; dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com header.b=rDRoY4Id; arc=fail smtp.client-ip=40.107.220.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=nvidia.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=nvidia.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=amZdULF8Tk/zB4Ctxe7+Vg/YgGMYbFqy9Yn3YsMZcGZnDx4xA3h0l9FBT9vAuuy9bdE3WuTWtnsoa+sm9jzVpyzUzBVBbZnfaLOmv0xOcpCd+8S4hEMDv0Izax8OiN7k5w29UdpPar0FqExY5sXR3559lIsiBL6RDv9AKMU+5J2uqVr5sjNw+mu52zG4gCX2OKITs9BCxJvGX+R574QYEfLOGb6rZPXJ0sA/4ifI51CYBKbr/mhUfypH4bHKqNSZvZ3s8zn3Egf9I4FkYbcR0t7vl9dBGjzzcsib7S+UVydHVEl0FUJS0eDqMZc79SZVtG67AeB9gsCBwdZXXB2cQA== 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=YiwIMmUzuDWhhO0d4XMSrE9saLc5NuUBEaYCSt4Jl1k=; b=GCio22TjvgbR/MtUUvIGpSERulnZN+4L8NoDF/BdUkKmQ2Ep8dgh30m3ucGqO6R7CvIAeIyRR0HXbMeJuNdZXOguijGrdE2iCev9EKyr03oNE/aXMwNwUUuchMLXfx4Q2yEMdZEBNRih05HdMq+URyh42OJc4WcU5R0b0WwFfzRvpmH0G+46oxh4PqUXAWbGzinXIpMnzqQPWOZoO0wLZqzIwalzkQ008AlTBaz3oloT3pC/8hgCzf8SMWPIaQmhv53p4rdV7d8IhJ0NYF41ekY8Ugd1CkCswlcut0kQg2wWpi7ULZCNiTL5ndXWL5rO8BKBYbtXqAyJivr9oiGSkg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YiwIMmUzuDWhhO0d4XMSrE9saLc5NuUBEaYCSt4Jl1k=; b=rDRoY4IdVW6K5YRFHOX4woapcCFATEv6V0epup/jO1AcetuWEB5bfDV6yCIuFzlWkmIugvUxOJxGfiZbFfkB7yw6A3FnZUcTUEPAdWrrk2y3FQnydOaahMpU4CSUV2SNCxuhR0PDbCHYqZPQbs2Yrk0yl3uFGG+pSGXn9HC47r6HaOmSQ06s9pbYdKO15cMGkEx26rCVzFuwNzWsic4WkcNW/KNK8UxFkGHutwyNvBAMOgQMPr9BH4DSASfKSt6BvT19cms31jgMI8CJ/HMM3h+PF0/XjngLHhHNSJTCDKzWP186I1OmspO9/PG2xIedKc8eCHpNRbLZNzBugRVy5A== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from DM6PR12MB3849.namprd12.prod.outlook.com (2603:10b6:5:1c7::26) by MN0PR12MB5859.namprd12.prod.outlook.com (2603:10b6:208:37a::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.55; Sun, 12 May 2024 15:54:59 +0000 Received: from DM6PR12MB3849.namprd12.prod.outlook.com ([fe80::c296:774b:a5fc:965e]) by DM6PR12MB3849.namprd12.prod.outlook.com ([fe80::c296:774b:a5fc:965e%4]) with mapi id 15.20.7544.052; Sun, 12 May 2024 15:54:59 +0000 Date: Sun, 12 May 2024 12:54:49 -0300 From: Jason Gunthorpe To: Nicolin Chen Cc: will@kernel.org, robin.murphy@arm.com, joro@8bytes.org, thierry.reding@gmail.com, vdumpa@nvidia.com, jonathanh@nvidia.com, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-tegra@vger.kernel.org Subject: Re: [PATCH v7 5/6] iommu/arm-smmu-v3: Add in-kernel support for NVIDIA Tegra241 (Grace) CMDQV Message-ID: References: <9cf877a464c359b44e87b375bdf2962d2670f0e2.1715147377.git.nicolinc@nvidia.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9cf877a464c359b44e87b375bdf2962d2670f0e2.1715147377.git.nicolinc@nvidia.com> X-ClientProxiedBy: BYAPR04CA0030.namprd04.prod.outlook.com (2603:10b6:a03:40::43) To DM6PR12MB3849.namprd12.prod.outlook.com (2603:10b6:5:1c7::26) 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: DM6PR12MB3849:EE_|MN0PR12MB5859:EE_ X-MS-Office365-Filtering-Correlation-Id: 48f37406-50a5-4ace-d3bc-08dc729be05d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|1800799015|366007|376005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?C9HQmQd8rOnHB1wq25mgaqG8OQ1JxcNO81BBUs2VQdXTEWPoN+P8kcyv/3iU?= =?us-ascii?Q?xVcZlpC4t5UwuaZzLmZzZzyh3mvCWLgtMf1ceYqCy6YjXsowiBeMiE0T/QFJ?= =?us-ascii?Q?xyCGmuneen6EoIlv2Sla51ebMh8EdYveXorVgxShU2f3pld9gufe7rARKoLK?= =?us-ascii?Q?o9iDiHice4MoM6ZGwkmZ1csJH0tfHffuiKtZ9uRUr8quAJjXxdXrBNz1dctX?= =?us-ascii?Q?nOL0E84ocUakCbO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=?us-ascii?Q?n3sXMr+vLhg46FPLRqC5fh98mD2Rb2NlTNK8s4xbJUEb+b8gicdAh0+UELbT?= =?us-ascii?Q?AVwo/ftC1g+AjlukzCguvLqsPX2Hx6u4THcXuyJYNDCPXS1WtKiYqSzFVeWv?= =?us-ascii?Q?FrGaVR/HHWJfiOXcerY/9WoGFiYMjJoYv5deY8lDaQ=3D=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB3849.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(1800799015)(366007)(376005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?C7pSxQwvtZqBf23Ot6oWoL2M1yJunh1pO9WQUNuatO4H4LjKvRCMN8BHgRQx?= =?us-ascii?Q?wsYmMM1uD1UgI4kOOZFXvofxlB5VZ427cRq4473K319XSCDzQJh+ll4eLpgn?= =?us-ascii?Q?tEIUicBeLukmTQLZT8RWlS0PcFCH7HHQL8g2wD/WIY/dlsXg+mXMs8FZfaJD?= =?us-ascii?Q?Fpu5Ipnawpvj1S7+mrSuOLGOqrr5A+e5ne205dCbl2Vr7Ra3xolT+Xg65umD?= =?us-ascii?Q?NN9YKNJ6QLhIV7EG85I3VytvDMPjOjYgaCTaz4MDFsSE58GyaSiI4k4/UVGA?= =?us-ascii?Q?OykU0ChBQIZaHHURET2BxQjSpZCCLjZPIO7auq8r4+WWWWHvIA7Joy8HEzNI?= =?us-ascii?Q?5pHSGXtbb3b2pjcWRZ9ZU2nIirR0nQlfadf4QyG72MTK8zv3k/K1iLEi2bRS?= =?us-ascii?Q?z29S+J8kp226AObEHp+5wci8K3DWFseTKV38OiqsOxRwdc2rEYUE6Voy5Uj6?= =?us-ascii?Q?6hf0arMX9B4sTt5LRMtfFQ1Djl0hnKpiBLFHiHTwRVwcYr1/5V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0+K8jxPgc1C4epgdFG3EhJ5r4GWgy6UzJDRef?= =?us-ascii?Q?AS8DcagZ3PtcjRmU43StieLYIuocdoymC1LDrd+WwJmzobpjyyzoN8oNTNRa?= =?us-ascii?Q?49mBvdyRhCfG/NFnLWsaDuOvCn5j6dzodhR06p4Xepu2fjagaf+A/OZIzWnu?= =?us-ascii?Q?eYM7AYdQtzNVaMOgxCpLqHpITHW7V6TrSqds1G0a?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 48f37406-50a5-4ace-d3bc-08dc729be05d X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB3849.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 May 2024 15:54:59.0667 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: cSsziKbiFLB8hTmy73fTIPzkWGlO7ukPXsJYSN0CAlhpwfUrBLvR1/f+xmMA6ugG X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5859 On Tue, May 07, 2024 at 10:56:53PM -0700, Nicolin Chen wrote: > +/* MMIO helpers */ > +#define cmdqv_readl(_cmdqv, _regname) \ > + readl((_cmdqv)->base + TEGRA241_CMDQV_##_regname) > +#define cmdqv_readl_relaxed(_cmdqv, _regname) \ > + readl_relaxed((_cmdqv)->base + TEGRA241_CMDQV_##_regname) > +#define cmdqv_readq_relaxed(_cmdqv, _regname) \ > + readq_relaxed((_cmdqv)->base + TEGRA241_CMDQV_##_regname) > +#define cmdqv_writel(_cmdqv, val, _regname) \ > + writel((val), (_cmdqv)->base + TEGRA241_CMDQV_##_regname) > +#define cmdqv_writel_relaxed(_cmdqv, val, _regname) \ > + writel_relaxed((val), (_cmdqv)->base + TEGRA241_CMDQV_##_regname) > + > +#define vintf_readl(_vintf, _regname) \ > + readl((_vintf)->base + TEGRA241_VINTF_##_regname) > +#define vintf_readq_relaxed(_vintf, _regname) \ > + readq_relaxed((_vintf)->base + TEGRA241_VINTF_##_regname) > +#define vintf_readl_relaxed(_vintf, _regname) \ > + readl_relaxed((_vintf)->base + TEGRA241_VINTF_##_regname) > +#define vintf_writel(_vintf, val, _regname) \ > + writel((val), (_vintf)->base + TEGRA241_VINTF_##_regname) > +#define vintf_writel_relaxed(_vintf, val, _regname) \ > + writel_relaxed((val), (_vintf)->base + TEGRA241_VINTF_##_regname) > + > +#define vcmdq_page0_readl(_vcmdq, _regname) \ > + readl((_vcmdq)->page0 + TEGRA241_VCMDQ_##_regname) > +#define vcmdq_page0_readl_relaxed(_vcmdq, _regname) \ > + readl_relaxed((_vcmdq)->page0 + TEGRA241_VCMDQ_##_regname) > +#define vcmdq_page0_writel(_vcmdq, val, _regname) \ > + writel((val), (_vcmdq)->page0 + TEGRA241_VCMDQ_##_regname) > +#define vcmdq_page0_writel_relaxed(_vcmdq, val, _regname) \ > + writel_relaxed((val), (_vcmdq)->page0 + TEGRA241_VCMDQ_##_regname) > + > +#define vcmdq_page1_readl(_vcmdq, reg) \ > + readl((_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) > +#define vcmdq_page1_readl_relaxed(_vcmdq, reg) \ > + readl_relaxed((_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) > +#define vcmdq_page1_readq_relaxed(_vcmdq, reg) \ > + readq_relaxed((_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) > +#define vcmdq_page1_writel(_vcmdq, val, reg) \ > + writel((val), (_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) > +#define vcmdq_page1_writel_relaxed(_vcmdq, val, reg) \ > + writel_relaxed((val), (_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) > +#define vcmdq_page1_writeq(_vcmdq, val, reg) \ > + writeq((val), (_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) > +#define vcmdq_page1_writeq_relaxed(_vcmdq, val, reg) \ > + writeq_relaxed((val), (_vcmdq)->page1 + TEGRA241_VCMDQ_##reg) These still need to be trimmed to only the ones being used. I still think it is a bad idea, maybe a middle ground is to wrapper the regsiter coding writeq_relaxed(val, REG_CMDQ_PAGE1(vcmdq, XXX)); Is still short enough and safe enough without creating so much obfuscation.. I didn't notice anything else in this patch Jason