From patchwork Thu Aug 20 10:34:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Scull X-Patchwork-Id: 11726041 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C61DC1575 for ; Thu, 20 Aug 2020 10:38:10 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9D6BA20738 for ; Thu, 20 Aug 2020 10:38:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Q1B9ZwUR"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="IgyZYEzu" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9D6BA20738 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:From:Subject:References:Mime-Version:Message-Id: In-Reply-To:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=ggxJAhfls8vU5skPmXfxIWVju3wcXhURkLQ7hwNtyEg=; b=Q1B9ZwURsXChKOSMZx0qvZlt9 CH5xx3llLc+bEObiR2BgoR5HvpXduQTkSUu+QI3evo7Ky0UsLjBRPNE2V7fEjpa9agTLbou+bKt2G uvNqPOtQqKAwgrGKV1gReX/LL2C4mY6V2Ri/g/hbF2Df65GTEbSaZkZ0oyDvpWaQiRQeQDpje6442 Ej5pkkwFwd5xQqCQcUzjjNAS9ZDaTZtt2eS4W/QAN5IiqUDAMGhNqH/XSrQx9sAxwwKIHz1YHsJ1y zRo0mKydhJBeEXRa6KaaG8ahn8W2MuyILnhdKXVGGfr+gzxcE75DrxE2xFu9Wj/bV/eAZ5qMrDnt7 Tek584UUw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8hxD-00037l-GZ; Thu, 20 Aug 2020 10:37:55 +0000 Received: from mail-qt1-x84a.google.com ([2607:f8b0:4864:20::84a]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8hvJ-00027w-ML for linux-arm-kernel@lists.infradead.org; Thu, 20 Aug 2020 10:36:00 +0000 Received: by mail-qt1-x84a.google.com with SMTP id e14so1233366qtm.5 for ; Thu, 20 Aug 2020 03:35:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:in-reply-to:message-id:mime-version:references:subject :from:to:cc; bh=De2u0bV2GogYbtm1LXjkVrsgQ3fRStNYWnnD7ykdEO8=; b=IgyZYEzu6m5N5E/s+L0cBVWU8T9z1/S+18rqxb3KcMHdRIy/T4HVCQnwl4fQYwAMLN TNpuALWS3HPzvd0VXr+noXvLjGQyGgGw9nTQSvqzLpvxCnpbtdBiJgxpaKnJtSun4Vy5 C6v/gWp8ZB9OSw1VmROMtpISLb59IQdtnuAKflAKmi50ZQQRpB8k3G4qsvXq/3JWWz/Q H/lteN5i7mMAxCk5bHcIcd8eMleGgWWfZvj8zRax2p1XkQMBmM1bnBGCC4xiiu0nMvoZ NwUcEblagPkGd9lSTRjXL47wXxuIfeAzW2BV2fy3BfQ+mgdXanBOtIOM7SuEYOJJlnYH lgwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=De2u0bV2GogYbtm1LXjkVrsgQ3fRStNYWnnD7ykdEO8=; b=dpecwk6dyPtNLHr1tzdThl7Fox33kTQ1nyCMjpuKlqmEPuqenujjb95FrhIFIX2yYx krinPDIBuoyGcJlcuj0CCq6s9cHkhphZUIG02p/Mmvtr8+zdLmuWMEsTJs35yYL2uG29 pWdWCbGimlR8Vi8Y5Z9rc0g65lOG+8ZuGuM6nJko0UVLfsBkt37bTuB2TN5irCME1lKN 9uWH1GIh4OA6VXIzcTX9vDaaWMQCegFJOwXa/colWNaYSHVyX4Nre/dUBvx+IvJZd0ZZ K9jrXCR4D+u8TX/3DReGRCEsLsQVmAr92QEmauvx3GNsySAWkZF6iX5f+g1HfTK5AmFi 6PmQ== X-Gm-Message-State: AOAM532JKvEMvEKuQTqblzcEI+7+So9a/3JD0E7iYMpEi+zz5KQk/i2F etMlJr1UDByKD9T6R4wG9RGyCT+QIRU= X-Google-Smtp-Source: ABdhPJw95GGCqhcbH4OcN4yC26A4qp01f24vi1RX/WBqJzH0ZmbWMifY5bHCqOD+Bnrya9RHbCkHZ+I4wF0= X-Received: from ascull.lon.corp.google.com ([2a00:79e0:d:109:4a0f:cfff:fe4a:6363]) (user=ascull job=sendgmr) by 2002:a0c:ea8e:: with SMTP id d14mr2229441qvp.37.1597919753110; Thu, 20 Aug 2020 03:35:53 -0700 (PDT) Date: Thu, 20 Aug 2020 11:34:41 +0100 In-Reply-To: <20200820103446.959000-1-ascull@google.com> Message-Id: <20200820103446.959000-16-ascull@google.com> Mime-Version: 1.0 References: <20200820103446.959000-1-ascull@google.com> X-Mailer: git-send-email 2.28.0.220.ged08abb693-goog Subject: [PATCH v2 15/20] smccc: Cast arguments to unsigned long From: Andrew Scull To: kvmarm@lists.cs.columbia.edu X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200820_063557_899127_D67FD4A7 X-CRM114-Status: GOOD ( 10.93 ) X-Spam-Score: -7.7 (-------) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-7.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:84a listed in] [list.dnswl.org] -7.5 USER_IN_DEF_DKIM_WL From: address is in the default DKIM white-list -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.0 DKIMWL_WL_MED DKIMwl.org - Medium sender X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, kernel-team@android.com, suzuki.poulose@arm.com, maz@kernel.org, Sudeep Holla , james.morse@arm.com, Andrew Scull , catalin.marinas@arm.com, will@kernel.org, julien.thierry.kdev@gmail.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org To avoid warning about implicit casting, make the casting explicit. This allows, for example, pointers to be used as arguments as are used in the KVM hyp interface. Cc: Sudeep Holla Signed-off-by: Andrew Scull --- include/linux/arm-smccc.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/arm-smccc.h b/include/linux/arm-smccc.h index 15c706fb0a37..3bb109a35554 100644 --- a/include/linux/arm-smccc.h +++ b/include/linux/arm-smccc.h @@ -260,7 +260,7 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1, typeof(a1) __a1 = a1; \ struct arm_smccc_res *___res = res; \ register unsigned long r0 asm("r0") = (u32)a0; \ - register unsigned long r1 asm("r1") = __a1; \ + register unsigned long r1 asm("r1") = (unsigned long)__a1; \ register unsigned long r2 asm("r2"); \ register unsigned long r3 asm("r3") @@ -269,8 +269,8 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1, typeof(a2) __a2 = a2; \ struct arm_smccc_res *___res = res; \ register unsigned long r0 asm("r0") = (u32)a0; \ - register unsigned long r1 asm("r1") = __a1; \ - register unsigned long r2 asm("r2") = __a2; \ + register unsigned long r1 asm("r1") = (unsigned long)__a1; \ + register unsigned long r2 asm("r2") = (unsigned long)__a2; \ register unsigned long r3 asm("r3") #define __declare_arg_3(a0, a1, a2, a3, res) \ @@ -279,29 +279,29 @@ asmlinkage void __arm_smccc_hvc(unsigned long a0, unsigned long a1, typeof(a3) __a3 = a3; \ struct arm_smccc_res *___res = res; \ register unsigned long r0 asm("r0") = (u32)a0; \ - register unsigned long r1 asm("r1") = __a1; \ - register unsigned long r2 asm("r2") = __a2; \ - register unsigned long r3 asm("r3") = __a3 + register unsigned long r1 asm("r1") = (unsigned long)__a1; \ + register unsigned long r2 asm("r2") = (unsigned long)__a2; \ + register unsigned long r3 asm("r3") = (unsigned long)__a3 #define __declare_arg_4(a0, a1, a2, a3, a4, res) \ typeof(a4) __a4 = a4; \ __declare_arg_3(a0, a1, a2, a3, res); \ - register unsigned long r4 asm("r4") = __a4 + register unsigned long r4 asm("r4") = (unsigned long)__a4 #define __declare_arg_5(a0, a1, a2, a3, a4, a5, res) \ typeof(a5) __a5 = a5; \ __declare_arg_4(a0, a1, a2, a3, a4, res); \ - register unsigned long r5 asm("r5") = __a5 + register unsigned long r5 asm("r5") = (unsigned long)__a5 #define __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res) \ typeof(a6) __a6 = a6; \ __declare_arg_5(a0, a1, a2, a3, a4, a5, res); \ - register unsigned long r6 asm("r6") = __a6 + register unsigned long r6 asm("r6") = (unsigned long)__a6 #define __declare_arg_7(a0, a1, a2, a3, a4, a5, a6, a7, res) \ typeof(a7) __a7 = a7; \ __declare_arg_6(a0, a1, a2, a3, a4, a5, a6, res); \ - register unsigned long r7 asm("r7") = __a7 + register unsigned long r7 asm("r7") = (unsigned long)__a7 #define ___declare_args(count, ...) __declare_arg_ ## count(__VA_ARGS__) #define __declare_args(count, ...) ___declare_args(count, __VA_ARGS__)