From patchwork Wed Nov 6 05:10:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: anish kumar X-Patchwork-Id: 13863899 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A588191494; Wed, 6 Nov 2024 05:10:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730869826; cv=none; b=Nuo8+l9GgHfN9n+pdAUzn23nsJVsJ7jtITn3oFMaEsHqFWWbXa9vN9bKgN/KxN9crRidHFsSfrGb9ACLJB2ffAt758TEZm5AzFs3LQEjdYpTStvdgxyGPDvKCH+auntHfvr9bhK7BPzPDxt5qufO5E6QN3vNS3YZ6WZEQj3N4BE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730869826; c=relaxed/simple; bh=uVhGRI+i5I4igu+9rTGQnM/4QlKhCZQJX+qGW6NeK2U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lCmqpLDY2FVbQ9JVBK8yu22XcOtQr/kp4FfLYJqJlGOBnlxHdSrwCd5tqYD5E+wuJZZv4YCSmEz+FaafHCkJ9KUTKcnXT2oHlf4bkrfJwbZ4QbMQeFX6IEhxpLODeRlVhp0b29rSXI8Af9XvwqG74WEWOvYeMxzwGYBEDKj9n4w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KwAKrJi2; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KwAKrJi2" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-20c8c50fdd9so3504565ad.0; Tue, 05 Nov 2024 21:10:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730869825; x=1731474625; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MyDcOUxJGr8liC+ojBmJrjmCA3eFLmNZPnuaZfrVqY8=; b=KwAKrJi2QldKV529nkpCdjNffYQFHZTz2UCEIIfI4umKyldYzALzhwN0k1HygsevRJ ZDze3LFE7+eFzBF3Opy4pe6N1xP7+vkkXf15qsZG53tggtQ/0OCAtiR53SZkOHxqLkGX M7t0vcc/O2HakV4RmVL+EqNdzsQ9I85p6X9+Nmsy5fsSroTWNroQRzT7v+8RP4HTPqS3 JEbxZ5Mag2HgPtaSXIobPxF64mq2s9r7o+JzE6+n5fXl+czK2DDtXCgrgF8qB6MJCmg6 V2x0EiZY68TUoypMfNxnMpmkhAiYh9lWliy671ntt9ksNlNSa2DCiLIZz4gDorOHrPRO mOYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730869825; x=1731474625; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MyDcOUxJGr8liC+ojBmJrjmCA3eFLmNZPnuaZfrVqY8=; b=W4fTkXMYWwoXn9D9js3oG/DAKLXYBjxsFCrfw9c42Bx1d3JSY/qy4G6n+aWEC/erqJ /PxNs2IZQz+UbGZpnq2VhKQ9lVR8qJi2mYSTMYmvYtbcFjTY3fKzSrEFdoC5hktGKThX 7xyMdA4ERlw9BkTJRkpXqBg0Cx0vmsv4f52xyalwOc0FwPaIGtk8cEb3eOx/x5NxD7Az dX0IbtHctOb6cF19BDUtI5azMaZzc4xcolEOxU5Qi5jVPnzneXx9IUhkdDmhIpqe6tga JHZS6rsgQSYRd6A13ZyC8ZiNzjhFDhUV5R4fAzKTsTWM6zTnDJY448W+Gomgo+OSxh3j qM8w== X-Forwarded-Encrypted: i=1; AJvYcCVrBvIpx6f3aSGRV3VN9gK13Q9J8fRl1UvPW83L+dx4qDEPeuTYon2MdKV7JjkA4Kab5+YBttqeVAggkXJmRURwRg==@vger.kernel.org, AJvYcCXKiNfYwfZ4hI+d38h+npjD9wEOWAXLD3OTuFwcar8gef0YskvCSDmD2RtnWrlpFjLKt58ABy1HbTg=@vger.kernel.org X-Gm-Message-State: AOJu0YypfYM6ocjkymmKv20ZpPIyXR0f427fem++V/vGJ4UdCs+AJFDP Z/R1dnXpn+giDnMeAGbdnfgis2x+fmIHf+rxVQGtltorj5zZcc3X X-Google-Smtp-Source: AGHT+IE3YvjN8X4Yecy3f7wm5WAbZD0itj0NSKVcXGwbs88PqaG/iGQ5LzeZEwjAYWxgdYlHXADSOw== X-Received: by 2002:a17:902:c40b:b0:20c:7e99:3df2 with SMTP id d9443c01a7336-2116c9c8508mr22386415ad.23.1730869824605; Tue, 05 Nov 2024 21:10:24 -0800 (PST) Received: from anishs-Air.attlocal.net ([2600:1700:3bdc:8c10:f510:c8a3:8415:793d]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211057c0825sm86266055ad.207.2024.11.05.21.10.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 21:10:23 -0800 (PST) From: anish kumar To: andersson@kernel.org, mathieu.poirier@linaro.org, corbet@lwn.net Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-remoteproc@vger.kernel.org, anish kumar Subject: [RESEND PATCH V6 1/3] Documentation: remoteproc: update introduction section Date: Tue, 5 Nov 2024 21:10:14 -0800 Message-Id: <20241106051016.89113-2-yesanishhere@gmail.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20241106051016.89113-1-yesanishhere@gmail.com> References: <20241106051016.89113-1-yesanishhere@gmail.com> Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Update the intrduction section to add key components provided by remote processor framework. Signed-off-by: anish kumar --- Documentation/staging/remoteproc.rst | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/staging/remoteproc.rst b/Documentation/staging/remoteproc.rst index 348ee7e508ac..eeebbeca71de 100644 --- a/Documentation/staging/remoteproc.rst +++ b/Documentation/staging/remoteproc.rst @@ -29,6 +29,23 @@ remoteproc will add those devices. This makes it possible to reuse the existing virtio drivers with remote processor backends at a minimal development cost. +The primary purpose of the remoteproc framework is to download firmware +for remote processors and manage their lifecycle. The framework consists +of several key components: + +- **Character Driver**: Provides userspace access to control the remote + processor. +- **ELF Utility**: Offers functions for handling ELF files and managing + resources requested by the remote processor. +- **Remoteproc Core**: Manages firmware downloads and recovery actions + in case of a remote processor crash. +- **Coredump**: Provides facilities for coredumping and tracing from + the remote processor in the event of a crash. +- **Userspace Interaction**: Uses sysfs and debugfs to manage the + lifecycle and status of the remote processor. +- **Virtio Support**: Facilitates interaction with the virtio and + rpmsg bus. + User API ======== From patchwork Wed Nov 6 05:10:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: anish kumar X-Patchwork-Id: 13863900 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F1C40191F82; Wed, 6 Nov 2024 05:10:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730869829; cv=none; b=Neb9R2gjMt5egFKahNJl/FaFiYYiMCI0WPGTzBGVK4N0+nufzWv5p3uWt25AoqQ80jPuXELSU3+gYyCXD4aT8aodzH9jjNDSl3seDfiIJ2CcI70MhZPO75q6w1iNpIXHaIYLtv6m6bzIfE50OxUaofxLCn4GUc8Jpi/poNGABbk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730869829; c=relaxed/simple; bh=XRfi1H+SGAifDgT93Oh4LmBcUduLwdRaBm63B4FjTPk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oMvtzVz6rgt4+Z7Nyw6Xh1Ks3+yD/3Lt/00e5EyxUZ/op9H48DaKpsPEfqOdkcXnJrdZzwWwoIWzONawvwjGcbGKGp69NbbkZkdx5JmkSgvNXIN8ryQM+mOw/F7B9la7E5ThuRGg1PjL/M4BUnswTaFm02DL5lMtJHM3hJDePAE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=NJD9fF2j; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="NJD9fF2j" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-210e5369b7dso63158385ad.3; Tue, 05 Nov 2024 21:10:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730869826; x=1731474626; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hakWmbGF5t6yCZezGDPznhi3RDsUgyCp9RDv0MZMLAU=; b=NJD9fF2j7hRCMcXKwa5Tj1MeAAOLnO7tJgE0oJwaPsFEN2c/mnnSZQB+IQAQGVW6MJ 3+cHD5hmEV9aDxTrlKVsyDVrirAdjtWjYU4I6RKQuU4aOyffhHbudDDH7hcuBGMGggWr lSh4dA1deDwZp7DLHm889G+WsB/gt9Kuh+HJeD1lMC49nOhWBpaHapDzTAD1Ox4cbgun ollf9VirCcuLRVw4fSyfa/XzKa2YhTT+/zVUFvBuS3OsvULCXfLWq2RfMa4y2TKv8hl1 6CqJyb9wGSwQndHE8F67BqELGoovR4SkwskpCTd0wffkSImFr6TRRNcJmzlrTkOBzX5b nunw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730869826; x=1731474626; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hakWmbGF5t6yCZezGDPznhi3RDsUgyCp9RDv0MZMLAU=; b=Z9z96ZMfSKzOt5+NQrMZUhAhR+mBo+V9aeF+FPtZvZLEvZTnBXdQ+2w18tkWNxglER 73/KD14IMQy8NkTftCSVPl2/jlRQ9XexYujLUApXLWz7Hf4Qr+GBsTZ7UulDkoEpBC/b tCt/OcoBcnQNJoO08dP8cQtZD8aPH/cm3VAJggju0f52mOac8XubpcKdUMjRohiVqBd1 fbt8NAkZUsp4pO/5YkFYzomJP/JNExY6/d3r22mlMtnyEDJC3oFZiBuZRaFBbL0hauiQ EDO/j1Yy9lY+cbmtEPTlToSlaUaEff4JS/b5nQnovJGS/TyxpkGJUzZP07pA+Izpj1EJ bSKA== X-Forwarded-Encrypted: i=1; AJvYcCUN3NO4qxOrZmZBHoNJk7GQozYHq/C9B6KzFEwcAad2WAb6iPwRegIaK6YM/jLFiPBJio6KsIBa/RM=@vger.kernel.org, AJvYcCVukSykVBu3JX3Gxn14f2lohFtxei6+AVT+sKZ2rFXm9qaQVTjnXjJkv1s91oUnSXcaAsyL2807XQLprYxD2yDxvQ==@vger.kernel.org X-Gm-Message-State: AOJu0Ywz/mTXTUubTK4zAuw4wk80C6GDHON3Yq8tj6Oxzf4WKCIoyAQE KEw/T3cmAQZs1IQ9ncUOPGlSR+KID+ozDWeikY6dSbf8cfa5nf67 X-Google-Smtp-Source: AGHT+IE0ltik1+CPI5b1dk/B05Ru9LjtMOO0dIerIiRhuUzK5PfbS+uXLWNbFfLevDR7BKLKscjHrw== X-Received: by 2002:a17:903:1054:b0:20e:55b0:3609 with SMTP id d9443c01a7336-2111af17690mr190576985ad.8.1730869826138; Tue, 05 Nov 2024 21:10:26 -0800 (PST) Received: from anishs-Air.attlocal.net ([2600:1700:3bdc:8c10:f510:c8a3:8415:793d]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211057c0825sm86266055ad.207.2024.11.05.21.10.24 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 21:10:25 -0800 (PST) From: anish kumar To: andersson@kernel.org, mathieu.poirier@linaro.org, corbet@lwn.net Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-remoteproc@vger.kernel.org, anish kumar Subject: [RESEND PATCH V6 2/3] Documentation: remoteproc: add overview section Date: Tue, 5 Nov 2024 21:10:15 -0800 Message-Id: <20241106051016.89113-3-yesanishhere@gmail.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20241106051016.89113-1-yesanishhere@gmail.com> References: <20241106051016.89113-1-yesanishhere@gmail.com> Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Added overview section which details how the remote processor framework works and how it handles crashes. Signed-off-by: anish kumar --- Documentation/staging/remoteproc.rst | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/Documentation/staging/remoteproc.rst b/Documentation/staging/remoteproc.rst index eeebbeca71de..e0bf68ceade8 100644 --- a/Documentation/staging/remoteproc.rst +++ b/Documentation/staging/remoteproc.rst @@ -46,6 +46,49 @@ of several key components: - **Virtio Support**: Facilitates interaction with the virtio and rpmsg bus. +Overview +======== + +The framework begins by gathering information about the firmware file +to be downloaded through the request_firmware function. It supports +the ELF format and parses the firmware image to identify the physical +addresses that need to be populated from the corresponding ELF sections. +Once this information is obtained from the driver, the framework transfers +the data to the specified addresses and starts the remote processor, +along with subdevices. + +Dependent devices, referred to as `subdevices` within the framework, +are also managed post-registration by their respective drivers. +Subdevices can register themselves using `rproc_(add/remove)_subdev`. +Non-remoteproc drivers can use subdevices as a way to logically connect +to remote and get lifecycle notifications of the remote. + +The framework oversees the lifecycle of the remote and +provides the `rproc_report_crash` function, which the driver invokes +upon receiving a crash notification from the remote. The +notification method can differ based on the design of the remote +processor and its communication with the application processor. For +instance, if the remote is a DSP equipped with a watchdog, +unresponsive behavior triggers the watchdog, generating an interrupt +that routes to the application processor, allowing it to call +`rproc_report_crash` in the driver's interrupt context. + +During crash handling, the framework performs the following actions: + +a. Sends a request to stop the remote and any connected or + dependent subdevices. +b. Generates a coredump, dumping all `resources` requested by the + remote alongside relevant debugging information. Resources are + explained below. +c. Reloads the firmware and restarts the remote processor. + +If the `RPROC_FEAT_ATTACH_ON_RECOVERY` flag is set, the detach and +attach callbacks of the driver are invoked without reloading the +firmware. This is useful when the remote requires no +assistance for recovery, or when the application processor can restart +independently. After recovery, the application processor can reattach +to the remote. + User API ======== From patchwork Wed Nov 6 05:10:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: anish kumar X-Patchwork-Id: 13863901 Received: from mail-pg1-f178.google.com (mail-pg1-f178.google.com [209.85.215.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2CDB191F90; Wed, 6 Nov 2024 05:10:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.178 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730869830; cv=none; b=Wt2zqrPqaYFcxqiDimZOntWHnQeLj2/UQWeMlZLi9EZXHbqAddGtIDtF13Tq/LJXqj6KDdAzHRWDnBDAGdnXpcs9wpCRbHkfbJib3Qsa6SK9Ra7+WCitkvlQqQUhUplXoVjKfr4TYNlalAH5i2dD/TP8CZ8YwdkZJ8LvdZpPsOA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730869830; c=relaxed/simple; bh=q/I54BCN7FOH7agzrRrVPUjzTgm2RIcPaI9LKCRWP5s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=L2tAcvbhgKWsCKWPt56gO4/u983WjOzQ9HU6AmNEqkQ2TM95pHbl44IcDVRP+E9qHBCtpohX1Cf+TektyNC0y0spe9bHvssu8vJvUlyGakAPu95UrzbT3f4OwLkFbWPavZWIX9fJ2KUd4NtpqL8l6fE2X18XCQZi5ASTnMhf5To= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KEyX4ZL6; arc=none smtp.client-ip=209.85.215.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KEyX4ZL6" Received: by mail-pg1-f178.google.com with SMTP id 41be03b00d2f7-7ee6edc47abso2866004a12.3; Tue, 05 Nov 2024 21:10:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730869827; x=1731474627; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VMFHpngG6qydjgLEjOI9ZIqyN4Q1VIumJ5ShzygmB4U=; b=KEyX4ZL6hl9GruJ/PeYQ19y/DM67Q5G9AWq8NcRcVvzg/aG41TuLIF/FsqWt/PfG7s ecTe6iz9iOK08CaUhmsr6uRLEOYy7yEQVeaRAfUqp0TbZyAH6UKuhS06O29Y5Gp07iPr WDRK7TLkmK+dBM3Gm9t0kVNLgfTmdztKB53/J/0RFwlwFMlyeY1DLdu2F7ZnPyow0qc9 vbxDSDylZOiCA+BarEB28ZRum1CfPclEpFN9s+LK9Kf1SqrKUAD+yPE6N7PGIeoVUM0H aEQO8ikoGMeaaINHZVmIBn4K+zX5iLniCnn7jaBw5jjQuZpiUnQYLuEPVhGua8bbrhrR 8FOw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730869827; x=1731474627; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VMFHpngG6qydjgLEjOI9ZIqyN4Q1VIumJ5ShzygmB4U=; b=fY0bWJt5bSuZe/FNUnXIteIv8P0H4E/XD66zOTCO6uBHqRpmKfk3bFnQGvF7oAZPb8 YEMZ4aBFKyq0K59qvPDjN210k1mc0q3vMP3n8eur7OVAFPPphhhBXN64PlVUm+azcWU2 43/5nvmIgpkQsjvMgfmK+6Ujt/Dlq/HZEjf9jygvhZchQluEYKR7PAmh41WxSPtu6R8U 6B9pciCzYBGGEZ/Ta2zYMuI7QhqW9EhLcV49X8pdWmQUeJJmPv9HxU1blWMIyHvYM7sm a6YxTHHvmST+Fr/Lus0k2gHo9ZS2iH6/oon/4ppKoF51Bx2sJjqrUPN4zX+fKUZH1tbf O+Yg== X-Forwarded-Encrypted: i=1; AJvYcCUCWh8HZ3bRAjhyV2lzlQRXlWuhk8OAxD/WgCkYf55IXIx7I94jsUlQsHTCLqh2V/52QeQXOaAftkGDpQVyiYfJDQ==@vger.kernel.org, AJvYcCUkCIt7PYQOPLPkO5U9UL2lAE6zdhi6D3ZppkqRAPLAxdRYDhOyhysdskL7wQngo/oMePDgoJkebng=@vger.kernel.org X-Gm-Message-State: AOJu0YxgD3pH3aHYvCz0IvaBoSzqBpCwlPkiRXtnqFc8SY2dWFWqksTG u4Vl+KMPDttFmsx88gRaXGUAFYUv4+1AD0Qnkm9cUo3aGkZ/y3RVHzGgdSVlZWo= X-Google-Smtp-Source: AGHT+IEZ07a8H44IIRS0lbR/0kzezpmGgNlibU1Spe1n9ePml2XXK+Hlz4wBUSgEGvciRY+2uTRx0w== X-Received: by 2002:a05:6a20:2512:b0:1d9:18b7:496 with SMTP id adf61e73a8af0-1dba56234b8mr20054456637.45.1730869827580; Tue, 05 Nov 2024 21:10:27 -0800 (PST) Received: from anishs-Air.attlocal.net ([2600:1700:3bdc:8c10:f510:c8a3:8415:793d]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211057c0825sm86266055ad.207.2024.11.05.21.10.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 05 Nov 2024 21:10:27 -0800 (PST) From: anish kumar To: andersson@kernel.org, mathieu.poirier@linaro.org, corbet@lwn.net Cc: linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-remoteproc@vger.kernel.org, anish kumar Subject: [RESEND PATCH V6 3/3] Documentation: remoteproc: add a note to rproc_add Date: Tue, 5 Nov 2024 21:10:16 -0800 Message-Id: <20241106051016.89113-4-yesanishhere@gmail.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20241106051016.89113-1-yesanishhere@gmail.com> References: <20241106051016.89113-1-yesanishhere@gmail.com> Precedence: bulk X-Mailing-List: linux-remoteproc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Added a note to the rproc_add description regarding the availability of the resource-managed variant of the API. Signed-off-by: anish kumar --- Documentation/staging/remoteproc.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/staging/remoteproc.rst b/Documentation/staging/remoteproc.rst index e0bf68ceade8..658ef7a28dd2 100644 --- a/Documentation/staging/remoteproc.rst +++ b/Documentation/staging/remoteproc.rst @@ -223,6 +223,14 @@ If found, those virtio devices will be created and added, so as a result of registering this remote processor, additional virtio drivers might get probed. +.. note:: + + there is a resource managed version of this api called devm_rproc_add. + Most of the times, you should use that unless you need to explicitly + control the rproc registration with the core. If you are using devm + variant of this api, then rproc_del will automatically get called when + driver is unloaded. + :: int rproc_del(struct rproc *rproc)