From patchwork Fri Jun 14 03:08:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 10994225 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A996513AD for ; Fri, 14 Jun 2019 03:26:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 96403212BE for ; Fri, 14 Jun 2019 03:26:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 840A1262AE; Fri, 14 Jun 2019 03:26:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 262ED212BE for ; Fri, 14 Jun 2019 03:26:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SN6CbOE6sJwLsMZWWfqvuVy/FQqu158LBIK0N6r25TE=; b=ahZpy3N/ZYX0Jg RsLw3V67Rvw1z8rfi/5p6beG7b/aGG0oaCxdH1YNVQjlf/TDMqwXKTKNhTgVx1dF7Igjglr10wb7U 3Sz9cez+Ze97auIT1GPKiqqkPEmYfOwGuyNoM30Y2kYRzC7UVwC4/8fe2jl5UKz9ftsiXqj0zR6ot J/LcQypEk+yHF0E7hcVdVy/XncYIysFC9DCdmpRVf8+jalefWa6YCdrU3TUHlV4tOUIcon+b7bzyh oY7KBSQeIB8Atk3357LiVJ1CUXVw+JoZzv/AOWMP9/T5LAyVOP6jBVwNSC+xfaltDypCFnB9w+gck YWLVAAoTL3ReDusZnmgw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hbcr6-000712-VC; Fri, 14 Jun 2019 03:26:20 +0000 Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hbcet-0001GB-FO for linux-arm-kernel@lists.infradead.org; Fri, 14 Jun 2019 03:13:46 +0000 Received: by mail-pl1-x643.google.com with SMTP id a93so375274pla.7 for ; Thu, 13 Jun 2019 20:13:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QAkAWOSid7lK0+CYFipQ6VxUVVXehQyD0WFI7UyGT+o=; b=dmFfqE3RSIU4Ho6hkmSADd23EX+tld4u3806oEUalpRrZVS1cmqp5pzecti/qkD7MZ 9Q3F2qViabRLb87OzNLEHUqavrai4vT1AePqeLFjnkK9PoK0AfUNYJH2+KI7xJBPS6r7 pCpMcHoGyhyHHrUyjEX+zzBhOGuN+rle9DTQ5CMxtawV8Ggri+/OhRLNOYiPgc1txdxD 283Mtizasgg7BvjljAVyKErkf04q+T1Mg7+g9U5s1atYL96TtGRaJL5dYuqOaa3CE2St bygSaCJMOu8636e0BsJZ7m6fYlBUCXIEHTfkTcduBKpFjhZM03cCN79RPuIq2AqaekHK M8BQ== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=QAkAWOSid7lK0+CYFipQ6VxUVVXehQyD0WFI7UyGT+o=; b=MlkZPzlyM+mO9IfMme/5V2n2K+Cf0eCD6CQ94w6RA1C3fP/zo8E4jn6h8aZEeWBgvG pkwS8GFybpCv2aYsJEQUu2aC6U4oR2mOZMngqJBg8YlEusSEJFNEnDK+adzU3HhOFEXC h0ZH4WuuOnYhEOUbZJ1BjvlSvJ+ATIDYg+MWkSFQxl7tUB0x5F3nN8IQV4i/La6rCIOf E1L8vhPPklKvHXWF7PVQeQgburOy8WtFSrrALkwv0i97Xe7xhHDqbe8s0oCNPidCNCWi dn5Hj5MDxiR207rCnn5tmX9N6Dub5NDn6gdeub8RMbNbjwB8T3pl630IJNOygndQV/AN FraA== X-Gm-Message-State: APjAAAWYPrSIgMewYkVbe9BKEAoDlT7+LaBxzvv+GWLbp8TBxy5NGhPv rfuqZruHrf+vzlmxQbnCsDEdiq90BcE= X-Google-Smtp-Source: APXvYqyAyZ6ezMbTYaeyEBCrulKG7P31Vp4EkUjjkKOUpO/xEIqEm4KkSwVqRI5sN5z41GtbmWE4AA== X-Received: by 2002:a17:902:7c04:: with SMTP id x4mr31949468pll.70.1560482021795; Thu, 13 Jun 2019 20:13:41 -0700 (PDT) Received: from localhost ([122.172.66.84]) by smtp.gmail.com with ESMTPSA id w187sm1079648pfb.4.2019.06.13.20.13.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 20:13:41 -0700 (PDT) From: Viresh Kumar To: linux-arm-kernel@lists.infradead.org, Julien Thierry Subject: [PATCH v4.4 41/45] arm/arm64: smccc: Make function identifiers an unsigned quantity Date: Fri, 14 Jun 2019 08:38:24 +0530 Message-Id: <5aeb3eee8907e3b49c19614c5c104f8a598faa95.1560480942.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.21.0.rc0.269.g1a574e7a288b In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190613_201343_558848_6D09CC6F X-CRM114-Status: GOOD ( 11.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Marc Zyngier , Viresh Kumar , Will Deacon , stable@vger.kernel.org, mark.brown@arm.com, Catalin Marinas , Russell King Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Marc Zyngier commit ded4c39e93f3b72968fdb79baba27f3b83dad34c upstream. Function identifiers are a 32bit, unsigned quantity. But we never tell so to the compiler, resulting in the following: 4ac: b26187e0 mov x0, #0xffffffff80000001 We thus rely on the firmware narrowing it for us, which is not always a reasonable expectation. Cc: stable@vger.kernel.org Reported-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Reviewed-by: Robin Murphy Tested-by: Ard Biesheuvel Signed-off-by: Marc Zyngier Signed-off-by: Catalin Marinas Signed-off-by: Viresh Kumar --- include/linux/arm-smccc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index 1f02e4045a9e..4c45fd75db5d 100644 --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h @@ -16,6 +16,7 @@ #include #include +#include /* * This file provides common defines for ARM SMC Calling Convention as @@ -23,8 +24,8 @@ * http://infocenter.arm.com/help/topic/com.arm.doc.den0028a/index.html */ -#define ARM_SMCCC_STD_CALL 0 -#define ARM_SMCCC_FAST_CALL 1 +#define ARM_SMCCC_STD_CALL _AC(0,U) +#define ARM_SMCCC_FAST_CALL _AC(1,U) #define ARM_SMCCC_TYPE_SHIFT 31 #define ARM_SMCCC_SMC_32 0