From patchwork Thu Jan 19 16:58:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Gross X-Patchwork-Id: 91975 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp373661qgi; Thu, 19 Jan 2017 09:00:46 -0800 (PST) X-Received: by 10.55.12.14 with SMTP id 14mr8657335qkm.308.1484845246251; Thu, 19 Jan 2017 09:00:46 -0800 (PST) Return-Path: Received: from bombadil.infradead.org ([65.50.211.133]) by mx.google.com with ESMTPS id k17si2988063qkl.154.2017.01.19.09.00.46 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 19 Jan 2017 09:00:46 -0800 (PST) Received-SPF: neutral (google.com: 65.50.211.133 is neither permitted nor denied by best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org) client-ip=65.50.211.133; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=neutral (google.com: 65.50.211.133 is neither permitted nor denied by best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cUG4q-0005ib-Os; Thu, 19 Jan 2017 17:00:44 +0000 Received: from mail-ot0-f177.google.com ([74.125.82.177]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cUG4Q-0004SI-86 for linux-arm-kernel@lists.infradead.org; Thu, 19 Jan 2017 17:00:20 +0000 Received: by mail-ot0-f177.google.com with SMTP id f9so36430152otd.1 for ; Thu, 19 Jan 2017 08:59:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=jmTPwWuRkV+fzJqNqzRWs4ejIxHeUr1QqQu/viIyAYs=; b=SpKzdUqP2od89cCJhqSQ5j3RKLAkAUgGMG60tOqq+CGn6tmEsvXt1yEZBLOmirUESp 3oIu+u+gBpGAh4MLGYHR8KVVbfufp6gAfOQLFcQT12rwb4W675Qd5nwRZU4bIWnCX9+t rY02QYZ2DG7O4sXeeBdY/hVYaYUg2ZzmlijoU= 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; bh=jmTPwWuRkV+fzJqNqzRWs4ejIxHeUr1QqQu/viIyAYs=; b=ozg8WUhGdWghAX69o7NHwjtA2CneqDDh3MHCSIHhbBVPUH61NzMBKkwUuZ/91SJIVT db/GBFqVMP76zGthxGH3RJzmQQg4lBk+gQgcIT9PKdZFgkGS/ORiSGYgaa7jWEKVxu5M s6KOVLg/MiHMHKM/OhVA63mi/qCvhAiyVoalEDNZ2MEWiJjQintu2wpA/38V2phH1Sas oMqza9rNgg+WK1wAljvsmziwoeEcvMqOXwtAEVzbwLRVUkC8WWi6JnaEgL/ZqrNZ50bT J4jMD0lb4qL059ESPBm5jBifyQ6UY8M+fwngNe2ySu3BCd3bQ/28Em2oaKlCnkVOVx7a i03A== X-Gm-Message-State: AIkVDXJ9fqwR0FIHqXt82mq0AriYNm4JYij+0aj6S8h5RXZB2261a3yL7EFVBeBxiHxvk18T X-Received: by 10.157.32.17 with SMTP id n17mr4702132ota.123.1484845137163; Thu, 19 Jan 2017 08:58:57 -0800 (PST) Received: from localhost ([2602:306:3406:6500:858:937d:2536:79fb]) by smtp.gmail.com with ESMTPSA id g6sm2189779otb.10.2017.01.19.08.58.56 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 19 Jan 2017 08:58:56 -0800 (PST) From: Andy Gross To: linux-arm-kernel@lists.infradead.org Subject: [Patch v4 0/2] Support ARM SMCC SoC vendor quirks Date: Thu, 19 Jan 2017 10:58:38 -0600 Message-Id: <1484845120-3364-1-git-send-email-andy.gross@linaro.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170119_090018_343981_867F0A73 X-CRM114-Status: GOOD ( 10.41 ) X-Spam-Score: -2.0 (--) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-2.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.177 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: lorenzo.pieralisi@arm.com, linux-arm-msm@vger.kernel.org, will.deacon@arm.com, linux-kernel@vger.kernel.org, Bjorn Andersson , Kevin Hilman , Andy Gross , linux@armlinux.org.uk MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org At least one SoC vendor (Qualcomm) requires additional processing done during ARM SMCCC calls. As such, an additional parameter to the arm_smccc_smc is required to be able to handle SoC specific quirks. The Qualcomm quirk is necessary due to the fact that the scm call can be interrupted on Qualcomm ARM64 platforms. When this occurs, the call must be restarted using information that was passed back during the original smc call. The first patch in this series adds a quirk structure and also adds a quirk parameter to arm_smccc_smc calls. I added macros to allow users to choose the API they need. This keeps all of the current users who do not need quirks from having to change anything. The second patch adds the Qualcomm quirk and also implements the Qualcomm firmware changes required to handle the restarting of the interrupted SMC call. The original patch set for the SMCCC session ID is located at: https://lkml.org/lkml/2016/8/20/7 Changes from v3: - Fix documentation Changes from v2: - Use variadic macros Changes from v1: - Add macros to handle both use cases per review comments Andy Gross (2): arm: kernel: Add SMC structure parameter firmware: qcom: scm: Fix interrupted SCM calls arch/arm/kernel/armksyms.c | 2 +- arch/arm/kernel/smccc-call.S | 7 ++++--- arch/arm64/kernel/arm64ksyms.c | 2 +- arch/arm64/kernel/asm-offsets.c | 7 +++++-- arch/arm64/kernel/smccc-call.S | 16 ++++++++++++---- drivers/firmware/qcom_scm-64.c | 13 ++++++++++--- include/linux/arm-smccc.h | 38 +++++++++++++++++++++++++++++++------- 7 files changed, 64 insertions(+), 21 deletions(-) -- 1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel