From patchwork Mon Sep 30 18:44:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 174772 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7509145ill; Mon, 30 Sep 2019 11:46:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqypM2q7rZ5vLA9SVhAlWHQK9pFg4JhtNqYuODE+PvZv1HtDm6JHhAHpr21ZnlzTleLPUlZi X-Received: by 2002:a5e:8902:: with SMTP id k2mr21440023ioj.49.1569869199865; Mon, 30 Sep 2019 11:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569869199; cv=none; d=google.com; s=arc-20160816; b=b71jYCcY2JHxi6qmJoZ55VcFDjr0P6z81TdgWW+UwVgoVcFiVyszt5EbOXWJMFuG5+ rDu0TMXxV+2DjnDt5p2+fN0A2YUMRRQn32QwXNkgSq2p3kbyRU5RSMDbPqxEr6fRBE3g hRetB6YnSLJl/XWkhc9kAaVyYAWgH16t98ui9iEzxhJ/bhlAO+39iL5KEOU7T4b4KwxL kJT27gq1DhQ1eIH0JilNijus9Ma6zvljYUqok0FrGh/KFYE3Ic/WyQGf/cwBFXDW7DpH QHnPdSCd6gP5oN3w04xof7qAwnhl5AiJXRuUrzxrXeQpn4z1LOgA15039Wkh4UHQERrV K7dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-unsubscribe:list-id :precedence:subject:message-id:date:to:from; bh=bLwU3ZAAEev4ZrKRbwZb7wBirDFwcWryWS3PGqZX5Bk=; b=cnw0chSpZ7BB4LAksOi2xGK3D/B7UyF2fOyeqmhdvVKM3xLQ16YgmdttXZGVWenUTj nt7MMNN9ZHwTGfWLPXOcJh3ikhEKuSuRvWEc4Dqi6H8FQOFq/Z9o8yhT5ews36NaUMgV qRTUFWOyTja0O9g2vMvIqIHwCrI5wlxzrjeltaedx7m8ZODGh8QUYNUiNYeysQNHzcYF QDDRxM5pUy+XZJSxryc8h+EkOYloYd4z8Ug5qCUL6b0T8ZqgPQ/AWdQ5+dhL8r85Nh89 vomQ6PPZDsWu3U9JGyK32t0V7SELJFK2ozPWsR6fyVsJ0EFv8Fp640G8lLZuEBO2+rx4 e5ow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org. [192.237.175.120]) by mx.google.com with ESMTPS id a14si17063723ioc.19.2019.09.30.11.46.39 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Sep 2019 11:46:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of xen-devel-bounces@lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iF0ew-0002Qa-Vi; Mon, 30 Sep 2019 18:44:34 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iF0ev-0002QV-Ke for xen-devel@lists.xenproject.org; Mon, 30 Sep 2019 18:44:33 +0000 X-Inumbo-ID: 568c7f6c-e3b2-11e9-97fb-bc764e2007e4 Received: from foss.arm.com (unknown [217.140.110.172]) by localhost (Halon) with ESMTP id 568c7f6c-e3b2-11e9-97fb-bc764e2007e4; Mon, 30 Sep 2019 18:44:30 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 733971597; Mon, 30 Sep 2019 11:44:30 -0700 (PDT) Received: from e108454-lin.cambridge.arm.com (e108454-lin.cambridge.arm.com [10.1.196.50]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6B7EF3F534; Mon, 30 Sep 2019 11:44:29 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 30 Sep 2019 19:44:25 +0100 Message-Id: <20190930184425.13756-1-julien.grall@arm.com> X-Mailer: git-send-email 2.11.0 Subject: [Xen-devel] [PATCH for-4.13] xen/arm32: head: Fix build when using GAS 2.25.0 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: jgross@suse.com, Stefano Stabellini , Julien Grall , Andrew Cooper , Julien Grall , Volodymyr Babchuk MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" GAS 2.25.0 throws multiple errors when building arm32/head.S: arm32/head.S: Assembler messages: arm32/head.S:452: Error: invalid constant (f7f) after fixup arm32/head.S:453: Error: invalid constant (f7f) after fixup arm32/head.S:495: Error: invalid constant (f7f) after fixup arm32/head.S:510: Error: invalid constant (f7f) after fixup arm32/head.S:514: Error: invalid constant (f7f) after fixup arm32/head.S:516: Error: invalid constant (f7f) after fixup arm32/head.S:633: Error: invalid constant (f7f) after fixup This makes sense because the instruction mov is only able to deal with a specific set of immediate (see "modified immediate constants in ARM instructions"). For any 16-bit immediate, the instruction movw should be used. It looks like newer version of GAS will seemly switch to movw if the immediate does not fit in the immediate encoding for mov. But we should not rely on this. So switch to movw. Fixes: 23dfe48d10 ("xen/arm32: head: Introduce macros to create table and mapping entry") Reported-by: Andrew Cooper Signed-off-by: Julien Grall Reviewed-by: Stefano Stabellini --- xen/arch/arm/arm32/head.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S index 2fc312f9e0..e9d356f05c 100644 --- a/xen/arch/arm/arm32/head.S +++ b/xen/arch/arm/arm32/head.S @@ -383,7 +383,7 @@ ENDPROC(cpu_init) ldr r4, =\tbl add r4, r4, r10 /* r4 := paddr(\tlb) */ - mov r2, #PT_PT /* r2:r3 := right for linear PT */ + movw r2, #PT_PT /* r2:r3 := right for linear PT */ orr r2, r2, r4 /* + \tlb paddr */ mov r3, #0 @@ -419,7 +419,7 @@ ENDPROC(cpu_init) lsr r4, \phys, #THIRD_SHIFT lsl r4, r4, #THIRD_SHIFT /* r4 := PAGE_ALIGNED(phys) */ - mov r2, #\type /* r2:r3 := right for section PT */ + movw r2, #\type /* r2:r3 := right for section PT */ orr r2, r2, r4 /* + PAGE_ALIGNED(phys) */ mov r3, #0