Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp922680lqd; Thu, 25 Apr 2024 00:10:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU0pPIInGJceBT02AcwL6GI6TS0bYZircn7D4LjxXwBjg+agBLXqFXI9ZyKkTAI0tGryxQgpg118utWL9eFDU4BGY8g3vhVMpW+VG0qGQ== X-Google-Smtp-Source: AGHT+IHkf+sD8Mw5+GfMFLBJISDdgsB99Fd0stbxHcH31Egt9D0ToT0rqa6PuTRl8nIuDi9vEzOo X-Received: by 2002:a05:620a:f10:b0:790:5e5c:c666 with SMTP id v16-20020a05620a0f1000b007905e5cc666mr6723001qkl.24.1714029038888; Thu, 25 Apr 2024 00:10:38 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714029038; cv=pass; d=google.com; s=arc-20160816; b=yoEHeOpok4wUogxsug4lm4Tj1pzHiAss96e7Vsh27X242Xy/4DIyMPOtwFzFy+fbY/ ujyregIOd12PsOwLpNLPMMZUaTPY2RoPXFflXFDIBYtNrqnnqtaX9HdIlmoD8Polw6KF TJQpYdXiLACTmiNPK7JXiAcl01YaZ8mLAgBAxBkSTlYwvODlnUfEEoXGFcn8pbIm8hqM oiqdq8mtrH4XCC+byWpKYcoh6YTZnKqRg6N4vqzxvUPFJMjwyc+lFh6oWyB1OgE1RGQN U7LTqaGb2LCHvCdHdd5lT/fiUkRTZTiFIEFX/ddQzkSTTi2/PRTrPwb5YaW1K3UhQtAe 6dNw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=7oX94Z3yE7ZvhQXajp2mIOeyVn6muLJyVNKFNFAUgCM=; fh=gNTl2dSTWkyYmXDRenzcGb8f7aWkzk3/sS6l11hFyMw=; b=IBZZPD29yGNIZa27NvepkgcDyLAVOjSR0Lgrathujb91s86E6ckzFX8okj9rwt712s tSzB8snrPBlcOHf05cy7Ugh48zggQzNXoQBBwKYxG0loZumZqMpdPvv6f+ED9OOKJmrS sa0D+SC/SkLzb1GOiu6OI8EOJ3OaR7r6ABj4eDGeUxSbLP2TWXF1/qh1gDzVr2mZLPjT nj6MdokmviwAJO6EimfFZvZOfN5/5Ja7/d65d/jkLuya2tWOW2g5+5JOwdQ/SQOHVf7x U3LTXr2YGOqJ25gYouHmw4hRKJWJsCyEv+/gtmW1P66dblbTOnzHhzNbYsbU21S3mnN6 2N9w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=HaAVBR2t; 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-158102-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158102-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id pe15-20020a05620a850f00b0078ebade24b1si16313041qkn.548.2024.04.25.00.10.38 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 00:10:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158102-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=@linaro.org header.s=google header.b=HaAVBR2t; 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-158102-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158102-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 8F17D1C2294C for ; Thu, 25 Apr 2024 07:10:38 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D6496A031; Thu, 25 Apr 2024 07:10:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="HaAVBR2t" Received: from mail-yb1-f180.google.com (mail-yb1-f180.google.com [209.85.219.180]) (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 02BBC3C08F for ; Thu, 25 Apr 2024 07:10:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714029032; cv=none; b=G6lq3YzWfRWnw+QEQXcSFnKZ3goFpwXPf96ToHxUoDRFi5OV764a+mH8XUr84l5WMuE4LlmXtdtbfp5rZZEKQ5xOLo/lO8RzgMahPgQ2zXYr0hob/BNKefejRZnT2NHXep6+LjM2qqEgJL7X6Lz4CIQhDe840hlVO9QMmuNySAY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714029032; c=relaxed/simple; bh=UosUzcAmwAOmYz9QmcT8Kb2jGebrbGq4Ag1KzqJ9J30=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=HTE77aT84bhnbOhhy0LHmZ6b14+EqCRvHA5jBy9S3pVFRI55mgZpFfnEDIQ0KBfIWGDdZ1nEhrzhc0/+q1O/Dpfw0ImEgGoOh5BgaQa/vvhZtd1fQx63pk3HUegpM1c1udpgwqMWhe6OnRAreKM90JQ/0Bp9nvOwMj1lB4efBKQ= 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=HaAVBR2t; arc=none smtp.client-ip=209.85.219.180 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-yb1-f180.google.com with SMTP id 3f1490d57ef6-de477949644so753629276.1 for ; Thu, 25 Apr 2024 00:10:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1714029029; x=1714633829; 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=7oX94Z3yE7ZvhQXajp2mIOeyVn6muLJyVNKFNFAUgCM=; b=HaAVBR2t2uEvmWpUJWSamKjcGulEiNRVBKtoheA+XQwiSBclHTY5EzR0wxmp7/KmrN lB1Qjm/2c4xXJqDGvAzBOrk5OQglgB1ck4QOSoc+6A7JMW/KMdz75ai3D4TE/n/NMYzl fMLOD0gPQlRWGsRYqP7DAXyHvVcumaTFVkP31aEe3KiEKrLb7mJnmga97yJGXCMGZixe 5EOP4sqJHLZuZh73vs+DeRwCnzU8tybYgUqMYRTXJMVnx3cLOs1zUS3NW4DzOfSf/Bpe A9WZmZ0B7+e2uSgoy9lN3bZj8MyG599IBCAMflP+lAeb+elo0ZouZjgf/3Pb+U2fYWYa V7AA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714029029; x=1714633829; 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=7oX94Z3yE7ZvhQXajp2mIOeyVn6muLJyVNKFNFAUgCM=; b=kOkLDqWyPelR7TDK3N6bRs8dsWsqSldBhIfhl2N/rpQfBftv7Gi6jRHJEiUUqJjcbu nuC1ADnBhHl/oZsOJE8bXkJiKR9KpsBil2rBan5pak3mbDM6sdppFcu360JT3f9tLvAI dNdpxql4XudJ0Ga1Ufxae/aguSQcQtoucWLBLduwu9KxZVXCytn91vDlQwmnhFv8sRbE QXo8R/rQnFBPKVZrB7hiQ5gmLOGydU0iG35YVMJFXPuzqjzRghP0TzI32wiWGl2rYYAK FdfnFKTwY6nkXze4mRQOQS2FWE8gms0535yJm0kQwYUE51B5arUfBdBzu8QvXlTmjv8J ustg== X-Forwarded-Encrypted: i=1; AJvYcCU/AdaNO5YzNS3d+pxM3ZsP+IVeEK/DFH4vOOn1WAsqgtuelxvVSx9l+kT7HkiarsyiNw8qmDYhF0g7LQvUr28961LuMeSpdJxDKudP X-Gm-Message-State: AOJu0Ywp8whQabvKyt6A1GoY3+a2ALMOSqZigUAmevohtXM+AuWXtDKc 456rTT2xMDBT2YX2N+YlH5i6kg+TvVgXAfC38RAc76oQdkjVBtpKyp5ThVh48V5ETUCbtRqdTO0 OXPX0jpU0eLYg1XOqjY9xEsGj0Jyrbd+nOUNXRQ== X-Received: by 2002:a25:ef0e:0:b0:dcc:f5d4:8b43 with SMTP id g14-20020a25ef0e000000b00dccf5d48b43mr5704734ybd.9.1714029029048; Thu, 25 Apr 2024 00:10:29 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240424-qcom-pd-mapper-v7-0-05f7fc646e0f@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Thu, 25 Apr 2024 10:10:18 +0300 Message-ID: Subject: Re: [PATCH v7 0/6] soc: qcom: add in-kernel pd-mapper implementation To: Steev Klimaszewski Cc: Bjorn Andersson , Konrad Dybcio , Sibi Sankar , Mathieu Poirier , 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 25 Apr 2024 at 10:08, Steev Klimaszewski wrote: > > Hi Dmitry, > > On Wed, Apr 24, 2024 at 4:28=E2=80=AFAM 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 o= r > > for properly starting up the UCSI / altmode / battery manager support. > > > > The existing userspace implementation has several issue. It doesn't pla= y > > well with CONFIG_EXTRA_FIRMWARE, it doesn't reread the JSON files if th= e > > 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 th= e > > 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-f9= 6957d01207@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-e3= 5b6f847e99@linaro.org > > > > Changes in v5: > > - pdr: drop lock in pdr_register_listener, list_lock is already held (C= hris 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-24= 679cca5c24@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-68= 58fa1ac1c8@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-5d= 12a081d9d1@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 (6): > > 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: qmi: add a way to remove running service > > soc: qcom: add pd-mapper implementation > > remoteproc: qcom: enable in-kernel PD mapper > > > > drivers/remoteproc/Kconfig | 4 + > > drivers/remoteproc/qcom_q6v5_adsp.c | 11 +- > > drivers/remoteproc/qcom_q6v5_mss.c | 10 +- > > drivers/remoteproc/qcom_q6v5_pas.c | 12 +- > > drivers/remoteproc/qcom_q6v5_wcss.c | 12 +- > > drivers/soc/qcom/Kconfig | 14 + > > drivers/soc/qcom/Makefile | 2 + > > drivers/soc/qcom/pdr_interface.c | 6 +- > > drivers/soc/qcom/pdr_internal.h | 318 ++--------------- > > drivers/soc/qcom/qcom_pd_mapper.c | 656 ++++++++++++++++++++++++++++= ++++++++ > > drivers/soc/qcom/qcom_pdr_msg.c | 353 +++++++++++++++++++ > > drivers/soc/qcom/qmi_interface.c | 67 ++++ > > include/linux/soc/qcom/pd_mapper.h | 28 ++ > > include/linux/soc/qcom/qmi.h | 2 + > > 14 files changed, 1193 insertions(+), 302 deletions(-) > > --- > > base-commit: a59668a9397e7245b26e9be85d23f242ff757ae8 > > change-id: 20240301-qcom-pd-mapper-e12d622d4ad0 > > > > Best regards, > > -- > > Dmitry Baryshkov > > > > > I've tested this series over a large number of reboots, and the p-d > devices(?) do always seem to come up (with the pd-mapper service > disabled) on my Thinkpad X13s. One less service to run in userland! > Tested-by: Steev Klimaszewski Thank you! --=20 With best wishes Dmitry