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=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 34AF2C3F2CD for ; Wed, 4 Mar 2020 09:36:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 E06BB2073D for ; Wed, 4 Mar 2020 09:36:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CGUz8rMN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E06BB2073D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=remlab.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=657YX2BzWsrFzySjwfoUnqYffHSGa2Aagilgcu3N7CM=; b=CGUz8rMNIgpPn1 R8ugckiefJ2sFwuGU5OdJ8IJeVsXIx+s4H0Rl17NkAZFpNzosvQ9K8GqTKKqau5d56cswBYcugBPl ciF239YXKPYiYJkn/l1m9Kw/YPuLUpG3u8cZz2xDQWm/fqhILTUBxb5tPsVs8JyI5Kyazeg3u59lM hFhSPgyQdSd/OUDNxCXVE2RYPFYTCyMqhwVbGd4qdiqAV3LDuSzfG1c5TggeeY4h4BwsVsQi+f9Ze 0uyLr/BZF0BayhjANL/MCU6uIJFyGhWSQeEawTQOY5jGrO216C5NNzssY8ic46KhsrxKDhZw+AFGS gWy/V4++zpgBbxd4lnnA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j9QSO-0007WM-CQ; Wed, 04 Mar 2020 09:36:48 +0000 Received: from poy.remlab.net ([2001:41d0:2:5a1a::] helo=ns207790.ip-94-23-215.eu) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j9QS8-0007GC-SA for linux-arm-kernel@lists.infradead.org; Wed, 04 Mar 2020 09:36:34 +0000 Received: from basile.remlab.net (ip6-localhost [IPv6:::1]) by ns207790.ip-94-23-215.eu (Postfix) with ESMTP id 273E25FD7F for ; Wed, 4 Mar 2020 10:36:32 +0100 (CET) From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/3] arm64: shrink the tramp_alias macro Date: Wed, 4 Mar 2020 11:36:30 +0200 Message-Id: <20200304093631.191200-2-remi@remlab.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200304_013633_076871_CF73B5E4 X-CRM114-Status: UNSURE ( 9.36 ) X-CRM114-Notice: Please train this message. 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Remi Denis-Courmont Aliases should be negative 48-bits values. They can be generated with 3 instructions: MOVN (lsl 32), MOVK (lsl 1) and MOVK. So far, the mov_q macro set bits 63-12, and a separate ADD instruction sets the low 12 bits. This patch takes the last MOVK out of the mov_q macro, and merges it with the ADD instruction. (This depends on the earlier mov_q patch.) Signed-off-by: Remi Denis-Courmont --- arch/arm64/kernel/entry.S | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm64/kernel/entry.S b/arch/arm64/kernel/entry.S index 20259e6a2fd7..ae99bf8bb0ae 100644 --- a/arch/arm64/kernel/entry.S +++ b/arch/arm64/kernel/entry.S @@ -120,8 +120,8 @@ alternative_else_nop_endif .endm .macro tramp_alias, dst, sym - mov_q \dst, TRAMP_VALIAS - add \dst, \dst, #(\sym - .entry.tramp.text) + mov_q \dst, (TRAMP_VALIAS | 0xffff) + movk \dst, #(TRAMP_VALIAS + \sym - .entry.tramp.text) & 0xffff .endm // This macro corrupts x0-x3. It is the caller's duty -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel