From patchwork Tue Nov 5 00:47:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: anish kumar X-Patchwork-Id: 13862226 Received: from mail-oi1-f175.google.com (mail-oi1-f175.google.com [209.85.167.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 B6336182C5; Tue, 5 Nov 2024 00:47:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730767681; cv=none; b=olEK27ZpqqJt01CmrSSF2o/ig1mJFI9hDScukyJH6TLrxkjWKR9ZATRbpUgpsrLJUHLCiCc1k5WGoHLKDCxtrmrd4tflGT+U/nXPO6CQ6C7DjY+3TuuWUu06m6Y6z5Jh4DmBb66RlWOmL6SA/o2DjnC0nFSIXEacRSnXxfR0E0w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730767681; c=relaxed/simple; bh=uVhGRI+i5I4igu+9rTGQnM/4QlKhCZQJX+qGW6NeK2U=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Kq+fCAyei4QdBGCbnbu3s7TyLUeqxPEBpdR5lAJK8q3kBqtkrK9utgyKfpD+BVAuvPCcpb3ap+MLjSjipSVVshGMyHBE0EqhQyrK+T//g9AhwV6Bdd7Uidfk5JtBmLXcHg2C2IHQitv/9HhVJBS3Y+OVWOD7XrKLlQjr9wHIejY= 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=griiRZ+b; arc=none smtp.client-ip=209.85.167.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="griiRZ+b" Received: by mail-oi1-f175.google.com with SMTP id 5614622812f47-3e604425aa0so2638674b6e.0; Mon, 04 Nov 2024 16:47:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730767679; x=1731372479; 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=griiRZ+bYw16UF5JN0ZC5Kouz/6k6lg2Mw3bA5MWN749IXRisbaplsUJuMIhkThSaV httId5lO/Haq060j40IXUnm9X9F+/TNJUj8tIWTvj5Etek27rEjH3xKpECIgfcBC29yp u3BJ+EMfzyhQWZm5AYbc3VtfVY/OLjjTgb9HULyLvDwDJuYJDprJjBh4ZZhW0Oot3PMf n8n1pxbU/Jo6R4xFuP5DnsEvzliF0S+afHq5TfEDGlLsTEKkY1dc3CshPNNeBbLqCeFE JRoH9XB+ihemLGK0qkRTO0InazEU/XaHbJwiK3j1BZ9ornnc/bAt6sgi1N90gYaYw3bf Xlug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730767679; x=1731372479; 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=vUglnsC2uJKm1xGGFW/9aLIC+mKqSx9mnxQsi6dmRNG9FERF4n+2/qY1Zf7U+W+7bq m48/OWpmDYDfabEoK7vlCv/KdPdAsqbfaDCfpDUWDknsASS2StHWX2+JtRkJgw1eHwqf 4Ots8qnvwLdZKOGuEDEv8+xF3+m6nu6ueO8cotQZuXh0DuRRZHTdK4miJ0lU+qMWcq67 PhsjT8lVSaY7f97dwGASJFQWQSGQsGqfNWEk66rb9ILbI0KYOv9LBCxytzHEgt++rrvh sZf8iBhQClz6eDXycUxo+BoSWQPwDTxeNX5UAdZITVf5pANgl82LjebISX1Pmpx4ijm8 WbYg== X-Forwarded-Encrypted: i=1; AJvYcCVQr/cvj5vvrY8L6O5uF9UD4s8N+wYZnm7+DbBo6oJ9z5EilFWLljBFtBJrR4Us+RbblZ6pQMzLDUE=@vger.kernel.org, AJvYcCVUkEJoD1aFA8SMrpdV/ubRZKMXR40kFk2zw7GaMSLdCb65vjVD3jUp1TI2epBfCzXKLHNRWfzmFj+HSJJ0b7Za8A==@vger.kernel.org X-Gm-Message-State: AOJu0YyYDZJzJPGHum6Ui4bLk2rfDPqYT/aOYfczWrwu855ygVbjBshp hlDeuoZZCR0k73jI9hedmfN7Ji05I6pnYUXYEHpGGZuLrFTJJG2R X-Google-Smtp-Source: AGHT+IHLBw5PGHmqItDQoY4R7LjhSOcCTKyOPpaDANw6t9aZOxUK2Oube+fsSxE6vBlO1JDCJZTW8w== X-Received: by 2002:a05:6808:14c2:b0:3e6:4f5b:afd1 with SMTP id 5614622812f47-3e64f5bb238mr23114625b6e.6.1730767678781; Mon, 04 Nov 2024 16:47:58 -0800 (PST) Received: from anishs-Air.attlocal.net ([2600:1700:3bdc:8c10:d414:4f86:7740:65e1]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3e661190d07sm2317994b6e.11.2024.11.04.16.47.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Nov 2024 16:47:58 -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: [PATCH 1/3] Documentation: remoteproc: update introduction section Date: Mon, 4 Nov 2024 16:47:47 -0800 Message-Id: <20241105004749.83424-2-yesanishhere@gmail.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20241105004749.83424-1-yesanishhere@gmail.com> References: <20241105004749.83424-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 Tue Nov 5 00:47:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: anish kumar X-Patchwork-Id: 13862227 Received: from mail-oi1-f177.google.com (mail-oi1-f177.google.com [209.85.167.177]) (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 1BDCB20B20; Tue, 5 Nov 2024 00:48:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730767685; cv=none; b=gS2tcEVSFHu1YDAayLVR+9Up3f6NMs5Jv40aX9uDRfzxUO/Ym4bm4UBvdbtC3lMCGQQaraSiU0LF+I4kDLbvm8eXgUbq1lTFE7yvz99tRjsCOpQoRXwAgr8NVCZf0vxRhGkJaARdgoLF4UaBa6GlX11J7A2edSqbLEj+laaxb/8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730767685; c=relaxed/simple; bh=XRfi1H+SGAifDgT93Oh4LmBcUduLwdRaBm63B4FjTPk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=SwPq21u9F9LKiFmCdA6YvmlaUgjQP6pngyfgbqojrIxwcORWHI1jvTaGoQYg68mANzH4eeMFpqEG7zpuTUidoD/u6ttDt/xz5WEIRlJdcLeMwLF5O0hl92tObJHU5ufwz+EseIxE0lppTGDj0OJG7RoTMorIoeB4ehlHceONXww= 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=ncgMTOEi; arc=none smtp.client-ip=209.85.167.177 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="ncgMTOEi" Received: by mail-oi1-f177.google.com with SMTP id 5614622812f47-3e60966297fso2449793b6e.1; Mon, 04 Nov 2024 16:48:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730767683; x=1731372483; 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=ncgMTOEi+4d+T6llBi8HsFdz69WMWYgGZOsVd6YSoikBaifk3PcDTpujJ1TorYkwBh FqXJBt0U5Ixw6N4J82tOdO5jq1NAi897f0pPpMrRBAgMGz4vmFGGl1ht6lpbQuciZoKg /kTOI+YkIf4DJM2gFi7mBZSkWJ28/KUPOHl24kf/oFGX/kqFWh0d99G4ZtTT1fI0FXfL E1sw5nL/68sjGHO51HRc/BlXJMKjZM6TSUd1mDcJ4pCQBN7M86qLk/yqgGv+RQII/pdf +gMSGI09zfIN9uiM2ZmI4z3bzXpqD7pBtl853oeSCamiyBl9tkef7SG8jGqXC1CYWBfl G3pg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730767683; x=1731372483; 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=k20D7MRjLEupY6q+Zd89Ul1Gu/7XtzUKJQo1Y2XxFByezWW4q+p8lGP0Shw3EP15bN D1CORd2X8gdbV4SFiFcBa/pf4AYui+KzSGab7m0D21wnG0zDxgKLg+0Vvr60Ou7eLUJG sFfEPfdsD9k1qdq7BS5dNE0t43uXLDHdoa6/RUNMbTthHtGXr5wklrm475d1Iz1haZdz 1x8k9y/FmFDQPLP1rXQuadSs3mutaz9dDzSOf81f4AvQf1i3+DPmayByDkvZrOwVJ/jr ys3AH4CvMaRd3+J3QaauW9ztr6s6Coy7i7ZOoK4at2AgJIe3fLE9qn6OyNaN7tkcvypW dk+g== X-Forwarded-Encrypted: i=1; AJvYcCVjJxyhv7LZ4gmUaPZeCyvtWe9MVV7pLqwXM9bVfI7kDfwqeRo5ASB3LVlXFztfVm3ok+HwoKuonuwXmGkhfr9mQw==@vger.kernel.org, AJvYcCX7SfgEE45FTE7OfNPzemp3xLeMwayrdsivZXqZC7lT10JBkyh+BmZGCsvJGw9oVTIirGz5Ogk271E=@vger.kernel.org X-Gm-Message-State: AOJu0YwAhInF06IiweSiuKrQva6DjPmiv9sG+PkB5fL6zwiKibCLy2Hc ZsBfCoG9DDicVlOjKoPVKjpnwrOwAbuQUF4hF+lj0f3jgh2vf110m7s01dBQYpI= X-Google-Smtp-Source: AGHT+IHaB6ViN4QHdzLFqmTOTFKSMiMiZtRTOSRTRG9TEbA3KF71yyDWqGQxkN0wUL7cKGTqlA8xww== X-Received: by 2002:a05:6808:1595:b0:3e6:27f1:d756 with SMTP id 5614622812f47-3e758c40173mr10838931b6e.2.1730767683069; Mon, 04 Nov 2024 16:48:03 -0800 (PST) Received: from anishs-Air.attlocal.net ([2600:1700:3bdc:8c10:d414:4f86:7740:65e1]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3e661190d07sm2317994b6e.11.2024.11.04.16.47.59 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Nov 2024 16:48:01 -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: [PATCH 2/3] Documentation: remoteproc: add overview section Date: Mon, 4 Nov 2024 16:47:48 -0800 Message-Id: <20241105004749.83424-3-yesanishhere@gmail.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20241105004749.83424-1-yesanishhere@gmail.com> References: <20241105004749.83424-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 Tue Nov 5 00:47:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: anish kumar X-Patchwork-Id: 13862228 Received: from mail-oi1-f171.google.com (mail-oi1-f171.google.com [209.85.167.171]) (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 0945E2868B; Tue, 5 Nov 2024 00:48:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730767689; cv=none; b=KOuFpVZxARSMaEBBcLuWySUhjHpXY0qSZNvGSOWcfiV5x0WjxjCv1JSaLbJ+fmRh599Qd6pQdxRWcz2Z1smZL5lhRv85qyrrcFQdZbIMAk+A+yTbeexOnR6x8xr8hPj3AeD1SbD4Atq8A9EwuL/aLcAe3AjHnfeLC0HzINQahf8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730767689; c=relaxed/simple; bh=q/I54BCN7FOH7agzrRrVPUjzTgm2RIcPaI9LKCRWP5s=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oIoexRzJrjcUFQLWbgGyxzZFOA8cCJQXb5FwThc8r7GyuoIZ30zFrYqMbPwPoo1uXcFGCHFv3wz63vvhJgcb6zx3JanxSQyEXvREG3C+vVRE2H7shMs6x4b7Hmn7sBxdb9xVpsU8HZh2mjRwV5+neti1iT6qe8ABaYwmXldgvKk= 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=VZ3vKAAD; arc=none smtp.client-ip=209.85.167.171 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="VZ3vKAAD" Received: by mail-oi1-f171.google.com with SMTP id 5614622812f47-3e6105886dfso2877820b6e.0; Mon, 04 Nov 2024 16:48:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730767687; x=1731372487; 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=VZ3vKAAD765AiJ84voIM9I34CoRng2kOuU/a7qA+xdwkoseGa4lQMo5zJH98TpnYRd 0YQA1TD4oHjSKCNCM0LWdMy2zPGg+XvMzKcsk6xHM2S0R2aIKhtkkoDrNOabj6Il8Cjw CJ1Qebxt/AHnd3c5V00A++dz/3nKkoHvAHyuED2MtCnhFcILzSS3jRq5Ux+rH7WruDy/ 4mrBoYC9QzKhLc7chN57doBpUUrb2bBYjaLcbIKLaBsJX1hhqziC6grHXCMGpiiADCGv IEQ5YfFgOVgIS3G4IRd8+6DA3VsHpTCpTuIIqz9PJS/PeJZXaZDhN2B2Gd5two/pNy1C fHEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730767687; x=1731372487; 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=Y0FagJQYd6mLIl1NtR3yNCJ111JkLuOdl1Nn2Q5FqjP7W2IBcpaMflBmKRYS02UyOx wQ7zv8YuVUHB3E1jDBxxtCh2hoI0dcgAL9KOlxiMyAxVhO8PXNKMNUQlbp8OfKvGleKq mYk8AntotNv/n36cqWxfOuXqiMwj8KO4rJUFVZrT7t4ndzNHimBEL/QNC1cNMa5wvCuG Oyaz1Nc1SMa/4HrHH6rHrIoOlnvbV7Bo0Uj7U5ATMai0uyg2p/kFo6WdcqFVMXfv8EDW TEMCQwn9kmwKesTEXEi7UgGRSD/qtDl2okpoLEXI+BiOvHoHFSRieO0YRPAhW0yO/l8A 402g== X-Forwarded-Encrypted: i=1; AJvYcCU5YQ9G0292M3Y5Php7JvpZ5yTK8/lMCKAUUtsnjvMC9dWH3R+Ysi9sT8oGKz/DCxs7w4N3NAuwvab7cuqC3fLwrQ==@vger.kernel.org, AJvYcCXwAuTM3HQXyZUYSGoIztnTHAhqDDkFwgz81Mz89/yxkseOuzxDG6A0RFt0KZ6d+D1C0xUSlI63d8k=@vger.kernel.org X-Gm-Message-State: AOJu0YzIEGQM++r3HTaY2BF2Bs+VW8dnHG+bB8bDf+SiIXwavZteTAV9 ZIpFhttZxIj19/l9CmdHYX4lENUmof0TFcP0fyNSaU1NItbkeOfT X-Google-Smtp-Source: AGHT+IF1k9cPVBQXV2vIuKk4ABDveD4Y3gCJ2K5GjcYjMlhsmx2nEJJBH4u+5VDn0/ag7gkTr223CA== X-Received: by 2002:a05:6808:1892:b0:3e6:59b1:8acd with SMTP id 5614622812f47-3e74c3d97f6mr7729940b6e.15.1730767687024; Mon, 04 Nov 2024 16:48:07 -0800 (PST) Received: from anishs-Air.attlocal.net ([2600:1700:3bdc:8c10:d414:4f86:7740:65e1]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3e661190d07sm2317994b6e.11.2024.11.04.16.48.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 04 Nov 2024 16:48:05 -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: [PATCH 3/3] Documentation: remoteproc: add a note to rproc_add Date: Mon, 4 Nov 2024 16:47:49 -0800 Message-Id: <20241105004749.83424-4-yesanishhere@gmail.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20241105004749.83424-1-yesanishhere@gmail.com> References: <20241105004749.83424-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)