Received: by 2002:ab2:3c46:0:b0:1f5:f2ab:c469 with SMTP id x6csp293438lqf; Fri, 26 Apr 2024 07:03:58 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXiFkjv7Y5/BU5vxgVdhz/4Pbt2lCB7WmLcX4VEUTYUEZJGbuUev2KFd0NEvVzT9kA1JBrOSHxqh0xV7uSCa/ZZDOKLhILFa09BrwFgAw== X-Google-Smtp-Source: AGHT+IHK1LwnLgPikgI+csX8XnG51+l39QRoSoEchAxyRJfODSZkAJjHXu/wunCdbm6zuK/WlPp/ X-Received: by 2002:ac8:58c6:0:b0:43a:15c9:34b9 with SMTP id u6-20020ac858c6000000b0043a15c934b9mr3417214qta.28.1714140238064; Fri, 26 Apr 2024 07:03:58 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714140238; cv=pass; d=google.com; s=arc-20160816; b=0Y8863mZFaKi5sNh35rKIywzf5TU8aaxcxR7ZMiS28JMJ3H0ss5uQ/i5GvULvqi24x vuUfApkLhLhyO8n0qhE+LhtOj/zLin6P/RaDtN6uSBQ/lvLKpuhQM7YPU60NI1fOm9LZ 3H54X8VMMxWoNdDjnuum6hyCZQz1Vc8cZkP8iRPPZQFrWTbIDqM32Qia6xCvGaF5MK6h Bm8i78XRqzst/pt70wgf8mwbcZ+WtGG5B+2PrIqh67e3Q1ESlUsQOd+BTWZP+Na5wIwo QWrej3+Pux4yTT7VYl53mmT92YvRVINyA/lEq9ZgYRgnthSO7j6x/KnfSKJoSDknSdbS llVQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=set4n7Bfvg/nCVRqXHEkPOl5DaTKubnkbfpADbsPLsA=; fh=WKfY33P0WBkWFjtVnunktBe+/EaXd3+Y8a9yqKPZOy8=; b=yOCu8e88a1HAc4veupYBsbwaWl6MrCEmv4ayJJ96039/yBY2X4RTQgTs2cboQY5wjk xkIfpQWrEzbTkhwK6BPZkSvqJJeXDv19F3tLdrmPq8lPCQg1fVYimuDWbm4wKYLXoVNs nKji/Ojyj20cs9h4/iNqUJTjHWJtgAQqOFrB/LQOzVc/Niewyz3tY7yd1RqgMh9tuIOJ IcSV34Yy6z6OQ7IfWC4kS5EV9OlxKRp7Plv9D4WRlQzmexLy1kQUNP31GeUC1t6g9/3P Do/0Oi1g2w1qWOei6yIzbrY6kZ9c/E9yBnfBbVbvuFOQAur9Ofq1KAape8NDowVYksQX A36A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@postmarketos.org header.s=key1 header.b=AKQocuZd; arc=pass (i=1 spf=pass spfdomain=postmarketos.org dkim=pass dkdomain=postmarketos.org dmarc=pass fromdomain=postmarketos.org); spf=pass (google.com: domain of linux-kernel+bounces-160121-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=postmarketos.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o21-20020a05622a009500b0043a46e3a096si4178730qtw.448.2024.04.26.07.03.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Apr 2024 07:03:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-160121-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@postmarketos.org header.s=key1 header.b=AKQocuZd; arc=pass (i=1 spf=pass spfdomain=postmarketos.org dkim=pass dkdomain=postmarketos.org dmarc=pass fromdomain=postmarketos.org); spf=pass (google.com: domain of linux-kernel+bounces-160121-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-160121-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=postmarketos.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 728ED1C22651 for ; Fri, 26 Apr 2024 14:02:19 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CD381487D3; Fri, 26 Apr 2024 14:02:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=postmarketos.org header.i=@postmarketos.org header.b="AKQocuZd" Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (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 3CFE17E573 for ; Fri, 26 Apr 2024 14:02:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714140133; cv=none; b=Dfyj5wx5PlmyaGZucmk2I4esAsd3xPGFBYhY1oQxHK/9pHYBCx129AD+z6DvNfFcc5yua4r8mXiLwtFM52R+u179oxTPqxvVDR+qtbyOeeRzvC50mEsBDiC8NfZNSfICjvMdTeGm5LNvEpxEapT8r8XYZMNq++RuO/rGj1VgWps= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714140133; c=relaxed/simple; bh=HZDsGbmh+YJvzqUYjBzipiRUUq1OHnGZ+Kln31mCXY8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bgSucmBVBsnldLwGHh7CLnqH3ACRLwZ220lXixQR5yFhPhVsVpPhmIgEZbHrVuNejqVt67Smv+U6JFRK5yqCIsbMZZkd8D+WiCqtBbisFmbFYly39XXEubb03Tx/Y0iY4Qye+pQrczAJN1CYvPmtJF5ERbgpuTclNUPWxs/OLUA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=postmarketos.org; spf=pass smtp.mailfrom=postmarketos.org; dkim=pass (2048-bit key) header.d=postmarketos.org header.i=@postmarketos.org header.b=AKQocuZd; arc=none smtp.client-ip=95.215.58.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=postmarketos.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=postmarketos.org Message-ID: <9c5b1759-24fd-44f8-bfee-d1ff61a3fd41@postmarketos.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=postmarketos.org; s=key1; t=1714140129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=set4n7Bfvg/nCVRqXHEkPOl5DaTKubnkbfpADbsPLsA=; b=AKQocuZdWNFvfJGaHtn03BiXdNglxDXGBarueV50w5UMXjGwSzsaZCc5s77EIgI85LQX27 Cr6T/s5qeguXtKV128lBSAxqnsDOlXYWp15X6CvT7ZJ0fjTtqXeqYXRGVSPgJA9NUFQbFv zr+no3hgkVF4Vwgx/jfPgAuO+4M9EoMgyYpsei92lh41IE52wKphLUFb5ruN6woYPpZ0mg ZUJ3tiTD25dyjnXRu6zFzCPLUg7XRHnJuoA7bjhFpsiMGQKU+n/gSlqPmou76dgHExLd0/ xWf2oIe/sKXJA54FMqolxZnfZ1oNDbZWD5QW4z+c7NQVEt3FhxdQja2ijwcIew== Date: Fri, 26 Apr 2024 17:02:06 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH v7 0/6] soc: qcom: add in-kernel pd-mapper implementation To: Dmitry Baryshkov , Bjorn Andersson , Konrad Dybcio , Sibi Sankar , Mathieu Poirier Cc: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-remoteproc@vger.kernel.org, Johan Hovold , Xilin Wu , Bryan O'Donoghue , Neil Armstrong References: <20240424-qcom-pd-mapper-v7-0-05f7fc646e0f@linaro.org> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Alexey Minnekhanov In-Reply-To: <20240424-qcom-pd-mapper-v7-0-05f7fc646e0f@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_OUT On 24.04.2024 12:27, Dmitry Baryshkov wrote: > Protection domain mapper is a QMI service providing mapping between > 'protection domains' and services supported / allowed in these domains. > For example such mapping is required for loading of the WiFi firmware or > for properly starting up the UCSI / altmode / battery manager support. > > The existing userspace implementation has several issue. It doesn't play > well with CONFIG_EXTRA_FIRMWARE, it doesn't reread the JSON files if the > firmware location is changed (or if the firmware was not available at > the time pd-mapper was started but the corresponding directory is > mounted later), etc. > > However this configuration is largely static and common between > different platforms. Provide in-kernel service implementing static > per-platform data. > > Unlike previous revisions of the patchset, this iteration uses static > configuration per platform, rather than building it dynamically from the > list of DSPs being started. > > To: Bjorn Andersson > To: Konrad Dybcio > To: Sibi Sankar > To: Mathieu Poirier > Cc: linux-arm-msm@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: linux-remoteproc@vger.kernel.org > Cc: Johan Hovold > Cc: Xilin Wu > Cc: "Bryan O'Donoghue" > -- > > Changes in v7: > - Fixed modular build (Steev) > - Link to v6: https://lore.kernel.org/r/20240422-qcom-pd-mapper-v6-0-f96957d01207@linaro.org > > Changes in v6: > - Reworked mutex to fix lockdep issue on deregistration > - Fixed dependencies between PD-mapper and remoteproc to fix modular > builds (Krzysztof) > - Added EXPORT_SYMBOL_GPL to fix modular builds (Krzysztof) > - Fixed kerneldocs (Krzysztof) > - Removed extra pr_debug messages (Krzysztof) > - Fixed wcss build (Krzysztof) > - Added platforms which do not require protection domain mapping to > silence the notice on those platforms > - Link to v5: https://lore.kernel.org/r/20240419-qcom-pd-mapper-v5-0-e35b6f847e99@linaro.org > > Changes in v5: > - pdr: drop lock in pdr_register_listener, list_lock is already held (Chris Lew) > - pd_mapper: reworked to provide static configuration per platform > (Bjorn) > - Link to v4: https://lore.kernel.org/r/20240311-qcom-pd-mapper-v4-0-24679cca5c24@linaro.org > > Changes in v4: > - Fixed missing chunk, reenabled kfree in qmi_del_server (Konrad) > - Added configuration for sm6350 (Thanks to Luca) > - Removed RFC tag (Konrad) > - Link to v3: https://lore.kernel.org/r/20240304-qcom-pd-mapper-v3-0-6858fa1ac1c8@linaro.org > > Changes in RFC v3: > - Send start / stop notifications when PD-mapper domain list is changed > - Reworked the way PD-mapper treats protection domains, register all of > them in a single batch > - Added SC7180 domains configuration based on TCL Book 14 GO > - Link to v2: https://lore.kernel.org/r/20240301-qcom-pd-mapper-v2-0-5d12a081d9d1@linaro.org > > Changes in RFC v2: > - Swapped num_domains / domains (Konrad) > - Fixed an issue with battery not working on sc8280xp > - Added missing configuration for QCS404 > I've tested this series on sdm660 device, with userspace pd-mapper service disabled, and don't see any regressions - e.g Wi-Fi/BT still come online and work as before. Debug logs: https://paste.sr.ht/~minlexx/bd03db4c582a3275078ce4fd05ea76ce46a52b8e Missing cdsp_root and adsp_sensors PDs are not currently an issue, because those are not enabled yet on SDM660 or hard to test, so Tested-by: Alexey Minnekhanov -- Regards, Alexey Minnekhanov postmarketOS developer