From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FE64C83F17 for ; Wed, 30 Aug 2023 18:33:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232757AbjH3Sdg (ORCPT ); Wed, 30 Aug 2023 14:33:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245130AbjH3Ob2 (ORCPT ); Wed, 30 Aug 2023 10:31:28 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27D18193 for ; Wed, 30 Aug 2023 07:31:25 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-99bc9e3cbf1so206032166b.0 for ; Wed, 30 Aug 2023 07:31:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1693405883; x=1694010683; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=k7MRgYxQ/rskHMSwacRwQkPlWa4q6KhrBYjtpS5/K2k=; b=wpCgh2IXpcYDznF3K9ZFs4oSXTsbpDj8USbQzL7RXBGwd955+rVWxztkVYIipByKx5 ASV9ddV9sqz1Ay4lNVjiW/x+nIR+vBPhhWocHkFNW0TP4+hF54ZKOA01qskecl8/pAen M6tmKgLvnToliVewgFabFk0Gs271Qqhani7DfHcKsOhdYzfWbHaq383Nv/2Ke15bb3+h 7siE5iDH0LrfYj/7yy+ebqDcSv/z2Mn0uO00M4cVFC9J5jJqgRI+8jHT9ooA1tvm4QSJ supdSu9KHGYw7ve9Eu0FpRK98VfW1WJaU8uD8YsBwAUsOSDSv3En/7swKi4RvaOuICot 9W5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693405883; x=1694010683; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=k7MRgYxQ/rskHMSwacRwQkPlWa4q6KhrBYjtpS5/K2k=; b=XaONf/kv44MkLyChX61f51bZXawlJZ2IeN3lByeBzVpV0ht8tFwKFFyB5+2SqcKf5r s6oT7j+hv8m5Im/ChM2HEV8ME4yXdmtqerOV/3n2swue8GAWuMosTPFtiFpRh7gswsJf G2m+Y8dktyy4qZC4K6ii1yNrcFRp4zR7EGutJVOgC1IYA2eLtyKtCj7scHQhTZDO1KjJ OgQ38yywpSQN8PQBUVaRQHrxafRVgy2+zx01i1mLrFwrI+nagWWFOaR0JyvvVhjuoQEd H6dvZFPdDZrS/E3wcQHXrd41yM+8+TaxCczwqnTbhkelRIb95UNsCizGknI2PSGk4XQB ae1Q== X-Gm-Message-State: AOJu0YwURx8KosMNECKNGj0oYrwKyKlmeVwap6JAQfMaSqHd20ybEQ7M 7hxJ0+IVYo+bXHa5Tp2wnb8yeQ== X-Google-Smtp-Source: AGHT+IEYuob+ogJ2cn3jEWJnDOBU0Ct0kNqfWrlOusL37c4JbyVAYrGnYOxwg04hk2/YDSj8e21Uhw== X-Received: by 2002:a17:906:51c6:b0:9a1:f1b2:9f2e with SMTP id v6-20020a17090651c600b009a1f1b29f2emr2690005ejk.2.1693405883593; Wed, 30 Aug 2023 07:31:23 -0700 (PDT) Received: from [192.168.0.22] (77-252-46-238.static.ip.netia.com.pl. [77.252.46.238]) by smtp.gmail.com with ESMTPSA id pk18-20020a170906d7b200b00997e00e78e6sm7249902ejb.112.2023.08.30.07.31.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Aug 2023 07:31:22 -0700 (PDT) Message-ID: <587b738c-118a-5e1e-bb6b-ea3ca2b93234@linaro.org> Date: Wed, 30 Aug 2023 16:31:21 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH 06/11] firmware: qcom-shm-bridge: new driver Content-Language: en-US To: Bartosz Golaszewski Cc: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Catalin Marinas , Will Deacon , Arnd Bergmann , Alex Elder , Srini Kandagatla , kernel@quicinc.com, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org References: <20230828192507.117334-1-bartosz.golaszewski@linaro.org> <20230828192507.117334-7-bartosz.golaszewski@linaro.org> <8b7bada9-3898-1b60-3dea-766a760412f7@linaro.org> <86bb50fd-72f3-7c76-c4fe-f8e4765e33d5@linaro.org> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 30/08/2023 15:09, Bartosz Golaszewski wrote: >>>>> + >>>>> + return gen_pool_virt_to_phys(pool->genpool, (unsigned long)vaddr); >>>>> +} >>>>> +EXPORT_SYMBOL_GPL(qcom_shm_bridge_to_phys_addr); >>>>> + >>>>> +static int qcom_shm_bridge_probe(struct platform_device *pdev) >>>>> +{ >>>>> + struct qcom_shm_bridge_pool *default_pool; >>>>> + struct device *dev = &pdev->dev; >>>>> + int ret; >>>>> + >>>>> + /* >>>>> + * We need to wait for the SCM device to be created and bound to the >>>>> + * SCM driver. >>>>> + */ >>>>> + if (!qcom_scm_is_available()) >>>>> + return -EPROBE_DEFER; >>>> >>>> I think we miss here (and in all other drivers) device links to qcm. >>>> >>> >>> Well, SCM, once probed, cannot be unbound. What would device links >>> guarantee above that? >> >> Runtime PM, probe ordering (dependencies) detection. >> > > Shouldn't we cross that bridge when we get there? SCM has no support > for runtime PM. Probe ordering is quite well handled with a simple > probe deferral. This is also not a parent-child relationship. SHM > Bridge calls into the trustzone using SCM, but SCM is also a user of > SHM Bridge. OK Best regards, Krzysztof