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: 166779 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp1506493ilk; Thu, 13 Jun 2019 20:13:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqz6YkKT10iJPQERoEI6Bc9U+ZxeobF+u4V6synvHyddLvVCq9h0667jd4uoSIquRmqTH6gf X-Received: by 2002:a63:6c87:: with SMTP id h129mr34440753pgc.427.1560482024086; Thu, 13 Jun 2019 20:13:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560482024; cv=none; d=google.com; s=arc-20160816; b=mTttHI516IlHZhmzrs0J/i+0b7uDVhFsQzZozuCAITcN0xTrI9EksWS5gQI3f+emhH ceNRjP3Hd1ImmPy+csWlcnxdselu7YaUn5yeqew/ZZGK15i8hzlPqforx12vPmlaNCKg g5slHFCbhUGaydW1s+I1j8Xy5cwJuMtiBTZPFtkWNU09ndbMCBVlRUKj4zaYov8d/fjs X7tGgp60UC23hal8jVixVLzZIBa5TTBrqPiuZQDDyrCUMiaqsLbjlrJ4kezugTA4kh4V m/vVCz+HnmmtAZILPWY0s4wSqCTd09Z2qx7XphB89R4+oj2eM4SVkETVw5JcB9QB+Ctv ns9A== 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=IA5Fyg9oQqx8/YIbLDV1zdCZ45YtFL8khXN4yZkIxN8t8dz4NEXTne6J3vrDUwssIL wEwUcgBbumPi1pSvis49Gn8IJT+IlhrES2FMyOFCNkUmRn1nNeYFG58wmd7y8HOM5cDx 4tVLv50ytUa/7tsUWNE+BhPjJyqBYKvI+Knq/SnfCRApiAi3Hzcd2Pd0pwLNifaRkNtX eiHiN3ZKt1P7M6dJqKaCJ+3HPOKCQPQm/zO1Pmqk9PIplehHzOa1Nmd2b9kVOSwHZEkT wdI1V02gmJxMjlogaUCUqyo9akNNsK1y5rP493xXj217CjezlcJjWvOfFkoZoJu0xgRh 8U5A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dmFfqE3R; 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 e8si1073936plb.420.2019.06.13.20.13.43; Thu, 13 Jun 2019 20:13:44 -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=dmFfqE3R; 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 S1725819AbfFNDNn (ORCPT + 14 others); Thu, 13 Jun 2019 23:13:43 -0400 Received: from mail-pl1-f196.google.com ([209.85.214.196]:33573 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726705AbfFNDNn (ORCPT ); Thu, 13 Jun 2019 23:13:43 -0400 Received: by mail-pl1-f196.google.com with SMTP id c14so386651plo.0 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=o7rsh0Zd9Aa7VezmIRPj7we+oUn8cdqEOllpGy3w2ohotwQZCnuUtmG040rYUmDFnI HksHtr1oWIL2oBaT4XHq1OOPikq85kzVN2YHODPUQTO4X4RdmOogOvTkAutMjh+cBXaG r9IBp/mzj51WDPnoZYfM5q6q25syhMiDvI/WNaHt55JMukf2WV5J2UHDtPAMiMd9+GxG JUkp97GbKE1C/huP+7HnNiB8AbihXmLOL8STQ+YgMJ5T0uE1z8CqRaHJlSlGPkDAVxj1 Nesq568b9q/qVNT5CYHHXBsMnFtoj4LBAPsZIFv6guvCADzUNl5X9lcgW+vLcSOlmUjn JRtA== X-Gm-Message-State: APjAAAUR2NdIz9CXGYfBRytabAtQ4x8JvB/am5Ew3DdIfJbohkOUH+6q NxsVHACrxHQNuBxhF9NXCz6Zj1X80BM= 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 Cc: Viresh Kumar , stable@vger.kernel.org, Catalin Marinas , Marc Zyngier , Mark Rutland , Will Deacon , Russell King , Vincent Guittot , mark.brown@arm.com 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 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