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 X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C52F1C5DF60 for ; Fri, 8 Nov 2019 12:36:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9BB5D222C6 for ; Fri, 8 Nov 2019 12:36:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573216596; bh=eXsPx6g2htrTWxGDDFeZO3cZPAUOiKL3Y2Y3MDblzsc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=NiXYy6iC1tvhed7PnDRR/Ahs3pxjilREjY+f+xOGXFd/7XUdY0tgz63wkQrNoZLhB DdqO5azAECJoOrurnDyX57IzppoDVPfqvBYEb0v+ZzgKGPzQw04IE35TN+BE3j+T+7 Dy4A6IMkj3Gh6c/Z5MMp4u+peJ7ZBe3PLf0Z4MZo= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726977AbfKHMgg (ORCPT ); Fri, 8 Nov 2019 07:36:36 -0500 Received: from mail.kernel.org ([198.145.29.99]:44112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726121AbfKHMgg (ORCPT ); Fri, 8 Nov 2019 07:36:36 -0500 Received: from localhost.localdomain (lfbn-mar-1-550-151.w90-118.abo.wanadoo.fr [90.118.131.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4EB4A2245C; Fri, 8 Nov 2019 12:36:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573216595; bh=eXsPx6g2htrTWxGDDFeZO3cZPAUOiKL3Y2Y3MDblzsc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WWKmmvJJBo+mHm6IG+Qm3vri3P5p/42onQJNwBBwIhc9XVjRWWGoyDXMwCeXmsSlW MQs8eEnYjW1xaOlb02xKACzOj5lcxZLdCQ9t+9L0KvPvNH/stqaodVoq+LgC7WXmoD zB77/9nLHnzqLjeXW5WEToaPB804RJ1fevTFDkLw= From: Ard Biesheuvel To: stable@vger.kernel.org Cc: linus.walleij@linaro.org, rmk+kernel@armlinux.org.uk, Marc Zyngier , Ard Biesheuvel Subject: [PATCH for-stable-4.4 14/50] arm/arm64: smccc: Add SMCCC-specific return codes Date: Fri, 8 Nov 2019 13:35:18 +0100 Message-Id: <20191108123554.29004-15-ardb@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191108123554.29004-1-ardb@kernel.org> References: <20191108123554.29004-1-ardb@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Marc Zyngier commit eff0e9e1078ea7dc1d794dc50e31baef984c46d7 upstream. We've so far used the PSCI return codes for SMCCC because they were extremely similar. But with the new ARM DEN 0070A specification, "NOT_REQUIRED" (-2) is clashing with PSCI's "PSCI_RET_INVALID_PARAMS". Let's bite the bullet and add SMCCC specific return codes. Users can be repainted as and when required. Acked-by: Will Deacon Reviewed-by: Mark Rutland Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas Signed-off-by: Marc Zyngier Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ard Biesheuvel --- include/linux/arm-smccc.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index eb79d0e21148..a4eec441f82d 100644 --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h @@ -264,5 +264,10 @@ asmlinkage void arm_smccc_hvc(unsigned long a0, unsigned long a1, */ #define arm_smccc_1_1_hvc(...) __arm_smccc_1_1(SMCCC_HVC_INST, __VA_ARGS__) +/* Return codes defined in ARM DEN 0070A */ +#define SMCCC_RET_SUCCESS 0 +#define SMCCC_RET_NOT_SUPPORTED -1 +#define SMCCC_RET_NOT_REQUIRED -2 + #endif /*__ASSEMBLY__*/ #endif /*__LINUX_ARM_SMCCC_H*/ -- 2.20.1