From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (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 0907E320B for ; Sat, 30 Nov 2024 12:50:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732971005; cv=none; b=GAoMw/S1wwBS3VVpwPek+JiVSt3oOGBMi+lFSCm7/WYDDsqX608lhAmyWvAJzLDoef+VaeS71Qs1dqUXzjnDUioAp+uysaCLvrRZl2gYXO01+T29cIGPi8MD/wpGBdEnD2AfcgmpQYoKHVYGEQVDXWraVL66EKAiz0oYR6Z+naY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732971005; c=relaxed/simple; bh=QDea+3e+cuoPAYkLcmeYbatc/ECyB4Kti6MbiVdXAmY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ucWoerSh10/n4cYmzlcB3/Uhm0w01OHTC46odkMAf3U9Q5bxHaCpUvvvDdd9vL3S2J+9dKuR2fhnhOKbQbc1nSMVKiHfLRu/uwXA0eIV7uoqaMaf8nJPOmHMwnwv6vcRB8Uh1qHqM4p5k9PpLVuuYYk1ZzBd2eIkUM4Wa8wN374= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=pyyD8LzA; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="pyyD8LzA" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4AUCgDfh030323 for ; Sat, 30 Nov 2024 12:50:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= hwEVoeZgfVpqkrEBH0FyIu3xxM7tj2jKoU6z06itptc=; b=pyyD8LzA+RyeCqfj WsAo2JjFrSRAhYatAeT8MzKEw1CEyO3IG/oGRJ6KoKmrbpaA6veGFithDwoy2MTY qx5xFZdVMdjXq8jkf9r//mYuEYAhxg+nve8EKPBo96WD5UjWsiCFC/JMAZH2Q1oc c8+qywFaFZz8VGi6ifKDTl+ui4GBpzs35+N76AVuc6DxVELkSG7HTzEf1JRCsYUr WyAb+oLvyi9j6GPWFpLR5XeZw1ULxSFO6YXVbLpy5R5X1d3Bpj0ltigiewjYHSj+ gLdOWF9KML6MeGpArTbTiOIvha40pKshDZqGs0EbTa0LkjWNuTSRmrP6AZiQiLN+ Vf5JWg== Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 437ta2rr81-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Sat, 30 Nov 2024 12:50:02 +0000 (GMT) Received: by mail-qt1-f200.google.com with SMTP id d75a77b69052e-4667cab5e1bso4860511cf.3 for ; Sat, 30 Nov 2024 04:50:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732971002; x=1733575802; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hwEVoeZgfVpqkrEBH0FyIu3xxM7tj2jKoU6z06itptc=; b=alDjC2Snshlt3UIVxv5q2j2u0aAQ5saYIWIWzl+/T4vIb+yrfcnLg/6K8FnNDVeWcg vMXpxDVV8+Bg3tDofyFc7MzsByOhc5kCQ/x4z2PzflrUAIsxf+5sQ7wiPoc51KTPhTWU 7z8qSgWgpibYgA5ZcKo8Yk69MKfgCaKHAvjkYuWOHEJFElnXYcBedg96Dq5JSgSXCB19 4BuEUlz56RYGyYDlNsRC0u+qBz20I0++onwPkxhmskQAq3qWji5lx4DChLnLl8hthOmk inPPgl8TVGEPWr5Y2v8MIwWbZVMDCZkCKLBpwcx5+6GipZYz+d0tmyqtcG1M+1yPZFNd gdbg== X-Forwarded-Encrypted: i=1; AJvYcCVDHpaHy0nisut78A3AOSe4HTkoVwE1teOG9/eCU8NJ66glAE20O4s7LZUaKstgM1lS5LRNyWm1FDcnafI=@vger.kernel.org X-Gm-Message-State: AOJu0Yy0dgIyjytkD1JGTZdWqdVI/uRmOcDZ01WTpc4TG9oT6ZzcaNXb ftRhyTz2d82DOkyg2elKbZ40S7NDQ3YpXn4GIl+BSSz6RQTBaTAevkU32jh/VZHUansaRKznauz V87fpDz9DI7fY9KTv6oCgiqRvl2giG/zfe9uSMtm2sd+IswvnUJrMldNGc9uAIio= X-Gm-Gg: ASbGnctrLB4m/i7cV+N4NMGO5KPpIALjtaime52DehlCUgT4MDrqFwbl1ZEDZaOKODM 8V9PXQ5uC+Sx0bR+1/6zNSQg6bFt1TFHEgG88o/ZQEH+CKA74OwfSF+Jm/Vv15ZUItBlLqxUXtK zKxCqbpNNvI/588VH5LJ1tFLSCBmqKeofGIGhNMNwnfdU/QO6GcX3YSTjZcdcMpc/7CXva558iL f7kzVrkA7JxOt72J9sYqJv1QXiY9zzhkYU5/ybacu/Mov5Vgqts5p4zq7AvwJmS1CRWmgGRMKhI /0TDZ9osBQpydvC0lZ9LtDNL2i4iS2o= X-Received: by 2002:a05:622a:389:b0:462:fb65:cbb5 with SMTP id d75a77b69052e-466b36886b8mr96997801cf.16.1732971001979; Sat, 30 Nov 2024 04:50:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IFcEk4zpcaPKGI305nMIFuY+OFtLWrdliZRQ3XgvCXbaX18+LdB778zQ6l/S2wnobvtgyPCVg== X-Received: by 2002:a05:622a:389:b0:462:fb65:cbb5 with SMTP id d75a77b69052e-466b36886b8mr96997421cf.16.1732971001537; Sat, 30 Nov 2024 04:50:01 -0800 (PST) Received: from [192.168.212.120] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d097d9f330sm2815866a12.9.2024.11.30.04.49.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 30 Nov 2024 04:50:00 -0800 (PST) Message-ID: <2b95cc25-a842-4edd-a5f3-2351038d264e@oss.qualcomm.com> Date: Sat, 30 Nov 2024 13:49:56 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH V6 1/4] interconnect: qcom: Add multidev EPSS L3 support To: Raviteja Laggyshetty , Georgi Djakov , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio Cc: Odelu Kukatla , Mike Tipton , Sibi Sankar , linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <20241125174511.45-1-quic_rlaggysh@quicinc.com> <20241125174511.45-2-quic_rlaggysh@quicinc.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20241125174511.45-2-quic_rlaggysh@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: pRO4gzhD4gumpJ3G4QxeaPk-Qehoi-WD X-Proofpoint-GUID: pRO4gzhD4gumpJ3G4QxeaPk-Qehoi-WD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 lowpriorityscore=0 suspectscore=0 mlxscore=0 impostorscore=0 malwarescore=0 adultscore=0 priorityscore=1501 mlxlogscore=999 phishscore=0 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2411300105 On 25.11.2024 6:45 PM, Raviteja Laggyshetty wrote: > EPSS on SA8775P has two instances which requires creation of two device > nodes with different compatible and device data because of unique > icc node id and name limitation in interconnect framework. > Add multidevice support to osm-l3 code to get unique node id from IDA > and node name is made unique by appending node address. > > Signed-off-by: Raviteja Laggyshetty > --- [...] > + ret = of_property_read_reg(pdev->dev.of_node, 0, &addr, NULL); > + if (ret) > + return ret; > + > qp->base = devm_platform_ioremap_resource(pdev, 0); > if (IS_ERR(qp->base)) > return PTR_ERR(qp->base); > @@ -242,8 +262,13 @@ static int qcom_osm_l3_probe(struct platform_device *pdev) > > icc_provider_init(provider); > > + /* Allocate unique id for qnodes */ > + for (i = 0; i < num_nodes; i++) > + qnodes[i]->id = ida_alloc_min(&osm_l3_id, OSM_L3_NODE_ID_START, GFP_KERNEL); As I've said in my previous emails, this is a framework-level problem. Up until now we've simply silently ignored the possibility of an interconnect provider having more than one instance, as conveniently most previous SoCs had a bunch of distinct bus masters. Currently, debugfs-client.c relies on the node names being unique. Keeping them as such is also useful for having a sane sysfs/debugfs interface. But it's not always feasible, and a hierarchical approach (like in pmdomain) may be a better fit. Then, node->id is used for creating links, and we unfortunately cannot assume that both src and dst are within the same provider. I'm not a fan of these IDs being hardcoded, but there are some drivers that rely on that, which itself is also a bit unfortunate.. If Mike (who introduced debugfs-client and is probably the main user) doesn't object to a small ABI break (which is "fine" with a debugfs driver that requires editing the source code to be compiled), we could add a property within icc_provider like `bool dynamic_ids` and have an ICC-global IDA that would take care of any conflicts. Provider drivers whose consumers don't already rely on programmatical use of hardcoded IDs *and* don't have cross-provider links could then enable that flag and have the node IDs and names set like you did in this patch. This also sounds very useful for icc-clk. Konrad