Received: by 10.223.185.116 with SMTP id b49csp3493468wrg; Mon, 26 Feb 2018 00:31:20 -0800 (PST) X-Google-Smtp-Source: AH8x226K7qbP6PTIiQumnRySE2GBD5NAn5X+hzmmZ8bmGOdtv7THyfHv0T+KjL2C9byXtVqm53gS X-Received: by 2002:a17:902:694c:: with SMTP id k12-v6mr9720426plt.133.1519633880662; Mon, 26 Feb 2018 00:31:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519633880; cv=none; d=google.com; s=arc-20160816; b=eMgoOWKYfWC3ZwPavEKF/nubQ5TbhkhtFdXTKVKARrJVh2UPWhQL2GiLWfp8S/+hbS RjtzmZYbU1p1jEN7EDVlgrfFUdsjliDvd8yWXTGlykQbREBiZikLO5Yy8gQww9ieBjCl OnbdlJunKfYvwGmPnlqrcWmowDQiTTueYEWt+moASmC50yKelvKAKBqEToP+7LMtgXC3 wUs4mMj/F8t7BzxRLOIg1+ap1ZIu8nNqQFIi4bsBcCP0DoWWs81o3PbdGOAHmAt5lXon rFQinALi1SMf5zk0NphYqFDNdtnnl6FepIV+OpvmNjvb9XvVWwzJRjhxqJWN5hY8IeEL HZbg== 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:to:from:dkim-signature:arc-authentication-results; bh=xjpJ8k7CKNbvTvoCWi2+8tjs1SrG8L5eeUCBFmDTG3o=; b=WHK6GFqAJCJHrz29cOp/qdx9+bZNdA1eMyxK8EdMBbx53ergRZSqvlt0Rqhob2ZRs1 Zzlfdn+N/lymQdBtzyJx9qDrqNwLvRO2RKoA0wZBUnIPdcjPb3JsuzX7qtIj0nSgQRzv h4YEZog8QCsPkWanY142DgyTfAnMyC2wdBAKe3rhuBM5jIsPYRo1bqHBSTpEhzTRU9KO AKS0M07tyuHZ72RtYeFDyLZIjhBa9uB8FJJTEgTLZUSzNiRnUr/08Q8+godgRiX9dusb Xbh09vHqcO8omMtuGxn0zHsq9NySHDT5skcVKpDBD7v2sDpOEumFXi9NudpAeBEG8kR0 Bh8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eolpxWlB; 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 j88si5405475pfe.324.2018.02.26.00.31.06; Mon, 26 Feb 2018 00:31:20 -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=eolpxWlB; 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 S1752783AbeBZI0v (ORCPT + 99 others); Mon, 26 Feb 2018 03:26:51 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:36131 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752492AbeBZI0h (ORCPT ); Mon, 26 Feb 2018 03:26:37 -0500 Received: by mail-pl0-f68.google.com with SMTP id v3so8876818plg.3 for ; Mon, 26 Feb 2018 00:26:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=xjpJ8k7CKNbvTvoCWi2+8tjs1SrG8L5eeUCBFmDTG3o=; b=eolpxWlBa75t/zeVVNzb1Lw41VpQDpfw0BYbrrKAemh0rpgFigirHIYmN5kgW+gJ8p QN2zViHI9mYh5JJub6Z5mFGUi1rblwUNCvhYB624xbndCuL7iu72Ak/GfBr5iHlsYRz2 riuQ7V8VH4wH9/WzMjTZ+i7K5k4txubAZD6ro= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=xjpJ8k7CKNbvTvoCWi2+8tjs1SrG8L5eeUCBFmDTG3o=; b=GCwLWo5xqX66n+9rzbyOortunaTIk8VuE/j2nyAmbSqci8N89ACEtyZtEic58HeMHu 6TkZoAH1MTgfkISUCn7l7M7Di9JoDIKSWJYPZmIrm0hCTzbAqoV0o5Qf4yDpa9IniY2E 2BwbN3LoI/nqNVLweF6c+SZ0lxZjuUDgaqUVJdEygkcXvH9nMs3ufbRo3I2xFQrqh44p ABUz0qFhTys5NASXDZjynE3ON4h3JHLICnF4PnIZXiquZ9N2Wgb0TjW7ANJJlNlGwuxH YrKzHu2s7VTZHFxq2ixYnrkUmpyBkURipCcbBphiEd5PO4Z3BebG9JPnvD9Bcil6DTwZ P1Ng== X-Gm-Message-State: APf1xPB0975VraHqbpDihY7RfQYkmyxWGmoSZziGLBZfHK1HOQDVYYBs tvqFhE7JeiS9WXOZBaIAo7WI3w== X-Received: by 2002:a17:902:5e3:: with SMTP id f90-v6mr9951543plf.413.1519633595873; Mon, 26 Feb 2018 00:26:35 -0800 (PST) Received: from localhost.localdomain (176.122.172.82.16clouds.com. [176.122.172.82]) by smtp.gmail.com with ESMTPSA id o86sm1422706pfi.87.2018.02.26.00.26.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Feb 2018 00:26:35 -0800 (PST) From: Alex Shi To: Marc Zyngier , Will Deacon , Ard Biesheuvel , Catalin Marinas , stable@vger.kernel.org, linux-kernel@vger.kernel.org (open list) Subject: [PATCH 42/52] arm/arm64: smccc: Make function identifiers an unsigned quantity Date: Mon, 26 Feb 2018 16:20:16 +0800 Message-Id: <1519633227-29832-43-git-send-email-alex.shi@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519633227-29832-1-git-send-email-alex.shi@linaro.org> References: <1519633227-29832-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