From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) (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 6401C230996; Sat, 18 Oct 2025 06:43:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=198.175.65.11 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760769841; cv=fail; b=gl5f8epLtk2K2JEdWCACOcYTMZLS0vXOLR3B8IZggYsHGu0Au1uL2y9B4UIOMaPJJGjL6HzvCE0AuVj6U7PjlDXdoIxbzi8iw14VR5kLAMKFAwPWVkMJ0NIBWDIad52RKNe68r/3lCgOjR2LGeNyymy3l51Vrozaka3CrClVGQQ= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760769841; c=relaxed/simple; bh=Npo1gXF7idyxuvfjEME3zQAljc8Or3vbgbz1VQrSyfg=; h=Date:From:To:CC:Subject:Message-ID:References:Content-Type: Content-Disposition:In-Reply-To:MIME-Version; b=j3T+w5ffUBrpOXcwxJknlzsltNjatcfO0GzYQ6/1nZx1SePLeA79r3U0WZRmcxngqScpIFMuwQN8tEOtK/rUPsh1yMax99oVZCxTlF4BkG5HANStm0nmJJK9CVfbXOjBM6QDgrUdD92BZiqsf7rkxnFSgkpfClo3dfi4et7Wkb4= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=XeDqVOIj; arc=fail smtp.client-ip=198.175.65.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XeDqVOIj" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1760769840; x=1792305840; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=Npo1gXF7idyxuvfjEME3zQAljc8Or3vbgbz1VQrSyfg=; b=XeDqVOIjnbzhPMXP1uWGKWVLuVqKlrPVaZFQBvRrTrvGasDQWKKcsVPF OURV1YqNgXtFDM2olMbTJkCppEasOi2fvXyF+yJQE6fzYPv9hyGIRl79h EIYvx9zB/1EGrrKSyYy2tl+4/LVm9k7vFYmTJyFcVy5O/Y2msDq52NASc k1Dbj4R5oahncpQA7y8RNLJmtlk4nmWC6MF9BdP/eduxXn07/ORz2Dhvv MrxC37UjBgpML0dsFRVn5HTcnnPDjhnQSDGCbAYAO91lN4VDj5mY7hY2j 5UDYOFTxxw12URa/quqhMEtaCmXeK5QfNo53B1YocdWwYg6x1FN/gSDn8 Q==; X-CSE-ConnectionGUID: qrJYIrh5QQujD+eNFJzpBg== X-CSE-MsgGUID: s8XnL5FASDiejr84RkS6og== X-IronPort-AV: E=McAfee;i="6800,10657,11585"; a="73260311" X-IronPort-AV: E=Sophos;i="6.19,238,1754982000"; d="scan'208";a="73260311" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2025 23:43:59 -0700 X-CSE-ConnectionGUID: NYCunhfUSXigW5af19iNMg== X-CSE-MsgGUID: YUVWddj4SEClqR85QE707Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.19,238,1754982000"; d="scan'208";a="213876917" Received: from fmsmsx901.amr.corp.intel.com ([10.18.126.90]) by fmviesa001.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2025 23:43:58 -0700 Received: from FMSMSX901.amr.corp.intel.com (10.18.126.90) by fmsmsx901.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.27; Fri, 17 Oct 2025 23:43:57 -0700 Received: from fmsedg901.ED.cps.intel.com (10.1.192.143) by FMSMSX901.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.27 via Frontend Transport; Fri, 17 Oct 2025 23:43:57 -0700 Received: from PH0PR06CU001.outbound.protection.outlook.com (40.107.208.35) by edgegateway.intel.com (192.55.55.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.27; Fri, 17 Oct 2025 23:43:57 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Y2E485DYCvNWja7AjXSJ9lARor5AMriIaK2YRqQI2yw+Q/uwNH79jOXgYFyrmv9LqMWlr/YOtR7jsw5znowBSYYW0QD69au02EdhkB/gMJBZYlTUWfhFgGbnA1QTsAFKeoOv8CAHkLP5Sw6pHERcY6pPDeoq4DlLrZDw/lf8lhvLp/9oB3DAzerDM8f8SS8MALL3yPFtY+oyXyQ/5Uvp9hZejUpfMEoxfxJZMoXL9x6ajUo9IXTP8j2/BRG1xS6deXsMWUmgRdga89HjJ43F1lIuSDDInH1sWmHFcql4Kx0HDah1lMgf/iga+7Nq2kENYr7kxONdhmHTN5iUOBzIOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=MwWvnnerEnOH555biMlHMrBLBOECCiLhQaTzqSLgBUg=; b=exhAjNzAgYO3cqgreNAKrUe/jmaiPQAfQSHlTVzj9o07MzJVyBA8IfNo8Cd32XO92WdcC+TE1sPCRRjnEIyrfznkQLLxe0ff+BsJoFWkgoOcoXbcxm2DPfokmOkLz6+WAkBywcRnBP0M0Td5dAnJpzZX8+U2n0hpmVmRWsR9HrYbSeEjq4E/8EJO50Bihk0qEtygrqH0qVHsF1nwQs1HU/CAiild130Rca9XOP4anXsLiuZgkGgcIk2RatxDRfvitG+lsGIzbqlwfPK4n8cm0l0JLGVodw0e1zteaOP9UGe12rpgxrvV62zwnO9IpwtS9LIHrxAnYbWMEi5jmIBkBg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from BL3PR11MB6508.namprd11.prod.outlook.com (2603:10b6:208:38f::5) by SA1PR11MB8396.namprd11.prod.outlook.com (2603:10b6:806:38d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9182.20; Sat, 18 Oct 2025 06:43:55 +0000 Received: from BL3PR11MB6508.namprd11.prod.outlook.com ([fe80::53c9:f6c2:ffa5:3cb5]) by BL3PR11MB6508.namprd11.prod.outlook.com ([fe80::53c9:f6c2:ffa5:3cb5%5]) with mapi id 15.20.9228.010; Sat, 18 Oct 2025 06:43:55 +0000 Date: Fri, 17 Oct 2025 23:43:51 -0700 From: Matthew Brost To: Rob Herring CC: Tomeu Vizoso , Krzysztof Kozlowski , Conor Dooley , Oded Gabbay , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , "Sumit Semwal" , Christian =?iso-8859-1?Q?K=F6nig?= , Robin Murphy , Steven Price , Daniel Stone , Frank Li , Sui Jingfeng , , , , , Subject: Re: [PATCH v5 2/2] accel: Add Arm Ethos-U NPU driver Message-ID: References: <20251016-ethos-v5-0-ba0aece0a006@kernel.org> <20251016-ethos-v5-2-ba0aece0a006@kernel.org> <20251017153746.GA1579747-robh@kernel.org> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20251017153746.GA1579747-robh@kernel.org> X-ClientProxiedBy: MW4PR04CA0254.namprd04.prod.outlook.com (2603:10b6:303:88::19) To BL3PR11MB6508.namprd11.prod.outlook.com (2603:10b6:208:38f::5) 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: BL3PR11MB6508:EE_|SA1PR11MB8396:EE_ X-MS-Office365-Filtering-Correlation-Id: 454d8b1e-5a97-4d7c-d891-08de0e11b528 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024|7416014; X-Microsoft-Antispam-Message-Info: =?utf-8?B?U3gzc21jdE5NSm5tN2pSdVFoUU1QN21rdzZuM2FrTTJOR01mdTIwWmg2NC9Y?= =?utf-8?B?dEhhem94VGNIRUVOZkt2b05WTmYwZyt6TURlNFZreUxkdnpWaWMxTG94cnBH?= =?utf-8?B?eEJEdTc4UW9hRFdwM2dGVit5elkyMDRuMnAvZTJ3dnJ6eEl3enJuN0Y2OUZO?= =?utf-8?B?dE8xL2I5ZUhVOTFGQno4RXdXRmc2d3pYRXI4YjhKM3oxK01mOFlKWFY5Rlh3?= =?utf-8?B?S1ZZRnZiWEFRMFk0dGF0VjhMcmdDNjg4L1p2SXdzRDROMUVDSmdBUFJ5RGVK?= =?utf-8?B?c3dwZ1o4TmxqRG5nZDYvOHdFTkExejRoeGpJNlpOcTd0ZDQ4KzVBZ29pMDN6?= =?utf-8?B?dlVCQ25zTEovZVVaNnRaMENiZmw4MHhnbHBnN2JEWGpNbmxjRUdQdDkwdmRq?= =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nJsMU1nTS9mK1dsZitr?= =?utf-8?B?dVZSZjBzYlZCZnl2b1F4cUhYZ0J3cUErNnNwZ211V3NXYTBURDBLaVJOd3pp?= =?utf-8?B?Y1JKWVJmUXJ0d0h6cU1Pb2NEYkpYTnZEdkl2bHdIUE1vcnJ1cGxReE0wL0sy?= =?utf-8?B?NUowWFA2bk9NVUJhS2JEMExlQmhvK1VnQ3ZVTnZidEE4a01wMWJIRW52ZnQ3?= =?utf-8?B?OTJWai9uaTQ5Qlc5YlRVMVBMR1pOUzB0L0dKa0kyTlFMdERMSjJzREowZmtG?= =?utf-8?B?RmpFcXdEWU41ZDdlU3RldHN2bTVybldMWjhTbG1CSFJhZitkTElEWVZDZDEx?= =?utf-8?B?c1FzYU8xOFk1RkhFbTJubHh6Zkh5bC9LQ3RPQjgzeVZia1BVRkNrQXIyNGtS?= =?utf-8?B?N1RNQmcvWnBHREFtNUhRdWs1aUxvZ0NaVkNZU3UxclJlNWZYUGgwSHJlenk5?= =?utf-8?B?Zm93Q0NwTE9USnJkbzY1RC9oVjl3T3FyNHFsa0V5UHhFc2lXUEx1d2k3a2o2?= =?utf-8?B?MUlBVEgvUmdpOXYzNS8wUWFMcXdsa21JTUVnaENuNUdzV2JHRUNvOG5KQXN0?= =?utf-8?B?U1ZyRDhjSXVYMUJkNFEzWmcycVFGV1ZJREx1Y045bTNYQ2tRekVQdXlaOEVH?= =?utf-8?Q?1enYdlQxbHlQQKggiiz//G3fYf+deTAB?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL3PR11MB6508.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(1800799024)(7416014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?U0J0V2FjSll5T0thN0ppVWNXZGFOQ0NSMGwvb01wTm5hc1YyNFhGM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NG1WajVUREJPalN0KzZuZHEwZUtQN0JzR3ZKS2FU?= =?utf-8?B?QzM2OUx5NWtrZ0g5eWVRSlFKNm9zLzdaR1M5SHJERzFQKzhreXE5ckFMeGRH?= =?utf-8?B?M1Iya0ZHUmJPSHB2QlJXWWs3Q2pHVFZTaUdQWnJrY0Y1cWtYU0RFbGF4Mk5t?= =?utf-8?B?VXMrY2R0NkJJTm9aUTVma1QreGRWS2tRdnovRWhzbEFvVGg3aEVpUTFwUW1T?= =?utf-8?B?dktMalA5ZTZkNlMzZ0wrMVFDbkRMcVlkSURhWnZkc1ppM0REODdWZGpsRGFG?= =?utf-8?B?V0ZCUXZ6TFc0K25FVGp6V2JDc0RDRlB2WHhLQWsvN1paSmo2TEd4Zktqam5C?= =?utf-8?B?Unc9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 454d8b1e-5a97-4d7c-d891-08de0e11b528 X-MS-Exchange-CrossTenant-AuthSource: BL3PR11MB6508.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Oct 2025 06:43:55.1859 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: wdYheQs6TdopY72aE8Y7KfQxGwwCthtdB5mHGwydmwfgg7313Y8d+V2/CX8yYQWRx/tKoCdp6tnZATio0ruyaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB8396 X-OriginatorOrg: intel.com On Fri, Oct 17, 2025 at 10:37:46AM -0500, Rob Herring wrote: > On Thu, Oct 16, 2025 at 11:25:34PM -0700, Matthew Brost wrote: > > On Thu, Oct 16, 2025 at 04:06:05PM -0500, Rob Herring (Arm) wrote: > > > Add a driver for Arm Ethos-U65/U85 NPUs. The Ethos-U NPU has a > > > relatively simple interface with single command stream to describe > > > buffers, operation settings, and network operations. It supports up to 8 > > > memory regions (though no h/w bounds on a region). The Ethos NPUs > > > are designed to use an SRAM for scratch memory. Region 2 is reserved > > > for SRAM (like the downstream driver stack and compiler). Userspace > > > doesn't need access to the SRAM. > > Thanks for the review. > > [...] > > > > +static struct dma_fence *ethosu_job_run(struct drm_sched_job *sched_job) > > > +{ > > > + struct ethosu_job *job = to_ethosu_job(sched_job); > > > + struct ethosu_device *dev = job->dev; > > > + struct dma_fence *fence = NULL; > > > + int ret; > > > + > > > + if (unlikely(job->base.s_fence->finished.error)) > > > + return NULL; > > > + > > > + fence = ethosu_fence_create(dev); > > > > Another reclaim issue: ethosu_fence_create allocates memory using > > GFP_KERNEL. Since we're already in the DMA fence signaling path > > (reclaim), this can lead to a deadlock. > > > > Without too much thought, you likely want to move this allocation to > > ethosu_job_do_push, but before taking dev->sched_lock or calling > > drm_sched_job_arm. > > > > We really should fix the DRM scheduler work queue to be tainted with > > reclaim. If I recall correctly, we'd need to update the work queue > > layer. Let me look into that—I've seen this type of bug several times, > > and lockdep should be able to catch it. > > Likely the rocket driver suffers from the same issues... > I am not surprised by this statement. > > > > > + if (IS_ERR(fence)) > > > + return fence; > > > + > > > + if (job->done_fence) > > > + dma_fence_put(job->done_fence); > > > + job->done_fence = dma_fence_get(fence); > > > + > > > + ret = pm_runtime_get_sync(dev->base.dev); > > > > I haven't looked at your PM design, but this generally looks quite > > dangerous with respect to reclaim. For example, if your PM resume paths > > allocate memory or take locks that allocate memory underneath, you're > > likely to run into issues. > > > > A better approach would be to attach a PM reference to your job upon > > creation and release it upon job destruction. That would be safer and > > save you headaches in the long run. > > Our PM is nothing more than clock enable/disable and register init. > > If the runtime PM API doesn't work and needs special driver wrappers, > then I'm inclined to just not use it and manage clocks directly (as > that's all it is doing). > Yes, then you’re probably fine. More complex drivers can do all sorts of things during a PM wake, which is why PM wakes should generally be the outermost layer. I still suggest, to future-proof your code, that you move the PM reference to an outer layer. > > > > This is what we do in Xe [1] [2]. > > > > Also, in general, this driver has been reviewed (RB’d), but it's not > > great that I spotted numerous issues within just five minutes. I suggest > > taking a step back and thoroughly evaluating everything this driver is > > doing. > > Well, if it is hard to get simple drivers right, then it's a problem > with the subsystem APIs IMO. > Yes, agreed. We should have assertions and lockdep annotations in place to catch driver-side misuses. This is the second driver I’ve randomly looked at over the past year that has broken DMA fencing and reclaim rules. I’ll take an action item to fix this in the DRM scheduler, but I’m afraid I’ll likely break multiple drivers in the process as misuess / lockdep will complain. Matt > Rob