Received: by 10.223.185.116 with SMTP id b49csp7397980wrg; Thu, 1 Mar 2018 05:02:53 -0800 (PST) X-Google-Smtp-Source: AG47ELtvDIv3mm+iHznLp/P95VLjRPW2Jt6GUEEkFgmRD9OnbV/O7wh1NE/0Ciz6C8aAlHDf5+oo X-Received: by 10.99.66.65 with SMTP id p62mr1467348pga.378.1519909372971; Thu, 01 Mar 2018 05:02:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519909372; cv=none; d=google.com; s=arc-20160816; b=odhLLOkCy30bOrdRPG0zURH1+O1NSjycn1joabTIL2ap/DuUCAvdcCIXVi3cSxROPE pWoRY6Hpl12mkl9HLgF/aFj8oZtQYT1btL7ewpQHYhP4+o697sUoQx9Frfh+DKPJp+Hz HZqC3OTv1aoaPmNXfCxFgg+YDxISDBWCMMg40ZA5Dw8TCQ+g69HCUfwFgKv9ebMRFsmw sPDreKpGaVPBl7Biff6hbgHesfL6qEGxFP981bkurQkKjEcaEumHiNgYT7bo+S9uI1cx Mha5FPnrkWZgvL7zZkaz660+Qz2Pf7yr1QqJ1hBsA2eWJNBk6dkW9bYF82SobBGYAgbH z7vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=xjpJ8k7CKNbvTvoCWi2+8tjs1SrG8L5eeUCBFmDTG3o=; b=p9pnxKkEul6h9Z+XWV6aoTdKB79b1RZkrEAEA/xXzlVAYEwyC9k7c46mxyqX2JkKbj MEvFnKYiIjG2VLPG49Gm6tng+mLlPp43bl7PluabN4RQh+r7K0N22rSF34ZZrNYQ6b4A sXlQXhk8L/vbeuEFkiN9S3xDv2UhGoxo40XMdOEvZTDtqPToYm4FjFrcpnhIO3DOmdeH Yb5SKPhanFnxsX5lbpknmgScBer48R3RdA8iwZlZdR5Z8oe3Xkqcxxsu3WEpUjUtKPLm I+Zd46tWJwya7k2XGvOUPhwCEoawcPtSPMWBa49YTfuKLNBQKaAklQYDVPWxIQvvIksk 1yRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ULhcJObd; 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; 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 v65si2907358pfk.338.2018.03.01.05.02.15; Thu, 01 Mar 2018 05:02:52 -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=@linaro.org header.s=google header.b=ULhcJObd; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031162AbeCANBB (ORCPT + 99 others); Thu, 1 Mar 2018 08:01:01 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34805 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1031154AbeCANA6 (ORCPT ); Thu, 1 Mar 2018 08:00:58 -0500 Received: by mail-pf0-f195.google.com with SMTP id j20so2411125pfi.1 for ; Thu, 01 Mar 2018 05:00:58 -0800 (PST) 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; bh=xjpJ8k7CKNbvTvoCWi2+8tjs1SrG8L5eeUCBFmDTG3o=; b=ULhcJObd7hh6GHhVGPDcF1aqBB2fpD46RptqYqg6FZVnAxO64acvPhAp+B82sOpc9N W1brkOsZBelO139nXlzRrF5YP/oQAuK+c1zwqf8/PA/+1k0AuaTsk51RhO37DC+kdxEs 0jD5orIB1QIJ3OBDgSaqE1zcz686DGtNsBDgc= 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; bh=xjpJ8k7CKNbvTvoCWi2+8tjs1SrG8L5eeUCBFmDTG3o=; b=edZ13uWge3Vfzp9DQu/TBxqwhP+lQ1V90ElPFVr4lKEQlvxq9LOfcfmJpWFk00HAk1 HPqeMs4EdeKFKStYGuYForsnIJ8O5aCG1HgPQfYYXVEnxRezt3YUtmx35jFZ95OSOHR+ 4NIDW8XWxsCRcNSsNly9zidkBo+5SDrPHir6rriDwBa1xknQ/+NqxXkluMIIZE1V+4UA u+zFgv9I012S2oLN5nyqbB0eZYvpUTF1ImYjqcCDYu8IQ2Yx/egSVAmNh3pXUI8J8HGU n7oAEoMvZJQ0wfizoIXPtNKrntFWrCYcj1GS9MvnUXQqqL7BoD2TesvbgTImH7nSGXAi PHaw== X-Gm-Message-State: APf1xPCvfk58N7sbFooMyRZ3KZme+tzL+7e9faSR815A16N5J0///eCV 5V67kvGwGYGv4z9L9nvB5/02+Q== X-Received: by 10.101.92.66 with SMTP id v2mr1482378pgr.341.1519909256952; Thu, 01 Mar 2018 05:00:56 -0800 (PST) Received: from localhost.localdomain (176.122.172.82.16clouds.com. [176.122.172.82]) by smtp.gmail.com with ESMTPSA id x4sm2289655pfb.46.2018.03.01.05.00.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 01 Mar 2018 05:00:56 -0800 (PST) From: Alex Shi To: Marc Zyngier , Will Deacon , Ard Biesheuvel , Catalin Marinas , stable@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Alex Shi Subject: [PATCH 42/45] arm/arm64: smccc: Make function identifiers an unsigned quantity Date: Thu, 1 Mar 2018 20:54:19 +0800 Message-Id: <1519908862-11425-43-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519908862-11425-1-git-send-email-alex.shi@linaro.org> References: <1519908862-11425-1-git-send-email-alex.shi@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Marc Zyngier commit ded4c39e93f3 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: Will Deacon Signed-off-by: Alex Shi --- include/linux/arm-smccc.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index e1ef944..dd44d84 100644 --- 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 -- 2.7.4