From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 63C7EC4361B for ; Thu, 17 Dec 2020 18:39:27 +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 2327A238E8 for ; Thu, 17 Dec 2020 18:39:27 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2327A238E8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=z8JvF5bcQ5wisUlvJjEpi2QVwgGt43l924pcmvQTcRA=; b=wmFl07FTUrfS07XiSA51xZe8A gp1hmlwSM8n/U47vVTWwO/fj5cHsO3MbpnXRPtMfhtLFhpoR/vv7O578qt9rS+5DUHPUNlCnpT+Lh oDb2UUK9nVcjIjHcgnHS3ay2ZqXxpOdAziv8NkX7GF64yeLfoRGvsFEo4weeWCuQwqmHVebFA3dW4 AGFzqRDlz40o+c/VlhpbStVtUYR1TnhABA+YKUbGA1xdgOQIsUHKcoypzMXfhHvvASFIwKxMqKBt4 pB6Xhzgq81lMiVgXj+Z+i4IFZPaeNWE2qVTCg03dYSHTPkpFoEWa5RSJj6qIZraFEuaA5mOmocKHV YOSEsJiKw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kpyAN-0001YJ-Ja; Thu, 17 Dec 2020 18:38:19 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kpyAJ-0001Wj-KZ for linux-arm-kernel@lists.infradead.org; Thu, 17 Dec 2020 18:38:16 +0000 Date: Thu, 17 Dec 2020 18:38:11 +0000 From: Catalin Marinas To: Guenter Roeck Subject: Re: [PATCHv2 05/11] arm64: entry: prepare ret_to_user for function call Message-ID: <20201217183810.GD20278@gaia> References: <20201130115950.22492-1-mark.rutland@arm.com> <20201130115950.22492-6-mark.rutland@arm.com> <20201217175740.GA90220@roeck-us.net> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201217175740.GA90220@roeck-us.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201217_133815_780346_DE1470FA X-CRM114-Status: GOOD ( 17.33 ) 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: Mark Rutland , elver@google.com, paulmck@kernel.org, peterz@infradead.org, james.morse@arm.com, dvyukov@google.com, will@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Dec 17, 2020 at 09:57:40AM -0800, Guenter Roeck wrote: > Hi, > > On Mon, Nov 30, 2020 at 11:59:44AM +0000, Mark Rutland wrote: > > In a subsequent patch ret_to_user will need to make a C function call > > (in some configurations) which may clobber x0-x18 at the start of the > > finish_ret_to_user block, before enable_step_tsk consumes the flags > > loaded into x1. > > > > In preparation for this, let's load the flags into x19, which is > > preserved across C function calls. This avoids a redundant reload of the > > flags and ensures we operate on a consistent shapshot regardless. > > > > There should be no functional change as a result of this patch. At this > > point of the entry/exit paths we only need to preserve x28 (tsk) and the > > sp, and x19 is free for this use. > > > > Signed-off-by: Mark Rutland > > Cc: Catalin Marinas > > Cc: James Morse > > Cc: Will Deacon > > This patch results in: > > arch/arm64/kernel/entry.S: Assembler messages: > arch/arm64/kernel/entry.S:774: Error: immediate out of range at operand 3 -- `and x2,x19,#((1<<1)|(1<<0)|(1<<2)|(1<<3)|(1<<4)|(1<<5)|(1<<7))' > > This is with gcc 9.3.0 and binutils 2.34. Do I need a special compiler > and/or binutils version to make it compile ? It has been fixed in Linus' tree last night. It's a limitation of the instruction rather than toolchain. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel