Received: by 10.223.176.5 with SMTP id f5csp2640974wra; Thu, 1 Feb 2018 03:49:30 -0800 (PST) X-Google-Smtp-Source: AH8x227HEZvF6XTXO35oIYUVBs1+Ngkx+9YXXpUai4Zr8TtLlpof695VGrzzeJONUzcqMYNDteIM X-Received: by 2002:a17:902:47c2:: with SMTP id d2-v6mr29716223plh.222.1517485769999; Thu, 01 Feb 2018 03:49:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517485769; cv=none; d=google.com; s=arc-20160816; b=IiVHjjHPv8LU+H2cmazrSXfDrCn4P3Y2qg5KyenVEFg5KODC7XAmhpkoKQeY8hlxY3 3I6CzoxYiXjQYO0+hggxPAqhyw+BwnEQjPXuGqpXptbOWa9FH/xR+Gt8aQMUZdETjMZI hoWcMaq7DqMcIWwN/YnBzhOGdIlVxnJg3BmSODip56x2u5x1oLwFBrS1E9TA1bpxvf7u 2nwvuZ/A2/hHSvl459LDKi6Z8ftXxh7V8hxED+5SJqkmrb1teW9ij1LqnQZ3ubhRbOTC SJB8+XJVZEKmRmdglzG2FkBwxbi9gMyXMbZsXdtpC0Oo4lRwtsYqZY/p3IRjM667JDrH 99Zg== 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:arc-authentication-results; bh=HTzQjfZ8qJ2vUxRNfWApyedTkH6vKuCJYaBQokfwzys=; b=qTLux8e1+T/Gr71vs3F54ZxzIuNHY8wkPAf7EmMJpkWmtlhSsLof52wvg3AZ9BJEUa 1z8IoKpCCiRrM51ivC/hd1OHhAgkvwXqnKmnOEQVQwsRQWXR1vWVQXhxKmjc3D9OyFwZ psT0oGCSeGF7dNCmNdjdoRRF6v1UPbpmt7PJ8PGIh+A1QN/HruiU3mgEdYG0Rgw7AMNK HN0gCF7O3dUFBDkwvY/eYzO9tu7uR6VeNWJIGlN5mj8x7kUoxsk5VmXZDencBL72Wen8 JOFAhVbUEWAEj4YgOwWuHldrq/sfWodwzwdApYgo66ObpLFvMaG661hw69PsaBou1mMZ onSg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10si1493073pgv.34.2018.02.01.03.49.15; Thu, 01 Feb 2018 03:49:29 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752568AbeBALs0 (ORCPT + 99 others); Thu, 1 Feb 2018 06:48:26 -0500 Received: from foss.arm.com ([217.140.101.70]:48586 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752531AbeBALsW (ORCPT ); Thu, 1 Feb 2018 06:48:22 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 6F81F164F; Thu, 1 Feb 2018 03:48:22 -0800 (PST) Received: from approximate.cambridge.arm.com (approximate.cambridge.arm.com [10.1.207.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id A61873F25C; Thu, 1 Feb 2018 03:48:19 -0800 (PST) From: Marc Zyngier To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Cc: Catalin Marinas , Will Deacon , Peter Maydell , Christoffer Dall , Lorenzo Pieralisi , Mark Rutland , Robin Murphy , Ard Biesheuvel , Andrew Jones , Hanjun Guo , Jayachandran C , Jon Masters , Russell King - ARM Linux Subject: [PATCH v3 15/18] arm/arm64: smccc: Make function identifiers an unsigned quantity Date: Thu, 1 Feb 2018 11:46:54 +0000 Message-Id: <20180201114657.7323-16-marc.zyngier@arm.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180201114657.7323-1-marc.zyngier@arm.com> References: <20180201114657.7323-1-marc.zyngier@arm.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Tested-by: Ard Biesheuvel Signed-off-by: Marc Zyngier --- 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 e1ef944ef1da..dd44d8458c04 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.14.2