Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp560169rdb; Tue, 19 Sep 2023 03:57:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJmeQGiEH2lftHc1rEUx3b6OTTBL/rMka/owM8advSRmkBEAARI7hwzdwM3gsJqNfuLVXM X-Received: by 2002:a17:902:f7c3:b0:1c4:1e80:5966 with SMTP id h3-20020a170902f7c300b001c41e805966mr11584643plw.63.1695121049094; Tue, 19 Sep 2023 03:57:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695121049; cv=none; d=google.com; s=arc-20160816; b=j5KR5z6bxlG9vibsMzelduNd3LK9u/BGq8mW4Oc/y6+xya/9c32+6smg6iY02UYTm7 tZsrFitzLtnUeMAi3g4yv/Ee/r8eF0JNu23Ug0V7D4LVW5VgI6tb0lp338yP/e+rgr4b RTxe4ZVK0gT922tzG42hGzVXzPQzDM/nY39ZOLihugs498Cp9ujKSV8I1CfTB3hhieYb qxbiWJKYf4Ex1Jp4s3MuTT3+lY5P5s9Lf6FxryG+BeekPjkgtC2MIhhd0cLbOsOGzv6U G3YlbdFXtE3mZwZ5/d9OPNWWPEapDqf7zNI/hVZ6um5I2unZxoER0LeD7s5v7esHQn8a 04Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=iN3B0w7/HP84BAXZ6ZgHwHAx1XejuMCTQ58AlHw/sJE=; fh=CC3SJsbec7okTYSYPtceDELLJ74eoKTY2iNmkwDLWL8=; b=HIyGRsD23JhcfgR07jgGHQJM5O/wtxsUFSZXR2qHIga65cRUe9G9w19UPbA1EwXKhJ l0Xl1iCUaraFpC5/LkqyvyPOB9q8+MQfIfTQYtEyFO8bM9u/A5Wl+1GPhfrcEfdxQ9g4 InHSTMINmzEaJi+XBrDN21H43VbxGl+dh34LPOprxk7C8kbfJquIWYmnY6s/qlWYzS6C o18311/Pw91hvNBjb/EYeJGywhIfV4YxIxlDPBL9X4CbMc6u4Vc4zANhS8kYWN/nbdN3 Vnl+Se+xuVQGL/lT7xGrUSbkPBHABDax3gsK0s8eAjbG3lYjJ4wSZfdHjlYw7n9jp7P4 dJqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kTMgS9lF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id kz11-20020a170902f9cb00b001c3e732b8casi9134054plb.159.2023.09.19.03.57.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Sep 2023 03:57:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kTMgS9lF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 75CA6807833E; Tue, 19 Sep 2023 02:40:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231317AbjISJkG (ORCPT + 99 others); Tue, 19 Sep 2023 05:40:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39228 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjISJkF (ORCPT ); Tue, 19 Sep 2023 05:40:05 -0400 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54250DA for ; Tue, 19 Sep 2023 02:39:59 -0700 (PDT) Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-502d9ce31cbso9079009e87.3 for ; Tue, 19 Sep 2023 02:39:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1695116397; x=1695721197; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iN3B0w7/HP84BAXZ6ZgHwHAx1XejuMCTQ58AlHw/sJE=; b=kTMgS9lFidgmWcuNbZyVTu3Vf0UoTlfZPno2Mf0qh7NjGuY2mK8qwSIKCiSvw1cIGh /czSwKgwc4q1i9uIXzVR0A0EzwYHw8C5sgqs2zv/coE6kKfkx9ZaAGBxJpla+FyUwHbF y2etDZQ/dskfMzldErDbaIl7LoPpu8CrsYJyc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695116397; x=1695721197; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iN3B0w7/HP84BAXZ6ZgHwHAx1XejuMCTQ58AlHw/sJE=; b=m4LbRDZb1+EH0Ft1aavlfkvUdhtU1XLeFStObQUOCgtHu66p9HhumG89kHdWPjHyY2 DCmmo2gS/O9ZJIq18DNrK/8TOX166NrtD1YJIzPafOQTUPGsx9H1K8EGLUqi4kEvuPmg VR7sRo7xSmdlwktwq6uBSwBv9aB/a/LNpWwDrQLAhxmkehRMyG3MW/X9oU2HvwmKTZ9z O0PBR+jcmqaVB9/Ye3qxegZZO3qB7GiFNAFPNt1bUGVd6EOZOeklkuyHWr1WIgSP86fY /LwO+vl/4rC7SRjXSKhrsiDlwJqgqykJ1mlyMXo21dFZRDmja2N7e7W8MQ90um5QFIwH 5S2A== X-Gm-Message-State: AOJu0YxrDegJoba4LgBtUVAp7OE0j2UwQJnnNr9sxXKlnZPWrps1rOV1 PxAh8ps4tfS8s6lwC11SU7zF98yV0z44AIlQDDKVXg== X-Received: by 2002:ac2:494f:0:b0:500:9a15:9054 with SMTP id o15-20020ac2494f000000b005009a159054mr9205021lfi.20.1695116397402; Tue, 19 Sep 2023 02:39:57 -0700 (PDT) MIME-Version: 1.0 References: <20230919050305.3817347-1-wenst@chromium.org> <13843095-0906-804e-ffbe-36625ebe05cf@collabora.com> In-Reply-To: <13843095-0906-804e-ffbe-36625ebe05cf@collabora.com> From: Chen-Yu Tsai Date: Tue, 19 Sep 2023 17:39:46 +0800 Message-ID: Subject: Re: [PATCH] remoteproc: mediatek: Detect single/multi core SCP with rpmsg-name property To: AngeloGioacchino Del Regno Cc: Bjorn Andersson , Mathieu Poirier , Matthias Brugger , Tinghan Shen , linux-remoteproc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Laura Nao Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 19 Sep 2023 02:40:24 -0700 (PDT) On Tue, Sep 19, 2023 at 5:26=E2=80=AFPM AngeloGioacchino Del Regno wrote: > > Il 19/09/23 07:03, Chen-Yu Tsai ha scritto: > > In the just landed multi-core SCP work, detection of single/multi core > > SCP is done by checking the immediate child node of the SCP complex > > device node. In the original work this was done by matching the child > > node's name. However the name wasn't previously standardized. This > > resulted in breakage on MT8183 and MT8192 Chromebooks while the driver > > side changes were picked up and the device tree changes were not picked > > up. > > > > Instead, match against the "mediatek,rpmsg-name" property, which is > > required to be present in the rpmsg sub-node. This makes the > > aforementioned devices running old device trees working again. > > > > Reported-by: Laura Nao > > Fixes: 1fdbf0cdde98 ("remoteproc: mediatek: Probe SCP cluster on multi-= core SCP") > > Signed-off-by: Chen-Yu Tsai > > --- > > The patch is based on next-20230918 with a whole bunch of local patches > > stacked on top. None of my local patches are related to remoteproc, so > > it should be fine. > > > > I tested on both MT8183 Juniper and MT8192 Hayato and on both systems > > the SCP successfully probed again. > > Instead of checking "mediatek,rpmsg-name", I think that a better way of c= hecking if > this is single or multi core is to count the number of cores... > > I've sent my own version of this, please check [1]. My version checks the structure of the device node, much like the original code, just against a different property/node name. If it's multi-core, there would be sub-nodes for each core, and the rpmsg property would be under those. Either way works. What we need right now is a quick fix to get things working again. We can discuss how to make things better later. Honestly I think it should just be based on the compatible string. However the current design seems quite fragile. The driver probably can't handle the core device nodes being out of order. ChenYu