From patchwork Fri Jul 12 05:28:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 168898 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp395910ilk; Thu, 11 Jul 2019 22:30:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqwU/Bp+lL585zau3kl3CgtqWWu2huFhrcJZpEKdLMcbGZGH6twpFTHMGGdE/LTFl85zR/v8 X-Received: by 2002:a17:90a:d343:: with SMTP id i3mr9789297pjx.15.1562909447929; Thu, 11 Jul 2019 22:30:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562909447; cv=none; d=google.com; s=arc-20160816; b=gHqqhvEgYcTSUs7dbgMv7RtYNYQlsYAwoZPWMTA04UYCCTCiVHLzn+I0WpWpTAJAIb SvywdP/Nxcb5cpGnog9/q2dUkvNfpKsbBIGGuk07qjAhrV6MVsDUft0hy49Ho5RstNtr o0NZGrfgEN8xtveH2YFfpywSLDQitmSd4fc9r9XQ7AspLfmZZW9kYkI4uH72KKGH9oOf WF3Wsfn+KhM2s24AiYVO7g8IQhloke0LrNbt1dqPQSoR3odapf6eckwue2Y8R4z0ZlKR tq5CuI0xjpT/RSjjw2Byd77+2v2xqaPKyBR3DTQqbuHtpfo2vdnRtNVuTlKaq4VpLgFU GvSA== 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=eqJNvLa4sP7AAst+MlJmFxVhm55UcVmsZ6CdZ60mpUj8yIWbfBBQM+jH0kCyqu+MkG oh00mfnZbMjVmwqMplfAJbpzuljRl7LXrS3Q7rSqMK7jyyV2QntPEJeM4LvVOqLZs8bB 6CB/LjaM5mT/kUuEWK99GC8TnDrpjQID0ygUwX1G0KAzTGst7GsSk3oDjUHxVwAxcYq2 rrKVUqk+OJNPseZoL4+3ym14A4ddch/lRHzF8M+PMf1llE4cuWXksUK/g6PD7Q893Xez Re0i07CXNVNUsFInvcgKjG0NuDMpZ39z5nWvisvCdQeBcilklWFBlzASe82YPBbbyfop ybbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rbBb9SC7; 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 e36si5303191pgm.17.2019.07.11.22.30.47; Thu, 11 Jul 2019 22:30:47 -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=rbBb9SC7; 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 S1725899AbfGLFar (ORCPT + 13 others); Fri, 12 Jul 2019 01:30:47 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:34463 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725791AbfGLFar (ORCPT ); Fri, 12 Jul 2019 01:30:47 -0400 Received: by mail-pl1-f193.google.com with SMTP id i2so4216651plt.1 for ; Thu, 11 Jul 2019 22:30:46 -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=rbBb9SC7giz0oauYvdP9cYHAqoGTPD+ykkopvCPSbIgttQxtYQqn1F6B5rA5OjrbOf MOKCdYW04llywRPGqJfvEeh4VcYLl/+4Ru/hdae+vjnPM0Uuiuryp5dNor6Mx9/RykRk GcmAEq29koH5jLv1c1LQTyqkDgH46WVu30cCdcE2YJLHSXjx9FUwtVjqTRvKB5UqbxaK xQGQvV+NE6OdjeTjcJxJAv19LEEVjuHp3lKY/t6Dj3nFj6ARNGu/5tp09Z5HmUjEJY0f hyWya3YF02NzZU6T23Q4MHmEjDyyq45W8aEu2vmZIcEosQ2QD0Nl0IP2BkclGU/e/7hE OHFg== 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=XIfPQmCBWxj4CS7rXvIyMa6VjWKnVf/u059etTIub2yr0HS+H+USdyK6VE7WtImUjd VVrya3q1+rcVqAD7G/8shKNAOHVdOPzRw8alCPBfvGuw1wRdkxdDuJCJAu9wjo4S4ZRK 1t9d4adgK1iQTaIHeSyfugVlpG50l6QXmMLr0TE47W5bsuAf0amw/3zNoTfdEJRAixsE LvCUa2mjsadraZyTU+U0bAGdK+m6zAIeZkIzFS7JKv2Gl19r43dhWchjfy7sNcxQixtP K6i4xCb2CAIWbOj+G6we/l20AvNFP6uQVe4IBLM//eIDuuRoxHAX1P/XFdIRr69SuRYD BQtA== X-Gm-Message-State: APjAAAUwoa8dgXJCtRa5u6qys4skLOYM5tlb3ou6q4QxB8hJPC39VSiG rl2G4WEfsdVipa4Umlrl0pXwuXjihHM= X-Received: by 2002:a17:902:24c:: with SMTP id 70mr9134247plc.2.1562909446241; Thu, 11 Jul 2019 22:30:46 -0700 (PDT) Received: from localhost ([122.172.28.117]) by smtp.gmail.com with ESMTPSA id b3sm11909341pfp.65.2019.07.11.22.30.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 11 Jul 2019 22:30:45 -0700 (PDT) From: Viresh Kumar To: stable@vger.kernel.org, Julien Thierry Cc: Viresh Kumar , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Marc Zyngier , Mark Rutland , Will Deacon , Russell King , Vincent Guittot , mark.brown@arm.com Subject: [PATCH v4.4 V2 39/43] arm/arm64: smccc: Make function identifiers an unsigned quantity Date: Fri, 12 Jul 2019 10:58:27 +0530 Message-Id: <22d449cd63d5d718d3aec3e55b4805c03592b265.1562908075.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