From patchwork Thu Aug 29 11:34:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 172617 Delivered-To: patch@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp2092813ily; Thu, 29 Aug 2019 04:36:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxIORWU85jJ1PCIhfRqQFfGymlFz6driXJTYl80NboXTHtGBezMvssDnnkwna7PMXEBw3Qz X-Received: by 2002:aa7:8a83:: with SMTP id a3mr10738295pfc.115.1567078600466; Thu, 29 Aug 2019 04:36:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567078600; cv=none; d=google.com; s=arc-20160816; b=DYiQ2OEnDW3Zsd6QjddISTKP2z9wYb5TyXZSudxhHRlkKxyqLtjEM/w4QHk1szJpbu dAEzhUyd2YlWuob10QVplWMYZ9R2sosYbQCj3+DK1EWjEkCI+viH53RevC8LelPDiTEV 9V2Mhm7K7SqToM4JvyR4o+hNZ0HR5PyEyuAmIWuLqQdJSCe+hjNFAo5KmO2Pbcewor6E K0YBs9Sc23rA1jyz+ozUZPOVKgSJprIY4SmQY6eZs5dDRCoD/WZzQeMXl+p8L/7ZGEuD ibRwo/fNqV6tHyyMllynJvhMnO8ZPX4fBdhj0f7oEUGaI+VZ4SZ9wUVx8G/kxFIbXa8Z 8x8A== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QAkAWOSid7lK0+CYFipQ6VxUVVXehQyD0WFI7UyGT+o=; b=L2JJydadTpq308QGQ4x+IMn82L6K+HG1MugJ6YyiuWAlqQww96YDXeYWL3FAKTbviQ 9IdOoKlaNsfNNjUPQZ4tDcEL7pTke21AJ3nZ+AL3+Xn5Y+nlLy0ka+ZX2KDO48vufsjh RGxNiWZHOuJUcekA0Yk3tGg18aAhhBKvOiOkK14TC3ZjfRt/5q8GAFVQUOu0c4EHFJWu jNXLjg6WR+yhXd4lLwQu6pZvVxPAm7oLLmj3Q5bd6ml1HwX83BSDyV74YmD7DFUk3QI7 WmtslYhfVos2upu9Xka+qaNo97KuTdG5BiLAqkBEUJlwe/CFtTx0AASvbmHcy1cKZ4YS HG8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CWNDmywD; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c67si2276378pfb.211.2019.08.29.04.36.40; Thu, 29 Aug 2019 04:36:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-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=@linaro.org header.s=google header.b=CWNDmywD; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727620AbfH2Lgj (ORCPT + 14 others); Thu, 29 Aug 2019 07:36:39 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:43340 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727066AbfH2Lgj (ORCPT ); Thu, 29 Aug 2019 07:36:39 -0400 Received: by mail-pg1-f194.google.com with SMTP id k3so1437518pgb.10 for ; Thu, 29 Aug 2019 04:36:39 -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=CWNDmywD9pwBoSyGrr+As4k3fmuk2k2e1Cj+YhyHwoayQ98EB8aWbyk0qtrgFFX8ab aVj+ZGKObm0d/C5Z/A/Nz6OT7wBkXe6cOp05PWhqrZRKRBN5Ow4TuLZwJFmEgbTUdKkw yrGwA36TGEbFabFc0dbcBZFc47loi7MIMCQuX0/g4yx5KBjLkkRImE7PriTYyeHftjxH pIApOewCjuzGA3UkACN5KdDuwCYA23Me5BXxuQajWqAcsrrh7Jt3xFu3gdl8A8T+9p+u iA2pL7GWbXmPwfouuSEsj9u73oy0HpXWKLf6BdUCwdTvUKpZVS5mWn8s8ANB8N6HuJGt 6WHQ== 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=ctfimmplnp4EF2ZpopLKw+0hMDEZnQorJOm3QU0q+jgn5BzeXowE+ly7Ol/LbzQzK4 3hQHwUON0hRJb2dVRsptVCNVETp1KiPhVV1uBu25XbYYT20XFDO4Iz/ATbHxGQuMWd6g 7cS3MwDRgev/TtDQ3nEA/Km3/GhZbVp6EAXoixjoD2ULwuUSzroXV84DHQ7Zfuq7Q3wV 0M2MvwY+Xjq8tjhsgIX1CWEpYwmiGyG4wpfpu14bwAM42mjHCpUUbdmLp5JKyZJ2cJQa hxvYGgN2DS0lIMWcz5Sb3rM4Qr0ANWuUflM35PZEogxDweB2quaPFFnG6d9bPul+48G8 ZQkQ== X-Gm-Message-State: APjAAAUIlsqBV8TILHV10fiU7D9PSBcptuK2o0gRyTKC8YRK5xbVL2P7 Fh+AVi4SVneu65QDEZZOmjNssjdV4iY= X-Received: by 2002:a65:4509:: with SMTP id n9mr7834393pgq.133.1567078598673; Thu, 29 Aug 2019 04:36:38 -0700 (PDT) Received: from localhost ([122.167.132.221]) by smtp.gmail.com with ESMTPSA id p90sm6514025pjp.7.2019.08.29.04.36.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Aug 2019 04:36:38 -0700 (PDT) From: Viresh Kumar To: stable@vger.kernel.org, Julien Thierry , Mark Rutland Cc: Viresh Kumar , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Marc Zyngier , Will Deacon , Russell King , Vincent Guittot , mark.brown@arm.com Subject: [PATCH ARM64 v4.4 V3 40/44] arm/arm64: smccc: Make function identifiers an unsigned quantity Date: Thu, 29 Aug 2019 17:04:25 +0530 Message-Id: <9bafd5233bd85eb31c7780a5d1149943da897e23.1567077734.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.21.0.rc0.269.g1a574e7a288b In-Reply-To: References: MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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: Viresh Kumar --- include/linux/arm-smccc.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.21.0.rc0.269.g1a574e7a288b 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