From patchwork Wed Jun 9 06:09:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Wiklander X-Patchwork-Id: 456796 Delivered-To: patches@linaro.org Received: by 2002:a02:735a:0:0:0:0:0 with SMTP id a26csp4730206jae; Tue, 8 Jun 2021 23:09:18 -0700 (PDT) X-Received: by 2002:a2e:6c09:: with SMTP id h9mr3555419ljc.434.1623218958649; Tue, 08 Jun 2021 23:09:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623218958; cv=none; d=google.com; s=arc-20160816; b=ye7PUwIyNHePSfmWXD1BHYeEreXVqSc+oyCFq/Hmx3v42sJI0Hq9Xiwv9qRI9bvCw8 wPfckoJH3Pi8hM5KYHwOyRWTFUwVcz7lSc4m5joF1KsbGADXB6FiobCBV3epxym0jHm7 AeMvrBVTa3GnLLGuA7Kvx1pfQxAfOt51EZAYXLMyiystXpFGw20twsKsdIJCk8PQhhKb Hgcku95m4NeqzseWfBB+I+1lm+vjSABZBR1w04TJpr2gI0oE+L032SEokTVMslG2n5fJ GhbwHQqJb1v3mRcPMErixACZVPfbf+NFZDHc0LC9xBfw+InzTCxC9bz0g5kVBj9030o2 WB8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=xpRw0xQJ4DmRjPc3XZOXCq8Yj+A2BA3B/GaickI4wN8=; b=XUTM59GX26atjOwmUYihyDT7l+64u5cTGwq2eb/OSUKVxNJVa+gsSJHNuhapefIBtD 7ktONWt2V87oWMIvwsueS+SaO9SAghi2e/H4zU41vpJiFJQTSIbHXP1SHzbzwcVW1/5p vKW5zsQfusua0wr93H6umLYnVxqyysPoqCS6s9Rf9NaIfunCmnYRT6luZTd2ziFGgIgn Z5JkpBd9M0RKKhy98qzm7E2Jb48TXtZ3IfYIKaMOmNdlGz4TqpNnMIyRcJys4WXIPMSD 4P+LZnkbXDwF/gJJi/pvnWzQTE38ySU2eUIzMTXgjdFsRVb9Ccu7wiQ76N/bTsEmbm1Y Gdbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xVAfZE0A; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id s19sor868985ljj.5.2021.06.08.23.09.18 for (Google Transport Security); Tue, 08 Jun 2021 23:09:18 -0700 (PDT) Received-SPF: pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xVAfZE0A; spf=pass (google.com: domain of jens.wiklander@linaro.org designates 209.85.220.41 as permitted sender) smtp.mailfrom=jens.wiklander@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xpRw0xQJ4DmRjPc3XZOXCq8Yj+A2BA3B/GaickI4wN8=; b=xVAfZE0A8Unf98HcFCXuX4RZeOIC8Q5dOG09zV2gGNevdLM0zMJq3dLuzH57zS8DoX 3g7to94dmRnjqwU072m/snpS5qSZ1uK+THO+4bYMUC4R6ZtG97z1753bAaxxLfTfnw5p PsiE24KVo9JW2MWWQYmZloqVI3ItixT13V8B6o5VkETPAqsLnmdoGWthypSGqK8JsT9L vaTWLj1shu0bx6Zb+qwzXryK8c1HAF7qFV+S60IM2Bs0+8k24SIRw6ZCJSQLUuCGrx3x ektFdVrwjG+rdnfGMO3iRTeXqg/sKwwvfkoTQnmnYcLHfxYvbd269M2vh+Tgn3g1eUvy T9TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xpRw0xQJ4DmRjPc3XZOXCq8Yj+A2BA3B/GaickI4wN8=; b=HjcKrJA5h4jSpkYkC80zQdsoYBhbyiDl81yqz9uNTXT1tEbDEj9WLzI4NdX/y/DVg4 nUGPDYJNJkuKJlh8mPZoippanKtktVkUbEVsN4to9ub902wk42eruHFNYhFw0Jd+0kbb iDq89h5JY84eKE8o5BU12EB78AH2RFklPDQpaSDB3LPTIZQ2/LQ2cel9xAAWBLx4ZjIk 4M7ThJmhT1E2H2r0hBPg76GAC/+nOvs4hEdDRu8DvakVj3Ou/vHtDUEjolJefdIdcJAI oGS5rSVfBgpfhPGLJJnzmRBAIZXNKV48uUMWWHVwIE1kOTyM4iw+Wmy6iYGfb8W1y2c4 T74Q== X-Gm-Message-State: AOAM532p9IEM8rKdfMCGIGY6dIL9L5UC2586cClXgTT0Vxp2VtGtHoIf gkLnes2x3/YR45qF4AXW0XDjQaYF X-Google-Smtp-Source: ABdhPJyzlIexmGtILhLW7B9H59a3K8PmSTy1VOX2F2Hp6cFGPRPg1J0rmm+bT9kFOnkasmm0JfiFEg== X-Received: by 2002:a2e:9f47:: with SMTP id v7mr21932830ljk.333.1623218958271; Tue, 08 Jun 2021 23:09:18 -0700 (PDT) Return-Path: Received: from jade.urgonet (h-79-136-85-3.A175.priv.bahnhof.se. [79.136.85.3]) by smtp.gmail.com with ESMTPSA id l26sm213735ljg.87.2021.06.08.23.09.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Jun 2021 23:09:18 -0700 (PDT) From: Jens Wiklander To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, op-tee@lists.trustedfirmware.org Cc: Jerome Forissier , Etienne Carriere , Sumit Garg , Vincent Guittot , Jens Wiklander Subject: [PATCH 0/4] Asynchronous notifications from secure world Date: Wed, 9 Jun 2021 08:09:06 +0200 Message-Id: <20210609060910.1500481-1-jens.wiklander@linaro.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Hi all, This adds support for asynchronous notifications from OP-TEE in secure world to the OP-TEE driver. This allows a design with a top half and bottom half type of driver where the top half runs in secure interrupt context and a notifications tells normal world to schedule a yielding call to do the bottom half processing. An SPI interrupt is used to notify the driver that there are asynchronous notifications pending. Thanks, Jens Jens Wiklander (4): tee: fix put order in teedev_close_context() tee: add tee_dev_open_helper() primitive optee: separate notification functions optee: add asynchronous notifications drivers/tee/optee/Makefile | 1 + drivers/tee/optee/call.c | 27 ++++ drivers/tee/optee/core.c | 104 ++++++++++---- drivers/tee/optee/notif.c | 226 ++++++++++++++++++++++++++++++ drivers/tee/optee/optee_msg.h | 9 ++ drivers/tee/optee/optee_private.h | 23 +-- drivers/tee/optee/optee_rpc_cmd.h | 31 ++-- drivers/tee/optee/optee_smc.h | 79 ++++++++++- drivers/tee/optee/rpc.c | 73 ++-------- drivers/tee/tee_core.c | 37 +++-- include/linux/tee_drv.h | 27 ++++ 11 files changed, 512 insertions(+), 125 deletions(-) create mode 100644 drivers/tee/optee/notif.c -- 2.31.1