From patchwork Tue Sep 11 09:09:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Chong X-Patchwork-Id: 146426 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp3411336ljw; Tue, 11 Sep 2018 02:09:48 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbpxQRkUitDyicSTsHHZcFx6eMXWyb1BaHGF8is+h1SoDL2aH7qGwvoEIjrKv5wgVmBPIsb X-Received: by 2002:a17:902:ba86:: with SMTP id k6-v6mr26422282pls.84.1536656988463; Tue, 11 Sep 2018 02:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536656988; cv=none; d=google.com; s=arc-20160816; b=YA520UPCeWWexvju5jnS9hKWRYJ3EYP1a3wHtBrUdVYUKusL2bIB0LDjlsNY4GKolB GwJSsmvADv82+vacyaGFxwZgvy9nqea15KO0wB/l7AN1EQp5X9WGjEx57bAwNMHeoAOf xokPJm9pOD65ztH/zl7dQeHbgjs/vP2ua/nPsWzugC83rvMthPfQOEyEEQWn/gaeHX27 14wG1ME+c7LSC5wmr/NgjvqSSOsS9A0a99t9ArZVc5Pgsx3lvRbqLPLrWnuFqjUSf12R C+6Yrz4SWC2UMeENLEGT8ONRlWwMyut8rqizs/em5reGlQZ3C9bqVTyVMqYD/lnBSO5J Nbfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :mime-version:dkim-signature; bh=vdVlnUzJtm5pEstycq/Rk8rhXbVcRAJrU61obM0wfUM=; b=NI3fJfHavdrltONu2dhCvL9u+hzYBc09fR5DzRK77pHPreyQRWAE6P+9dSPkASS6q6 U35iwHcqJNNLNSEnNoU7s0rZfI0T8p5eDswPiqZHxZW0oZv8TTdeClAyMJsAUk3i95Vu cUWWlRRYVNjPUj2wxEcOVnkfKPHCj4w/nGpwRL2uwXMTtvfA3C0pjKo55x5ZAyk5PQZ8 K8xkQUGcyThbrZ8PdJY/n5FSVXozq/4+spexuds5fgHwPippUWaN7d8zY5Aaedt70lXB jni5Tk0O49v0yJ0W0ybyS4Vfej0hkGIsrwAzcir1wFW2xuC6Uzo+PIWlGYqpfnRHDgZd 3p2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TRduqyJt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 9-v6si20635021pgf.599.2018.09.11.02.09.48; Tue, 11 Sep 2018 02:09:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TRduqyJt; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727009AbeIKOII (ORCPT + 32 others); Tue, 11 Sep 2018 10:08:08 -0400 Received: from mail-lj1-f194.google.com ([209.85.208.194]:35369 "EHLO mail-lj1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726546AbeIKOII (ORCPT ); Tue, 11 Sep 2018 10:08:08 -0400 Received: by mail-lj1-f194.google.com with SMTP id p10-v6so20240824ljg.2 for ; Tue, 11 Sep 2018 02:09:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:from:date:message-id:subject:to:cc; bh=vdVlnUzJtm5pEstycq/Rk8rhXbVcRAJrU61obM0wfUM=; b=TRduqyJtihJlzTpcyN5ZkrXo8hFswui56Grlv8nxzxaCLxGTD+XX6MCyOMi+qmPUM7 RZVXRGv6aDZpj2QXo7vx+E9Dq9SLnMi42F0RN6f8CytUbHQqz8x9cA+TH0CJJ88MXjQa tIsWdwWNMusj8NkhK0nlsVmnpCjKmGaublIds= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=vdVlnUzJtm5pEstycq/Rk8rhXbVcRAJrU61obM0wfUM=; b=Mqc6o0IsPb231O+28DY5ALDyfOa3uZp4FtR+0RvZaJI3TubmjtIDiTgACikRS8iExT v9EbvuG+EOHeVVzUO4eZbghqDtNoARVcXiI1L9txuD/33nvu44M2mXc5KXZnOyN4fpAp bVE6W13uNcmlJwPYPsPvWR9e5iE62C9bxKmk+/1aecffr0hOOP0Hstl2anFtk804k86N 9GtWrAZBO+MsoryeXJizyIscRFqvFBKdaZayCdWcW57X5HluZ8M7sLlNM+XV3vco8XGo gsO/aBZFDvOVCNk8kGfjwnOAs8WyzY83gb0/tMvfGRdJroMiLzjwqKpE5M/LZj4CPFoH 2NHQ== X-Gm-Message-State: APzg51CuoqtAYXCKRn8nsR5Fqp5lcD0ay42wZClIELkHz/GxeI3I2toG 3zJM1RQFfn3s8PmYtUQ/EVoiyXUQkF72Pwet0QDZBQ== X-Received: by 2002:a2e:934d:: with SMTP id m13-v6mr1002360ljh.45.1536656983685; Tue, 11 Sep 2018 02:09:43 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:118f:0:0:0:0:0 with HTTP; Tue, 11 Sep 2018 02:09:02 -0700 (PDT) From: Victor Chong Date: Tue, 11 Sep 2018 18:09:02 +0900 Message-ID: Subject: [PATCH v2] tee: optee: log message if dynamic shm is enabled To: Jens Wiklander Cc: tee-dev@lists.linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When dynamic shared memory support is enabled in the OP-TEE Trusted OS, it doesn't mean that the driver supports it, which can confuse users during debugging. Log a message when dynamic shared memory is enabled in the driver, to let users know for sure. Suggested-by: Jerome Forissier Signed-off-by: Victor Chong Reviewed-by: Jerome Forissier --- v2: * Added patch description [v1] lore.kernel.org/patchwork/patch/983949/ drivers/tee/optee/core.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.17.1 diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index e1aafe842d66..cca5c091e55a 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -631,6 +631,9 @@ static struct optee *optee_probe(struct device_node *np) optee_enable_shm_cache(optee); + if (optee->sec_caps & OPTEE_SMC_SEC_CAP_DYNAMIC_SHM) + pr_info("dynamic shared memory is enabled\n"); + pr_info("initialized driver\n"); return optee; err: