Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp6169764ybf; Thu, 5 Mar 2020 14:41:50 -0800 (PST) X-Google-Smtp-Source: ADFU+vvJROEyP2ZY9Ttvb+cmGxEdBV9Oq4V5f1/FuA3FhBFgJRapSUEHvUYv2bm2jxdSY+isyBof X-Received: by 2002:a9d:84f:: with SMTP id 73mr116480oty.289.1583448110403; Thu, 05 Mar 2020 14:41:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583448110; cv=none; d=google.com; s=arc-20160816; b=jyzUFSuQDwPntIfkxIeZRdRs0GhQl9DRMHOkhn+G0CehMKNEXSAYz/w6FrgStnzgtD 575nFHlMEi4DfFzdLfwG7GplArpBhgRxYln1zDeowqapBAATrlEBfT48cdRxMLD708FH HK9NSJGbEj9l10Zx4KY6xYW1k34/DIvO8JT0pVb6fwRtrA2S2n2qxbjbIH+y8+TJQk4t O3ApjlPz639yhV5fqaf7QXcX32rG75Z9K1XMgxSeCSYNISwG9lAK7ECprENSTP1nxDii O1D9qwV4LBR0pmF3kkPHLGvC2he5DfizmxPmuQM7iS0fwtDKhInYrtLKfvXBOtbKSyU3 UehA== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=KDMH0YFU9Mx31kpchhyUnkDoDR5x283mB093t2Sod8o=; b=m/gwqOf9WMwrpgZKrLS2Ph3xh1EJ+uHhJ3ASFg6gj7yq4GI+TG5KoZA1osCOneJwmL FzEy956iMyBAkaUzlDGqFrnGv7urAQETJBDiqUZ+Acg09kqLI4G5qtpdtTCtxnUudmzU hkVVbF6uwBOugNFbSbvIzUWVQn17PvAmbe6cLfndDnjpfXisjWtAEdhX3gEzp8GvggHh oSuyW9yid8H0hB8XH80idnLg/LTvExEix7y+em/dnuryGXinagr9IN6zFwbbBeC72VxR WooFPJmdZujcUUyw5khTBbwqsXsBIN8fc1q80gvCWF6mfSz1ILTA2R3cKTVyhA9V3i6k iOqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=KFh3bUVO; 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 p6si201826otk.11.2020.03.05.14.41.36; Thu, 05 Mar 2020 14:41:50 -0800 (PST) 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=KFh3bUVO; 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 S1726300AbgCEWlU (ORCPT + 99 others); Thu, 5 Mar 2020 17:41:20 -0500 Received: from lelv0143.ext.ti.com ([198.47.23.248]:52232 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726128AbgCEWlU (ORCPT ); Thu, 5 Mar 2020 17:41:20 -0500 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 025MfEWG110314; Thu, 5 Mar 2020 16:41:14 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1583448074; bh=KDMH0YFU9Mx31kpchhyUnkDoDR5x283mB093t2Sod8o=; h=From:To:CC:Subject:Date; b=KFh3bUVOqdZG7qKNtpU2rtvAAL8f+hwfsrusUIb6AISUzF7Z9GteAZ1isFJ8e637e Aq22hcnPqm95X95FFJ+L06+DUEfoVjhp6W2VgdTlr02aH/7x2ivPELLN5pJ+BaZmiZ 1+uKQfWJNIQZZH2WN44LMtmfM0L7zQhnH6orW/04= Received: from DLEE104.ent.ti.com (dlee104.ent.ti.com [157.170.170.34]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id 025MfEFk115081; Thu, 5 Mar 2020 16:41:14 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 5 Mar 2020 16:41:14 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE113.ent.ti.com (157.170.170.24) 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, 5 Mar 2020 16:41:14 -0600 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 025MfENq077913; Thu, 5 Mar 2020 16:41:14 -0600 Received: from localhost (irmo.dhcp.ti.com [128.247.81.254]) by lelv0597.itg.ti.com (8.14.7/8.14.7) with ESMTP id 025MfEo2098943; Thu, 5 Mar 2020 16:41:14 -0600 From: Suman Anna To: Bjorn Andersson , Loic Pallardy CC: Mathieu Poirier , Arnaud Pouliquen , Tero Kristo , , , Suman Anna Subject: [PATCH 0/2] Misc. rproc fixes around fixed memory region support Date: Thu, 5 Mar 2020 16:41:06 -0600 Message-ID: <20200305224108.21351-1-s-anna@ti.com> X-Mailer: git-send-email 2.23.0 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 Hi Bjorn, Loic, The following are two different fixes for the same commit 086d08725d34 ("remoteproc: create vdev subdevice with specific dma memory pool") added in 5.1 kernel. This has deviated from the core logic prior to the fixed memory region support. Patch 1 fixes an issue for some TI remoteproc drivers which always used the same CMA pool for allocating vrings, vring buffers and carveouts. It assigns the same pool (if there exists one) for the separated out vdev device if there are no specific vdev memory regions, and is a no-op otherwise. Patch 2 restores the parenting hierarchy for rpmsg devices so that the rproc handle can be retrieved by rpmsg drivers using the rproc_get_by_child() API. Following is an example of how the rpmsg-client-sample devices looked on our Davinci platforms: 1. On 4.19 kernel: root@omapl138-lcdk# ls -l /sys/bus/rpmsg/devices/ lrwxrwxrwx 1 root root 0 Nov 17 02:03 virtio0.rpmsg-client-sample.-1.50 -> ../../../devices/platform/11800000.dsp/remoteproc/remoteproc0/virtio0/virtio0.rpmsg-client-sample.-1.50 lrwxrwxrwx 1 root root 0 Nov 17 02:03 virtio0.rpmsg-client-sample.-1.51 -> ../../../devices/platform/11800000.dsp/remoteproc/remoteproc0/virtio0/virtio0.rpmsg-client-sample.-1.51 2. After the commit 086d08725d34: root@omapl138-lcdk# ls -l /sys/bus/rpmsg/devices/ lrwxrwxrwx 1 root root 0 Nov 17 02:05 virtio0.rpmsg-client-sample.-1.50 -> ../../../devices/platform/11800000.dsp/11800000.dsp#vdev0buffer/virtio0/virtio0.rpmsg-client-sample.-1.50 lrwxrwxrwx 1 root root 0 Nov 17 02:05 virtio0.rpmsg-client-sample.-1.51 -> ../../../devices/platform/11800000.dsp/11800000.dsp#vdev0buffer/virtio0/virtio0.rpmsg-client-sample.-1.51 3. With Patch 2: root@omapl138-lcdk:/rpmsg/2020lts# ls -l /sys/bus/rpmsg/devices/ lrwxrwxrwx 1 root root 0 Nov 17 02:00 virtio0.rpmsg-client-sample.-1.50 -> ../../../devices/platform/11800000.dsp/remoteproc/remoteproc0/remoteproc0#vdev0buffer/virtio0/virtio0.rpmsg-client-sample.-1.50 lrwxrwxrwx 1 root root 0 Nov 17 02:00 virtio0.rpmsg-client-sample.-1.51 -> ../../../devices/platform/11800000.dsp/remoteproc/remoteproc0/remoteproc0#vdev0buffer/virtio0/virtio0.rpmsg-client-sample.-1.51 regards Suman Suman Anna (1): remoteproc: Fix and restore the parenting hierarchy for vdev Tero Kristo (1): remoteproc: fall back to using parent memory pool if no dedicated available drivers/remoteproc/remoteproc_core.c | 2 +- drivers/remoteproc/remoteproc_virtio.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) -- 2.23.0