From patchwork Thu Aug 1 08:15:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 170321 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp5085394ile; Thu, 1 Aug 2019 01:19:55 -0700 (PDT) X-Google-Smtp-Source: APXvYqwot+gcJ2kcNokAOiSb9OIMUP7Z3lErV/42Nqp7h0HxDKzffzzLn1CmkWnyRcHC5NS0R2d0 X-Received: by 2002:a17:902:4683:: with SMTP id p3mr114989028pld.31.1564647595704; Thu, 01 Aug 2019 01:19:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564647595; cv=none; d=google.com; s=arc-20160816; b=wSnwgldiEj0dIrNe9k4Lbp0pIQLcDVt909BHw4UqNTm191bSejt4z3qWpAk7Pwjm2M 4Oy+BP3MV4UcvtYVqcHfAt/87W1j9yUQMsLCsVVEqsksXpaFU539yY8yp+HsdkRPNHOE IDSMyUzpoYFkZ437bdhvzFfmTPyt4ijiKbC2EJtRHPCz+rIFfYr9RQUGlchdtJh684sd XSDt25BNWQSRqPC7qTR7c8mCaaFlYaxxRHiqpDIdZwRN/U1G2YA43ytkQ+llkKaEV+if 1+Z3R5B/P74qenAHtHXpjHBf7dPG5xroa1gjnNwB3yNJrO4MsvLcHv0Nlui45Orf6TrO 6ukQ== 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=ghCtiYyiWodshuX+OHD7ryl0p1GqrS4nD8xJSPA4CNFBDPRwYvSMicmd1Hcr4SWjV2 U4RZaxARkWYf1Whn++Q4sQdSOglxcIUmPq8BO0feVizy4EMm/aXhB49aIL85/Jds56Gc jBAKHeAcnLd5OCjoE6+kh1HbQyPqavbPuMo77dleplpzjPpO5p+jWN2SyIziP8iA7/dU A7itVMhvkc2NLy9WYkzTN6HUosiT/WWMJ8wDXeLTcpFJRc1bNvofgZIGjNBz/ZVNEPfz Myui05b47gD+ks9mhNic20ajNtA4WB4b3OYGbZW/3VAblCklp9SBZTw0ulx9TNnh7+im zw4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VbI6KvBY; 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 ch18si32232418plb.76.2019.08.01.01.19.55; Thu, 01 Aug 2019 01:19:55 -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=VbI6KvBY; 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 S1731025AbfHAITz (ORCPT + 14 others); Thu, 1 Aug 2019 04:19:55 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44250 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730381AbfHAITy (ORCPT ); Thu, 1 Aug 2019 04:19:54 -0400 Received: by mail-pg1-f194.google.com with SMTP id i18so33733652pgl.11 for ; Thu, 01 Aug 2019 01:19:54 -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=VbI6KvBYoAleWdpoNuid44aSrwYNmD6XVjYIU7cCDTWY4VDquc62cFzYoqAjoNU4c6 nZdCxO4QKpSqcfDfWapRYMgqaUzdTVFD6QEiTM4dIJb0ZM1ABvlyVKKWWtNPpds1G3lU 4p92/NPa79XeTp/RqJA3evytYoQgQIeWoUDGGWbUFJL5yJfeteKwslbEPL6XJ81zlmu4 mqBei4tEDuRtTA5ILbqgU4DBk8LIhWRf6SJUr11/UyQJ9nEkk3ZEB73W/A5g/oRFW5pC orshzn6ourcm7mrF/MHU430GQUWbheLftyEwlurTTVsAnK2IQGUQJyEuSSSvo2QsVTeB QOfw== 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=nRKlgGq4L31I9rhd/vrkT2LlzTw2kXxGFbVvj8XzqhJegVLZhhyapkJQLeAiyEfIlh nfqeIsphRrwq3ms8F6ScTaKAVKi4kdo+ZYvvVAQ2E4pzpFX+xxA1Plvv4ZLpd2Fu8ZKB smX9onBd6CZuDrqGS9fDTm3o1/Bym/xGzwoIXT4QlEu8Ttid7KJLxrNjBsLTTAtkJprd FLXnsaOlsn6duQYxsbM58SluvIHX71+Bfsh7S7Y4MsGs05awqnkiDTUnl/OWzts39Cre lpFWRjfTqcigzdXKTNc5I1nBJe06FYPbz9z8KlAZTl5OduWgDyhlI+4hfHlc+nd9Glr4 Rnqw== X-Gm-Message-State: APjAAAXwX+uCEvpmCATqkqH0USyX9ZHzO2GKqSLqQ4SPwBbuKhMgjHQJ pDRqAMu6SprkFd6crg/3x7OWyujiPt0= X-Received: by 2002:a63:5162:: with SMTP id r34mr686278pgl.229.1564647593609; Thu, 01 Aug 2019 01:19:53 -0700 (PDT) Received: from localhost ([122.172.28.117]) by smtp.gmail.com with ESMTPSA id u24sm10002220pgk.31.2019.08.01.01.19.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Aug 2019 01:19:53 -0700 (PDT) From: Viresh Kumar To: stable@vger.kernel.org Cc: Viresh Kumar , Julien Thierry , linux-arm-kernel@lists.infradead.org, Catalin Marinas , Marc Zyngier , Mark Rutland , Will Deacon , Russell King , Vincent Guittot , mark.brown@arm.com, guohanjun@huawei.com Subject: [PATCH ARM32 v4.4 V2 07/47] arm/arm64: smccc: Make function identifiers an unsigned quantity Date: Thu, 1 Aug 2019 13:45:51 +0530 Message-Id: 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