From patchwork Tue Jun 16 15:35:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 188067 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp3775836ilo; Tue, 16 Jun 2020 08:59:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwRRdwC77gEx1OIBmbAVAafZtcYlMDQKDMt/68wYpO6phpETctTJlqQZEqltpjXwTaZmxu/ X-Received: by 2002:a50:b2a1:: with SMTP id p30mr3325211edd.199.1592323156548; Tue, 16 Jun 2020 08:59:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592323156; cv=none; d=google.com; s=arc-20160816; b=AR5Dr6WMUHvPBUR1oxzgaZiSzhZ8ZPBjWkgwk7inxFC6gDEyKz2XcKkaYtB0MpeTXQ APRHZCKhnYxzaPZhjhe2ZNKOSf3vd2VdaRr+xX20HT+1PxM124memm56+qkvb6QWHvHo xw2RxxfgCZzMISIUlLVC1msNrA/che8dqbVgySeY39W9J5uDQNS8lyCstslQ99snyxz6 iMmzXcCsngLgcE7pvUIX95Kj8RGe/LlX6f8j7D4WLdHQFYLy8t4cpDBi8Ks0uPwDrkS8 QsHyTr9QudPzMnjB+LlUX1a1v7RqCe6JbUR95Va7p706A28Y10V3FNdqjHut1l1JvHfZ KbDw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=okYIxKjRsn+lLDslKJO9m9WVDablIiEIabeCNAJcpe0=; b=PCnPye9iSIgPh5phBouh+BrzJOQMXnHiCFMExI74nL/819LWQ1b97dY66Dkif+R66c Mt7faM9TXQmDVoWCrLhByUwkuUfZB65qoDtuGlXaGBpFWzZQ7H+iDJXq09AWafM4QUvG WKrMuaAHlt7dz01x71kkd8zy5DsMGe8Jl25phM6CK+I4JpyDSo73CW3Ztpq7GLEMy/k4 C469cC/x8ndqM2Nro9mni1y9x01NfxIRS5vMUzbmoU/oqBHtUdCrWLdCCGKUMtI8/+xB Q+AmZTBkRGUDHPmQab8OyVi0ERE5E+JHspHTXvxj83TAtIZ9nrnE018FaFz8z6if+Vug RP/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ReFib/ry"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b8si10573631edr.398.2020.06.16.08.59.16; Tue, 16 Jun 2020 08:59:16 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="ReFib/ry"; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731485AbgFPP7P (ORCPT + 15 others); Tue, 16 Jun 2020 11:59:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:52378 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731326AbgFPPxs (ORCPT ); Tue, 16 Jun 2020 11:53:48 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 10008208D5; Tue, 16 Jun 2020 15:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592322828; bh=jPK7r6XngKm+9s3k8RkKbP+GQdmiG3cPPA1jpmH2QwM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ReFib/ryGVGrpzGnwdecTVP4vx0ei3P/IUAfywBFw6/QGknwHq8WwtR4HOOgkpjtV sitXxewYR0TM8sqAp/vEZ7+fFZhvOQSjj99Qqpcg3hvbcCyMc57q6tdyuM0kYfd4l8 qxdZOXaBH123ZN88yZ/vq2GsiPYVTemaCtg/sUQ4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Suman Anna , Mathieu Poirier , Arnaud Pouliquen , Bjorn Andersson Subject: [PATCH 5.6 119/161] remoteproc: Fix and restore the parenting hierarchy for vdev Date: Tue, 16 Jun 2020 17:35:09 +0200 Message-Id: <20200616153112.025804793@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200616153106.402291280@linuxfoundation.org> References: <20200616153106.402291280@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Suman Anna commit c774ad010873bb89dcc0cdcb1e96aef6664d8caf upstream. 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). Cc: stable@vger.kernel.org Fixes: 086d08725d34 ("remoteproc: create vdev subdevice with specific dma memory pool") Signed-off-by: Suman Anna Reviewed-by: Mathieu Poirier Acked-by: Arnaud Pouliquen Link: https://lore.kernel.org/r/20200420160600.10467-3-s-anna@ti.com Signed-off-by: Bjorn Andersson Signed-off-by: Greg Kroah-Hartman --- drivers/remoteproc/remoteproc_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -510,7 +510,7 @@ static int rproc_handle_vdev(struct rpro /* 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);