Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp2649720imj; Mon, 11 Feb 2019 06:28:03 -0800 (PST) X-Google-Smtp-Source: AHgI3IZr+A3LGTKj+jMhPTQ5KKxCUl3UIZ6yJJ/PPViyoUjPPqqbKdWjyH4+hCGCQj5FGOG1pIbX X-Received: by 2002:a62:9f1a:: with SMTP id g26mr13844403pfe.123.1549895283092; Mon, 11 Feb 2019 06:28:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549895283; cv=none; d=google.com; s=arc-20160816; b=rTPKxVgT2uHXZDa+M0p/n4Ln+a81ibV5BLrnM76wXGDisPSulOYa4G4W2Fbf8ZeVRT wzypY+lYW0Pjn16cbGjkTWckmsY9u2OjqAHQVNx0FmKCF8xQnmt3S9heF1L0wEM6yhid FjGlKz3vi4ybdO3guvW8YrQp7j2UQLkxsbmIE1EBI2JeN738K9PrhcRMLaYwqNppFWNA xsILVXQ0gNvzEiI4IYjGJhu703gmupapPidmtpCr4DyDcpadYbQ6+4VrBSgqh8l6lpZG ikPUQxAkTN3uZJJvkQ2jk4DPv5SftWBo6YEIT0C3Jd1hY2FdhNJ7VMqOeViE7roiaqwH mLJg== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=wZlzn6E4DCvugAvaFHkuquGz5LZdl1cMfsZQ82bpxyU=; b=I0jLqwMRUSujUvZiJW8I73ih54DD0JjXQU2LxZ0s/PKCwR+hGa16j9Z1coD46lD3Pe EHoYTvKBmbrtCVg7bDssl45HCmE8CRb4AnfNij1d54r1GdHtBuCJ0cdjyuZ3db21y+Ri e0Q/LsJ6zK6y3N7E7ZFmXaurMCUi7eYqoCVrHSOXhm9eof0aioHIl04O8KE337A2GBVb RhcDl6N7V8wernWzMqHcxygty+AmCjDA6yEQOSD6yahKVRbPFdtxbW21/drR0DaDAVlk UJzA7GbYtxA1Onh70eba4qRmcgSkcfeF1w3oB9nM/qeCuWK+E155en0dKl6dN6OP5RHq 8fiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nuM39LtT; 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 s14si2671368plq.159.2019.02.11.06.27.47; Mon, 11 Feb 2019 06:28:03 -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=@kernel.org header.s=default header.b=nuM39LtT; 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 S1729316AbfBKOZD (ORCPT + 99 others); Mon, 11 Feb 2019 09:25:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:58332 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729306AbfBKOY7 (ORCPT ); Mon, 11 Feb 2019 09:24:59 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C3F94214DA; Mon, 11 Feb 2019 14:24:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1549895099; bh=Jk8H50YROFZSpleFUTHOxSdIKyuY4+ZZTMNVfSaxIDA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nuM39LtTuawoGH25/XO9uFXfh+NhmgWmcrimMqHll/m8+sXix8AhiwafY0ylmM9KQ 6jqky5dBzaysRAQSlmBKAoqaHxwCCIn5PSDCLN9In/oFi+et+gqBWZY5PBEAN+gXfr m/VLtLm3b7bEyw5UEiC4+J66u6r+tsYqNOj3qWrA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Desaulniers , Nathan Chancellor , Will Deacon , Sasha Levin Subject: [PATCH 4.20 092/352] arm64: io: Ensure value passed to __iormb() is held in a 64-bit register Date: Mon, 11 Feb 2019 15:15:19 +0100 Message-Id: <20190211141851.743766379@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190211141846.543045703@linuxfoundation.org> References: <20190211141846.543045703@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.20-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 1b57ec8c75279b873639eb44a215479236f93481 ] As of commit 6460d3201471 ("arm64: io: Ensure calls to delay routines are ordered against prior readX()"), MMIO reads smaller than 64 bits fail to compile under clang because we end up mixing 32-bit and 64-bit register operands for the same data processing instruction: ./include/asm-generic/io.h:695:9: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] return readb(addr); ^ ./arch/arm64/include/asm/io.h:147:58: note: expanded from macro 'readb' ^ ./include/asm-generic/io.h:695:9: note: use constraint modifier "w" ./arch/arm64/include/asm/io.h:147:50: note: expanded from macro 'readb' ^ ./arch/arm64/include/asm/io.h:118:24: note: expanded from macro '__iormb' asm volatile("eor %0, %1, %1\n" \ ^ Fix the build by casting the macro argument to 'unsigned long' when used as an input to the inline asm. Reported-by: Nick Desaulniers Reported-by: Nathan Chancellor Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/include/asm/io.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/include/asm/io.h b/arch/arm64/include/asm/io.h index d42d00d8d5b6..ee723835c1f4 100644 --- a/arch/arm64/include/asm/io.h +++ b/arch/arm64/include/asm/io.h @@ -117,7 +117,8 @@ static inline u64 __raw_readq(const volatile void __iomem *addr) */ \ asm volatile("eor %0, %1, %1\n" \ "cbnz %0, ." \ - : "=r" (tmp) : "r" (v) : "memory"); \ + : "=r" (tmp) : "r" ((unsigned long)(v)) \ + : "memory"); \ }) #define __iowmb() wmb() -- 2.19.1