Received: by 2002:a25:d783:0:0:0:0:0 with SMTP id o125csp827379ybg; Thu, 19 Mar 2020 09:25:59 -0700 (PDT) X-Google-Smtp-Source: ADFU+vt968tvZp9oXcnn+PvKb5kYb+o4OJIHkj6wvj8rcsZYL+1+M4QwpZZnjxFf+55a9k9iuSdp X-Received: by 2002:aca:f585:: with SMTP id t127mr3035104oih.38.1584635159714; Thu, 19 Mar 2020 09:25:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584635159; cv=none; d=google.com; s=arc-20160816; b=CVWkuYR6Iy/48e/rg2xSIfZ6W4+iDTlu029EOJPzn+qMRX0uvc4j8ctplDUxnL4Ngh 0mTcuilZiu0aVrCKKMiGdXZYBZGvOtd935epCZCwMIiT7LFS2xf8bUWCLwc6lJBeVNUP tfpVEOlqmaTVSxUyi4/5gXViG7GUyuVH3LI/tvU7iakAeuJRmJkDfLvvh9E6OzQJefOc lld5QcgaiLjxHNMcobBjm9pgC59JSWpVwX5EDjN35gmqi4jU7PDh0FMPeA3/h9y/934U ytC60znW6/ioRo4862RbdzuvuRb6qvAyHSEGYV9+xJxTvlDEHNFSbF/H8XQvGonjpG26 DQlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=InLyviOkfFOPkDrw3fsPx+IycNhWr/qvF9UvPT91rPQ=; b=WGkYf9ivf2+2WM+BqAGmiGa2XGmSGKtsuUsqRTo/PYcjM+oAEP+rb8r4PuSB3OA0gd R61oSMwd4iVMnzO0d1Ub0eRvnMUq47baFReZ0qNM6254uRt79OpWEY5uxVZrvoQx5pFT 3mUsrLq/G760g7l9vsJCw/nMYoB1GEx5KxIuQBhSOjq5eh+qRKD5Mw4x/jHOURf4FEIE 3EWRz093uY7SfwRMZqs/AhYtr+zSwN+SsjG/8lOb00yWIYENU0bUdQM5VdwOLf2WkwM2 MJROZ1Ho65XzkU3GRNJpoboWB1eiJfn6q5Dg8ULDul8KZrRqO5j/ubJlf2v6uHOVHSxU CWqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=UWKk46eV; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 53si1397926otd.15.2020.03.19.09.25.43; Thu, 19 Mar 2020 09:25:59 -0700 (PDT) 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=@ti.com header.s=ti-com-17Q1 header.b=UWKk46eV; 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=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727935AbgCSQXd (ORCPT + 99 others); Thu, 19 Mar 2020 12:23:33 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:39032 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727399AbgCSQXb (ORCPT ); Thu, 19 Mar 2020 12:23:31 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 02JGNRSY087050; Thu, 19 Mar 2020 11:23:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1584635007; bh=InLyviOkfFOPkDrw3fsPx+IycNhWr/qvF9UvPT91rPQ=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=UWKk46eVJesUFUnliJecoZN01llOhTN+aRKM3g76mu04W7PPR/KuPD4aiszhfEPEk AMU9Qw6+/8lpVNXO9w7x2oIPQabg/4uGF4grRSD/FDtEB/Ds+RPNEXsNVLenczBZEk T4cEoTvgrRA9Kj+5buRnF78J+VpiUILfgh39ss3E= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 02JGNR5v096819 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 19 Mar 2020 11:23:27 -0500 Received: from DFLE112.ent.ti.com (10.64.6.33) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 19 Mar 2020 11:23:27 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE112.ent.ti.com (10.64.6.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 19 Mar 2020 11:23:27 -0500 Received: from lelv0597.itg.ti.com (lelv0597.itg.ti.com [10.181.64.32]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 02JGNR8w100125; Thu, 19 Mar 2020 11:23:27 -0500 Received: from localhost ([10.250.86.212]) by lelv0597.itg.ti.com (8.14.7/8.14.7) with ESMTP id 02JGNQrH066554; Thu, 19 Mar 2020 11:23:26 -0500 From: Suman Anna To: Bjorn Andersson , Loic Pallardy CC: Mathieu Poirier , Arnaud Pouliquen , Tero Kristo , , , Suman Anna Subject: [PATCH v2 2/2] remoteproc: Fix and restore the parenting hierarchy for vdev Date: Thu, 19 Mar 2020 11:23:21 -0500 Message-ID: <20200319162321.20632-3-s-anna@ti.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20200319162321.20632-1-s-anna@ti.com> References: <20200319162321.20632-1-s-anna@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The commit 086d08725d34 ("remoteproc: create vdev subdevice with specific dma memory pool") has introduced a new vdev subdevice for each vdev declared in the firmware resource table and made it as the parent for the created virtio rpmsg devices instead of the previous remoteproc device. This changed the overall parenting hierarchy for the rpmsg devices, which were children of virtio devices, and does not allow the corresponding rpmsg drivers to retrieve the parent rproc device through the rproc_get_by_child() API. Fix this by restoring the remoteproc device as the parent. The new vdev subdevice can continue to inherit the DMA attributes from the remoteproc's parent device (actual platform device). Fixes: 086d08725d34 ("remoteproc: create vdev subdevice with specific dma memory pool") Signed-off-by: Suman Anna Reviewed-by: Mathieu Poirier Acked-by: Arnaud Pouliquen --- v2: No code changes, picked up review tags v1: https://patchwork.kernel.org/patch/11422725/ drivers/remoteproc/remoteproc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index a9ac1d01e09b..0962855f27fc 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -514,7 +514,7 @@ static int rproc_handle_vdev(struct rproc *rproc, struct fw_rsc_vdev *rsc, /* Initialise vdev subdevice */ snprintf(name, sizeof(name), "vdev%dbuffer", rvdev->index); - rvdev->dev.parent = rproc->dev.parent; + rvdev->dev.parent = &rproc->dev; rvdev->dev.dma_pfn_offset = rproc->dev.parent->dma_pfn_offset; rvdev->dev.release = rproc_rvdev_release; dev_set_name(&rvdev->dev, "%s#%s", dev_name(rvdev->dev.parent), name); -- 2.23.0