Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp260679lqt; Thu, 6 Jun 2024 02:47:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV+Cd00Y9l2My81hYEZoGZ7tq45ja3ail9BYACOjGdd0aiJF1ZgVp1HarponCGhccC4xqdAVAEte32NKCRAgNDa6cJknV6BR2EqeJd++g== X-Google-Smtp-Source: AGHT+IGgPTukTJEb9MabnJJ0fO95pdFdW+MZ0yHk0g+5N0bCHgYesvWUXuEKqEU1+vlLkcUBp75K X-Received: by 2002:a81:7708:0:b0:61b:1bf5:67a9 with SMTP id 00721157ae682-62cbb4d8a33mr49189787b3.22.1717667268879; Thu, 06 Jun 2024 02:47:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717667268; cv=pass; d=google.com; s=arc-20160816; b=IGhEngrvtZIpFKuWi4/POtrCq3pnD1OQzh8jt0OK48q3tCfqHp+HLXM3XQL6J+L8SL htXTpZHeYvqs8vC1ESJKvwP8hMvonblA23RihhsIn1wCQP5EkdRVkiZC8HUr6A/aHvpX nz3/ARmJYmiYie7rlv8qMEfj9zMMKcCPDun+j69/99S1cDEkG8VUdPAWeGO8qSes8rJZ SQPy23/YQ9nBFR9ceF2gnSqhzEKiVn6TboQEIi1WDIpk1e/y4ekHvtJUXwRP6zTI3Hdf UXVZFg3TNTBOe1EhluyklG0qCpr/2fUiTEOaKQJmNsde2etaN/m/7Zg2PzlR3TIXYdrF MGbA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=jEOxwJ2kGSzIBxrSyY+xehPPjLW7bypGPaSh+KZyDyU=; fh=gtdCsZB4UubEFoWAt+ugtHYZa/CQIssa4JdbO76SzU8=; b=Lp6XywEZqqwlCAX72IvLzp5HpljtxF0Eveba3znI6At5w0zkILxF2+hj2JlDQidJk0 ehGHnSUmoH+KBs4kA0WAOlDYjoume+K90Kfz0fEWZ5VTf3NPTCl/ifg7Mb8sk/26749E Z7y4l8VXmJJpswWIlXr32vLnceqMnQTsNFUzVXME6Fx3AQ0t3oluRyQGrWT9eniWRlUr M9FqSrHEONo0SWiw2C1jH4baevFrWjh5OXjMVFyZSTXiltDk33bgzw+j0xNh5xMAwdyt FiOyH5NEWm1QCtDSRSWOEhQ3Ksg2Jf9QdnP1WqTkn82XSYn4GpM8mjHDjddH65UyVpHG IjQg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=anMOK0Iu; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204047-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204047-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b04f685b81si10946936d6.189.2024.06.06.02.47.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 02:47:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204047-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=anMOK0Iu; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-204047-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204047-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 88F791C251A3 for ; Thu, 6 Jun 2024 09:47:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D3054178CCB; Thu, 6 Jun 2024 09:47:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="anMOK0Iu" Received: from mail-lf1-f45.google.com (mail-lf1-f45.google.com [209.85.167.45]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7B0219D898 for ; Thu, 6 Jun 2024 09:47:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717667259; cv=none; b=DuscgSG9mrdz72hDYuRjUpqvZbWK74Vc8jRPAR0PUAdTux/C64nfWozX5CVPMKDsFdoDoG867hcAw9W62mHmfNRiS1C1pl9t17Ny5UTUbYEXM7cFGl6uOpmHjJg0cDxQ0uBIbC0FQyBcD010XYa1r1RDpHt9dfGYvFNS0qiO+wg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717667259; c=relaxed/simple; bh=Hi0neK8a5ZCe3IvW2h1FQfZB7W5FmPki1KuXMEWVHEc=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=W/+OPRxe8+fUmhSbFYYzM369J5BKegoIr6yeKTRojTSqbd/4rrkESnqzNJieR1uDBBuVAqnbrzuUw2pGG9Hs7uxeZiy1wjmCVilxTO5QJgbs2iZD8uyxh1/QmhOeYjAiIRaTqnibiAohNVE6ImS1pxzOqaAXb3LODxeQ5XpLa8A= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=anMOK0Iu; arc=none smtp.client-ip=209.85.167.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f45.google.com with SMTP id 2adb3069b0e04-52b83225088so886876e87.3 for ; Thu, 06 Jun 2024 02:47:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717667256; x=1718272056; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=jEOxwJ2kGSzIBxrSyY+xehPPjLW7bypGPaSh+KZyDyU=; b=anMOK0IuCTZI5l/kZ+oMqBxGqrEfrhY20k2ZOvOg80X0jfBitt3D9fimwrDTMwEHJJ wO2Jw5SFVzAatg6g6ZR4jBxIK2z9tEcpGv0B8BxYIMqNKkp5K1cg2VUZUsWlSW7M/a0q xHgv7LlV1Eic+WwbfDLCDmfSSxPKgW/CaQKiaRQNAvqI0Wgb2mz/nkiuXBuFQslJiIkZ QCZI0/2omxwMlGFCFT3MsuzKIg20+lTxBK14Q3H0Qze3QX885LjkdyrHjS8VahxsMIBA xOlpkK+b97h1mjeOxekO7O2L8m6cOT/JHbnCfNgu4v6kwUI1bxCUs6dO0q3hDNoaA/hh aAfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717667256; x=1718272056; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=jEOxwJ2kGSzIBxrSyY+xehPPjLW7bypGPaSh+KZyDyU=; b=Bn4RBLo3Tdl50xxlG61lTXz5Wo67zIx3qI5ygCaOttyToZk8MRKn1xPYvdM6hzXIwo HDY9D4xYydsuL1wh6z0dqCNJboYFbbedO3OVwvArJIBn4Vei2whH3xZ+xzs+zorirM9X qyBTDuLCUyLEEbNROFRln+LWxPw6Z9wZWxxMwaYh2ErWUKtMa1hq7KznKnwhAM7RHzyA 9DzIjos/eI54wVK2hpVqzY/iXBC6qAYr1HZejCCo4/XVhulxr5gSGcJcHBl+8i/ZGHhO 2xuzOMmkcvucxix21Vpzl2EaAAToXHOXvAQMRZTgoICcgQ2esig1N3T8hiNDzDbGUYxI dy6A== X-Forwarded-Encrypted: i=1; AJvYcCUmMcgzgYr3q/MF30V3M9y7Zl60W/ZhrHMqKoar7snTU6XZrY1OBNBSSKGN60/syHVoe+g7lLtbecsNj3sw6S4qCEAW+hIo9j7VmELS X-Gm-Message-State: AOJu0YySCPm557DOsDFLrRftbLeXygcc9RN6gwT5RY4bR0MBgLH4Hclb 4JAhmWpNAguqYfiAjYEeQvbxTiKH9TzOydB4A+3JGaPCWEsvMkmPm7/jnII6z2A= X-Received: by 2002:a05:6512:234a:b0:52b:aa2f:d8a3 with SMTP id 2adb3069b0e04-52bab4d813amr3391217e87.34.1717667255898; Thu, 06 Jun 2024 02:47:35 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:22fd:4ae6:287f:17f2? ([2a01:e0a:982:cbb0:22fd:4ae6:287f:17f2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42158111143sm50138045e9.20.2024.06.06.02.47.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Jun 2024 02:47:35 -0700 (PDT) Message-ID: <1d9bf8bb-af00-40d7-9c58-fbb6f6dd9e77@linaro.org> Date: Thu, 6 Jun 2024 11:47:34 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH v8 0/5] 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 , Steev Klimaszewski , Alexey Minnekhanov References: <20240512-qcom-pd-mapper-v8-0-5ecbb276fcc0@linaro.org> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0BsaW5hcm8ub3JnPsLAkQQTAQoA OwIbIwULCQgHAwUVCgkICwUWAgMBAAIeAQIXgBYhBInsPQWERiF0UPIoSBaat7Gkz/iuBQJk Q5wSAhkBAAoJEBaat7Gkz/iuyhMIANiD94qDtUTJRfEW6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linaro In-Reply-To: <20240512-qcom-pd-mapper-v8-0-5ecbb276fcc0@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 11/05/2024 23:56, 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. > > 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" > Cc: Steev Klimaszewski > Cc: Alexey Minnekhanov > > -- > > Changes in v8: > - Reworked pd-mapper to register as an rproc_subdev / auxdev > - Dropped Tested-by from Steev and Alexey from the last patch since the > implementation was changed significantly. > - Add sensors, cdsp and mpss_root domains to 660 config (Alexey > Minnekhanov) > - Added platform entry for sm4250 (used for qrb4210 / RB2) > - Added locking to the pdr_get_domain_list() (Chris Lew) > - Remove the call to qmi_del_server() and corresponding API (Chris Lew) > - In qmi_handle_init() changed 1024 to a defined constant (Chris Lew) > - Link to v7: https://lore.kernel.org/r/20240424-qcom-pd-mapper-v7-0-05f7fc646e0f@linaro.org > > 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 > > --- > Dmitry Baryshkov (5): > soc: qcom: pdr: protect locator_addr with the main mutex > soc: qcom: pdr: fix parsing of domains lists > soc: qcom: pdr: extract PDR message marshalling data > soc: qcom: add pd-mapper implementation > remoteproc: qcom: enable in-kernel PD mapper > > drivers/remoteproc/qcom_common.c | 87 +++++ > drivers/remoteproc/qcom_common.h | 10 + > drivers/remoteproc/qcom_q6v5_adsp.c | 3 + > drivers/remoteproc/qcom_q6v5_mss.c | 3 + > drivers/remoteproc/qcom_q6v5_pas.c | 3 + > drivers/remoteproc/qcom_q6v5_wcss.c | 3 + > drivers/soc/qcom/Kconfig | 15 + > drivers/soc/qcom/Makefile | 2 + > drivers/soc/qcom/pdr_interface.c | 17 +- > drivers/soc/qcom/pdr_internal.h | 318 ++--------------- > drivers/soc/qcom/qcom_pd_mapper.c | 676 ++++++++++++++++++++++++++++++++++++ > drivers/soc/qcom/qcom_pdr_msg.c | 353 +++++++++++++++++++ > 12 files changed, 1190 insertions(+), 300 deletions(-) > --- > base-commit: e5119bbdaca76cd3c15c3c975d51d840bbfb2488 > change-id: 20240301-qcom-pd-mapper-e12d622d4ad0 > > Best regards, Tested-by: Neil Armstrong # on SM8550-QRD Tested-by: Neil Armstrong # on SM8550-HDK Tested-by: Neil Armstrong # on SM8650-QRD Thanks, Neil