Message ID | 20240103221124.3063683-3-tanmay.shah@amd.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-16056-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp5292687dyb; Wed, 3 Jan 2024 14:12:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IFxELxIarcAn4l5UOS1RHSY5ImppMAICZf1opXI3PfzeP5GnunrquINJADQkTf9ubNlM9RV X-Received: by 2002:a05:6a00:1d1a:b0:6d9:bfef:119 with SMTP id a26-20020a056a001d1a00b006d9bfef0119mr16478041pfx.7.1704319967675; Wed, 03 Jan 2024 14:12:47 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1704319967; cv=pass; d=google.com; s=arc-20160816; b=pW0Qbmi/NuGrJfJqo/I3jGyumEEXqPr8vx2noI5ZIO6vnFlqBfhGtVdSb846fwbu4z xVghRWib9WblX9tE9scgw6ARpXcigR0z3pTqva+TktTcyujrNZJtyB2fiMlnLp/AcjFE lokaCikQZXIbNLfq2G9OksrjYhHQtiBXR/MudfjcthNpbK8FUaURQ8zkSTXbH36Y/CsK P6gGH+DsmD73JoZFtRsA2tqLm1mUcDg6QKQq32BXaE6RtILlj6jueuCXTfFtxEPZcN5+ aHFsJvxUQXHVzAvfWKNaoj4rQWpRyppD8sh32+c1tK9hg09290jUYY1fQr7Z1OcoDxDv ib3w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0wKfNZqTs6xaT4BpSnhYNxtHxjHm8kPb8MoW/KDKyuA=; fh=3plJd1RzKrkkEPh2ESRY4/Ewiw9TI+X4qr6p2ruuIgQ=; b=Jqb61zeKnm1xEzFfcmIvBg7L0eTU7xzc4dL5IYIkjs21pWPNja68ZftN0XheqDXn4r dBEY7z3pztt8gSB8mNRH3QJaBGpSVk6d+fZDJxQRNTjTVy85NDhSryiVlEAncX99rzlN XtHluZ6tJH1DlpMD/DBUxTLQDsj5WolM7ikv19CmJ7ofh9WBsWPmwFIgtj/kLIaaUMfm a6MtVE7M/N5fgE+bzV3VJFET2vIJ5zj8SaxQXu66ZH7X6PSu6vvMaGJYBj70nNrvuRfB T04esCw0ZtztHdgPi5bNjjxrB61H7txr2/qrhgxNGjcSNq0TCayfBtdAdzTtzg2bVlTo 3sRw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=YczjQzQh; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-16056-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16056-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id m185-20020a6258c2000000b006da8f6744afsi4925346pfb.219.2024.01.03.14.12.47 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jan 2024 14:12:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-16056-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=YczjQzQh; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel+bounces-16056-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-16056-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 70D49283964 for <ouuuleilei@gmail.com>; Wed, 3 Jan 2024 22:12:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id ACBE81F600; Wed, 3 Jan 2024 22:12:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="YczjQzQh" X-Original-To: linux-kernel@vger.kernel.org Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2072.outbound.protection.outlook.com [40.107.92.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5C971DDE2; Wed, 3 Jan 2024 22:12:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=csxk1TsGY1S/zerReXS1goHXwSAvaQwP3tr8KlVlpH8Q5r6s9YkoSzv0S5bJ3G+ZozCft6xYG2ARTU1roWMIE8MHuaMZ/u2NtzSUXRQAWHIBJtXtznxBehnEY0OJZOt81HEfxoAMr0KVhggYAnZYDsmRjLEYudYzilYJ4mRKPMlx8oxFqDgGkzf45/k+3Kb+v3xldqfK5UJKH/dxzRXYxs1CkdGRarAgn+8kx2v7rIAsMpWZLQnSG+y6lQUtb+gofHJyoM1toM8ljm2HvWSHw36zl2jR84G0qn/MmVFDczFHRik5ktWHizhO0Ov9CS/BQuP1hHIfZXFLqbJt4Hj7RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0wKfNZqTs6xaT4BpSnhYNxtHxjHm8kPb8MoW/KDKyuA=; b=BvMJ7cWW65tUmM0u/h6YsCnaBATa4KgWNKaOqwx/4pbin957YbV6xBeFr1IQq2lZ72xXv096+UgGKFQbEHABarLNL61YW/+PV0PGXvzChRut5UYDP2s7vooBudjaNGIxpsyFnXmL/msuRggKSEU3F0kXOXfspwumKOy6/3qGSZESs6or3OWE159ie5WT36TtBRcBkV6rxcIMU/x2B469oNv7dvlhr5yqFVA52hJAMYjKkGjitxwIfxkW9evVQ2d3vEwOhLvzv3OlxuZg/qeibhPemWFsa4kYb7dTsv2DSWlZzfWUuHp1/4q3hEXW+pbtar93+GQGXRHbe1sHZt4QtQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0wKfNZqTs6xaT4BpSnhYNxtHxjHm8kPb8MoW/KDKyuA=; b=YczjQzQh7GJNTgQwb+Llbc/jxBwQzgpbSP+ikRwBPS1RLq2f6grAlAL2OdG8poMUAdr6p1kKINE9ArDZsk3HVeOwk3Nv9Cium64rh/wrmElVClyC3SnQQbbrJsm0iidsHXBMhhrU8ZBj052plN51USL2miMX/Xau4SaR1JvfoSo= Received: from BY5PR03CA0006.namprd03.prod.outlook.com (2603:10b6:a03:1e0::16) by BL3PR12MB6545.namprd12.prod.outlook.com (2603:10b6:208:38c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7159.13; Wed, 3 Jan 2024 22:12:07 +0000 Received: from SJ5PEPF000001D1.namprd05.prod.outlook.com (2603:10b6:a03:1e0:cafe::19) by BY5PR03CA0006.outlook.office365.com (2603:10b6:a03:1e0::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.22 via Frontend Transport; Wed, 3 Jan 2024 22:12:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ5PEPF000001D1.mail.protection.outlook.com (10.167.242.53) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7159.9 via Frontend Transport; Wed, 3 Jan 2024 22:12:06 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Wed, 3 Jan 2024 16:12:01 -0600 Received: from xsjtanmays50.xilinx.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.34 via Frontend Transport; Wed, 3 Jan 2024 16:12:01 -0600 From: Tanmay Shah <tanmay.shah@amd.com> To: <andersson@kernel.org>, <mathieu.poirier@linaro.org> CC: <linux-remoteproc@vger.kernel.org>, <linux-kernel@vger.kernel.org>, "Tanmay Shah" <tanmay.shah@amd.com>, Tarak Reddy <tarak.reddy@amd.com> Subject: [PATCH v4 2/2] remoteproc: enhance rproc_put() for clusters Date: Wed, 3 Jan 2024 14:11:25 -0800 Message-ID: <20240103221124.3063683-3-tanmay.shah@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240103221124.3063683-1-tanmay.shah@amd.com> References: <20240103221124.3063683-1-tanmay.shah@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ5PEPF000001D1:EE_|BL3PR12MB6545:EE_ X-MS-Office365-Filtering-Correlation-Id: e8436b88-ccbb-4837-914d-08dc0ca905f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: S9dBPXlGcq/TNvii/Zpq3gNQq5HHsB2dAxtBa8GJ1iT41ZQqoay5JTKfKyw5JwWz/1zILt8TwCw0OT/agb2GglxkBnGTtby1DKwN9P69ImZizBfUhOcQ2nxe9TlXxgEEkTImDWAMDHoorKgSWJBGv9+Y92CNKMNkcdK8C8vEmPTKrN3U2FwkYGdQITa0S84I2Ravz+I6SSpNB1aaqavCt2f8GqXvVP0J4gye3SLUhKcr49hcMCg4jpMnTTNMlCVvakXiBdkcmbFWVCLexOt8EnGL0SVHcJwWlJXv2ZpfFAj1mF9aq1JdQZxobIUwn4M9ObRmreBx853/dh/b72NDtINvt2/rRA7ZOOkcGXIMU5/32OHGhwsHgjVEy0b+6dBkeZ4Gnr328bZGrwvokfM/f/r2ztluoziGaTcUZotO7an+tNnc7LIWL/1i47QhZ0emvKXP1fivdoMUNc1+fzVQxOJJ61kS7cNXAE3BqmCulDPFNIsfjqFCTCiUYmbZazzIszkf5ADi7RM9uRfFcXMSbpMCmB65EuGKCWhezsdobHxvs3QpwS0rD0lY4uTAQ95jWNlkhhbsV1ZxnAdxELP3lLRmWo94VgN8RRvHqJfxYhBFn9OA4X29ckhIhtSsrdtdGPYcT/CKhALMU3myWeB606Kr6tyP8NGAybyJkwVsl1+gLVkAqFWgodoTj63f1kurV4kGSSlNDdqAM9e8HQEVPN/hN3qlhsl4KYfesbPyY+awAiroggZKt74XGJxv3bHeARDpBm5wiiVEL93jyK7mWw== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(39860400002)(376002)(346002)(136003)(396003)(230922051799003)(64100799003)(451199024)(1800799012)(82310400011)(186009)(36840700001)(40470700004)(46966006)(86362001)(36756003)(356005)(81166007)(478600001)(6666004)(70206006)(70586007)(110136005)(54906003)(336012)(26005)(1076003)(2616005)(426003)(44832011)(4744005)(2906002)(5660300002)(8676002)(8936002)(316002)(4326008)(36860700001)(82740400003)(40480700001)(83380400001)(40460700003)(47076005)(41300700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jan 2024 22:12:06.6762 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e8436b88-ccbb-4837-914d-08dc0ca905f8 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ5PEPF000001D1.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6545 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787109014279055273 X-GMAIL-MSGID: 1787109014279055273 |
Series |
remoteproc: get rproc devices for clusters
|
|
Commit Message
Tanmay Shah
Jan. 3, 2024, 10:11 p.m. UTC
This patch enhances rproc_put() to support remoteproc clusters with multiple child nodes as in rproc_get_by_phandle(). Signed-off-by: Tarak Reddy <tarak.reddy@amd.com> Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> --- drivers/remoteproc/remoteproc_core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
Comments
On Wed, Jan 03, 2024 at 02:11:25PM -0800, Tanmay Shah wrote: > This patch enhances rproc_put() to support remoteproc clusters > with multiple child nodes as in rproc_get_by_phandle(). > > Signed-off-by: Tarak Reddy <tarak.reddy@amd.com> > Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> As described in the first patch, this documents that Tarak first certified the origin of this patch, then you certify the origin as you handle the patch. But according to From: you're the author, so how could Tarak have certified the origin before you authored the patch? Either correct the author, or add Co-developed-by, if that's what happened. > --- > drivers/remoteproc/remoteproc_core.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 0b3b34085e2f..f276956f2c5c 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -2554,7 +2554,11 @@ EXPORT_SYMBOL(rproc_free); > */ > void rproc_put(struct rproc *rproc) > { > - module_put(rproc->dev.parent->driver->owner); > + if (rproc->dev.parent->driver) > + module_put(rproc->dev.parent->driver->owner); > + else > + module_put(rproc->dev.parent->parent->driver->owner); > + This does however highlight a bug that was introduced by patch 1, please avoid this by squashing the two patches together (and use Co-developed-by as needed). Regards, Bjorn > put_device(&rproc->dev); > } > EXPORT_SYMBOL(rproc_put); > -- > 2.25.1 >
On 1/26/24 11:38 AM, Bjorn Andersson wrote: > On Wed, Jan 03, 2024 at 02:11:25PM -0800, Tanmay Shah wrote: > > This patch enhances rproc_put() to support remoteproc clusters > > with multiple child nodes as in rproc_get_by_phandle(). > > > > Signed-off-by: Tarak Reddy <tarak.reddy@amd.com> > > Signed-off-by: Tanmay Shah <tanmay.shah@amd.com> > > As described in the first patch, this documents that Tarak first > certified the origin of this patch, then you certify the origin as you > handle the patch. > > But according to From: you're the author, so how could Tarak have > certified the origin before you authored the patch? > > Either correct the author, or add Co-developed-by, if that's what > happened. > > > --- > > drivers/remoteproc/remoteproc_core.c | 6 +++++- > > 1 file changed, 5 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > > index 0b3b34085e2f..f276956f2c5c 100644 > > --- a/drivers/remoteproc/remoteproc_core.c > > +++ b/drivers/remoteproc/remoteproc_core.c > > @@ -2554,7 +2554,11 @@ EXPORT_SYMBOL(rproc_free); > > */ > > void rproc_put(struct rproc *rproc) > > { > > - module_put(rproc->dev.parent->driver->owner); > > + if (rproc->dev.parent->driver) > > + module_put(rproc->dev.parent->driver->owner); > > + else > > + module_put(rproc->dev.parent->parent->driver->owner); > > + > > This does however highlight a bug that was introduced by patch 1, please > avoid this by squashing the two patches together (and use > Co-developed-by as needed). Thanks Bjorn for catching this. This change originally was developed by Tarak, but I sent upstream based on his patch so I missed to update his name as author. I should update author name. However, if we are going to squash this in first patch, then I think, first patch's author will stay as it is. Following Action Item on me for v5: 1) Fix commit text in first patch. 2) Squash second patch in first. 3) Add my s-o-b signature after Mathieu's 4) Add Tarak's s-o-b as well. As he developed second patch. Hope got it all. Thanks, Tanmay > > Regards, > Bjorn > > > put_device(&rproc->dev); > > } > > EXPORT_SYMBOL(rproc_put); > > -- > > 2.25.1 > >
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index 0b3b34085e2f..f276956f2c5c 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -2554,7 +2554,11 @@ EXPORT_SYMBOL(rproc_free); */ void rproc_put(struct rproc *rproc) { - module_put(rproc->dev.parent->driver->owner); + if (rproc->dev.parent->driver) + module_put(rproc->dev.parent->driver->owner); + else + module_put(rproc->dev.parent->parent->driver->owner); + put_device(&rproc->dev); } EXPORT_SYMBOL(rproc_put);