From patchwork Fri Nov 8 18:49:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 178931 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp3123115ilf; Fri, 8 Nov 2019 10:53:35 -0800 (PST) X-Google-Smtp-Source: APXvYqz3bWkFsyizOWopN2x5QC7srEEpWjlOYd1ioClq0E6xd/0c+YLQEDwko3sVAbGqSkCxwBNv X-Received: by 2002:a05:6402:1692:: with SMTP id a18mr12044411edv.297.1573239215404; Fri, 08 Nov 2019 10:53:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573239215; cv=none; d=google.com; s=arc-20160816; b=c8KYlog/4caFzGHndiZvbwnYOewms9wxmvx8KWnF+mfrgIHpDp+HYr9/0PHKVAEA9r WH9Bu2tEXd4UZ+Z+0w6rBH4Lx5Hk85rG7V4OLzzWyyUBBkRMy0AwA3tu5HUfYpVa4Z6Z S7zoMapgF8gjmhhwqWcOjBJJmW8xiRnDniy9wM1PKFCAgyMmroy26qNSGAi3HH3v8wc4 d+ey4s19ycuqM2HdjHlmLzJ0M/beI+9oPSqUArUzKk3lHz2ZyXmnE+nrWS8foa5h7D7P ZivQxJY3Cz9SFWx06UqP9PTCAfevohvz1MG67IIDFZX7cpfrynoLQhg7O0NUAoLMAUwN AuIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=a30r/Z+PJStDnk+pqhGFZMx8w3NTLfsflNrI7Sj5+hc=; b=mhmc5AO6KC9JhX0EgfjZF/F82LYjdCdseF4Zvs3cHmVyTL6WFMQG1WKU0VXwFIY8dv st2RLUA3nZ5trAkmnOzoQ8bIgKxqb+qEDVRrcS7wOpEiMQBNT3KiKT/yipmocR7iU3Lo ra/KHW1oRB25Gvt9Hw5N7I7Y+8uazUmJTmEZnSxSnoYhjwU9slCa+mC4zDH9YzbnpcIT D4QADSBcDPJLDw64Tz+BRwFITsqzmfq1KA6c+DT5deQlIfZ7fJeWh9rg25i7SzS4lhJ9 h3gPIp9Ho5BEpPBZKZaq3OvCepJx5A+6gDXq5bs/JoTC/xJRh08psvwiXBXN1l/Xc9Ey dDLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zXKwNwBG; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d6si5306393eda.262.2019.11.08.10.53.35; Fri, 08 Nov 2019 10:53:35 -0800 (PST) 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=@kernel.org header.s=default header.b=zXKwNwBG; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732426AbfKHSxd (ORCPT + 26 others); Fri, 8 Nov 2019 13:53:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:50140 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732341AbfKHSx3 (ORCPT ); Fri, 8 Nov 2019 13:53:29 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 128B3218AE; Fri, 8 Nov 2019 18:53:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1573239208; bh=5q8MdXl36BTYt1/zFIU1xr7uiq22NFrK9WPUMpYkyg0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zXKwNwBG+CZ7/p032AlPwQ0E6MGBcUyM3Vtq7DUrbPzN+PvlKpbRz/A2rD7OhKi67 O99fWLmo28k/qTPkBKFZ4mbVHL8vCKoOMq0O1FUy98A371UW0wPV8vTFx8XYUBjwQ4 v8+i9D3ZzMAgUQS+oJsj0FQDZFLYC2mh8IaQ4Lvc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Greg Kroah-Hartman , Ard Biesheuvel , Robin Murphy , Marc Zyngier , Catalin Marinas , Greg Hackmann , Ard Biesheuvel , Mark Rutland Subject: [PATCH 4.4 35/75] arm/arm64: smccc: Make function identifiers an unsigned quantity Date: Fri, 8 Nov 2019 19:49:52 +0100 Message-Id: <20191108174744.434421656@linuxfoundation.org> X-Mailer: git-send-email 2.24.0 In-Reply-To: <20191108174708.135680837@linuxfoundation.org> References: <20191108174708.135680837@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: Mark Rutland [v4.9 backport] Tested-by: Greg Hackmann Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ard Biesheuvel Signed-off-by: Greg Kroah-Hartman --- include/linux/arm-smccc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h @@ -14,14 +14,16 @@ #ifndef __LINUX_ARM_SMCCC_H #define __LINUX_ARM_SMCCC_H +#include + /* * This file provides common defines for ARM SMC Calling Convention as * specified in * 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